diff options
author | Jason Kridner <jdk@ti.com> | 2011-11-15 07:29:24 -0600 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-11-15 14:34:21 +0100 |
commit | 5a27c486e99d347692b2c6986dd1558ab6ad7f5c (patch) | |
tree | 382ec535850a30cd06c566b2706c87577d1b157e /recipes-ti/beagleboard/gadget-init | |
parent | 215974bb9cac89c18a559e79047dd5feca881663 (diff) | |
download | meta-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.service | 1 | ||||
-rwxr-xr-x | recipes-ti/beagleboard/gadget-init/update-image-info-on-mmcblk0p1.sh | 33 |
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] |
6 | RemainAfterExit=yes | 6 | RemainAfterExit=yes |
7 | ExecStartPre=/usr/bin/update-image-info-on-mmcblk0p1.sh | ||
7 | ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 | 8 | 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 | ExecStop=/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 | ||
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 "opkg list-installed:" >> /mnt/info.txt | ||
31 | opkg list-installed >> /mnt/info.txt | ||
32 | |||
33 | umount /mnt | ||