diff options
author | Joel A Fernandes <joelagnel@ti.com> | 2011-11-10 00:06:35 -0600 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-10 08:23:08 +0100 |
commit | 89c54f502b38ec21e79056a5510f77836d013e81 (patch) | |
tree | 8679cbdb468fdf5abfa55bc63b537d174f2205d1 /recipes-ti/beagleboard/gadget-init.bb | |
parent | 2cd35f07bfcb6ea76f329d6f278a7d7e98c5d79a (diff) | |
download | meta-ti-89c54f502b38ec21e79056a5510f77836d013e81.tar.gz |
gadget-init: Add network-gadget services and other fixes
* Add rule to start network-gadget when mass storage is ejected
* Add network-gadget-init service and scripts to switch to g_ether
* Add DHCP service / conf
* Update to storage-gadget: rmmod on stop
v2 changes:
* Fix g-ether MAC address by reading from mac_id
* Split into multiple packages
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-ti/beagleboard/gadget-init.bb')
-rw-r--r-- | recipes-ti/beagleboard/gadget-init.bb | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/recipes-ti/beagleboard/gadget-init.bb b/recipes-ti/beagleboard/gadget-init.bb index ee51586f..defef63b 100644 --- a/recipes-ti/beagleboard/gadget-init.bb +++ b/recipes-ti/beagleboard/gadget-init.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | DESCRIPTION = "Units to initialize usb gadgets" | 1 | DESCRIPTION = "Units to initialize usb gadgets" |
2 | 2 | ||
3 | PR = "r3" | 3 | PR = "r8" |
4 | 4 | ||
5 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
6 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | 6 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" |
@@ -9,13 +9,21 @@ COMPATIBLE_MACHINE = "(ti33x)" | |||
9 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 9 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
10 | 10 | ||
11 | SRC_URI = "file://storage-gadget-init.service \ | 11 | SRC_URI = "file://storage-gadget-init.service \ |
12 | file://network-gadget-init.service \ | ||
13 | file://udhcpd.service \ | ||
14 | file://udhcpd.conf \ | ||
12 | file://99-hokey-pokey.rules \ | 15 | file://99-hokey-pokey.rules \ |
13 | file://hokey-pokey.sh \ | 16 | file://hokey-pokey.sh \ |
17 | file://bone-gmass-eject.rules \ | ||
18 | file://g-storage-reinsert.sh \ | ||
19 | file://g-ether-start-service.sh \ | ||
20 | file://g-ether-load.sh \ | ||
14 | " | 21 | " |
15 | 22 | ||
16 | do_install() { | 23 | do_install() { |
17 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants | 24 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants |
18 | install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system | 25 | install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system |
26 | |||
19 | for i in ${WORKDIR}/*.service ; do | 27 | for i in ${WORKDIR}/*.service ; do |
20 | install -m 0644 $i ${D}${base_libdir}/systemd/system | 28 | install -m 0644 $i ${D}${base_libdir}/systemd/system |
21 | ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/ | 29 | ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/ |
@@ -23,10 +31,27 @@ do_install() { | |||
23 | 31 | ||
24 | install -d ${D}${sysconfdir}/udev/rules.d | 32 | install -d ${D}${sysconfdir}/udev/rules.d |
25 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d | 33 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d |
34 | install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir} | ||
26 | 35 | ||
27 | install -d ${D}${bindir} | 36 | install -d ${D}${bindir} |
28 | install -m 0755 ${WORKDIR}/*.sh ${D}${bindir} | 37 | install -m 0755 ${WORKDIR}/*.sh ${D}${bindir} |
29 | |||
30 | } | 38 | } |
31 | 39 | ||
32 | FILES_${PN} = "${base_libdir}/systemd ${sysconfdir} ${bindir}" | 40 | PACKAGES =+ "${PN}-storage ${PN}-network ${PN}-udhcpd" |
41 | |||
42 | FILES_${PN} = "${sysconfdir}/udev/rules.d/99-hokey-pokey.rules \ | ||
43 | ${bindir}/hokey-pokey.sh \" | ||
44 | |||
45 | FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \ | ||
46 | ${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \ | ||
47 | ${bindir}/g-storage-reinsert.sh \ | ||
48 | ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules" | ||
49 | |||
50 | FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \ | ||
51 | ${bindir}/g-ether-load.sh \ | ||
52 | ${bindir}/g-ether-start-service.sh" | ||
53 | |||
54 | FILES_${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \ | ||
55 | ${sysconfdir}/udhcpd.conf" | ||
56 | |||
57 | RRECOMMENDS_${PN} = "${PN}-storage ${PN}-network ${PN}-udhcpd" | ||