cloud9-image: include CAN support
[glsdk/meta-ti-glsdk.git] / recipes-ti / beagleboard / gadget-init.bb
1 DESCRIPTION = "Units to initialize usb gadgets"
3 PR = "r16"
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}
39         install -d ${D}${sysconfdir}/tmpfiles.d
40         echo "w    /sys/class/pwm/ehrpwm.1:0/polarity -    -    -    -   1" > ${D}${sysconfdir}/tmpfiles.d/lcd7.conf
41 }
43 PACKAGES =+ "${PN}-storage ${PN}-network ${PN}-udhcpd"
45 FILES_${PN} = "${sysconfdir}/tmpfiles.d"
47 FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \
48                        ${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \
49                        ${bindir}/g-storage-reinsert.sh \
50                        ${bindir}/update-image-info-on-mmcblk0p1.sh \
51                        ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
53 FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
54                        ${base_libdir}/systemd/system/basic.target.wants/network-gadget-init.service \
55                        ${bindir}/g-ether-load.sh \
56                        ${bindir}/g-ether-start-service.sh \
57                        ${sysconfdir}/udev/rules.d/udhcpd.rules"
59 FILES_${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \
60                       ${base_libdir}/systemd/system/basic.target.wants/udhcpd.service \
61                       ${sysconfdir}/udhcpd.conf"
63 RRECOMMENDS_${PN} = "${PN}-storage ${PN}-network ${PN}-udhcpd"