summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux-hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux-hotplug')
-rw-r--r--meta/packages/linux-hotplug/files/collie/usbd1
-rwxr-xr-xmeta/packages/linux-hotplug/files/mmc.agent52
-rwxr-xr-xmeta/packages/linux-hotplug/files/sleeve.agent120
-rwxr-xr-xmeta/packages/linux-hotplug/files/sleeve.rc60
-rw-r--r--meta/packages/linux-hotplug/files/soc.agent62
-rw-r--r--meta/packages/linux-hotplug/files/sysconfig-hotplug12
-rw-r--r--meta/packages/linux-hotplug/files/sysconfig-usb0
-rw-r--r--meta/packages/linux-hotplug/files/tosa/sysconfig-usb2
-rw-r--r--meta/packages/linux-hotplug/files/usbd2
-rwxr-xr-xmeta/packages/linux-hotplug/files/usbd.agent63
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent29
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch43
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/isapnp-exit.diff11
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/logcheck-ignore1
-rwxr-xr-xmeta/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap37
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/usb-storage2
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/usbrc-busybox.patch13
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug-20040920/userspecified_hcd.patch55
-rw-r--r--meta/packages/linux-hotplug/linux-hotplug_20040920.bb73
19 files changed, 638 insertions, 0 deletions
diff --git a/meta/packages/linux-hotplug/files/collie/usbd b/meta/packages/linux-hotplug/files/collie/usbd
new file mode 100644
index 0000000000..38aff0adcb
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/collie/usbd
@@ -0,0 +1 @@
usbdmodule="sa1100_bi"
diff --git a/meta/packages/linux-hotplug/files/mmc.agent b/meta/packages/linux-hotplug/files/mmc.agent
new file mode 100755
index 0000000000..a80daa4603
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/mmc.agent
@@ -0,0 +1,52 @@
1#!/bin/sh
2#
3# H3600 Sleeve hotplug policy agent for Linux 2.4 kernels
4#
5# Kernel NET hotplug params include:
6#
7# ACTION=%s [add or remove]
8# MEDIA=%s
9# SLOT=%d
10#
11
12. /etc/hotplug/hotplug.functions
13#DEBUG=yes export DEBUG
14
15 echo "Executing $0 action=$ACTION, media=$MEDIA ($SLOT)" > /dev/console
16
17MMC_MOUNT_OPTIONS="-t auto -o sync,noatime"
18
19if [ -f /etc/sysconfig/hotplug ] ; then
20 . /etc/sysconfig/hotplug
21fi
22
23case `uname -r` in
242.4*)
25 devpath=mmc/part
26 ;;
27*)
28 devpath=mmcblk0p
29 ;;
30esac
31
32if [ "$ACTION" = "add" ] ; then
33 sleep 4
34 echo -n add > /dev/console
35 for n in 1 2 3 4 ; do
36 device=/dev/$devpath$n
37 if [ "$n" = "1" ] ; then
38 card=/mnt/card
39 else
40 card=/mnt/card$n
41 fi
42 [ -b $device ] || break
43 echo " flash on $device" > /dev/console
44 [ -d $card ] || mkdir -p $card
45 mount $MMC_MOUNT_OPTIONS $device $card
46 done
47
48else
49 for card in /mnt/card*; do
50 umount $card
51 done
52fi
diff --git a/meta/packages/linux-hotplug/files/sleeve.agent b/meta/packages/linux-hotplug/files/sleeve.agent
new file mode 100755
index 0000000000..55befca1b1
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/sleeve.agent
@@ -0,0 +1,120 @@
1#!/bin/sh
2#
3# H3600 Sleeve hotplug policy agent for Linux 2.4 kernels
4#
5# Kernel NET hotplug params include:
6#
7# ACTION=%s [add or remove]
8# VENDOR_ID=%s
9# DEVICE_ID=%x
10# DEVICE_NAME=%s
11#
12
13. /etc/hotplug/hotplug.functions
14#DEBUG=yes export DEBUG
15
16if [ "$DEBUG" != "" ]; then
17 mesg "Executing $0 action=$ACTION, device=$DEVICE_NAME ($VENDOR_ID,$DEVICE_ID)"
18fi
19
20COMPACTFLASH_TIMING_INCREMENT=0
21PCMCIA_TIMING_INCREMENT=0
22DUAL_PCMCIA_TIMING_INCREMENT=0
23NAVMAN_TIMING_INCREMENT=0
24BACKPAQ_TIMING_INCREMENT=-100
25
26if [ -f /etc/sysconfig/hotplug ] ; then
27 . /etc/sysconfig/hotplug
28fi
29
30case $ACTION in
31add)
32 case $DEVICE_NAME in
33 "Compaq Mercury Backpaq")
34 mkdir -p /backpaq
35 echo $BACKPAQ_TIMING_INCREMENT > /proc/sys/backpaq/pcmcia/timing_increment_ns
36 ## mount -t jffs2 /dev/mtdblock/4 /backpaq
37 modprobe h3600_backpaq_fpga || mesg 'could not load backpaq fpga driver'
38 modprobe h3600_backpaq_camera || mesg 'could not load backpaq camera driver'
39 if [ -c /dev/v4l/video0 ] ; then
40 ln -s /dev/v4l/video0 /dev/video0
41 ln -s /dev/v4l/video0 /dev/video
42 fi
43 CAMERATYPE=`/bin/grep "CameraType" /proc/backpaq/camera | /bin/sed -e 's/.*: //'`
44 BACKPAQ_NUMBER=`/bin/grep "Major revision" /proc/backpaq/eeprom | /bin/sed -e 's/.*0x//'`
45 FPGA_NUMBER=`/bin/grep "FPGA version" /proc/backpaq/eeprom | /bin/sed -e 's/.*0x//'`
46 CAMERA_NUMBER=`/bin/grep "Camera" /proc/backpaq/eeprom | /bin/sed -e 's/.*0x//'`
47
48 echo "CAMERA_TYPE = $CAMERATYPE"
49 echo "BACKPAQ_NUMBER = $BACKPAQ_NUMBER"
50 echo "FPGA_NUMBER = $FPGA_NUMBER"
51 echo "CAMERA_NUMBER = $CAMERA_NUMBER"
52 echo "looking for file: /etc/fpga_B${BACKPAQ_NUMBER}_F${FPGA_NUMBER}_C${CAMERA_NUMBER}.bin"
53 if [ -e /etc/fpga_B${BACKPAQ_NUMBER}_F${FPGA_NUMBER}_C${CAMERA_NUMBER}.bin ] ; then
54 cat /etc/fpga_B${BACKPAQ_NUMBER}_F${FPGA_NUMBER}_C${CAMERA_NUMBER}.bin > /dev/backpaq/fpga
55 elif [ -e /etc/fpga_$CAMERATYPE.bin ] ; then
56 cat /etc/fpga_$CAMERATYPE.bin > /dev/backpaq/fpga
57 elif [ -e /etc/fpga.bin ] ; then
58 cat /etc/fpga.bin > /dev/backpaq/fpga
59 else
60 mesg 'unable to program the backpaq fpga'
61 fi
62 modprobe h3600_backpaq_accel || mesg 'could not load backpaq accelerometer driver'
63 mesg 'BackPAQ drivers loaded'
64 ;;
65 "Compaq CompactFlash Sleeve")
66 mesg 'CompactFlash drivers loaded'
67 echo $COMPACTFLASH_TIMING_INCREMENT > /proc/sys/bus/pcmcia/timing_increment_ns
68 ;;
69 "Compaq PC Card Sleeve")
70 mesg 'PC card sleeve drivers loaded'
71 echo $PCMCIA_TIMING_INCREMENT > /proc/sys/bus/pcmcia/timing_increment_ns
72 ;;
73 "Compaq Dual PC Card Sleeve")
74 mesg 'Dual PC card sleeve drivers loaded'
75 echo $DUAL_PCMCIA_TIMING_INCREMENT > /proc/sys/bus/pcmcia/timing_increment_ns
76 ;;
77 "Navman GPS/CF Sleeve")
78 mesg 'Navman GPS sleeve drivers loaded'
79 echo $NAVMAN_TIMING_INCREMENT > /proc/sys/bus/pcmcia/timing_increment_ns
80 start-stop-daemon --start --exec /usr/sbin/gpsd.bin -- -p /dev/tts/0 -s 57600
81 ;;
82 *)
83 mesg "$1 $ACTION event not handled for $DEVICE_NAME"
84 ;;
85 esac
86 ;;
87
88remove)
89 case $DEVICE_NAME in
90 "Compaq Mercury Backpaq")
91 mesg 'Unloading BackPAQ drivers'
92 ## umount /backpaq
93 rmmod h3600_backpaq_camera
94 rmmod h3600_backpaq_accel
95 rmmod h3600_backpaq_fpga
96 ;;
97 "Compaq CompactFlash Sleeve")
98 mesg 'Unloading CompactFlash sleeve'
99 ;;
100 "Compaq PC Card Sleeve")
101 mesg 'Unloading PC Card sleeve'
102 ;;
103 "Compaq Dual PC Card Sleeve")
104 mesg 'Unloading Dual PC Card sleeve'
105 ;;
106 "Navman GPS/CF Sleeve")
107 mesg 'Unloading Navman GPS sleeve'
108 start-stop-daemon --stop --name gpsd.bin
109 ;;
110 *)
111 mesg $1 $ACTION event not handled for $DEVICE_NAME
112 ;;
113 esac
114 ;;
115
116*)
117 mesg "$1 $ACTION event not supported"
118 exit 1 ;;
119
120esac
diff --git a/meta/packages/linux-hotplug/files/sleeve.rc b/meta/packages/linux-hotplug/files/sleeve.rc
new file mode 100755
index 0000000000..864a2eb182
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/sleeve.rc
@@ -0,0 +1,60 @@
1#!/bin/sh
2#
3# H3600 Sleeve hotplug *.rc agent.
4# This script is called by /etc/init.d/hotplug whenever
5# a run level has changed.
6#
7# A single argument is passed - start, restart, status, or stop
8#
9# We set up parameters that are equivalent to the ones created
10# by the Kernel and pass them along to /sbin/hotplug (the
11# function called by the kernel).
12#
13# Kernel NET hotplug params include:
14#
15# ACTION=%s [add or remove]
16# VENDOR_ID=%s
17# DEVICE_ID=%x
18# DEVICE_NAME=%s
19#
20
21. /etc/hotplug/hotplug.functions
22# DEBUG=yes export DEBUG
23
24SLEEVEFILE="/proc/bus/sleeve/device"
25[ ! -f $SLEEVEFILE ] && exit 0
26
27# give the sleeve driver a kick to make sure it recognizes the card -Jamey 6/26/01
28# echo > /proc/sys/sleeve/insert
29
30export DEVICE_NAME=`/bin/grep driver $SLEEVEFILE | /bin/sed -e 's/.*=//'`
31export DEVICE_ID=`/bin/grep device $SLEEVEFILE | /bin/sed -e 's/.*=//'`
32export VENDOR_ID=`/bin/grep vendor $SLEEVEFILE | /bin/sed -e 's/.*=//'`
33
34case "$1" in
35 start)
36 export ACTION="add"
37 /sbin/hotplug sleeve
38 ;;
39 stop)
40 export ACTION="remove"
41 /sbin/hotplug sleeve
42 ;;
43 restart)
44 export ACTION="remove"
45 /sbin/hotplug sleeve
46 export ACTION="add"
47 /sbin/hotplug sleeve
48 ;;
49 status)
50 if [ -f /var/lock/subsys/hotplug ]; then
51 mesg "Hot plug sleeve has been started, current device $DEVICE_NAME"
52 else
53 mesg "Hot plug sleeve has not been started, current device $DEVICE_NAME"
54 fi
55 ;;
56 *)
57 mesg "Usage: $0 {start|stop|status|restart}"
58 ;;
59esac
60
diff --git a/meta/packages/linux-hotplug/files/soc.agent b/meta/packages/linux-hotplug/files/soc.agent
new file mode 100644
index 0000000000..e91246196f
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/soc.agent
@@ -0,0 +1,62 @@
1#!/bin/sh
2#
3# SoC hotplug agent for 2.6 kernels
4#
5# ACTION=add
6# SOC_ID=1234
7#
8
9cd /etc/hotplug
10. ./hotplug.functions
11
12MAP_CURRENT=$MODULE_DIR/modules.socmap
13
14#
15# stdin is "modules.socmap" syntax
16# on return, all matching modules were added to $DRIVERS
17#
18soc_map_modules ()
19{
20 while read line
21 do
22 # comments are lines that start with "#" ...
23 # be careful, they still get parsed by bash!
24 case "$line" in
25 \#*) continue ;;
26 esac
27
28 set $line
29
30 module="$1"
31 id="$2"
32
33 if [ "$id" != "0x$SOC_ID" ]; then
34 continue
35 fi
36
37 # It was a match!
38 case " $DRIVERS " in
39 *" $module "* )
40 : already found
41 ;;
42 * )
43 DRIVERS="$module $DRIVERS"
44 ;;
45 esac
46 : drivers $DRIVERS
47 done
48}
49
50case $ACTION in
51
52add)
53
54 load_drivers soc $MAP_CURRENT "$SOC_ID"
55 ;;
56
57*)
58 debug_mesg SoC $ACTION event not supported
59 exit 1
60 ;;
61
62esac
diff --git a/meta/packages/linux-hotplug/files/sysconfig-hotplug b/meta/packages/linux-hotplug/files/sysconfig-hotplug
new file mode 100644
index 0000000000..7ee5a20c31
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/sysconfig-hotplug
@@ -0,0 +1,12 @@
1##
2## Each of these may be assigned to the number of nanoseconds by which to
3## increase the timing of pcmcia bus transactions
4##
5# COMPACTFLASH_TIMING_INCREMENT=0
6## the single pcmcia sleeve seems to be a bit slow, but 25ns makes my
7## orinoco card detectable. -Jamey 4/2/2002
8PCMCIA_TIMING_INCREMENT=25
9# DUAL_PCMCIA_TIMING_INCREMENT=0
10
11## mount options used by MMC
12MMC_MOUNT_OPTIONS="-t auto -o sync,noatime"
diff --git a/meta/packages/linux-hotplug/files/sysconfig-usb b/meta/packages/linux-hotplug/files/sysconfig-usb
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/sysconfig-usb
diff --git a/meta/packages/linux-hotplug/files/tosa/sysconfig-usb b/meta/packages/linux-hotplug/files/tosa/sysconfig-usb
new file mode 100644
index 0000000000..cbd18c6566
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/tosa/sysconfig-usb
@@ -0,0 +1,2 @@
1## Specify the USB host controller driver
2HCD="usb_ohci_tc6393"
diff --git a/meta/packages/linux-hotplug/files/usbd b/meta/packages/linux-hotplug/files/usbd
new file mode 100644
index 0000000000..aa4e6d2de7
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/usbd
@@ -0,0 +1,2 @@
1usbdmodule=""
2
diff --git a/meta/packages/linux-hotplug/files/usbd.agent b/meta/packages/linux-hotplug/files/usbd.agent
new file mode 100755
index 0000000000..6613b4810a
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/usbd.agent
@@ -0,0 +1,63 @@
1#!/bin/ash
2
3# DEBUG=yes export DEBUG
4#set -x
5
6. /etc/hotplug/hotplug.functions
7. /etc/default/usbd
8cd $HOTPLUG_DIR
9
10[ -z "$INTERFACE" ] && exit 1
11[ -z "$ACTION" ] && exit 1
12[ -z "$usbdmodule" ] && exit 0
13
14debug_mesg "USBD $ACTION Action Recived"
15
16case $INTERFACE in
17
18monitor)
19 case $ACTION in
20 # called to load all usb device modules
21 load)
22 modprobe usbdcore
23 modprobe net_fd
24 modprobe $usbdmodule
25 ;;
26
27 # called to handle suspend power management event
28 suspend)
29 rmmod $usbdmodule
30 ;;
31
32 # called to reload after resume power management event
33 restore-loaded)
34 modprobe $usbdmodule
35 sleep 2
36 ;;
37
38 # called to unload after resume power management event
39 restore-unloaded)
40 modprobe -r net_fd
41 ;;
42
43 # called to unload all usb device modules
44 unload)
45 modprobe -r $usbdmodule
46 ;;
47
48 *)
49 debug_mesg USBD $ACTION event not handled
50 exit 1
51 ;;
52 esac
53 ;;
54*)
55 debug_mesg USBD $INTERFACE-$ACTION event not handled
56 exit 1
57 ;;
58esac
59
60[ -e /proc/usb-monitor ] && echo "Done" > /proc/usb-monitor
61
62exit 0
63
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent b/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
new file mode 100644
index 0000000000..3bc0935018
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/fix-net.agent
@@ -0,0 +1,29 @@
1#!/bin/sh -e
2#
3# Since ifupdown of Debian is different than one of RedHat.
4# So we need to fix it
5
6topdir=$1
7dir=$topdir/etc/hotplug
8test -f $dir/net.agent || exit 1
9mv $dir/net.agent $dir/net.agent.orig
10
11sed -e '/^\*)/i\
12unregister)\
13 # Assume that we want to run ifdown no matter what, \
14 # because it is not going to remove the data from the \
15 # ifstate database otherwise.\
16 if [ -x /sbin/ifdown ]; then\
17 debug_mesg invoke ifdown $INTERFACE\
18 exec /sbin/ifdown $INTERFACE\
19 else\
20 # mesg "how do I bring interfaces up on this distro?"\
21 mesg "E: /sbin/ifdown not found. You need to install ifupdown package"\
22 fi\
23 mesg $1 $ACTION event not handled\
24 ;;\
25' $dir/net.agent.orig > $dir/net.agent
26rm -f $dir/net.agent.orig
27chmod 755 $dir/net.agent
28exit 0
29
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch b/meta/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch
new file mode 100644
index 0000000000..a64fc50d2b
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/hotplug-net-agent-usb.patch
@@ -0,0 +1,43 @@
1--- hotplug/etc/hotplug/net.agent 2005-01-13 21:12:47.143597392 +1300
2+++ hotplug/etc/hotplug/net.agent 2005-01-13 21:17:57.095477544 +1300
3@@ -41,6 +41,9 @@
4 debug_mesg assuming $INTERFACE is already up
5 exit 0
6 ;;
7+ # interfaces that don't go up until attached
8+ usbf)
9+ ;;
10 # interfaces that are registered then brought up
11 *)
12 # NOTE: network configuration relies on administered state,
13@@ -83,6 +86,13 @@
14 mesg $1 $ACTION event not handled
15 ;;
16
17+attach)
18+ # ifupdown is dumb and won't bring up an interface that it thinks
19+ # might already be configured.
20+ /sbin/ifdown $INTERFACE
21+ exec /sbin/ifup $INTERFACE
22+ ;;
23+
24 remove|unregister)
25 case $INTERFACE in
26 # interfaces that are unregistered after being "down" (?)
27@@ -105,6 +115,16 @@
28 mesg $1 $ACTION event not handled
29 ;;
30
31+detach)
32+ if [ -x /sbin/ifdown ]; then
33+ debug_mesg invoke ifdown $INTERFACE
34+ exec /sbin/ifdown $INTERFACE
35+ else
36+ mesg "E: /sbin/ifdown not found. You need to install ifupdown package"
37+ fi
38+ mesg $1 $ACTION event not handled
39+ ;;
40+
41 *)
42 debug_mesg NET $ACTION event for $INTERFACE not supported
43 exit 1 ;;
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/isapnp-exit.diff b/meta/packages/linux-hotplug/linux-hotplug-20040920/isapnp-exit.diff
new file mode 100644
index 0000000000..e5a9ab10af
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/isapnp-exit.diff
@@ -0,0 +1,11 @@
1--- hotplug-2004_09_20/etc/hotplug/isapnp.rc.orig 2004-12-20 15:01:21.541446000 +0100
2+++ hotplug-2004_09_20/etc/hotplug/isapnp.rc 2004-12-20 15:01:32.625760928 +0100
3@@ -13,7 +13,7 @@
4 #
5
6 # only 2.6 kernels are supported
7-[ -d /sys/bus/pnp/devices/ ] || return 0
8+[ -d /sys/bus/pnp/devices/ ] || exit 0
9
10 cd /etc/hotplug
11 . ./hotplug.functions
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/logcheck-ignore b/meta/packages/linux-hotplug/linux-hotplug-20040920/logcheck-ignore
new file mode 100644
index 0000000000..b941353041
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/logcheck-ignore
@@ -0,0 +1 @@
net.agent: invoke if(up|down)
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap b/meta/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
new file mode 100755
index 0000000000..d09e1176ec
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/update-usb.usermap
@@ -0,0 +1,37 @@
1#!/bin/sh -e
2# update-usb.usermap
3# Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
4# GPL
5
6LIBDIR=/usr/lib/hotplug
7USERMAP=/etc/hotplug/usb.usermap
8LOCALMAP=/etc/hotplug/usb.usermap.local
9
10test -d $LIBDIR || exit 0
11
12echo -n "Updating $USERMAP ..."
13
14echo "# usb.usermap file" > $USERMAP
15echo "# This is autogenerated by update-usb.usermap program" >> $USERMAP
16echo "# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info" >> $USERMAP
17
18if [ -f $LOCALMAP ]; then
19 echo "# usb.usermap.local" >> $USERMAP
20 cat $LOCALMAP >> $USERMAP
21fi
22
23cd $LIBDIR
24for package in *
25do
26 if [ -d "$package" ]; then
27 map=$package/usb.usermap
28 echo "# $package" >> $USERMAP
29 if [ -x "$map" ]; then
30 ./$map >> $USERMAP
31 elif [ -f "$map" ]; then
32 cat $map >> $USERMAP
33 fi
34 fi
35done
36
37echo done.
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/usb-storage b/meta/packages/linux-hotplug/linux-hotplug-20040920/usb-storage
new file mode 100644
index 0000000000..138790a367
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/usb-storage
@@ -0,0 +1,2 @@
1#!/bin/sh
2modprobe sd_mod \ No newline at end of file
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/usbrc-busybox.patch b/meta/packages/linux-hotplug/linux-hotplug-20040920/usbrc-busybox.patch
new file mode 100644
index 0000000000..35f43dc52b
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/usbrc-busybox.patch
@@ -0,0 +1,13 @@
1--- hotplug/etc/hotplug/usb.rc.old 2005-05-25 15:50:11.000000000 +0100
2+++ hotplug/etc/hotplug/usb.rc 2005-05-25 15:50:59.000000000 +0100
3@@ -95,8 +95,8 @@
4 PRODUCT="$(cat $devlink/../idVendor)/$(cat $devlink/../idProduct)/$(cat $devlink/../bcdDevice)"
5 if [ -f $devlink/../../devnum ]
6 then
7- devbus=$( ( echo -n 000 ; cat $devlink/../../devnum ) | grep -o ...\$ )
8- devdev=$( ( echo -n 000 ; cat $devlink/../devnum ) | grep -o ...\$ )
9+ devbus=$( ( echo -n 000 ; cat $devlink/../../devnum ) | sed 's/.*\(...\)$/\1/' )
10+ devdev=$( ( echo -n 000 ; cat $devlink/../devnum ) | sed 's/.*\(...\)$/\1/' )
11 DEVICE="/proc/bus/usb/$devbus/$devdev"
12 else
13 DEVICE=
diff --git a/meta/packages/linux-hotplug/linux-hotplug-20040920/userspecified_hcd.patch b/meta/packages/linux-hotplug/linux-hotplug-20040920/userspecified_hcd.patch
new file mode 100644
index 0000000000..c2ceeb686e
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug-20040920/userspecified_hcd.patch
@@ -0,0 +1,55 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- hotplug-2004_09_20/etc/hotplug/usb.rc~userspecified_hcd.patch
7+++ hotplug-2004_09_20/etc/hotplug/usb.rc
8@@ -24,6 +24,7 @@
9 unset I_WANT_A_BROKEN_PS
10 PS_PERSONALITY=linux
11
12+HCD=
13 STATIC_MODULE_LIST=
14 X11_USBMICE_HACK=false
15
16@@ -166,20 +167,25 @@
17 # FIXME: some of this should be driven by PCI hotplugging, and have
18 # the blacklist control which uhci driver gets used (before 2.5).
19
20- # "new style" HCDs ... more common code
21- modprobe -q ehci-hcd >/dev/null 2>&1
22- modprobe -q ohci-hcd >/dev/null 2>&1
23- modprobe -q uhci-hcd >/dev/null 2>&1
24-
25- # "old style" HCDs ... more driver-specific bugs
26- modprobe -q usb-ohci >/dev/null 2>&1
27- # NOTE: this prefers "uhci"; you may prefer "usb-uhci".
28- # modprobe -q usb-uhci >/dev/null 2>&1 || modprobe -q uhci >/dev/null 2>&1
29- modprobe -q uhci >/dev/null 2>&1 || modprobe -q usb-uhci >/dev/null 2>&1
30-
31- # ... add any non-PCI HCDS here. Examples include the
32- # CRIS usb-host, Philips ISP-1161, Symlogic 811HS, and so on.
33- # ohci-hcd can handle some non-pci variants.
34+ # If the user specified which HCD they want, trust them.
35+ if [ -n "$HCD" ]; then
36+ modprobe -q $HCD >/dev/null 2>&1
37+ else
38+ # "new style" HCDs ... more common code
39+ modprobe -q ehci-hcd >/dev/null 2>&1
40+ modprobe -q ohci-hcd >/dev/null 2>&1
41+ modprobe -q uhci-hcd >/dev/null 2>&1
42+
43+ # "old style" HCDs ... more driver-specific bugs
44+ modprobe -q usb-ohci >/dev/null 2>&1
45+ # NOTE: this prefers "uhci"; you may prefer "usb-uhci".
46+ # modprobe -q usb-uhci >/dev/null 2>&1 || modprobe -q uhci >/dev/null 2>&1
47+ modprobe -q uhci >/dev/null 2>&1 || modprobe -q usb-uhci >/dev/null 2>&1
48+
49+ # ... add any non-PCI HCDS here. Examples include the
50+ # CRIS usb-host, Philips ISP-1161, Symlogic 811HS, and so on.
51+ # ohci-hcd can handle some non-pci variants.
52+ fi
53
54 if [ -d /proc/bus/usb ]; then
55 # If we see there are no busses, we "failed" and
diff --git a/meta/packages/linux-hotplug/linux-hotplug_20040920.bb b/meta/packages/linux-hotplug/linux-hotplug_20040920.bb
new file mode 100644
index 0000000000..c6bcbb66e6
--- /dev/null
+++ b/meta/packages/linux-hotplug/linux-hotplug_20040920.bb
@@ -0,0 +1,73 @@
1DESCRIPTION = "This package contains the scripts necessary \
2for hotplug Linux support, and lets you plug in new devices \
3and use them immediately."
4HOMEPAGE = "http://linux-hotplug.sourceforge.net/"
5LICENSE = "GPL"
6RPROVIDES_${PN} = "hotplug"
7RCONFLICTS_${PN} = "hotplug"
8RREPLACES_${PN} = "hotplug"
9SECTION = "base"
10RSUGGESTS = "pciutils usbutils"
11PR = "r8"
12
13SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_09_20.tar.gz \
14 file://userspecified_hcd.patch;patch=1 \
15 file://hotplug-net-agent-usb.patch;patch=1 \
16 file://usbrc-busybox.patch;patch=1 \
17 file://fix-net.agent \
18 file://update-usb.usermap \
19 file://logcheck-ignore \
20 file://sleeve.agent \
21 file://sleeve.rc \
22 file://mmc.agent \
23 file://usbd.agent \
24 file://usbd \
25 file://sysconfig-hotplug \
26 file://sysconfig-usb \
27 file://isapnp-exit.diff;patch=1 \
28 file://usb-storage \
29 file://soc.agent"
30
31SRC_URI_append_openzaurus = " file://quiet-pci.patch;patch=1"
32
33S = "${WORKDIR}/hotplug-2004_09_20"
34
35INITSCRIPT_NAME = "hotplug"
36INITSCRIPT_PARAMS = "start 40 S . stop 89 0 6 ."
37
38inherit update-rc.d
39
40do_compile () {
41 :
42}
43
44oldmandir := "${mandir}"
45oldsbindir := "${sbindir}"
46prefix = ""
47exec_prefix = ""
48FILES_${PN} += "${oldsbindir}"
49FILES_${PN}-doc += "${oldmandir}"
50
51export DEBFIX = "sed -e 's:sysconfig/usb:default/hotplug.usb:'"
52do_install () {
53 install -d ${D}${sysconfdir}/logcheck/ignore.d
54 install -d ${D}${oldmandir}
55 install -d ${D}${oldsbindir}
56 #install -d ${D}${sysconfdir}/default
57 oe_runmake prefix=${D}${prefix} exec_prefix=${D}${exec_prefix} \
58 etcdir=${D}${sysconfdir} sbindir=${D}${sbindir} \
59 mandir=${D}${oldmandir} INSTALL=install install
60 sh ${WORKDIR}/fix-net.agent ${D} || :
61 install -m 0755 ${WORKDIR}/update-usb.usermap ${D}${oldsbindir}/
62 install -m 0644 ${WORKDIR}/logcheck-ignore ${D}${sysconfdir}/logcheck/ignore.d/hotplug
63 install -m 0755 ${WORKDIR}/sleeve.agent ${D}${sysconfdir}/hotplug/
64 install -m 0755 ${WORKDIR}/sleeve.rc ${D}${sysconfdir}/hotplug/
65 install -m 0755 ${WORKDIR}/mmc.agent ${D}${sysconfdir}/hotplug/
66 install -m 0755 ${WORKDIR}/usbd.agent ${D}${sysconfdir}/hotplug/
67 install -m 0755 ${WORKDIR}/soc.agent ${D}${sysconfdir}/hotplug/
68 #install -m 0755 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd
69 install -d ${D}${sysconfdir}/sysconfig
70 install -m 0644 ${WORKDIR}/sysconfig-hotplug ${D}${sysconfdir}/sysconfig/hotplug
71 install -m 0644 ${WORKDIR}/sysconfig-usb ${D}${sysconfdir}/sysconfig/usb
72 install -m 0755 ${WORKDIR}/usb-storage ${D}${sysconfdir}/hotplug/usb
73}