Browse Source

visionfive2: core-image-minimal: Added recipes

Added core-image-minimal recipe and generate img file to support multiple boot mode.

Signed-off-by: yang.lee <yang.lee@starfivetech.com>
yang.lee 1 year ago
parent
commit
9ec17a9f32

+ 5 - 0
recipes-core/images/core-image-minimal-initramfs.bbappend

@@ -0,0 +1,5 @@
+# Manually adding riscv64-oe-linux as a compatible hosts
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv64.*)-(linux.*|freebsd.*)'
+
+# Manually avoid circular dependencies
+EXTRA_IMAGEDEPENDS = ""

+ 14 - 0
recipes-core/images/core-image-minimal.bbappend

@@ -0,0 +1,14 @@
+DEPENDS += " opensbi starfive-tool-native u-boot-tools-native dtc-native"
+
+IMAGE_INSTALL += "helloworld coremark dhrystone perf gdb gdbserver util-linux ethtool bmap-tools systemd-analyze"
+
+# Generate SD Card image and eMMC image
+# - Using spl_tool to fix img header to boot from eMMC
+
+do_vf2_sd (){
+	cd ${IMGDEPLOYDIR}
+	bmaptool copy core-image-minimal-starfive-visionfive2.wic.gz ${DEPLOY_DIR_IMAGE}/starfive-visionfive2-core-image-minimal.img
+	spl_tool -i -f ${DEPLOY_DIR_IMAGE}/starfive-visionfive2-core-image-minimal.img
+}
+
+IMAGE_POSTPROCESS_COMMAND:starfive-visionfive2 += "do_vf2_sd;"

+ 3 - 0
recipes-core/images/initramfs-module-install_1.0.bbappend

@@ -0,0 +1,3 @@
+# Manually adding riscv64-oe-linux as a compatible hosts
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv64.*)-(linux.*|freebsd.*)'
+