slugos-init: Further improvements to module loading
authorMichael-Luke Jones <mlj28@cam.ac.uk>
Thu, 28 Sep 2006 15:41:26 +0000 (15:41 +0000)
committerMichael-Luke Jones <mlj28@cam.ac.uk>
Thu, 28 Sep 2006 15:41:26 +0000 (15:41 +0000)
packages/slugos-init/files/boot/disk
packages/slugos-init/files/initscripts/loadmodules.sh
packages/slugos-init/files/modulefunctions [new file with mode: 0644]
packages/slugos-init/slugos-init_0.10.bb

index d0b093c..dca1e42 100644 (file)
@@ -26,7 +26,7 @@ then
        #
        # load USB & SCSI storage modules (/proc required!)
        echo "boot: loading modules required for boot"
-       loadusbmods
+       loaddiskmods
        #
        # Mount read-write because before exec'ing init
        # If a UUID is given (in the environment) this
index 1bc540a..e80f995 100644 (file)
@@ -1,18 +1,15 @@
 #!/bin/sh
 
 # This script is used for loading modules required by SlugOS
-# Currently, this script only supports the NSLU2
+# This script may not be necessary if udev is present, but is included
+# for 'backup' purposes in case udev is playing silly buggers
 
-. /etc/default/functions # Load $(machine) function required
-. /etc/default/modulefunctions
+. /etc/default/modulefunctions # Load module loading logic
 
-echo "Loading networking modules"
 loadnetmods
 
-echo "Loading usb storage modules"
-loadusbmods
+loaddiskmods
 
-echo "Loading other modules"
 loadmiscmods
 
 exit 0
diff --git a/packages/slugos-init/files/modulefunctions b/packages/slugos-init/files/modulefunctions
new file mode 100644 (file)
index 0000000..c6719d4
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+# . this file to load the functions for automatically loading modules
+
+. /etc/default/functions
+
+loaddiskmods(){
+       modprobe scsi_mod
+       modprobe sd_mod 
+       modprobe usbcore 
+       case "$(machine)" in
+           nslu2)                     
+               modprobe ehci-hcd
+               modprobe ohci-hcd
+               ;;
+            nas100d)
+                modprobe ehci-hcd
+                modprobe uhci-hcd
+                ;;
+
+       esac
+       modprobe usb-storage
+}
+
+loadnetmods(){
+       modprobe af_packet
+       case "$(machine)" in
+           ixdp425|nslu2|nas100d)
+               modprobe ixp4xx_mac
+               ;;                     
+       esac
+}
+
+loadmiscmods(){
+       modprobe ixp4xx_rng
+       modprobe i2c_dev
+}
+
index 66e2ae5..d6ce0b5 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r68"
+PR = "r69"
 
 SRC_URI = "file://boot/flash \
           file://boot/disk \