summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard/gadget-init
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/gadget-init
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/gadget-init')
-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
2 files changed, 34 insertions, 0 deletions
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