diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-12-06 20:32:29 -0500 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-04-19 12:05:21 +0000 |
commit | 928a3e06811655db710c78e519e5cc9fcb2dd21b (patch) | |
tree | 32d4ac08d9791c786f43ea5bb8468e6eafcea8b7 /update-kernel.in | |
parent | 648d10f12618f48da9b31bc9e438fdc074d79bfa (diff) | |
download | alpine-conf-928a3e06811655db710c78e519e5cc9fcb2dd21b.zip |
update-kernel: decompress modules for modloop
reduces modloop size by about 20%, see
https://gitlab.alpinelinux.org/alpine/aports/-/issues/12857#note_197051
Diffstat (limited to 'update-kernel.in')
-rw-r--r-- | update-kernel.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/update-kernel.in b/update-kernel.in index 0e3958a..f21db2e 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -277,6 +277,11 @@ KVER=$(basename $(ls -d $ROOT/lib/modules/*"$KVER_FLAVOR")) DTBDIR=$ROOT/boot/dtbs-$FLAVOR [ -d "$DTBDIR" ] || DTBDIR=$ROOT/usr/lib/linux-$KVER [ -d "$DTBDIR" ] || DTBDIR=$ROOT/boot +find $ROOT/lib/modules \ + -name \*.gz -exec gunzip {} + \ + -o -name \*.xz -exec unxz {} + \ + -o -name \*.zst -exec unzstd --rm {} + \ + -o ! -name '' # don't fail if no files found. busybox find doesn't support -true depmod -b $ROOT "$KVER" |