Commit cd22dcd0 authored by Natanael Copa's avatar Natanael Copa

Merge branch '4-mkinitfs-fails-if-feature-list-is-empty' into 'master'

Fix for issue #4 "mkinitfs fails if feature list is empty"

Closes #4

See merge request !66
parents f90d4099 a3b59159
......@@ -121,7 +121,8 @@ initfs_kmods() {
cd "${basedir}"
for file in $(find_kmods); do
echo "${file#/}"
done | sort -u | cpio --quiet -pdm "$tmpdir" || return 1
# DO NOT return with 1 if there are no custom modules for initramfs
done | sort -u | cpio --quiet -pdm "$tmpdir"
for file in modules.order modules.builtin; do
if [ -f "$kerneldir"/$file ]; then
cp "$kerneldir"/$file "$tmpdir"/lib/modules/$kernel/
......@@ -135,6 +136,9 @@ initfs_firmware() {
[ -z "$nokernel" ] || return 0
rm -rf "$tmpdir"/lib/firmware
mkdir -p "$tmpdir"/lib/firmware
# Verify if there are initfs modules
_modules=`find "$tmpdir"/lib/modules -type f -name "*.ko" -print -quit`
[ -n "$_modules" ] || return 0
find "$tmpdir"/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -u | while read FW; do
[ -e "${basedir}/lib/firmware/${FW}" ] && install -pD "${basedir}/lib/firmware/${FW}" "$tmpdir"/lib/firmware/$FW
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment