summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/slugos-init/files')
-rw-r--r--packages/slugos-init/files/initscripts/loadmiscmod.sh12
-rw-r--r--packages/slugos-init/files/initscripts/loadmodules.sh42
-rw-r--r--packages/slugos-init/files/initscripts/loadnetmod.sh17
-rw-r--r--packages/slugos-init/files/initscripts/loadusbmod.sh20
4 files changed, 42 insertions, 49 deletions
diff --git a/packages/slugos-init/files/initscripts/loadmiscmod.sh b/packages/slugos-init/files/initscripts/loadmiscmod.sh
deleted file mode 100644
index d2d09821f1..0000000000
--- a/packages/slugos-init/files/initscripts/loadmiscmod.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# This script is used for loading modules required for other purposes than
-# usb or networking
-
-# A way of finding which embedded board SlugOS is being run on is needed
-
-echo "Loading misc modules"
-modprobe ixp4xx_rng
-modprobe i2c_dev
-
-exit 0 \ No newline at end of file
diff --git a/packages/slugos-init/files/initscripts/loadmodules.sh b/packages/slugos-init/files/initscripts/loadmodules.sh
new file mode 100644
index 0000000000..2ed4156ab0
--- /dev/null
+++ b/packages/slugos-init/files/initscripts/loadmodules.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# This script is used for loading modules required by SlugOS
+# Currently, this script only supports the NSLU2
+
+. /etc/default/functions # Load $(machine) function required
+
+echo "Loading networking modules"
+
+modprobe af_packet # Required for DHCP
+
+modprobe ixp4xx_npe
+sleep 1 # Allow firmware load to occur
+
+# Add nas100d/loft below when mac definition is added to kernel
+case "$(machine)" in
+ ixdp425|nslu2)
+ modprobe ixp4xx_mac
+ ;;
+esac
+
+# Add conditional DSM-G600 ethernet module load
+
+echo "Loading usb storage modules"
+modprobe scsi_mod
+modprobe usbcore
+
+# Add more entries as appropriate
+case "$(machine)" in
+ nslu2)
+ modprobe ohci_hcd
+ modprobe ehci_hcd
+ ;;
+esac
+
+modprobe usb_storage
+
+echo "Loading other modules"
+modprobe ixp4xx_rng
+modprobe i2c_dev
+
+exit 0 \ No newline at end of file
diff --git a/packages/slugos-init/files/initscripts/loadnetmod.sh b/packages/slugos-init/files/initscripts/loadnetmod.sh
deleted file mode 100644
index eb8f3eb9dd..0000000000
--- a/packages/slugos-init/files/initscripts/loadnetmod.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# This script is used for loading modules required for networking
-
-# A way of finding which embedded board SlugOS is being run on is needed
-
-echo "Loading networking modules"
-
-modprobe af_packet #Required for DHCP
-
-modprobe ixp4xx_npe
-sleep 1 #Allow Firmware Load
-
-#Conditional required: Not all IXP4xx boards use onboard MAC
-modprobe ixp4xx_mac
-
-exit 0 \ No newline at end of file
diff --git a/packages/slugos-init/files/initscripts/loadusbmod.sh b/packages/slugos-init/files/initscripts/loadusbmod.sh
deleted file mode 100644
index 92866dcf6d..0000000000
--- a/packages/slugos-init/files/initscripts/loadusbmod.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# This script is used for loading modules required for usb storage devices
-# As this script is run very early in the boot process, insmod is used
-
-echo "Loading usb storage modules"
-insmod /lib/modules/2.6.18/kernel/drivers/scsi/scsi_mod.ko
-insmod /lib/modules/2.6.18/kernel/drivers/usb/core/usbcore.ko
-#Conditional required: NSLU2 has ohci/ehci but others have uhci/ehci
-insmod /lib/modules/2.6.18/kernel/drivers/usb/host/ohci-hcd.ko
-insmod /lib/modules/2.6.18/kernel/drivers/usb/host/ehci-hcd.ko
-insmod /lib/modules/2.6.18/kernel/drivers/usb/storage/usb-storage.ko
-
-echo "Loading ext2/3 support"
-insmod /lib/modules/2.6.18/kernel/fs/mbcache.ko
-insmod /lib/modules/2.6.18/kernel/fs/jbd/jbd.ko
-insmod /lib/modules/2.6.18/kernel/fs/ext2/ext2.ko
-insmod /lib/modules/2.6.18/kernel/fs/ext3/ext3.ko
-
-exit 0 \ No newline at end of file