[leaf-commits] src/bering-uclibc4/source/modules modutils.cfg, NONE, 1.1 buildtool.cfg, 1.3, 1.4 buildtool.mk, 1.1.1.1, 1.2 modutils, 1.3, 1.4

Andrew <[email protected]>
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/modules
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1282/modules

Modified Files:
	buildtool.cfg buildtool.mk modutils 
Added Files:
	modutils.cfg 
Log Message:
Added auto-loading of device drivers for supported hardware


Index: modutils
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/modules/modutils,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** modutils	23 May 2010 10:50:50 -0000	1.3
--- modutils	18 Jun 2010 15:40:43 -0000	1.4
***************
*** 7,14 ****
  RCDLINKS="S,S20"
  
  PATH="/sbin:/bin:/usr/sbin:/usr/bin"
  
! kernel=`uname -r`
! ln -s /lib/modules /lib/modules/$kernel
  
  # Loop over every line in /etc/modules.
--- 7,20 ----
  RCDLINKS="S,S20"
  
+ . /etc/modutils.conf
+ 
  PATH="/sbin:/bin:/usr/sbin:/usr/bin"
  
! lsalias () {	for i in $@; do
! 		    cat /sys/bus/$i/devices/*/modalias 2>/dev/null;
! 		done; }
! 
! #kernel=`uname -r`
! #ln -s /lib/modules /lib/modules/$kernel
  
  # Loop over every line in /etc/modules.
***************
*** 31,32 ****
--- 37,54 ----
  	logger modutils module $module could not be loaded
  done
+ 
+ #autodetection of hardware
+ 
+ #load device drivers
+ for i in `lsalias $BUSLIST`; do
+ 	/sbin/modprobe $i 2>/dev/null
+ done
+ 
+ # wait for drives
+ [ "$DRV_WAIT" -gt 0 ] && sleep $DRV_WAIT
+ 
+ #load scsi drivers (SATA/IDE drives, flash)
+ for i in `lsalias scsi`; do
+ 	/sbin/modprobe $i 2>/dev/null
+ done
+                 
\ No newline at end of file

Index: buildtool.mk
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/modules/buildtool.mk,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** buildtool.mk	26 Apr 2010 09:02:44 -0000	1.1.1.1
--- buildtool.mk	18 Jun 2010 15:40:43 -0000	1.2
***************
*** 18,21 ****
--- 18,22 ----
  	cp -a modules $(CONFIG_TARGET_DIR)/etc
  	cp -a modutils $(CONFIG_TARGET_DIR)/etc/init.d
+ 	cp -a modutils.conf $(CONFIG_TARGET_DIR)/etc
  	cp -a $(CONFIG_TARGET_DIR)/* $(BT_STAGING_DIR)
  	touch $(CONFIG_DIR)/.build

Index: buildtool.cfg
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/modules/buildtool.cfg,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** buildtool.cfg	25 May 2010 15:39:35 -0000	1.3
--- buildtool.cfg	18 Jun 2010 15:40:43 -0000	1.4
***************
*** 20,24 ****
  	<modules>
  			Version  = 2.6.x
! 			Revision = 6
  
  			Help <<EOF
--- 20,24 ----
  	<modules>
  			Version  = 2.6.x
! 			Revision = 7
  
  			Help <<EOF
***************
*** 49,52 ****
--- 49,61 ----
  				</File>
  				<File>
+ 					Filename	= etc/modutils.conf
+ 					Source		= etc/modutils.conf
+ 					Description	= config for modules loader
+ 					Type		= conf
+ 					Type		= local
+ 					Type		= binary
+ 					Permissions	= 644
+ 				</File>
+ 				<File>
  					Filename	= etc/init.d/modutils
  					Source		= etc/init.d/modutils

--- NEW FILE: modutils.cfg ---
#Delay in seconds before loading SCSI device drivers
DRV_WAIT=1

#List of busses in /sys/bus for scanning
BUSLIST="pnp pci pci_express acpi platform serio"

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.