README: refer to toolchain-layer in meta-openembedded
[glsdk/meta-ti-glsdk.git] / recipes-ti / beagleboard / gadget-init.bb
1 DESCRIPTION = "Units to initialize usb gadgets"
3 PR = "r19"
5 LICENSE = "MIT"
6 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
8 COMPATIBLE_MACHINE = "(ti33x)"
9 PACKAGE_ARCH = "${MACHINE_ARCH}"
11 SRC_URI = "file://storage-gadget-init.service \
12            file://network-gadget-init.service \
13            file://udhcpd.service \
14            file://udhcpd.conf \
15            file://bone-gmass-eject.rules \
16            file://udhcpd.rules \
17            file://g-storage-reinsert.sh \
18            file://g-ether-start-service.sh \
19            file://g-ether-load.sh \
20            file://update-image-info-on-mmcblk0p1.sh \
21           "
23 do_install() {
24         install -d ${D}${base_libdir}/systemd/system/basic.target.wants
25         install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system
27         for i in ${WORKDIR}/storage-gadget-init.service ; do
28                 install -m 0644 $i ${D}${base_libdir}/systemd/system
29                 ln -sf ../$(basename $i) ${D}${base_libdir}/systemd/system/basic.target.wants/
30         done
32         install -d ${D}${sysconfdir}/udev/rules.d
33         install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d
34         install -m 0644 ${WORKDIR}/*.conf ${D}${sysconfdir}
36         install -d ${D}${bindir}
37         install -m 0755 ${WORKDIR}/*.sh ${D}${bindir}
38 }
40 PACKAGES =+ "${PN}-storage ${PN}-network ${PN}-udhcpd"
42 ALLOW_EMPTY_${PN} = "1"
44 FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \
45                        ${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \
46                        ${bindir}/g-storage-reinsert.sh \
47                        ${bindir}/update-image-info-on-mmcblk0p1.sh \
48                        ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
50 FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
51                        ${base_libdir}/systemd/system/basic.target.wants/network-gadget-init.service \
52                        ${bindir}/g-ether-load.sh \
53                        ${bindir}/g-ether-start-service.sh \
54                        ${sysconfdir}/udev/rules.d/udhcpd.rules"
56 FILES_${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \
57                       ${base_libdir}/systemd/system/basic.target.wants/udhcpd.service \
58                       ${sysconfdir}/udhcpd.conf"
60 RRECOMMENDS_${PN} = "${PN}-storage ${PN}-network ${PN}-udhcpd"