[PATCH 2/3] docs: platform: Describe sifive_fu540 as supported generic platform

Anup Patel Anup.Patel at wdc.com
Thu May 6 10:09:17 BST 2021



> -----Original Message-----
> From: Anup Patel
> Sent: 04 May 2021 09:11
> To: Bin Meng <bmeng.cn at gmail.com>; opensbi at lists.infradead.org
> Subject: RE: [PATCH 2/3] docs: platform: Describe sifive_fu540 as supported
> generic platform
> 
> 
> 
> > -----Original Message-----
> > From: Bin Meng <bmeng.cn at gmail.com>
> > Sent: 29 April 2021 15:46
> > To: Anup Patel <Anup.Patel at wdc.com>; opensbi at lists.infradead.org
> > Subject: [PATCH 2/3] docs: platform: Describe sifive_fu540 as
> > supported generic platform
> >
> > The upstream U-Boot/QEMU have been using generic platform for SiFive
> > HiFive Unleashed board for some time. Let's document sifive_fu540 as
> > one of the supported targets for "generic" platform.
> >
> > Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> 
> Thanks for updating this.
> 
> Looks good to me.
> 
> Reviewed-by: Anup Patel <anup.patel at wdc.com>
> 

Applied this patch to the riscv/opensbi repo

Regards,
Anup

> Regards,
> Anup
> 
> > ---
> >
> >  docs/platform/generic.md      |  2 ++
> >  docs/platform/sifive_fu540.md | 16 ++++++++--------
> >  2 files changed, 10 insertions(+), 8 deletions(-)
> >
> > diff --git a/docs/platform/generic.md b/docs/platform/generic.md index
> > e0bf8fe..73a8afa 100644
> > --- a/docs/platform/generic.md
> > +++ b/docs/platform/generic.md
> > @@ -47,10 +47,12 @@ RISC-V Platforms Using Generic Platform
> >
> >  * **QEMU RISC-V Virt Machine** (*[qemu_virt.md]*)
> >  * **Shakti C-class SoC Platform** (*[shakti_cclass.md]*)
> > +* **SiFive HiFive Unleashed** (*[sifive_fu540.md]*)
> >  * **Spike** (*[spike.md]*)
> >  * **T-HEAD C9xx series Processors** (*[thead-c9xx.md]*)
> >
> >  [qemu_virt.md]: qemu_virt.md
> >  [shakti_cclass.md]: shakti_cclass.md
> > +[sifive_fu540.md]: sifive_fu540.md
> >  [spike.md]: spike.md
> >  [thead-c9xx.md]: thead-c9xx.md
> > diff --git a/docs/platform/sifive_fu540.md
> > b/docs/platform/sifive_fu540.md index b38df47..5cbca21 100644
> > --- a/docs/platform/sifive_fu540.md
> > +++ b/docs/platform/sifive_fu540.md
> > @@ -8,7 +8,7 @@ With QEMU v4.2 or above release, the 'sifive_u'
> > machine can be used to test  OpenSBI image built for the real hardware as
> well.
> >
> >  To build platform specific library and firmwares, provide the
> > -*PLATFORM=sifive/fu540* parameter to the top level `make` command.
> > +*PLATFORM=generic* parameter to the top level `make` command.
> >
> >  Platform Options
> >  ----------------
> > @@ -32,10 +32,10 @@ To use Linux v5.2 (or higher), the pre-built DTB
> > (DT
> > binary) from Linux v5.2  the compile time option *FW_FDT_PATH*.
> >
> >  ```
> > -make PLATFORM=sifive/fu540
> > FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
> > +make PLATFORM=generic
> > +FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
> >  or
> >  (For Linux v5.2 or higher)
> > -make PLATFORM=sifive/fu540
> > FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
> > FW_FDT_PATH=<hifive-unleashed-a00.dtb path from Linux kernel>
> > +make PLATFORM=generic
> > +FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
> > +FW_FDT_PATH=<hifive-unleashed-a00.dtb path from Linux kernel>
> >  ```
> >
> >  **U-Boot Payload**
> > @@ -45,7 +45,7 @@ sifive_fu540_defconfig configuration and with U-Boot
> > v2020.01, and up to  v2021.04. sifive_unleashed_defconfig shall be
> > used with
> > v2021.07 or above.
> >
> >  ```
> > -make PLATFORM=sifive/fu540 FW_PAYLOAD_PATH=<u-
> boot_build_dir>/u-
> > boot-dtb.bin
> > +make PLATFORM=generic 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].
> > @@ -64,7 +64,7 @@ That's why the generated firmware binary in above
> > steps should be copied to  the partition of the sdcard with above GUID.
> >
> >  ```
> > -dd if=build/platform/sifive/fu540/firmware/fw_payload.bin
> > of=/dev/disk2s1 bs=1024
> > +dd if=build/platform/generic/firmware/fw_payload.bin of=/dev/disk2s1
> > +bs=1024
> >  ```
> >
> >  In my case, it is the first partition is **disk2s1** that has been
> > formatted @@ -161,7 +161,7 @@ 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
> > +make PLATFORM=generic FW_PAYLOAD_PATH=<u-boot_build_dir>/u-
> > boot.bin
> >  ```
> >
> >  U-Boot v2020.07 release added SPL support to SiFive HiFive Unleashed
> > board, @@ -179,12 +179,12 @@ 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
> > +	-bios build/platform/generic/firmware/fw_payload.bin
> >  ```
> >  or
> >  ```
> >  qemu-system-riscv64 -M sifive_u -m 256M -nographic \
> > -	-bios build/platform/sifive/fu540/firmware/fw_jump.bin \
> > +	-bios build/platform/generic/firmware/fw_jump.bin \
> >  	-kernel <uboot_build_dir>/u-boot.bin  ```
> >
> > --
> > 2.25.1




More information about the opensbi mailing list