include all fs modules in initrd since it is needed
parent
cf6024417a
commit
0c233c5ca8
|
|
@ -29,6 +29,12 @@ copy_including_deps()
|
||||||
copy_including_deps "$LIB"
|
copy_including_deps "$LIB"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for MOD in $(find "$1" -type f | grep .ko); do
|
||||||
|
for DEP in $(cat /$LMK/modules.dep | fgrep /$(basename $MOD):); do
|
||||||
|
copy_including_deps "/$LMK/$DEP"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
shift
|
shift
|
||||||
if [ "$1" != "" ]; then
|
if [ "$1" != "" ]; then
|
||||||
copy_including_deps "$@"
|
copy_including_deps "$@"
|
||||||
|
|
@ -66,17 +72,13 @@ mknod $INITRAMFS/dev/tty4 c 4 4
|
||||||
#copy_including_deps /usr/bin/strace
|
#copy_including_deps /usr/bin/strace
|
||||||
#copy_including_deps /usr/bin/lsof
|
#copy_including_deps /usr/bin/lsof
|
||||||
|
|
||||||
# TODO: add all common filesystems which are NOT compiled in kernel already
|
copy_including_deps /$LMK/kernel/fs # all filesystems
|
||||||
copy_including_deps /$LMK/kernel/fs/aufs
|
|
||||||
copy_including_deps /$LMK/kernel/fs/squashfs
|
|
||||||
copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram
|
copy_including_deps /$LMK/kernel/drivers/staging/zsmalloc # needed by zram
|
||||||
copy_including_deps /$LMK/kernel/drivers/staging/zram
|
copy_including_deps /$LMK/kernel/drivers/block/zram
|
||||||
copy_including_deps /$LMK/kernel/drivers/block/loop.*
|
copy_including_deps /$LMK/kernel/drivers/block/loop.*
|
||||||
copy_including_deps /$LMK/kernel/fs/fuse
|
|
||||||
copy_including_deps /$LMK/kernel/fs/isofs
|
|
||||||
copy_including_deps /$LMK/modules.*
|
|
||||||
|
|
||||||
# usb drivers
|
# usb drivers
|
||||||
|
copy_including_deps /$LMK/kernel/drivers/usb/storage/usb-storage.*
|
||||||
copy_including_deps /$LMK/kernel/drivers/usb/host
|
copy_including_deps /$LMK/kernel/drivers/usb/host
|
||||||
copy_including_deps /$LMK/kernel/drivers/usb/common
|
copy_including_deps /$LMK/kernel/drivers/usb/common
|
||||||
copy_including_deps /$LMK/kernel/drivers/usb/core
|
copy_including_deps /$LMK/kernel/drivers/usb/core
|
||||||
|
|
@ -93,6 +95,9 @@ copy_including_deps /$LMK/kernel/drivers/scsi/scsi_mod.*
|
||||||
copy_including_deps /$LMK/kernel/drivers/scsi/sg.*
|
copy_including_deps /$LMK/kernel/drivers/scsi/sg.*
|
||||||
copy_including_deps /$LMK/kernel/drivers/ata
|
copy_including_deps /$LMK/kernel/drivers/ata
|
||||||
|
|
||||||
|
copy_including_deps /$LMK/modules.*
|
||||||
|
|
||||||
|
|
||||||
find $INITRAMFS -name "*.ko.gz" -exec gunzip {} \;
|
find $INITRAMFS -name "*.ko.gz" -exec gunzip {} \;
|
||||||
|
|
||||||
# trim modules.order file. Perhaps we could remove it entirely
|
# trim modules.order file. Perhaps we could remove it entirely
|
||||||
|
|
@ -119,3 +124,4 @@ echo $INITRAMFS.img
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
rm -Rf $INITRAMFS
|
rm -Rf $INITRAMFS
|
||||||
|
#mv $INITRAMFS.img /tmp/initrfs.img
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,7 @@ modprobe_everything()
|
||||||
echo_green_star >&2
|
echo_green_star >&2
|
||||||
echo "Probing for hardware" >&2
|
echo "Probing for hardware" >&2
|
||||||
|
|
||||||
find /lib/modules/ | while read MODULE; do
|
find /lib/modules/ | fgrep .ko | xargs -n 1 modprobe 2>/dev/null
|
||||||
modprobe $MODULE 2>/dev/null
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -316,7 +314,7 @@ init_network_dev()
|
||||||
|
|
||||||
# If we are here, none of the above specified modules worked.
|
# If we are here, none of the above specified modules worked.
|
||||||
# As a last chance, try to modprobe everything.
|
# As a last chance, try to modprobe everything.
|
||||||
find /lib/modules/ | xargs -n 1 modprobe
|
modprobe_everything
|
||||||
cat /proc/net/dev | grep : | grep -v lo: | cut -d : -f 1 | tr -d " " | head -n 1
|
cat /proc/net/dev | grep : | grep -v lo: | cut -d : -f 1 | tr -d " " | head -n 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue