diff options
author | Andrew Davis <afd@ti.com> | 2024-12-13 10:21:59 -0600 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-12-13 12:03:42 -0600 |
commit | 3addc8d442e4754d17a7bdb178c6202de67e5a4a (patch) | |
tree | 345b69e1287371f809928144fb7c7f38a8c6d296 | |
parent | 7b41d83f372214dbd1ebcf6ea8c80cb1fca75e6f (diff) | |
download | meta-ti-3addc8d442e4754d17a7bdb178c6202de67e5a4a.tar.gz |
meta-ti-extras: recipes-ti: Remove gadget-init package
As the patch that added these states, this is an ugly hack, the issues
involved are fixed and no longer relevant, remove this.
Signed-off-by: Andrew Davis <afd@ti.com>
11 files changed, 0 insertions, 199 deletions
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init.bb b/meta-ti-extras/recipes-ti/beagleboard/gadget-init.bb deleted file mode 100644 index f22583c0..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init.bb +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | DESCRIPTION = "Units to initialize usb gadgets" | ||
2 | |||
3 | PR = "r19" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
7 | |||
8 | COMPATIBLE_MACHINE = "(ti33x)" | ||
9 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
10 | |||
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 | " | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${base_libdir}/systemd/system/basic.target.wants | ||
25 | install -m 0644 ${UNPACKDIR}/*.service ${D}${base_libdir}/systemd/system | ||
26 | |||
27 | for i in ${UNPACKDIR}/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 | ||
31 | |||
32 | install -d ${D}${sysconfdir}/udev/rules.d | ||
33 | install -m 0644 ${UNPACKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d | ||
34 | install -m 0644 ${UNPACKDIR}/*.conf ${D}${sysconfdir} | ||
35 | |||
36 | install -d ${D}${bindir} | ||
37 | install -m 0755 ${UNPACKDIR}/*.sh ${D}${bindir} | ||
38 | } | ||
39 | |||
40 | PACKAGES =+ "${PN}-storage ${PN}-network ${PN}-udhcpd" | ||
41 | |||
42 | ALLOW_EMPTY:${PN} = "1" | ||
43 | |||
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" | ||
49 | |||
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" | ||
55 | |||
56 | FILES:${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \ | ||
57 | ${base_libdir}/systemd/system/basic.target.wants/udhcpd.service \ | ||
58 | ${sysconfdir}/udhcpd.conf" | ||
59 | |||
60 | RRECOMMENDS:${PN} = "${PN}-storage ${PN}-network ${PN}-udhcpd" | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/bone-gmass-eject.rules b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/bone-gmass-eject.rules deleted file mode 100644 index ee6f93e2..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/bone-gmass-eject.rules +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | SUBSYSTEM=="block",ACTION=="change",KERNEL=="mmcblk0p1",RUN+="/usr/bin/g-ether-start-service.sh" | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-load.sh b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-load.sh deleted file mode 100755 index f9400649..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-load.sh +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | function get_devmem() | ||
4 | { | ||
5 | /usr/bin/devmem2 $1 | grep ": " | cut -d ":" -f 2|cut -d "x" -f 2 | ||
6 | } | ||
7 | |||
8 | function hex_to_mac_addr() | ||
9 | { | ||
10 | addr=$1 | ||
11 | n=0 | ||
12 | mac_addr=$(echo ${addr} | while read -r -n2 c; do | ||
13 | if [ ! -z "$c" ]; then | ||
14 | if [ $n -ne 0 ] ; then | ||
15 | echo -n ":${c}" | ||
16 | else | ||
17 | echo -n "${c}" | ||
18 | fi | ||
19 | fi | ||
20 | n=$(($n+1)) | ||
21 | done) | ||
22 | echo ${mac_addr} | ||
23 | } | ||
24 | |||
25 | function reverse_bytes() | ||
26 | { | ||
27 | addr=$1 | ||
28 | New_addr=$(echo ${addr} | while read -r -n2 c; do | ||
29 | if [ ! -z "$c" ]; then | ||
30 | New_addr=${c}${New_addr} | ||
31 | else echo | ||
32 | echo ${New_addr} | ||
33 | fi | ||
34 | done) | ||
35 | echo ${New_addr} | ||
36 | } | ||
37 | |||
38 | DEVMEM_ADDR_LO=$(get_devmem 0x44e10638|bc) | ||
39 | DEVMEM_ADDR_LO=$(reverse_bytes ${DEVMEM_ADDR_LO}) | ||
40 | |||
41 | DEVMEM_ADDR_HI=$(get_devmem 0x44e1063C) | ||
42 | DEVMEM_ADDR_HI=$(reverse_bytes ${DEVMEM_ADDR_HI}) | ||
43 | |||
44 | DEV_ADDR=$(hex_to_mac_addr "${DEVMEM_ADDR_HI}${DEVMEM_ADDR_LO}") | ||
45 | |||
46 | modprobe g_ether host_addr=${DEV_ADDR} | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh deleted file mode 100755 index 6e73b155..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | if [ -a /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/lun0/file ] | ||
3 | then | ||
4 | x=$(cat /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/lun0/file) | ||
5 | if [ -z "$x" ] | ||
6 | then | ||
7 | /bin/systemctl stop storage-gadget-init.service | ||
8 | /bin/systemctl start network-gadget-init.service | ||
9 | fi | ||
10 | fi | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-storage-reinsert.sh b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-storage-reinsert.sh deleted file mode 100755 index d358640a..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/g-storage-reinsert.sh +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | /bin/systemctl stop storage-gadget-init.service | ||
3 | /bin/systemctl stop network-gadget-init.service | ||
4 | /bin/systemctl start storage-gadget-init.service | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/network-gadget-init.service b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/network-gadget-init.service deleted file mode 100644 index 0ee29147..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/network-gadget-init.service +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Start USB Ethernet gadget | ||
3 | Conflicts=storage-gadget-init.service | ||
4 | |||
5 | [Service] | ||
6 | RemainAfterExit=yes | ||
7 | ExecStart=/usr/bin/g-ether-load.sh | ||
8 | ExecStop=/sbin/rmmod g_ether | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=gether.target | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service deleted file mode 100644 index 9a8513e8..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Start usb mass storage gadget | ||
3 | After=dev-mmcblk0p1.device | ||
4 | |||
5 | [Service] | ||
6 | RemainAfterExit=yes | ||
7 | ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 | ||
8 | ExecStop=/sbin/rmmod g_mass_storage | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=basic.target | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.conf b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.conf deleted file mode 100644 index 3bcf00f0..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.conf +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | start 192.168.7.1 | ||
2 | end 192.168.7.1 | ||
3 | interface usb0 | ||
4 | max_leases 1 | ||
5 | option subnet 255.255.255.252 | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.rules b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.rules deleted file mode 100644 index db65f9ac..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.rules +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | SUBSYSTEM=="net",ACTION=="add",KERNEL=="usb0",RUN+="/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252",RUN+="/bin/systemctl start udhcpd.service" | ||
2 | SUBSYSTEM=="net",ACTION=="remove",KERNEL=="usb0",RUN+="/bin/systemctl stop udhcpd.service" | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.service b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.service deleted file mode 100644 index 1f4ac688..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.service +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=DHCP server for USB0 network gadget | ||
3 | After=dev-usb0.device | ||
4 | Conflicts=storage-gadget-init.service | ||
5 | |||
6 | [Service] | ||
7 | ExecStart=/usr/sbin/udhcpd -f -S /etc/udhcpd.conf | ||
8 | ExecStop=/bin/kill -TERM $MAINPID | ||
9 | KillSignal=SIGINT | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=gether.target | ||
diff --git a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh b/meta-ti-extras/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh deleted file mode 100755 index a4daf734..00000000 --- a/meta-ti-extras/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | mount /dev/mmcblk0p1 /mnt | ||
3 | echo "Image info snapshot" > /mnt/info.txt | ||
4 | |||
5 | echo >> /mnt/info.txt | ||
6 | echo "/etc/angstrom-version:" >> /mnt/info.txt | ||
7 | cat /etc/angstrom-version >> /mnt/info.txt | ||
8 | |||
9 | echo >> /mnt/info.txt | ||
10 | echo "/proc/cpuinfo:" >> /mnt/info.txt | ||
11 | cat /proc/cpuinfo >> /mnt/info.txt | ||
12 | |||
13 | echo >> /mnt/info.txt | ||
14 | echo "uname -a:" >> /mnt/info.txt | ||
15 | uname -a >> /mnt/info.txt | ||
16 | |||
17 | echo >> /mnt/info.txt | ||
18 | echo "/proc/cmdline:" >> /mnt/info.txt | ||
19 | cat /proc/cmdline >> /mnt/info.txt | ||
20 | |||
21 | echo >> /mnt/info.txt | ||
22 | echo "ifconfig:" >> /mnt/info.txt | ||
23 | ifconfig >> /mnt/info.txt | ||
24 | |||
25 | echo >> /mnt/info.txt | ||
26 | echo "/etc/angstrom-build-info:" >> /mnt/info.txt | ||
27 | cat /etc/angstrom-build-info >> /mnt/info.txt | ||
28 | |||
29 | echo >> /mnt/info.txt | ||
30 | echo "/etc/image-version-info:" >> /mnt/info.txt | ||
31 | cat /etc/image-version-info >> /mnt/info.txt | ||
32 | |||
33 | echo >> /mnt/info.txt | ||
34 | echo "opkg list-installed:" >> /mnt/info.txt | ||
35 | opkg list-installed >> /mnt/info.txt | ||
36 | |||
37 | umount /mnt | ||