This is a Python-based firmware image package (FIP) generator specifically designed for the Milk-V series board.
- Build U-Boot
Take Milk-V Duo as example:
cd <Your U-Boot Path>
make milkv_duo_defconfig
make
After compilation, the u-boot.bin and u-boot.dtb file will be generated.
- Build OpenSBI
cd <Your OpenSBI Path>
make PLATFORM=generic FW_FDT_PATH=<Your U-Boot Path>/u-boot.dtb
After compilation, the fw_dynamic.bin file will be generated.
- (Optional) Build RTOS
Choose any RTOS, and after compilation, a bin file will be generated.
- Pack fip.bin
For Milk-V Duo with CV1800B SoC, use cv180x.bin under fsbl folder as its firt stage bootloader, and for Milk-V Duo256M with SG2002 SoC, use cv181x.bin instead.
./fiptool \
--fsbl data/fsbl/cv180x.bin \
--ddr_param data/ddr_param.bin \
--opensbi <Your OpenSBI Path>/fw_dynamic.bin \
--uboot <Your U-Boot Path>/u-boot.bin \
--rtos <Any RTOS.bin>
or
Build fip.bin using Makefile, select according to board's memory size.
make BOARD=64M (or 256M)
- Place the generated fip.bin file into the FAT partition of the SD card.
- Insert the SD card into the board and power it on.