Skip to content

Commit

Permalink
ci: add nvme boot
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Dec 2, 2024
1 parent 528f6b0 commit 57124e8
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,21 @@ jobs:
# move img to output
mv -v "$BOOT_IMG" "$ROOT_IMG" ${GITHUB_WORKSPACE}/output/
- name: Copy other file
run: |
cp -vf ${GITHUB_WORKSPACE}/config/partition_universal.json ${GITHUB_WORKSPACE}/output/
- name: Clean up (EMMC)
run: |
rm -rf ${GITHUB_WORKSPACE}/output/*.deb
- name: 'Upload emmc img'
uses: actions/upload-artifact@v4
with:
name: k1-img-emmc
path: output/*
retention-days: 30

- name: genimage-sdcard
run: |
export SD_TARGET=${GITHUB_WORKSPACE}/config/genimage.cfg
Expand Down Expand Up @@ -216,18 +231,27 @@ jobs:
path: output/debian-k1-sdcard.img
retention-days: 30

- name: Copy other file
- name: Clean up (SDCARD)
run: |
cp -vf ${GITHUB_WORKSPACE}/config/partition_universal.json ${GITHUB_WORKSPACE}/output/
rm -rf ${GITHUB_WORKSPACE}/output/debian-k1-sdcard.img
- name: Clean up
- name: genimage-nvme
run: |
rm -rf ${GITHUB_WORKSPACE}/output/*.deb
rm -rf ${GITHUB_WORKSPACE}/output/debian-k1-sdcard.img
export CHROOT_TARGET=${GITHUB_WORKSPACE}/rootfs
- name: 'Upload emmc img'
pushd ${GITHUB_WORKSPACE}/output
sudo mount "$ROOT_IMG" $CHROOT_TARGET
sudo mount "$BOOT_IMG" $CHROOT_TARGET/boot
sudo sed -i "s/mmcblk2/nvme0n1/g" $CHROOT_TARGET/etc/fstab
sudo sed -i "s/mmcblk2/nvme0n1/g" $CHROOT_TARGET/etc/default/u-boot
sudo sed -i "s/mmcblk2/nvme0n1/g" $CHROOT_TARGET/boot/extlinux/extlinux.conf
sudo umount -l $CHROOT_TARGET
popd
tree ${GITHUB_WORKSPACE}/output
- name: 'Upload nvme img'
uses: actions/upload-artifact@v4
with:
name: k1-img-emmc
name: k1-img-nvme
path: output/*
retention-days: 30

0 comments on commit 57124e8

Please sign in to comment.