diff options
Diffstat (limited to 'recipes-ti')
-rw-r--r-- | recipes-ti/beagleboard/gadget-init.bb | 22 | ||||
-rw-r--r-- | recipes-ti/beagleboard/gadget-init/hokey-pokey.service | 9 | ||||
-rw-r--r-- | recipes-ti/beagleboard/gadget-init/storage-gadget-init.service | 9 |
3 files changed, 40 insertions, 0 deletions
diff --git a/recipes-ti/beagleboard/gadget-init.bb b/recipes-ti/beagleboard/gadget-init.bb new file mode 100644 index 00000000..f3300e19 --- /dev/null +++ b/recipes-ti/beagleboard/gadget-init.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | DESCRIPTION = "Units to initialize usb gadgets" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "(ti33x)" | ||
7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
8 | |||
9 | SRC_URI = "file://storage-gadget-init.service \ | ||
10 | file://hokey-pokey.service \ | ||
11 | " | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants | ||
15 | install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system | ||
16 | for i in ${WORKDIR}/*.service ; do | ||
17 | install -m 0644 $i ${D}${base_libdir}/systemd/system | ||
18 | ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/ | ||
19 | done | ||
20 | } | ||
21 | |||
22 | 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 new file mode 100644 index 00000000..ac92d734 --- /dev/null +++ b/recipes-ti/beagleboard/gadget-init/hokey-pokey.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=Hokey Pokey modprobe dance to get the USB host port working | ||
3 | After=storage-gadget-init.service | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/sbin/modprobe g_zero | ||
7 | |||
8 | [Install] | ||
9 | 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 new file mode 100644 index 00000000..366d2fd4 --- /dev/null +++ b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=Start usb mass storage gadget | ||
3 | After=dev-mmcblk0p1.device | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=basic-user.target | ||