summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-ti/beagleboard/gadget-init.bb4
-rw-r--r--recipes-ti/beagleboard/gadget-init/storage-gadget-init.service1
-rwxr-xr-xrecipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh33
3 files changed, 37 insertions, 1 deletions
diff --git a/recipes-ti/beagleboard/gadget-init.bb b/recipes-ti/beagleboard/gadget-init.bb
index 0d4682ef..16137fae 100644
--- a/recipes-ti/beagleboard/gadget-init.bb
+++ b/recipes-ti/beagleboard/gadget-init.bb
@@ -1,6 +1,6 @@
1DESCRIPTION = "Units to initialize usb gadgets" 1DESCRIPTION = "Units to initialize usb gadgets"
2 2
3PR = "r11" 3PR = "r12"
4 4
5LICENSE = "MIT" 5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" 6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
@@ -19,6 +19,7 @@ SRC_URI = "file://storage-gadget-init.service \
19 file://g-storage-reinsert.sh \ 19 file://g-storage-reinsert.sh \
20 file://g-ether-start-service.sh \ 20 file://g-ether-start-service.sh \
21 file://g-ether-load.sh \ 21 file://g-ether-load.sh \
22 file://update-image-info-on-mmcblk0p1.sh \
22 " 23 "
23 24
24do_install() { 25do_install() {
@@ -46,6 +47,7 @@ FILES_${PN} = "${sysconfdir}/udev/rules.d/99-hokey-pokey.rules \
46FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \ 47FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \
47 ${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \ 48 ${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \
48 ${bindir}/g-storage-reinsert.sh \ 49 ${bindir}/g-storage-reinsert.sh \
50 ${bindir}/update-image-info-on-mmcblk0p1.sh \
49 ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules" 51 ${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
50 52
51FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \ 53FILES_${PN}-network = "${base_libdir}/systemd/system/network-gadget-init.service \
diff --git a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service
index 9a8513e8..601e0d7c 100644
--- a/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service
+++ b/recipes-ti/beagleboard/gadget-init/storage-gadget-init.service
@@ -4,6 +4,7 @@ After=dev-mmcblk0p1.device
4 4
5[Service] 5[Service]
6RemainAfterExit=yes 6RemainAfterExit=yes
7ExecStartPre=/usr/bin/update-image-info-on-mmcblk0p1.sh
7ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 8ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1
8ExecStop=/sbin/rmmod g_mass_storage 9ExecStop=/sbin/rmmod g_mass_storage
9 10
diff --git a/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh b/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh
new file mode 100755
index 00000000..62aab39e
--- /dev/null
+++ b/recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh
@@ -0,0 +1,33 @@
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 "opkg list-installed:" >> /mnt/info.txt
31opkg list-installed >> /mnt/info.txt
32
33umount /mnt