diff --git a/recipes-bsp/opensbi/opensbi/visionfive2-uboot-fit-image.its b/recipes-bsp/opensbi/opensbi/visionfive2-uboot-fit-image.its new file mode 100644 index 0000000..393e8ff --- /dev/null +++ b/recipes-bsp/opensbi/opensbi/visionfive2-uboot-fit-image.its @@ -0,0 +1,28 @@ +/dts-v1/; + +/ { + description = "U-boot-spl FIT image for JH7110 VisionFive2"; + #address-cells = <2>; + + images { + firmware { + description = "u-boot"; + data = /incbin/("fw_payload.bin"); + type = "firmware"; + arch = "riscv"; + os = "u-boot"; + load = <0x0 0x40000000>; + entry = <0x0 0x40000000>; + compression = "none"; + }; + }; + + configurations { + default = "config-1"; + + config-1 { + description = "U-boot-spl FIT config for JH7110 VisionFive2"; + firmware = "firmware"; + }; + }; +}; diff --git a/recipes-bsp/opensbi/opensbi_%.bbappend b/recipes-bsp/opensbi/opensbi_%.bbappend index d626409..f2ba9a0 100644 --- a/recipes-bsp/opensbi/opensbi_%.bbappend +++ b/recipes-bsp/opensbi/opensbi_%.bbappend @@ -1,2 +1,16 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + # Support fdt drivers for AE350 SRCREV:ae350-ax45mp = "22f38ee6c658a660083aa45c4ec6c72f66a17260" + +SRC_URI:append:visionfive2 = "\ + file://visionfive2-uboot-fit-image.its \ + " + +DEPENDS:visionfive2:append = " u-boot-tools-native dtc-native" + +do_deploy:append:visionfive2() { + install -m 0644 ${WORKDIR}/visionfive2-uboot-fit-image.its ${DEPLOYDIR}/visionfive2-uboot-fit-image.its + cd ${DEPLOYDIR} + mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img +} diff --git a/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb b/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb index 3a36903..83317b7 100644 --- a/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb +++ b/recipes-bsp/u-boot/u-boot-starfive_v2021.10.bb @@ -20,6 +20,8 @@ SRCREV:visionfive2 = "688befadf1d337dee3593e6cc0fe1c737cc150bd" DEPENDS:append = " u-boot-tools-native" +DEPENDS:append:visionfive2 = " jh7110-spl-tool-native" + # Overwrite this for your server TFTP_SERVER_IP ?= "127.0.0.1" @@ -31,6 +33,9 @@ do_configure:prepend() { do_deploy:append:visionfive2() { install -m 644 ${WORKDIR}/uEnv-visionfive2.txt ${DEPLOYDIR}/uEnv.txt + spl_tool -c -f ${DEPLOYDIR}/${SPL_IMAGE} + ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out + ln -sf ${SPL_IMAGE}.normal.out ${DEPLOYDIR}/${SPL_SYMLINK}.normal.out } COMPATIBLE_MACHINE = "(visionfive2)"