summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff7221f)
raw | patch | inline | side by side (parent: ff7221f)
author | Koen Kooi <koen@dominion.thruhere.net> | |
Tue, 18 Oct 2011 08:22:48 +0000 (10:22 +0200) | ||
committer | Koen Kooi <koen@dominion.thruhere.net> | |
Tue, 18 Oct 2011 08:22:48 +0000 (10:22 +0200) |
This is NOT suitable for customers or production.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-ti/beagleboard/gadget-init.bb | [new file with mode: 0644] | patch | blob |
recipes-ti/beagleboard/gadget-init/hokey-pokey.service | [new file with mode: 0644] | patch | blob |
recipes-ti/beagleboard/gadget-init/storage-gadget-init.service | [new file with mode: 0644] | patch | blob |
diff --git a/recipes-ti/beagleboard/gadget-init.bb b/recipes-ti/beagleboard/gadget-init.bb
--- /dev/null
@@ -0,0 +1,22 @@
+DESCRIPTION = "Units to initialize usb gadgets"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+COMPATIBLE_MACHINE = "(ti33x)"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "file://storage-gadget-init.service \
+ file://hokey-pokey.service \
+ "
+
+do_install() {
+ install -d ${D}${base_libdir}/systemd/system/basic.target.wants
+ install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system
+ for i in ${WORKDIR}/*.service ; do
+ install -m 0644 $i ${D}${base_libdir}/systemd/system
+ ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/
+ done
+}
+
+FILES_${PN} = "${base_libdir}/systemd"
diff --git a/recipes-ti/beagleboard/gadget-init/hokey-pokey.service b/recipes-ti/beagleboard/gadget-init/hokey-pokey.service
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Hokey Pokey modprobe dance to get the USB host port working
+After=storage-gadget-init.service
+
+[Service]
+ExecStart=/sbin/modprobe g_zero
+
+[Install]
+WantedBy=basic-user.target
diff --git a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Start usb mass storage gadget
+After=dev-mmcblk0p1.device
+
+[Service]
+ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1
+
+[Install]
+WantedBy=basic-user.target