aboutsummaryrefslogtreecommitdiffstats
path: root/export-image/04-finalise/01-run.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-06 10:22:20 +0200
committerSven Gothel <[email protected]>2021-07-06 10:22:20 +0200
commitf09badba01506338881b6b2dd556f6c57ae23ee1 (patch)
treea9877a9394b04730d014120660b5bc2f7d5f33c2 /export-image/04-finalise/01-run.sh
parent3adba1a0c08d646935a1d3720864067aa0b37c69 (diff)
export-image: Add squashfs w/ zstd-10, sadly zstd is disabled in Raspberry kernel
Diffstat (limited to 'export-image/04-finalise/01-run.sh')
-rwxr-xr-xexport-image/04-finalise/01-run.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh
index e05bfbd..24b2728 100755
--- a/export-image/04-finalise/01-run.sh
+++ b/export-image/04-finalise/01-run.sh
@@ -16,7 +16,7 @@ INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
IMG_FILE_ROOT_EXT4="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root-ext4.img"
IMG_FILE_ROOT_SQFS_GZ="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root-sqfs_gz.img"
IMG_FILE_ROOT_SQFS_LZO="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root-sqfs_lzo.img"
-IMG_FILE_ROOT_SQFS_NONE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root-sqfs_none.img"
+IMG_FILE_ROOT_SQFS_ZSTD="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root-sqfs_zstd10.img"
INFO_FILE_ROOT="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.root.info"
on_chroot << EOF
@@ -109,7 +109,7 @@ if [ "${ROOTFS_RO}" = "1" ] ; then
mount -o ro "$IMG_FILE_ROOT_EXT4" "${ROOTFS_DIR}"
mksquashfs "${ROOTFS_DIR}" "${IMG_FILE_ROOT_SQFS_GZ}" -comp gzip
mksquashfs "${ROOTFS_DIR}" "${IMG_FILE_ROOT_SQFS_LZO}" -comp lzo
- mksquashfs "${ROOTFS_DIR}" "${IMG_FILE_ROOT_SQFS_NONE}" -noI -noD -noF -noX
+ mksquashfs "${ROOTFS_DIR}" "${IMG_FILE_ROOT_SQFS_ZSTD}" -comp zstd -Xcompression-level 10
umount "${ROOTFS_DIR}"
cp -a "$INFO_FILE_ROOT" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.inf"
fi
@@ -129,13 +129,14 @@ mv "$IMG_FILE" "$DEPLOY_DIR2/"
if [ "${ROOTFS_RO}" = "1" ] ; then
# cp -a "$IMG_FILE_ROOT_EXT4" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.img"
cp -a "$IMG_FILE_ROOT_SQFS_LZO" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.img"
+ # cp -a "$IMG_FILE_ROOT_SQFS_ZSTD" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.img"
( cd "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}"; zip -r0 "../${IMG_FILENAME}${IMG_SUFFIX}.sdcard.zip" . )
mv "$IMG_FILE_ROOT_EXT4" "$DEPLOY_DIR2/"
mv "$IMG_FILE_ROOT_SQFS_GZ" "$DEPLOY_DIR2/"
mv "$IMG_FILE_ROOT_SQFS_LZO" "$DEPLOY_DIR2/"
- mv "$IMG_FILE_ROOT_SQFS_NONE" "$DEPLOY_DIR2/"
+ mv "$IMG_FILE_ROOT_SQFS_ZSTD" "$DEPLOY_DIR2/"
fi
rm -f "${STAGE_WORK_DIR}/SHA256SUMS"