From 116c7b3b45c1653d2fe448f0a0a085f46d67ca35 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Mon, 2 Dec 2024 23:23:09 +0800 Subject: [PATCH] ci: add k1-sdcard-boot.img Signed-off-by: Han Gao --- .github/workflows/build.yml | 24 ++++++++++++++++++++ config/genimage_boot.cfg | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 config/genimage_boot.cfg diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b683bb6..fcd732c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -235,6 +235,30 @@ jobs: run: | rm -rf ${GITHUB_WORKSPACE}/output/debian-k1-sdcard.img + - name: genimage-sdcard-boot + run: | + export SD_TARGET=${GITHUB_WORKSPACE}/config/genimage_boot.cfg + export SD_NAME=k1-sdcard-boot.img + + pushd ${GITHUB_WORKSPACE}/output + genimage --config ${SD_TARGET} \ + --inputpath $(pwd) \ + --outputpath $(pwd) \ + --rootpath="$(mktemp -d)" + popd + tree ${GITHUB_WORKSPACE}/output + + - name: 'Upload sdcard boot img' + uses: actions/upload-artifact@v4 + with: + name: k1-img-sdcard + path: output/k1-sdcard-boot.img + retention-days: 30 + + - name: Clean up (SDCARD BOOT) + run: | + rm -rf ${GITHUB_WORKSPACE}/output/k1-sdcard-boot.img + - name: genimage-nvme run: | export CHROOT_TARGET=${GITHUB_WORKSPACE}/rootfs diff --git a/config/genimage_boot.cfg b/config/genimage_boot.cfg new file mode 100644 index 0000000..0ad71b8 --- /dev/null +++ b/config/genimage_boot.cfg @@ -0,0 +1,45 @@ +image k1-sdcard-boot.img { + hdimage { + partition-table-type = gpt + } + + partition bootinfo { + image = "factory/bootinfo_sd.bin" + offset = "0K" + size = "512" + holes = {"(80;512)"} + in-partition-table = "false" + } + + partition fsbl { + image = "factory/FSBL.bin" + offset = "128K" + size = "256K" + holes = {} + in-partition-table = "true" + } + + partition env { + image = "env.bin" + offset = "384K" + size = "64K" + holes = {} + in-partition-table = "true" + } + + partition opensbi { + image = "fw_dynamic.itb" + offset = "" + size = "384K" + holes = {} + in-partition-table = "true" + } + + partition uboot { + image = "u-boot.itb" + offset = "" + size = "2M" + holes = {} + in-partition-table = "true" + } +}