File tree Expand file tree Collapse file tree 6 files changed +57
-14
lines changed
Expand file tree Collapse file tree 6 files changed +57
-14
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-aux/Config.in"
55source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-qcow/Config.in"
66source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-gns3a/Config.in"
77source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rauc/Config.in"
8+ source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-dl-release/Config.in"
89source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-readme/Config.in"
910
1011endmenu
Original file line number Diff line number Diff line change 1+ menuconfig IMAGE_ITB_DL_RELEASE
2+ bool "Download existing release"
3+ depends on !BR2_TARGET_ROOTFS_SQUASHFS
4+ help
5+ This is primarily used by target specific builds, where the
6+ bootloader artifact needs to be combined with an existing
7+ Infix image, to create a full disk image that can be
8+ provisioned to an SD-card or eMMC.
9+
10+ config IMAGE_ITB_DL_RELEASE_URL
11+ string "URL"
12+ depends on IMAGE_ITB_DL_RELEASE
13+ default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
14+ help
15+ URL to release tarball.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ squash=" ${BINARIES_DIR} " /rootfs.squashfs
6+ aux=" ${BINARIES_DIR} " /aux.ext4
7+
8+ [ -f " ${squash} " ] && [ -f " ${aux} " ] && exit 0
9+
10+ archive=" ${WORKDIR} /$( basename ${URL} ) "
11+ [ -f " ${archive} " ] || wget -O" ${archive} " " ${URL} "
12+
13+ echo " Unpacking..."
14+ tar -xa --strip-components=1 -C " ${BINARIES_DIR} " -f " ${archive} "
15+
16+ auxsize=$( stat -c %s " ${aux} " )
17+ if [ " ${auxsize} " -gt $(( 8 << 20 )) ]; then
18+ # In older releases, 16M aux.ext4 images were generated. In order
19+ # to keep the image-itb-qcow logic simpler, trim it 8M, which we
20+ # always generate nowadays.
21+ echo " WARNING: Auxiliary partition is unexpectedly large. Resizing..."
22+ resize2fs " ${aux} " 8M
23+ truncate -s 8M " ${aux} "
24+ tune2fs -l " ${aux} "
25+ fi
Original file line number Diff line number Diff line change 1+ # ###############################################################################
2+ #
3+ # image-itb-dl-release
4+ #
5+ # ###############################################################################
6+
7+ IMAGE_ITB_DL_RELEASE_CONFIG_VARS := URL
8+
9+ $(eval $(ix-image))
Original file line number Diff line number Diff line change 11menuconfig IMAGE_ITB_QCOW
22 bool "QEMU disk image (ITB)"
3- default y
4- select IMAGE_ITB_ROOTFS
5- select IMAGE_ITB_AUX
3+ depends on (IMAGE_ITB_ROOTFS && IMAGE_ITB_AUX) || IMAGE_ITB_DL_RELEASE
64 select BR2_PACKAGE_HOST_GENIMAGE
75 help
86 Compose a full disk image with redundant Linux OS partitions,
@@ -68,13 +66,3 @@ config IMAGE_ITB_QCOW_BOOT_OFFSET
6866 Offset at which the bootloader partition is placed. Remember
6967 to make sure that the GPT still fits at the start of the
7068 image.
71-
72- config IMAGE_ITB_QCOW_RELEASE_URL
73- string "Infix URL"
74- depends on IMAGE_ITB_QCOW
75- depends on !BR2_TARGET_ROOTFS_SQUASHFS
76- default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
77- help
78- In situations where Infix itself is not being built, but a
79- disk image is, i.e. when building a bootloader: place this
80- Infix release in the primary and secondary partitions.
Original file line number Diff line number Diff line change 44#
55# ###############################################################################
66
7- IMAGE_ITB_QCOW_DEPENDENCIES := host-genimage image-itb-rootfs image-itb-aux
7+ # We can source the rootfs+aux from a local build, or from a
8+ # downloaded release; so adjust our dependencies accordingly.
9+ IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_ROOTFS) := image-itb-rootfs image-itb-aux
10+ IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_DL_RELEASE) := image-itb-dl-release
11+
12+ IMAGE_ITB_QCOW_DEPENDENCIES := host-genimage $(IMAGE_ITB_QCOW_SRC-y )
813IMAGE_ITB_QCOW_CONFIG_VARS := BOOT_DATA BOOT_OFFSET SIZE
914
1015$(eval $(ix-image))
You can’t perform that action at this time.
0 commit comments