roms: opensbi: Add 32-bit firmware image for sifive_u machine
authorBin Meng <bmeng.cn@gmail.com>
Mon, 24 Feb 2020 13:39:42 +0000 (05:39 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 17 Mar 2020 00:03:48 +0000 (17:03 -0700)
Although the real world SiFive HiFive Unleashed board is a 64-bit
hardware configuration, with QEMU it is possible to test 32-bit
configuration with the same hardware features.

This updates the roms Makefile to add the build rules for creating
the 32-bit OpenSBI firmware image for sifive_u machine. A pre-built
OpenSBI v0.6 image has been added as the default bios for 32-bit
sifive_u machine.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Makefile
pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin [new file with mode: 0644]
roms/Makefile

index 7df22fcc5dac4133dba18c761052e1e234cac07a..ea0e08fc57fa0899612237b3e749eda0a777f880 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -848,7 +848,7 @@ u-boot.e500 u-boot-sam460-20100605.bin \
 qemu_vga.ndrv \
 edk2-licenses.txt \
 hppa-firmware.img \
-opensbi-riscv32-virt-fw_jump.bin \
+opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \
 opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin
 
 
diff --git a/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin b/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
new file mode 100644 (file)
index 0000000..bab13f5
Binary files /dev/null and b/pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin differ
index 28e1e557b0763cabe6da3d07602d6422e5ccbe81..f9acf39954dcf96618fab21cafe76fcbb487964f 100644 (file)
@@ -66,6 +66,7 @@ default help:
        @echo "  efi                -- update UEFI (edk2) platform firmware"
        @echo "  opensbi32-virt     -- update OpenSBI for 32-bit virt machine"
        @echo "  opensbi64-virt     -- update OpenSBI for 64-bit virt machine"
+       @echo "  opensbi32-sifive_u -- update OpenSBI for 32-bit sifive_u machine"
        @echo "  opensbi64-sifive_u -- update OpenSBI for 64-bit sifive_u machine"
        @echo "  bios-microvm       -- update bios-microvm.bin (qboot)"
        @echo "  clean              -- delete the files generated by the previous" \
@@ -181,6 +182,12 @@ opensbi64-virt:
                PLATFORM="qemu/virt"
        cp opensbi/build/platform/qemu/virt/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-virt-fw_jump.bin
 
+opensbi32-sifive_u:
+       $(MAKE) -C opensbi \
+               CROSS_COMPILE=$(riscv32_cross_prefix) \
+               PLATFORM="sifive/fu540"
+       cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv32-sifive_u-fw_jump.bin
+
 opensbi64-sifive_u:
        $(MAKE) -C opensbi \
                CROSS_COMPILE=$(riscv64_cross_prefix) \