Browse Source

dubhe: qspi-image: Update image generation method
QSPI image contains only bootcode, bootjump, U-Boot SPL, U-Boot proper and OpenSBI firmware only.
The boot flow is altered due to the U-Boot support in Dubhe series.
Kernel, rootfs and device tree is now separated from the qspi-image and will be loaded via TFTP.

Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>

weiheng.cheng 6 months ago
parent
commit
ae8bdc4fc5
1 changed files with 8 additions and 13 deletions
  1. 8 13
      recipes-core/images/qspi-image_0.1.bb

+ 8 - 13
recipes-core/images/qspi-image_0.1.bb

@@ -4,27 +4,22 @@ LICENSE = "CLOSED"
 
 inherit core-image
 
-DEPENDS = "opensbi deploy-bootfiles"
+DEPENDS = "deploy-bootfiles"
 
 LIC_FILES_CHKSUM = ""
 
 IMAGE_FSTYPES = "qspi"
 
 do_rootfs[depends] += "dubhe-image-initramfs:do_rootfs"
+
 do_image[depends] += "\
 	deploy-bootfiles:do_deploy \
-	opensbi:do_deploy \
-	virtual/kernel:do_deploy \
+	u-boot-starfive:do_deploy \
 	"
 
-IMAGE_CMD:qspi () {
-	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-90-qspi-initramfs-image.bin bs=32 seek=0 count=128
-	dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-90-qspi-initramfs-image.bin bs=32 seek=128 count=1
-	dd if=${DEPLOY_DIR_IMAGE}/dubhe90_fpga.dtb of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-90-qspi-initramfs-image.bin bs=32 seek=129 count=255
-	dd if=${DEPLOY_DIR_IMAGE}/fw_payload_initramfs.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-90-qspi-initramfs-image.bin bs=32 seek=384
-
-	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-80-qspi-initramfs-image.bin bs=32 seek=0 count=128
-        dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-80-qspi-initramfs-image.bin bs=32 seek=128 count=1
-        dd if=${DEPLOY_DIR_IMAGE}/dubhe80_fpga.dtb of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-80-qspi-initramfs-image.bin bs=32 seek=129 count=255
-        dd if=${DEPLOY_DIR_IMAGE}/fw_payload_initramfs.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-80-qspi-initramfs-image.bin bs=32 seek=384
+IMAGE_CMD:qspi(){
+	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-qspi-tftpboot.bin bs=32 seek=0 count=128
+	dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-qspi-tftpboot.bin bs=32 seek=128 count=128
+	dd if=${DEPLOY_DIR_IMAGE}/u-boot-spl.bin of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-qspi-tftpboot.bin bs=32 seek=256 count=8192
+	dd if=${DEPLOY_DIR_IMAGE}/u-boot.itb of=${DEPLOY_DIR_IMAGE}/starfive-dubhe-qspi-tftpboot.bin bs=32 seek=8448 count=32768
 }