diff options
| author | Richard Oliver <richard.oliver@raspberrypi.com> | 2025-03-13 17:29:19 +0000 |
|---|---|---|
| committer | XECDesign <XECDesign@users.noreply.github.com> | 2025-03-14 14:33:23 +0000 |
| commit | 2e5d13e1b965489b8088acea26877b7f0d8af54a (patch) | |
| tree | 0384e2d7fcaeb81a633fc8a68e0999d44526cf4c /export-image | |
| parent | f621f9e27942ae0776b0a4d1bf4065e7165bdf88 (diff) | |
export-image: generate bmap file if bmaptool is available
Diffstat (limited to 'export-image')
| -rwxr-xr-x | export-image/05-finalise/01-run.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/export-image/05-finalise/01-run.sh b/export-image/05-finalise/01-run.sh index c59c23b..6012957 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}.*" @@ -128,4 +135,7 @@ esac if [ -f "${SBOM_FILE}" ]; then xz -c "${SBOM_FILE}" > "$DEPLOY_DIR/image_$(basename "${SBOM_FILE}").xz" fi +if [ -f "${BMAP_FILE}" ]; then + xz -c "${BMAP_FILE}" > "$DEPLOY_DIR/image_$(basename "${BMAP_FILE}").xz" +fi cp "$INFO_FILE" "$DEPLOY_DIR/" |
