-
Notifications
You must be signed in to change notification settings - Fork 0
Sifive HiFive Unmatched
CPU: SiFive Freedom U740 (FU740), RV64IMAC
Mem: 16GB DDR4
Boot Option: SPI Flash, MicroSD Card (Can't boot directly from NVMe drive)
Datasheet & Errata: https://www.sifive.com/boards/hifive-unmatched
sudo apt install mmdebstrap debian-ports-archive-keyring
U-boot files are from meta-sifive (https://github.com/sifive/meta-sifive/tree/master), Mainline U-boot with meta-sifive patches should be same.
Patches: https://github.com/sifive/meta-sifive/tree/master/recipes-bsp/u-boot/files/riscv64
TODO: Devicetree file? (package: linux-modules-xxx)
TODO
For only sdcard: TODO (dd)
For sdcard + nvme disk: TODO (dd + mkimage-nvme.sh)
sudo mkimage-uboot.sh -d [sdcard device (/dev/sdx)]
This will make a sdcard only contains opensbi and u-boot, suitable for boot form nvme case.
the other/mkimage-uboot.sh
will help to build a image only contain SPL and u-boot, so you can flash it to onboard SPI flash.
sudo mkimage-uboot.sh -o [image_file_name]
(copy output image file to unmatched)
sudo modprobe mtdblock # Load the MTD block driver
sudo dd if=[image_file_name] of=/dev/mtdblock0 status=progress # flash image to MTD device (SPI Flash)
After this step, set the "BOOT MODE SEL" switches to "0110" and boot.
FreeBSD wiki has a more detailed instruction, see https://wiki.freebsd.org/riscv/HiFiveUnmatched
Rootfs: ext4, must have legacy_boot
flag set for extlinux boot
EFI: vfat, must have boot,esp
flag set for grub boot
TODO (a hardware setup guide needed?)
Boot from sdcard (SPI0): 1101
Boot from onboard flash (QSPI0): 0110
On hifive-unmatched-schematics-v3.pdf, SD Card is connected to SPI0, but on fu740-c000-manual-v1p6.pdf, there is a table 19 where mentioned "QSPI2 SD Card", and it matched boot from sd card case. need more research?