Skip to content

A lightweight toolkit that builds ready-to-flash image for Milk-V Duo-256M, enabling custom OS development from scratch.

License

Notifications You must be signed in to change notification settings

rota1001/milkv-baremetal-toolkit

Repository files navigation

milkv baremetal toolkit

This is a lightweight toolkit that builds ready-to-flash .img images for Milk-V duo 256M, enabling custom OS development from scratch.

I created this respository for the reason that I think the existing tutorials are not very newbie-friendly to me. This toolkit will tell you how to get all the toolchain you need and build the image in one click.

Dependency

You should install the cross compile toolchain.

sudo apt update
sudo apt install gcc-riscv64-unknown-elf libconfuse-dev mtools

Usage

Notice: For the convenience reason, I use some pre-build binaries. However, if you don't want to use the pre-build binaries for security reason, I have made a full tutorial of how to build these binaries from source.

First, clone the repository.

git clone --recurse-submodules https://github.com/rota1001/milkv-baremetal-toolkit.git

Second, use make to compile and produce the kernel image.

cd milkv-baremetal-toolkit
make

Then you will get the kernel.img, you can flash it to the SD card. It will output the helloworld through the UART serial port.

Run your own OS

Notice that the example/ directory consists of a minimal OS example, you can read the Makefile to understand how it works.

Previous Work

Use Opensbi to boot your own operating system

License and Third-Party Software

This project is licensed under GPLv2 and includes the following third-party software:

  1. genimage

  2. OpenSBI

  3. fiptool

    • License: Please refer to the fiptool/LICENSE for the details

All third-party software is used according to their respective licenses.

For full license details, please refer to pre-build-binary/COPYING (GPLv2), pre-build-binary/COPYING.BSD (BSD-2-Clause) and those licenses under the genimage, fiptool directories.

About

A lightweight toolkit that builds ready-to-flash image for Milk-V Duo-256M, enabling custom OS development from scratch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published