[aadk-commits] dbailey: uClinux/trunk r208 - /uClinux/trunk/uClinux-dist/vendors/Digium/S800I/

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Wed Mar 7 16:39:06 MST 2007


Author: dbailey
Date: Wed Mar  7 17:39:05 2007
New Revision: 208

URL: http://svn.digium.com/view/aadk?view=rev&rev=208
Log:
Updated scripts to handle arguments passed to the uClinux from the bootloader

Modified:
    uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc

Modified: uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc?view=diff&rev=208&r1=207&r2=208
==============================================================================
--- uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc (original)
+++ uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc Wed Mar  7 17:39:05 2007
@@ -3,6 +3,24 @@
 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
 
 echo -n "Reading config..."
 if restore_config; then
@@ -130,11 +148,10 @@
 
 modprobe i2c-bfin-twi
 modprobe i2c-dev
-modprobe eeprom
 
-I2CEEPROMADDR=`ls /sys/bus/i2c/devices/ | grep "0-0050" `
-if [ "$I2CEEPROMADDR" = "0-0050" ]; then
-	echo "I2C Devices detected"
+if [ "$boardrev" != "A" ]; then
+	echo "Attempting to communicate to I2C Devices"
+	modprobe eeprom
 	modprobe hwmon
 	modprobe lm75
 fi



More information about the aadk-commits mailing list