Merge branch 'recompress-kernel-modules' into 'master'

Recompress kernel modules to save disk space (#247)

See merge request systemrescue/systemrescue-sources!163
This commit is contained in:
Francois Dupoux 2022-01-19 07:59:37 +00:00
commit d82ea0f8eb
2 changed files with 8 additions and 0 deletions

View file

@ -5,6 +5,7 @@ SystemRescue ChangeLog
9.01 (YYYY-MM-DD):
-------------------------------------------------------------------------------
* Support for adding Certification Authorities (CAs) via YAML config (Gerd v. Egidy)
* Recompress kernel modules using xz to reduce the size of the ISO image (#247)
-------------------------------------------------------------------------------
9.00 (2022-01-16):

View file

@ -223,6 +223,13 @@ make_customize_airootfs() {
# strip large binaries
find ${work_dir}/${arch}/airootfs/usr/lib -type f -name "lib*.so.*" -exec strip --strip-all {} \;
# recompress kernel modules to save space (#247)
echo "Recompressing kernel modules ..."
kernelver=$(basename ${work_dir}/${arch}/airootfs/usr/lib/modules/*)
find ${work_dir}/${arch}/airootfs/usr/lib/modules/${kernelver} -type f -name "*.ko.zst" -exec zstd -q -d --rm {} \;
find ${work_dir}/${arch}/airootfs/usr/lib/modules/${kernelver} -type f -name "*.ko" -exec xz {} \;
depmod --all --basedir=${work_dir}/${arch}/airootfs/usr ${kernelver}
}
# Copy mkinitcpio archiso hooks and build initramfs (airootfs)