Author: qwiat
Date: Sat May 7 10:03:47 2011
New Revision: 12239
Modified:
livecd/mklive/templates/initrd/init
livecd/mklive/templates/isolinux/help.msg
Log:
- added new arg that allow loading all hardware modules
Modified: livecd/mklive/templates/initrd/init
==
--- livecd/mklive/templates/initrd/init (original)
+++ livecd/mklive/templates/initrd/init Sat May 7 10:03:47 2011
@@ -15,6 +15,16 @@
{
lsmod | grep -q ^$1\
}
+load_all_drv_modules()
+{
+ find /lib/modules/$kernel_rel/kernel/drivers/ -name \*.ko \
+ | while read module_path
+ do
+ modprobe $module_path \
+debug loaded module: $module_path \
+ || echo Error: module $module_path not loaded!
+ done
+}
run_debug_shell()
{
echo Processing initrd interrupted, dropping to shell.
@@ -32,29 +42,43 @@
for arg in $@
do
[ $arg = 'debuginitrd' ] debugmode=1
+ [ $arg = 'allmodules' ] loadAllModules=1
done
mount -t proc none /proc
mount -t sysfs none /sys
echo 0 /proc/sys/kernel/printk # shut up!
-# Loading kernel modules
+# Loading basic kernel modules
kernel_rel=$(uname -r)
echo Kernel: $kernel_rel
echo Loading basic modules...
-load_module crc16 crc-t10dif loop isofs squashfs
+load_module crc16 crc-t10dif loop isofs squashfs aufs
echo Loading hardware modules...
load_module cdrom scsi_mod sg sr_mod scsi_wait_scan usbhid hid usbcore
usb-storage ehci-hcd ohci-hcd uhci-hcd xhci-hcd
rmmod scsi_wait_scan
is_module_loaded aufs echo AUFS enabled || load_module unionfs
-echo Detecting host adapter device...
-pci_modules=$(/bin/pcimodules)
-[ -z $pci_modules ] echo Error: No host adapter modules found
-for module in $pci_modules
-do
- load_module $module
-done
+# Loading hostadapter modules
+if [ -z $loadAllModules ]
+then
+ echo Detecting host adapter device...
+ pci_modules=$(/bin/pcimodules)
+ if [ ! -z $pci_modules ]
+ then
+ for module in $pci_modules
+ do
+ load_module $module
+ done
+ else
+ echo Error: No host adapter modules detected
+ echo Loading all modules...
+ load_all_drv_modules
+ fi
+else
+ echo Loading all modules...
+ load_all_drv_modules
+fi
echo 'Starting udev daemon'
/bin/udevd --daemon
Modified: livecd/mklive/templates/isolinux/help.msg
==
--- livecd/mklive/templates/isolinux/help.msg (original)
+++ livecd/mklive/templates/isolinux/help.msg Sat May 7 10:03:47 2011
@@ -7,6 +7,6 @@
noapicDisable the Advanced Programmable Interrupt Controller
noacpiThis parameter disables the whole ACPI system
debuginitrd Run debug shell after initrd process
-
+ allmodulesDon't use autodetection, load all hardware modules instead.
press any key to return to menu
___
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit