diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-10-26 19:51:08 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-10-27 16:57:29 +0200 |
commit | 6171fc7e4fb14a70edfd86a794a844c3f07823b9 (patch) | |
tree | ee0a5615769e32244c82786a91277fcdd0be6ed3 /update-kernel.in | |
parent | af3dd2011f928dcb6941fdd90da4daa8db39edde (diff) | |
download | alpine-conf-6171fc7e4fb14a70edfd86a794a844c3f07823b9.zip |
update-kernel: include only needed firmwares in modloop
new modloop (44.9M)
117.9M 4.1.10-0-grsec
39.3M firmware
157.1M total
old modloop (80.8M)
117.9M 4.1.10-0-grsec
112.1M firmware
230.0M total
Diffstat (limited to 'update-kernel.in')
-rw-r--r-- | update-kernel.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/update-kernel.in b/update-kernel.in index f4d2e8c..1327047 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -140,7 +140,7 @@ trap clean_up EXIT $SIGNALS if [ "$SUPERUSER" ]; then - apk add $QUIET_OPT --update-cache -t $VIRTUAL mkinitfs squashfs-tools + apk add $QUIET_OPT --update-cache -t $VIRTUAL mkinitfs squashfs-tools kmod fi if [ -z "$features" ]; then @@ -221,7 +221,10 @@ DTB_STAGING=$TMPDIR/dtbs mkdir $DTB_STAGING $MODLOOP $STAGING cp -a $ROOT/lib/modules $MODLOOP -cp -a $ROOT/lib/firmware $MODLOOP/modules +mkdir -p $MODLOOP/modules/firmware +find $ROOT/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -u | while read FW; do + [ -e "$ROOT/lib/firmware/$FW" ] && install -pD $ROOT/lib/firmware/$FW $MODLOOP/modules/firmware/$FW +done _exec mksquashfs $MODLOOP "$STAGING/$MODIMG" -comp xz _exec mkinitfs -q -b $ROOT -F "$features base squashfs" \ |