From ce7cce91e87967ae5e455e9317a90ac970c27769 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 16 Apr 2019 11:42:00 -0700 Subject: [PATCH] freedom-u540: Allow u-boot to be an OpenSBI payload Signed-off-by: Alistair Francis --- conf/machine/freedom-u540.conf | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/conf/machine/freedom-u540.conf b/conf/machine/freedom-u540.conf index f704714..a944616 100644 --- a/conf/machine/freedom-u540.conf +++ b/conf/machine/freedom-u540.conf @@ -7,7 +7,6 @@ require conf/machine/include/tune-riscv.inc MACHINE_FEATURES = "screen keyboard ext2 ext3 serial" -# This must be vmlinux for bbl to work and Image for openSBI KERNEL_IMAGETYPE = "Image" PREFERRED_PROVIDER_virtual/kernel ?= "linux-riscv" @@ -16,10 +15,13 @@ GDBVERSION = "riscv" EXTRA_IMAGEDEPENDS += "opensbi" RISCV_SBI_PLAT = "sifive/fu540" -# When we have better openSBI -> u-boot -> kernel support in released -# versions of u-boot and Linux kernel swap to u-boot binary here. -# RISCV_SBI_PAYLOAD ?= "u-boot-${MACHINE}.bin" + +# When we have u-boot SD/MMC load support we can swap to +# u-boot being the defual. Until then it's an option for TFTP boot +# RISCV_SBI_PAYLOAD ?= "u-boot.bin" +# This will set the kernel as the OpenSBI payload RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin" + # Override the DTB from the firmware with this one from openSBI # Use this to add Microsemi Expansion board support # RISCV_SBI_FDT ?= "HiFiveUnleashed-MicroSemi-Expansion.dtb" @@ -29,10 +31,15 @@ SERIAL_CONSOLES = "115200;ttySIF0" MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" IMAGE_FSTYPES_append = " wic.gz ext4" +KERNEL_IMAGETYPES += "uImage" +KEEPUIMAGE = "no" # Do not update fstab file when using wic images WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update" +EXTRA_IMAGEDEPENDS += "u-boot" +UBOOT_MACHINE = "sifive_fu540_defconfig" + ### wic default support WKS_FILE_DEPENDS ?= " \ opensbi \ @@ -42,6 +49,7 @@ WKS_FILE_DEPENDS ?= " \ IMAGE_BOOT_FILES ?= " \ Image \ + uImage \ " WKS_FILE ?= "freedom-u540-opensbi.wks"