From 906cc165bed44fadbcfc7fecde1405869c6f3f21 Mon Sep 17 00:00:00 2001 From: Klaus Kurzmann Date: Mon, 14 Dec 2009 15:33:19 +0100 Subject: initscripts-shr: add initscript to set usb gadget mode for palmpre Signed-off-by: Klaus Kurzmann --- recipes/shr/initscripts-shr/palmpre/usb-gadget.sh | 10 ++++++++++ recipes/shr/initscripts-shr_0.0.1.bb | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipes/shr/initscripts-shr/palmpre/usb-gadget.sh 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 # -- cgit v1.2.3