summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard
diff options
context:
space:
mode:
authorJason Kridner <jdk@ti.com>2011-11-15 07:29:24 -0600
committerKoen Kooi <koen@dominion.thruhere.net>2011-11-15 14:34:21 +0100
commit5a27c486e99d347692b2c6986dd1558ab6ad7f5c (patch)
tree382ec535850a30cd06c566b2706c87577d1b157e /recipes-ti/beagleboard
parent215974bb9cac89c18a559e79047dd5feca881663 (diff)
downloadmeta-ti-5a27c486e99d347692b2c6986dd1558ab6ad7f5c.tar.gz
gadget-init: create info.txt upon starting storage gadget
This creates a file called info.txt that saves some useful information for image versioning, network connectivity and beginner user debugging. Signed-off-by: Jason Kridner <jdk@ti.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-ti/beagleboard')
-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