summaryrefslogtreecommitdiff
path: root/recipes/shr
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/shr')
-rw-r--r--recipes/shr/initscripts-shr/palmpre/usb-gadget.sh10
-rw-r--r--recipes/shr/initscripts-shr_0.0.1.bb8
2 files changed, 17 insertions, 1 deletions
diff --git a/recipes/shr/initscripts-shr/palmpre/usb-gadget.sh b/recipes/shr/initscripts-shr/palmpre/usb-gadget.sh
new file mode 100644
index 0000000000..d7554954d6
--- /dev/null
+++ b/recipes/shr/initscripts-shr/palmpre/usb-gadget.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# usb gadget configuration:
+# there already different configurations on the palm pre defined,
+# we choose nr 5 cause it provides the usbnet, novacom
+# and storage gadget
+if [ -e /sys/class/usb_gadget/config_num ]; then
+ echo 5 > /sys/class/usb_gadget/config_num
+fi
+
diff --git a/recipes/shr/initscripts-shr_0.0.1.bb b/recipes/shr/initscripts-shr_0.0.1.bb
index f1be1c2fc7..89df6ce375 100644
--- a/recipes/shr/initscripts-shr_0.0.1.bb
+++ b/recipes/shr/initscripts-shr_0.0.1.bb
@@ -5,7 +5,7 @@ DEPENDS = ""
RDEPENDS = ""
LICENSE = "GPL"
PV = "0.0.1"
-PR = "r13"
+PR = "r14"
RPROVIDES_${PN} = "initscripts"
RCONFLICTS_${PN} = "initscripts"
@@ -33,6 +33,7 @@ SRC_URI = "file://alignment.sh \
file://umountfs \
file://umountnfs.sh \
"
+SRC_URI_append_palmpre = " file://usb-gadget.sh"
inherit base
@@ -76,6 +77,11 @@ do_install () {
install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d
+ if [ "${MACHINE}" == "palmpre" ]; then
+ install -m 0755 ${WORKDIR}/usb-gadget.sh ${D}${sysconfdir}/init.d
+ ln -sf ../init.d/usb-gadget.sh ${D}${sysconfdir}/rcS.d/S00usb-gadget.sh
+ fi
+
#
# Create runlevel links
#