ci: generate image.yml.txt for bb-imager

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
main
Robert Nelson 1 week ago
parent 0be36b84b4
commit 6f6191b67d

@ -31,10 +31,10 @@ build-v6.6-debian-13-riscv64:
- ./05_generate_payload.bin.sh - ./05_generate_payload.bin.sh
- ./06_generate_debian_console_root.sh - ./06_generate_debian_console_root.sh
- ./07_create_sdcard_img.sh - ./07_create_sdcard_img.sh
- xz -vT8 deploy/images/sdcard.img
- tree -s deploy/ - tree -s deploy/
- cp -v deploy/images/sdcard.img.xz ./deploy/ - cp -v deploy/images/sdcard.img.xz ./deploy/
- cp -v deploy/images/sdcard.bmap ./deploy/ - cp -v deploy/images/sdcard.bmap ./deploy/
- cp -v deploy/images/image.yml.txt ./deploy/
artifacts: artifacts:
when: on_success when: on_success
expire_in: 4 week expire_in: 4 week
@ -43,6 +43,7 @@ build-v6.6-debian-13-riscv64:
- "deploy/sdcard.img.xz" - "deploy/sdcard.img.xz"
- "deploy/sdcard.bmap" - "deploy/sdcard.bmap"
- "deploy/readme.md" - "deploy/readme.md"
- "deploy/image.yml.txt"
build-v6.6-ubuntu-2404-riscv64: build-v6.6-ubuntu-2404-riscv64:
image: robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest image: robertcnelson/beagle-devscripts-kernel-debian-12-amd64:latest
@ -70,10 +71,10 @@ build-v6.6-ubuntu-2404-riscv64:
- ./05_generate_payload.bin.sh - ./05_generate_payload.bin.sh
- ./06_generate_ubuntu_console_root.sh - ./06_generate_ubuntu_console_root.sh
- ./07_create_sdcard_img.sh - ./07_create_sdcard_img.sh
- xz -vT8 deploy/images/sdcard.img
- tree -s deploy/ - tree -s deploy/
- cp -v deploy/images/sdcard.img.xz ./deploy/ - cp -v deploy/images/sdcard.img.xz ./deploy/
- cp -v deploy/images/sdcard.bmap ./deploy/ - cp -v deploy/images/sdcard.bmap ./deploy/
- cp -v deploy/images/image.yml.txt ./deploy/
artifacts: artifacts:
when: on_success when: on_success
expire_in: 4 week expire_in: 4 week
@ -82,3 +83,4 @@ build-v6.6-ubuntu-2404-riscv64:
- "deploy/sdcard.img.xz" - "deploy/sdcard.img.xz"
- "deploy/sdcard.bmap" - "deploy/sdcard.bmap"
- "deploy/readme.md" - "deploy/readme.md"
- "deploy/image.yml.txt"

@ -30,6 +30,12 @@ if [ ! -f ./images/sdcard.img ]; then
exit 2 exit 2
fi fi
extract_size=$(du -b ./images/sdcard.img | awk '{print $1}')
echo " extract_size: ${extract_size}" > ./images/image.yml.txt
extract_sha256=$(sha256sum ./images/sdcard.img | awk '{print $1}')
echo " extract_sha256: ${extract_sha256}" >> ./images/image.yml.txt
if [ -f /usr/bin/bmaptool ] ; then if [ -f /usr/bin/bmaptool ] ; then
if [ -f ./images/sdcard.bmap ] ; then if [ -f ./images/sdcard.bmap ] ; then
rm -rf ./images/sdcard.bmap || true rm -rf ./images/sdcard.bmap || true
@ -37,4 +43,22 @@ if [ -f /usr/bin/bmaptool ] ; then
/usr/bin/bmaptool -d create -o ./images/sdcard.bmap ./images/sdcard.img /usr/bin/bmaptool -d create -o ./images/sdcard.bmap ./images/sdcard.img
fi fi
xz -T0 -z ./images/sdcard.img
if [ ! -f ./images/sdcard.img.xz ]; then
echo "Error: ./images/sdcard.img.xz was not generated"
exit 2
fi
image_download_size=$(du -b ./images/sdcard.img.xz | awk '{print $1}')
echo " image_download_size: ${image_download_size}" >> ./images/image.yml.txt
image_download_sha256=$(sha256sum ./images/sdcard.img.xz | awk '{print $1}')
echo " image_download_sha256: ${image_download_sha256}" >> ./images/image.yml.txt
TIME=$(date +%Y-%m-%d)
echo " release_date: '${TIME}'" >> ./images/image.yml.txt
echo " init_format: sysconf" >> ./images/image.yml.txt
# #

Loading…
Cancel
Save