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
11
mkmodpack
11
mkmodpack
@ -136,13 +136,12 @@ AddModuleFirmware()
|
|||||||
Warning "Firmware file \"$fw_name\" for module \"$mod_name\" not found"
|
Warning "Firmware file \"$fw_name\" for module \"$mod_name\" not found"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
[ "$fw_name" = "${fw_name##*/}" ] || {
|
fw_privdir=$fw_name
|
||||||
[ -n "$fw_privdir" ] || {
|
while [ ! "$fw_privdir" = "${fw_name%%/*}" ]; do
|
||||||
fw_privdir="${fw_name%/*}"
|
fw_privdir="${fw_privdir%/*}"
|
||||||
FILES="$FILES
|
FILES="$FILES
|
||||||
dir /lib/firmware/$fw_privdir 0755 0 0"
|
dir /lib/firmware/$fw_privdir 0755 0 0"
|
||||||
}
|
done
|
||||||
}
|
|
||||||
FILES="$FILES
|
FILES="$FILES
|
||||||
file /lib/firmware/$fw_name $fw_file 0644 0 0"
|
file /lib/firmware/$fw_name $fw_file 0644 0 0"
|
||||||
done
|
done
|
||||||
@ -223,7 +222,7 @@ depmod -a -F "/boot/System.map-$KERNEL" -b "$WORKDIR" "$KERNEL" || Fatal "Failed
|
|||||||
cd "$WORKDIR"
|
cd "$WORKDIR"
|
||||||
find "lib/modules/$KERNEL" -type d |sed -e 's,^.\+$,dir\t/&\t0755\t0 0,g'
|
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"
|
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"
|
) > "$TEMPLATE"
|
||||||
|
|
||||||
if [ -n "$OUTPUT" ]; then
|
if [ -n "$OUTPUT" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user