diff options
author | Bin Meng <bin.meng@windriver.com> | 2020-06-26 04:26:04 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-06-29 06:47:58 +0300 |
commit | ec3e5b14d52a26531f1a315e5cced326a8323ca9 (patch) | |
tree | fc48e8cc0ab3ff00a99d2fd62c48dc3738188a16 | |
parent | 78afe11ba2e7585d48ac4e3c38b71906c83cbe6c (diff) | |
download | opensbi-ec3e5b14d52a26531f1a315e5cced326a8323ca9.tar.xz |
docs/platform: sifive_fu540: Update U-Boot instructions
U-Boot v2020.07 release adds SPL support to SiFive HiFive Unleashed.
Update the doc to mention that detailed build instructions are in the
U-Boot doc.
This also adds detailed command line description to show how to boot
U-Boot v2020.07 S-mode payload in the QEMU chapter.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
-rw-r--r-- | docs/platform/sifive_fu540.md | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/docs/platform/sifive_fu540.md b/docs/platform/sifive_fu540.md index 9342846..1008432 100644 --- a/docs/platform/sifive_fu540.md +++ b/docs/platform/sifive_fu540.md @@ -41,13 +41,14 @@ make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/bo **U-Boot Payload** The command-line example here assumes that U-Boot was compiled using the -sifive_fu540_defconfig configuration and with U-Boot v2020.01 (or higher). - -The detailed U-Boot booting guide is avaialble at [U-Boot]. +sifive_fu540_defconfig configuration and with U-Boot v2020.01, and up to +v2020.07-rc3. ``` make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<u-boot_build_dir>/u-boot-dtb.bin ``` +For U-Boot v2020.07-rc4 or later releases, SPL support was added in U-Boot. +Please refer to the detailed U-Boot booting guide available at [U-Boot]. Flashing the OpenSBI firmware binary to storage media: ------------------------------------------------------ @@ -155,13 +156,37 @@ Linux kernel. When U-Boot v2020.01 (or higher) is used as the payload, as the SiFive FU540 DTB for the real hardware is embedded in U-Boot binary itself, due to the same reason above, we need to switch the U-Boot sifive_fu540_defconfig configuration -from CONFIG_OF_SEPARATE to CONFIG_OF_PRIOR_STAGE so that U-Boot uses the DTB -generated by QEMU, and u-boot.bin should be used as the payload image, like: +from **CONFIG_OF_SEPARATE** to **CONFIG_OF_PRIOR_STAGE** so that U-Boot uses the +DTB generated by QEMU, and u-boot.bin should be used as the payload image, like: ``` make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<u-boot_build_dir>/u-boot.bin ``` +U-Boot v2020.07 release added SPL support to SiFive HiFive Unleashed board, +hence a build error will be seen after you switch to **CONFIG_OF_PRIOR_STAGE**. + +``` +./tools/mkimage: Can't open arch/riscv/dts/hifive-unleashed-a00.dtb: No such file or directory +./tools/mkimage: failed to build FIT +Makefile:1402: recipe for target 'u-boot.img' failed +make: *** [u-boot.img] Error 1 +``` + +The above errors can be safely ignored as we don't run U-Boot SPL under QEMU. + +Run: +``` +qemu-system-riscv64 -M sifive_u -m 256M -nographic \ + -bios build/platform/sifive/fu540/firmware/fw_payload.bin +``` +or +``` +qemu-system-riscv64 -M sifive_u -m 256M -nographic \ + -bios build/platform/sifive/fu540/firmware/fw_jump.bin \ + -kernel <uboot_build_dir>/u-boot.bin +``` + While the real hardware operates at the 64-bit mode, it's possible for QEMU to test the 32-bit OpenSBI firmware. This can be helpful for testing 32-bit SiFive specific drivers. |