summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2024-12-13 10:21:59 -0600
committerRyan Eatmon <reatmon@ti.com>2024-12-13 12:03:42 -0600
commit3addc8d442e4754d17a7bdb178c6202de67e5a4a (patch)
tree345b69e1287371f809928144fb7c7f38a8c6d296
parent7b41d83f372214dbd1ebcf6ea8c80cb1fca75e6f (diff)
downloadmeta-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>
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init.bb60
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/bone-gmass-eject.rules1
-rwxr-xr-xmeta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-load.sh46
-rwxr-xr-xmeta-ti-extras/recipes-ti/beagleboard/gadget-init/g-ether-start-service.sh10
-rwxr-xr-xmeta-ti-extras/recipes-ti/beagleboard/gadget-init/g-storage-reinsert.sh4
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/network-gadget-init.service11
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service11
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.conf5
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.rules2
-rw-r--r--meta-ti-extras/recipes-ti/beagleboard/gadget-init/udhcpd.service12
-rwxr-xr-xmeta-ti-extras/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh37
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 @@
1DESCRIPTION = "Units to initialize usb gadgets"
2
3PR = "r19"
4
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
7
8COMPATIBLE_MACHINE = "(ti33x)"
9PACKAGE_ARCH = "${MACHINE_ARCH}"
10
11SRC_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
23do_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
40PACKAGES =+ "${PN}-storage ${PN}-network ${PN}-udhcpd"
41
42ALLOW_EMPTY:${PN} = "1"
43
44FILES:${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
50FILES:${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
56FILES:${PN}-udhcpd = "${base_libdir}/systemd/system/udhcpd.service \
57 ${base_libdir}/systemd/system/basic.target.wants/udhcpd.service \
58 ${sysconfdir}/udhcpd.conf"
59
60RRECOMMENDS:${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 @@
1SUBSYSTEM=="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
3function get_devmem()
4{
5 /usr/bin/devmem2 $1 | grep ": " | cut -d ":" -f 2|cut -d "x" -f 2
6}
7
8function 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
25function 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
38DEVMEM_ADDR_LO=$(get_devmem 0x44e10638|bc)
39DEVMEM_ADDR_LO=$(reverse_bytes ${DEVMEM_ADDR_LO})
40
41DEVMEM_ADDR_HI=$(get_devmem 0x44e1063C)
42DEVMEM_ADDR_HI=$(reverse_bytes ${DEVMEM_ADDR_HI})
43
44DEV_ADDR=$(hex_to_mac_addr "${DEVMEM_ADDR_HI}${DEVMEM_ADDR_LO}")
45
46modprobe 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
2if [ -a /sys/devices/platform/omap/musb-ti81xx/musb-hdrc.0/gadget/lun0/file ]
3then
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
10fi
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]
2Description=Start USB Ethernet gadget
3Conflicts=storage-gadget-init.service
4
5[Service]
6RemainAfterExit=yes
7ExecStart=/usr/bin/g-ether-load.sh
8ExecStop=/sbin/rmmod g_ether
9
10[Install]
11WantedBy=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]
2Description=Start usb mass storage gadget
3After=dev-mmcblk0p1.device
4
5[Service]
6RemainAfterExit=yes
7ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1
8ExecStop=/sbin/rmmod g_mass_storage
9
10[Install]
11WantedBy=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 @@
1start 192.168.7.1
2end 192.168.7.1
3interface usb0
4max_leases 1
5option 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 @@
1SUBSYSTEM=="net",ACTION=="add",KERNEL=="usb0",RUN+="/sbin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252",RUN+="/bin/systemctl start udhcpd.service"
2SUBSYSTEM=="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]
2Description=DHCP server for USB0 network gadget
3After=dev-usb0.device
4Conflicts=storage-gadget-init.service
5
6[Service]
7ExecStart=/usr/sbin/udhcpd -f -S /etc/udhcpd.conf
8ExecStop=/bin/kill -TERM $MAINPID
9KillSignal=SIGINT
10
11[Install]
12WantedBy=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
2mount /dev/mmcblk0p1 /mnt
3echo "Image info snapshot" > /mnt/info.txt
4
5echo >> /mnt/info.txt
6echo "/etc/angstrom-version:" >> /mnt/info.txt
7cat /etc/angstrom-version >> /mnt/info.txt
8
9echo >> /mnt/info.txt
10echo "/proc/cpuinfo:" >> /mnt/info.txt
11cat /proc/cpuinfo >> /mnt/info.txt
12
13echo >> /mnt/info.txt
14echo "uname -a:" >> /mnt/info.txt
15uname -a >> /mnt/info.txt
16
17echo >> /mnt/info.txt
18echo "/proc/cmdline:" >> /mnt/info.txt
19cat /proc/cmdline >> /mnt/info.txt
20
21echo >> /mnt/info.txt
22echo "ifconfig:" >> /mnt/info.txt
23ifconfig >> /mnt/info.txt
24
25echo >> /mnt/info.txt
26echo "/etc/angstrom-build-info:" >> /mnt/info.txt
27cat /etc/angstrom-build-info >> /mnt/info.txt
28
29echo >> /mnt/info.txt
30echo "/etc/image-version-info:" >> /mnt/info.txt
31cat /etc/image-version-info >> /mnt/info.txt
32
33echo >> /mnt/info.txt
34echo "opkg list-installed:" >> /mnt/info.txt
35opkg list-installed >> /mnt/info.txt
36
37umount /mnt