Browse Source

dubhe: qspi-image: Fix QSPI-Image binary

'seek' and 'count' was not updated when the block-size of dd command is
increased to 32 (008757330faa5b7e2ddae8ecaab7246b6bff778a), causing the
QSPI image to be unbootable.

Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.com>
Jun Yuan Tan 2 years ago
parent
commit
812cecacf5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      recipes-images/qspi-image/qspi-image_0.1.bb

+ 4 - 4
recipes-images/qspi-image/qspi-image_0.1.bb

@@ -16,8 +16,8 @@ do_image[depends] += " opensbi:do_deploy"
 do_image[depends] += " virtual/kernel:do_deploy"
 
 IMAGE_CMD:qspi () {
-	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=0 count=4096
-	dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=4096 count=32
-	dd if=${DEPLOY_DIR_IMAGE}/dubhe_fpga.dtb of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=4128 count=8160
-	dd if=${DEPLOY_DIR_IMAGE}/fw_payload.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=12288
+	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=0 count=128
+	dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=128 count=1
+	dd if=${DEPLOY_DIR_IMAGE}/dubhe_fpga.dtb of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=129 count=255
+	dd if=${DEPLOY_DIR_IMAGE}/fw_payload.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=32 seek=384
 }