浏览代码

starfive: dubhe: Add qspi boot image to be loaded by FPGA

This adds the recipe to build the QSPI boot image that gets loaded by FPGA
bootcode. This concatenates kernel, OpenSBI, bootcode and bootjump images
together. Dubhe FPGA then load the whole image into RAM and start running

Signed-off-by: Tien Hock Loh <tienhock.loh@starfivetech.com>
Tien Hock Loh 2 年之前
父节点
当前提交
b7c9408537
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      recipes-images/qspi-image/qspi-image_0.1.bb

+ 16 - 0
recipes-images/qspi-image/qspi-image_0.1.bb

@@ -0,0 +1,16 @@
+SUMMARY = "QSPI Image Creator"
+DESCRIPTION = "Recipe to create a QSPI Image"
+LICENSE = "CLOSED"
+
+LIC_FILES_CHKSUM = ""
+
+do_createqspiimage[depends] += " virtual/kernel:do_deploy "
+do_createqspiimage[depends] += "opensbi:do_deploy"
+addtask do_createqspiimage after do_deploy before do_build
+
+do_createqspiimage(){
+	dd if=${DEPLOY_DIR_IMAGE}/bootcode.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=1 seek=0 count=4096
+	dd if=${DEPLOY_DIR_IMAGE}/bootjump.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=1 seek=4096 count=32
+	dd if=${DEPLOY_DIR_IMAGE}/dubhe_fpga.dtb of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=1 seek=4128 count=4064
+	dd if=${DEPLOY_DIR_IMAGE}/fw_payload.bin of=${DEPLOY_DIR_IMAGE}/QSPI-Image.bin bs=1 seek=8192 count=134209536
+}