aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-04 13:29:55 +0200
committerSven Gothel <[email protected]>2021-07-04 13:29:55 +0200
commit5c46939927f2347b737d97574a18f5991f73f477 (patch)
tree4f867ebc7ba2e4292e09732e433d71d798afd683
parentb97b8145c4fd29eba380a9bb092819df859d8928 (diff)
parent9e856799d83cc5dfb84a92601b131420c0170877 (diff)
Merge branch 'reduced_ro_arm64' into reduced_ro_arm64_zafenaZafena-1.4
-rwxr-xr-xexport-image/04-finalise/01-run.sh7
-rwxr-xr-xstage2/01-sys-tweaks/01-run.sh2
-rwxr-xr-xstage2/01-sys-tweaks/files/initramfs/fsck_custom2
-rwxr-xr-xstage2/01-sys-tweaks/files/initramfs/loop_rootfs15
4 files changed, 23 insertions, 3 deletions
diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh
index 8d64997..e05bfbd 100755
--- a/export-image/04-finalise/01-run.sh
+++ b/export-image/04-finalise/01-run.sh
@@ -130,8 +130,15 @@ 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"
+ ( 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/"
fi
+
+rm -f "${STAGE_WORK_DIR}/SHA256SUMS"
+( cd "${DEPLOY_DIR2}"; find . -maxdepth 1 -type f -exec sha256sum -b \{\} >> "${STAGE_WORK_DIR}/SHA256SUMS" \; )
+mv "${STAGE_WORK_DIR}/SHA256SUMS" "$DEPLOY_DIR2/"
+
diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh
index 49b3b5d..7f98473 100755
--- a/stage2/01-sys-tweaks/01-run.sh
+++ b/stage2/01-sys-tweaks/01-run.sh
@@ -101,7 +101,7 @@ on_chroot << EOF
sed -i -e 's/#Storage=auto/Storage=volatile/g;s/#Compress=yes/Compress=yes/g;s/#RuntimeMaxUse=/RuntimeMaxUse=1M/g;s/#ForwardToSyslog=yes/ForwardToSyslog=no/g;s/#ForwardToWall=yes/ForwardToWall=no/g' /etc/systemd/journald.conf
- sed -i -e 's/MODULES=most/MODULES=dep/g;s/BUSYBOX=auto/BUSYBOX=y/g' /etc/initramfs-tools/initramfs.conf
+ sed -i -e 's/MODULES=most/MODULES=dep/g;s/BUSYBOX=auto/BUSYBOX=y/g;s/COMPRESS=gzip/COMPRESS=lzop/g' /etc/initramfs-tools/initramfs.conf
echo "squashfs" >> /etc/modules
echo "squashfs" >> /etc/initramfs-tools/modules
diff --git a/stage2/01-sys-tweaks/files/initramfs/fsck_custom b/stage2/01-sys-tweaks/files/initramfs/fsck_custom
index 6620d31..b2b58f3 100755
--- a/stage2/01-sys-tweaks/files/initramfs/fsck_custom
+++ b/stage2/01-sys-tweaks/files/initramfs/fsck_custom
@@ -26,7 +26,7 @@ fi
. /usr/share/initramfs-tools/scripts/functions
. /usr/share/initramfs-tools/hook-functions
-fsck_types="ext4 vfat"
+fsck_types="ext4 squashfs vfat"
copy_exec /sbin/fsck
copy_exec /sbin/logsave
diff --git a/stage2/01-sys-tweaks/files/initramfs/loop_rootfs b/stage2/01-sys-tweaks/files/initramfs/loop_rootfs
index d6ed109..ff309d2 100755
--- a/stage2/01-sys-tweaks/files/initramfs/loop_rootfs
+++ b/stage2/01-sys-tweaks/files/initramfs/loop_rootfs
@@ -148,7 +148,20 @@ fallback_rootfs() {
fi
sync
umount ${BOOT_DIR}
- reboot
+
+ # /usr/sbin/reboot --help
+ # BusyBox v1.30.1 (Debian 1:1.30.1-4) multi-call binary.
+ # Usage: reboot [-d DELAY] [-n] [-f]
+ # Reboot the system
+ # -d SEC Delay interval
+ # -n Do not sync
+ # -f Force (don't go through init)
+ # /usr/sbin/reboot -f
+ #
+ # /usr/bin/reboot --help
+ # Usage: {halt|reboot|poweroff} [-n] [reboot-arg]
+ #
+ /usr/bin/reboot reboot
exit 1
}