From 30e6933e71fc18ff5bcb5a7d9dad105e464272bf Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Mon, 6 Jul 2020 10:50:55 -0400 Subject: [PATCH] update-kernel: use -nopad -Xbcj for modloop reduces x86 modloop size by about 38k. -all-time 0 reduces by 300 bytes more, but probably more confusing than it's worth --- update-kernel.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/update-kernel.in b/update-kernel.in index 67eb94b..d0b67e8 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -317,7 +317,13 @@ if [ -e "$ROOT"/lib/modules/*/kernel/drivers/bluetooth/btbcm.ko ]; then done fi -mksquashfs $MODLOOP "$STAGING/$MODIMG" -comp xz -exit-on-error +case $ARCH in + armhf) mksfs="-Xbcj arm" ;; + armv7|aarch64) mksfs="-Xbcj arm,armthumb" ;; + x86|x86_64) mksfs="-Xbcj x86" ;; + *) mksfs= +esac +mksquashfs $MODLOOP "$STAGING/$MODIMG" -comp xz -exit-on-error -nopad $mksfs if [ -n "$MODLOOPSIGN" ]; then sign_modloop "$STAGING/$MODIMG" -- 2.30.0