me8100-driver
changeset 3 fc24e3b47731
parent 0 c9b8efdb5369
equal deleted inserted replaced
2:3345048104fc 3:fc24e3b47731
    19 case "$1" in
    19 case "$1" in
    20     start)
    20     start)
    21 	echo -n "Starting me8100 driver "
    21 	echo -n "Starting me8100 driver "
    22 	/sbin/insmod -f $module.o || return=$rc_failed
    22 	/sbin/insmod -f $module.o || return=$rc_failed
    23 	rm -f /dev/${device}
    23 	rm -f /dev/${device}
    24 	rm -f /dev/${device}_[0-3]
    24 	rm -f /dev/${device}_[0-3]*
    25 	major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
    25 	major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
    26 
    26 
    27 	echo -n "with major number $major"
    27 	echo -n "with major number $major"
    28 
    28 
    29 	# Make the device nodes in the dev. file system for 4 boards
    29 	# Make the device nodes in the dev. file system for 4 boards
    30 	mknod /dev/${device}_0 c $major 0
    30 	mknod /dev/${device}_0 c $major 0
    31 	mknod /dev/${device}_1 c $major 1
    31 	mknod /dev/${device}_1 c $major 1
    32 	mknod /dev/${device}_2 c $major 2
    32 	mknod /dev/${device}_2 c $major 2
    33 	mknod /dev/${device}_3 c $major 3
    33 	mknod /dev/${device}_3 c $major 3
       
    34 
       
    35 	mknod /dev/${device}_0a c $major 16		# Port A
       
    36 	mknod /dev/${device}_0b c $major 32		# Port B
       
    37 	mknod /dev/${device}_0c c $major 64		# Counter
       
    38 
       
    39 	mknod /dev/${device}_1a c $major 17
       
    40 	mknod /dev/${device}_1b c $major 33
       
    41 	mknod /dev/${device}_1c c $major 65
    34 	
    42 	
    35 	# Set a default link to the first dev
    43 	# Set a default link to the first dev
    36 	ln -s /dev/${device}_0 /dev/${device}
    44 	ln -s /dev/${device}_0 /dev/${device}
    37 
    45 
    38 	# Give appropriate group permissions
    46 	# Give appropriate group permissions