diff options
author | macmpi <spam@ipik.org> | 2022-09-29 16:28:33 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-11-08 15:52:06 +0000 |
commit | 1e1ac71fc0e6efe8c6bacc5ff3ba6429a97330cd (patch) | |
tree | 5349281c62a545a483c95ba4a2b7174ded78340e | |
parent | 16f55f57ca117b6be7551330e3fd0054a5f97d67 (diff) | |
download | alpine-conf-1e1ac71fc0e6efe8c6bacc5ff3ba6429a97330cd.zip |
update-kernel: fix modloop construction
some module refer to wildcarded firmware name: ensure proper handling
-rw-r--r-- | update-kernel.in | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/update-kernel.in b/update-kernel.in index e6d0a82..ebb2552 100644 --- a/update-kernel.in +++ b/update-kernel.in @@ -296,13 +296,16 @@ mkdir $MODLOOP $STAGING cp -a $ROOT/lib/modules $MODLOOP mkdir -p $MODLOOP/modules/firmware find $ROOT/lib/modules -type f -name "*.ko*" | xargs modinfo -k $KVER -F firmware | sort -u | while read FW; do - if [ -e "$ROOT/lib/firmware/$FW" ]; then - install -pD $ROOT/lib/firmware/$FW $MODLOOP/modules/firmware/$FW - # copy also all potentially associated files - for _file in "$ROOT"/lib/firmware/"${FW%.*}".*; do - install -pD "$_file" "$MODLOOP/modules/firmware/${_file#*/lib/firmware/}" - done - fi + # eventually expand $FW containing * wildcard in name + for _FW in $( basename "$ROOT/lib/firmware/$FW" ); do + if [ -e "$ROOT/lib/firmware/$_FW" ]; then + install -pD $ROOT/lib/firmware/$_FW $MODLOOP/modules/firmware/$_FW + # copy also all potentially associated files + for _file in "$ROOT"/lib/firmware/"${_FW%.*}".*; do + install -pD "$_file" "$MODLOOP/modules/firmware/${_file#*/lib/firmware/}" + done + fi + done done # install extra firmware files in modloop (i.e. not detected by modinfo) |