From 2504097d53ca26b8db307a4351b3e8ab0a946a7b Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 17 Nov 2022 14:54:07 +0100 Subject: Revert "update-kernel: fix modloop construction" This was broken. ref https://gitlab.alpinelinux.org/alpine/alpine-conf/-/merge_requests/124#note_274593 This reverts commit 1e1ac71fc0e6efe8c6bacc5ff3ba6429a97330cd. --- update-kernel.in | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'update-kernel.in') diff --git a/update-kernel.in b/update-kernel.in index 46b920d..dd764a0 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -296,16 +296,13 @@ mkdir $MODLOOP $STAGING cp -a $ROOTFS/lib/modules $MODLOOP mkdir -p $MODLOOP/modules/firmware find $ROOTFS/lib/modules -type f -name "*.ko*" | xargs modinfo -k $KVER -F firmware | sort -u | while read FW; do - # eventually expand $FW containing * wildcard in name - for _FW in $( basename "$ROOTFS/lib/firmware/$FW" ); do - if [ -e "$ROOTFS/lib/firmware/$_FW" ]; then - install -pD $ROOTFS/lib/firmware/$_FW $MODLOOP/modules/firmware/$_FW - # copy also all potentially associated files - for _file in "$ROOTFS"/lib/firmware/"${_FW%.*}".*; do - install -pD "$_file" "$MODLOOP/modules/firmware/${_file#*/lib/firmware/}" - done - fi - done + if [ -e "$ROOTFS/lib/firmware/$FW" ]; then + install -pD $ROOTFS/lib/firmware/$FW $MODLOOP/modules/firmware/$FW + # copy also all potentially associated files + for _file in "$ROOTFS"/lib/firmware/"${FW%.*}".*; do + install -pD "$_file" "$MODLOOP/modules/firmware/${_file#*/lib/firmware/}" + done + fi done # install extra firmware files in modloop (i.e. not detected by modinfo) -- cgit v1.2.3