mkmodpack: include leading directories for firmware files
The kernel needs leading directories in the cpio archive when creating rootfs. Otherwise, the files will not be copied.
This commit is contained in:
parent
eee4e636d9
commit
7738617c4c
13
mkmodpack
13
mkmodpack
@ -136,13 +136,12 @@ AddModuleFirmware()
|
||||
Warning "Firmware file \"$fw_name\" for module \"$mod_name\" not found"
|
||||
continue
|
||||
}
|
||||
[ "$fw_name" = "${fw_name##*/}" ] || {
|
||||
[ -n "$fw_privdir" ] || {
|
||||
fw_privdir="${fw_name%/*}"
|
||||
FILES="$FILES
|
||||
fw_privdir=$fw_name
|
||||
while [ ! "$fw_privdir" = "${fw_name%%/*}" ]; do
|
||||
fw_privdir="${fw_privdir%/*}"
|
||||
FILES="$FILES
|
||||
dir /lib/firmware/$fw_privdir 0755 0 0"
|
||||
}
|
||||
}
|
||||
done
|
||||
FILES="$FILES
|
||||
file /lib/firmware/$fw_name $fw_file 0644 0 0"
|
||||
done
|
||||
@ -223,7 +222,7 @@ depmod -a -F "/boot/System.map-$KERNEL" -b "$WORKDIR" "$KERNEL" || Fatal "Failed
|
||||
cd "$WORKDIR"
|
||||
find "lib/modules/$KERNEL" -type d |sed -e 's,^.\+$,dir\t/&\t0755\t0 0,g'
|
||||
find "lib/modules/$KERNEL" -type f |sed -e "s,^.\+$,file\t/&\t$WORKDIR/&\t0644\t0 0,g"
|
||||
echo "$FILES"
|
||||
echo "$FILES"|sort -k2|uniq
|
||||
) > "$TEMPLATE"
|
||||
|
||||
if [ -n "$OUTPUT" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user