[PATCH 3/3] docs/platform: sifive_fu540: Update U-Boot instructions
Atish Patra
atishp at atishpatra.org
Thu Jun 25 13:34:09 EDT 2020
On Wed, Jun 24, 2020 at 11:48 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> From: Bin Meng <bin.meng at windriver.com>
>
> 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 at windriver.com>
> ---
>
> docs/platform/sifive_fu540.md | 35 ++++++++++++++++++++++++++++++-----
> 1 file changed, 30 insertions(+), 5 deletions(-)
>
> diff --git a/docs/platform/sifive_fu540.md b/docs/platform/sifive_fu540.md
> index 9342846..31bdf09 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 avaialble at [U-Boot].
>
nits:
avaialble/available
> 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.
> --
> 2.7.4
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
Apart from the nits, Looks good.
Reviewed-by: Atish Patra <atish.patra at wdc.com>
--
Regards,
Atish
More information about the opensbi
mailing list