summaryrefslogtreecommitdiff
path: root/packages/slugos-init
diff options
context:
space:
mode:
authorMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-28 15:41:26 +0000
committerMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-28 15:41:26 +0000
commit1decdb826d58ca77eedf9516b4b250b03d398afc (patch)
treef47c9e97068dda1786e8b34453b1a5895f580a7d /packages/slugos-init
parentc4de89456a82bc97d97b0905f33f825ee303a099 (diff)
slugos-init: Further improvements to module loading
Diffstat (limited to 'packages/slugos-init')
-rw-r--r--packages/slugos-init/files/boot/disk2
-rw-r--r--packages/slugos-init/files/initscripts/loadmodules.sh11
-rw-r--r--packages/slugos-init/files/modulefunctions37
-rw-r--r--packages/slugos-init/slugos-init_0.10.bb2
4 files changed, 43 insertions, 9 deletions
diff --git a/packages/slugos-init/files/boot/disk b/packages/slugos-init/files/boot/disk
index d0b093c602..dca1e422aa 100644
--- a/packages/slugos-init/files/boot/disk
+++ b/packages/slugos-init/files/boot/disk
@@ -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
diff --git a/packages/slugos-init/files/initscripts/loadmodules.sh b/packages/slugos-init/files/initscripts/loadmodules.sh
index 1bc540a148..e80f995598 100644
--- a/packages/slugos-init/files/initscripts/loadmodules.sh
+++ b/packages/slugos-init/files/initscripts/loadmodules.sh
@@ -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
index 0000000000..c6719d4f79
--- /dev/null
+++ b/packages/slugos-init/files/modulefunctions
@@ -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
+}
+
diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb
index 66e2ae5712..d6ce0b5f65 100644
--- a/packages/slugos-init/slugos-init_0.10.bb
+++ b/packages/slugos-init/slugos-init_0.10.bb
@@ -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 \