Browse Source

visionfive2: opensbi: Update opensbi recipe for visionfive2 support

Added visionfive2 opensbi make command, source branch and generate visionfive2_fw_payload.img.

Signed-off-by: yang.lee <yang.lee@starfivetech.com>
yang.lee 11 months ago
parent
commit
474d22a390

+ 28 - 0
recipes-bsp/opensbi/files/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";
+		};
+	};
+};

+ 15 - 0
recipes-bsp/opensbi/opensbi_%.bbappend

@@ -0,0 +1,15 @@
+SRCREV:starfive-visionfive2 = "c6a092cd80112529cb2e92e180767ff5341b22a3"
+SRC_URI:starfive-visionfive2 = "git://git@192.168.110.45/sbc/opensbi.git;protocol=ssh \
+                                file://visionfive2-uboot-fit-image.its \
+                               "
+
+EXTRA_OEMAKE:starfive-visionfive2 += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= FW_TEXT_START=0x40000000"
+
+DEPENDS:starfive-visionfive2:append = " u-boot-tools-native dtc-native"
+
+do_deploy:append:starfive-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
+}
+

+ 5 - 4
recipes-bsp/opensbi/opensbi_1.2.bb

@@ -8,8 +8,8 @@ require opensbi-payloads.inc
 
 inherit autotools-brokensep deploy
 
-SRCREV = "df3de2f059c8c7edd1ba48ea43e6d8b93553a58a"
-SRC_URI = "git://git@192.168.110.45/starfive-tech/opensbi.git;protocol=ssh;branch=starfive-v1.2-dubhe"
+SRCREV:starfive-dubhe = "df3de2f059c8c7edd1ba48ea43e6d8b93553a58a"
+SRC_URI:starfive-dubhe = "git://git@192.168.110.45/starfive-tech/opensbi.git;protocol=ssh;branch=starfive-v1.2-dubhe"
 
 SRC_URI:remove:nezha = " \
     file://0001-lib-utils-fdt-Require-match-data-to-be-const.patch \
@@ -18,8 +18,9 @@ SRC_URI:remove:nezha = " \
 
 S = "${WORKDIR}/git"
 
-#EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= "
-EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} PLATFORM_DEFCONFIG=starfive_defconfig I=${D} FW_PIC=n CLANG_TARGET= "
+EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= "
+EXTRA_OEMAKE:starfive-dubhe += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= PLATFORM_DEFCONFIG=starfive_defconfig "
+
 # If RISCV_SBI_PAYLOAD is set then include it as a payload
 EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
 EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"