[aadk-commits] qwell: branch uClinux/upstreamsync r294 - /uClinux/branches/upstreamsync/uCli...

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Fri Mar 30 15:23:57 MST 2007


Author: qwell
Date: Fri Mar 30 17:23:57 2007
New Revision: 294

URL: http://svn.digium.com/view/aadk?view=rev&rev=294
Log:
Pull in rc script updates from trunk

Modified:
    uClinux/branches/upstreamsync/uClinux-dist/vendors/Digium/S800I/rc

Modified: uClinux/branches/upstreamsync/uClinux-dist/vendors/Digium/S800I/rc
URL: http://svn.digium.com/view/aadk/uClinux/branches/upstreamsync/uClinux-dist/vendors/Digium/S800I/rc?view=diff&rev=294&r1=293&r2=294
==============================================================================
--- uClinux/branches/upstreamsync/uClinux-dist/vendors/Digium/S800I/rc (original)
+++ uClinux/branches/upstreamsync/uClinux-dist/vendors/Digium/S800I/rc Fri Mar 30 17:23:57 2007
@@ -3,6 +3,36 @@
 echo "Settup up ramfs..."
 mount -t ramfs none /ramfs
 ( cd / ; gzip -dc ramfs.tgz | tar xf - -C ramfs/ )
+
+# parse configuration arguments passed to ucLinux
+#	Pull info from init process environ
+BOARDREV=`cat /proc/1/environ | grep boardrev`
+echo $BOARDREV
+if [ "" != "$BOARDREV" ]; then 
+	export $BOARDREV
+fi
+SKU=`cat /proc/1/environ | grep productsku`
+echo $SKU
+if [ "" != "$SKU" ]; then 
+	export $SKU
+fi
+CAPABILITY=`cat /proc/1/environ | grep capability`
+echo $CAPABILITY
+if [ "" != "$CAPABILITY" ]; then 
+	export $CAPABILITY
+fi
+
+modprobe sx00i_cfgswx
+CFGSWX=`cat /proc/cfgswx | grep CFGSWX=1`
+if [ "$CFGSWX" = "CFGSWX=1" ]; then
+	sleep 1
+	CFGSWX=`cat /proc/cfgswx | grep CFGSWX=1`
+	if [ "$CFGSWX" = "CFGSWX=1" ]; then
+		echo "CONFIGURATION RESET Requested ***********************************"
+		reset_config
+	fi
+fi
+echo "Done checking for Configuration Reset"
 
 echo -n "Reading config..."
 if restore_config; then
@@ -20,27 +50,11 @@
 modprobe orinoco_cs
 modprobe ide-cs
 modprobe blackfin_wd
-modprobe i2c-bfin-twi
-modprobe i2c-dev
-modprobe hwmon
-modprobe lm75
-modprobe sx00i_cfgswx
 
 # mount sysfs to get access to i2c devices
 mount -t sysfs none /sys
 #mount devpts to allow for use of UNIX98 pty's 
 mount -t devpts none /dev/pts
-		
-CFGSWX=`cat /proc/cfgswx | grep CFGSWX=1`
-if [ "$CFGSWX" = "CFGSWX=1" ]; then
-	sleep 1
-	CFGSWX=`cat /proc/cfgswx | grep CFGSWX=1`
-	if [ "$CFGSWX" = "CFGSWX=1" ]; then
-		echo "CONFIGURATION RESET Requested"
-		reset_config
-	fi
-fi
-echo "Done checking for Configuration Reset"
 		
 echo -n "Looking for IP address..."
 
@@ -131,4 +145,15 @@
 	echo "Running local stuff..."
 	. /etc/config/rc.local
 fi
+
+modprobe i2c-bfin-twi
+modprobe i2c-dev
+
+if [ "$boardrev" != "A" ]; then
+	echo "Attempting to communicate to I2C Devices"
+	modprobe eeprom
+	modprobe hwmon
+	modprobe lm75
+fi
+
 cat /etc/motd



More information about the aadk-commits mailing list