summaryrefslogtreecommitdiff
path: root/export-image
diff options
context:
space:
mode:
Diffstat (limited to 'export-image')
-rwxr-xr-xexport-image/00-allow-rerun/00-run.sh4
-rwxr-xr-xexport-image/02-set-sources/01-run.sh1
-rwxr-xr-xexport-image/05-finalise/01-run.sh10
-rwxr-xr-xexport-image/prerun.sh2
4 files changed, 11 insertions, 6 deletions
diff --git a/export-image/00-allow-rerun/00-run.sh b/export-image/00-allow-rerun/00-run.sh
index dd67f4c..860ed51 100755
--- a/export-image/00-allow-rerun/00-run.sh
+++ b/export-image/00-allow-rerun/00-run.sh
@@ -1,9 +1,5 @@
#!/bin/bash -e
-if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then
- cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/"
-fi
-
if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
fi
diff --git a/export-image/02-set-sources/01-run.sh b/export-image/02-set-sources/01-run.sh
index 6d50496..d93efdf 100755
--- a/export-image/02-set-sources/01-run.sh
+++ b/export-image/02-set-sources/01-run.sh
@@ -1,6 +1,7 @@
#!/bin/bash -e
rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
+rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete
on_chroot << EOF
apt-get update
diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh
index c59c23b..5cbda20 100755
--- a/export-image/05-finalise/01-run.sh
+++ b/export-image/05-finalise/01-run.sh
@@ -3,6 +3,7 @@
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom"
+BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap"
on_chroot << EOF
update-initramfs -k all -c
@@ -100,6 +101,12 @@ zerofree "${ROOT_DEV}"
unmount_image "${IMG_FILE}"
+if hash bmaptool 2>/dev/null; then
+ bmaptool create \
+ -o "${BMAP_FILE}" \
+ "${IMG_FILE}"
+fi
+
mkdir -p "${DEPLOY_DIR}"
rm -f "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.*"
@@ -126,6 +133,7 @@ none | *)
esac
if [ -f "${SBOM_FILE}" ]; then
- xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/image_$(basename "${SBOM_FILE}").xz"
+ xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/$(basename "${SBOM_FILE}").xz"
fi
+cp "$BMAP_FILE" "$DEPLOY_DIR/"
cp "$INFO_FILE" "$DEPLOY_DIR/"
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index 6a5309a..9f1b496 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -13,7 +13,7 @@ BOOT_SIZE="$((512 * 1024 * 1024))"
ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1)
# All partition sizes and starts will be aligned to this size
-ALIGN="$((4 * 1024 * 1024))"
+ALIGN="$((8 * 1024 * 1024))"
# Add this much space to the calculated file size. This allows for
# some overhead (since actual space usage is usually rounded up to the
# filesystem block size) and gives some free space on the resulting