summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 215974b)
raw | patch | inline | side by side (parent: 215974b)
author | Jason Kridner <jdk@ti.com> | |
Tue, 15 Nov 2011 13:29:24 +0000 (07:29 -0600) | ||
committer | Koen Kooi <koen@dominion.thruhere.net> | |
Tue, 15 Nov 2011 13:34:21 +0000 (14:34 +0100) |
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>
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>
index 0d4682ef618b342f9c50c136c78bc54be1df787d..16137fae7d4c782ea6986af2a1e7d042e19752b6 100644 (file)
DESCRIPTION = "Units to initialize usb gadgets"
-PR = "r11"
+PR = "r12"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
file://g-storage-reinsert.sh \
file://g-ether-start-service.sh \
file://g-ether-load.sh \
+ file://update-image-info-on-mmcblk0p1.sh \
"
do_install() {
FILES_${PN}-storage = "${base_libdir}/systemd/system/storage-gadget-init.service \
${base_libdir}/systemd/system/basic.target.wants/storage-gadget-init.service \
${bindir}/g-storage-reinsert.sh \
+ ${bindir}/update-image-info-on-mmcblk0p1.sh \
${sysconfdir}/udev/rules.d/bone-gmass-eject.rules"
FILES_${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 9a8513e8a3f332608d4be4ec3030f17fa034ff42..601e0d7cceced9e56c31ccf0ec0c28e55c3bb42a 100644 (file)
[Service]
RemainAfterExit=yes
+ExecStartPre=/usr/bin/update-image-info-on-mmcblk0p1.sh
ExecStart=/sbin/modprobe g_mass_storage file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1
ExecStop=/sbin/rmmod g_mass_storage
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
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+mount /dev/mmcblk0p1 /mnt
+echo "Image info snapshot" > /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "/etc/angstrom-version:" >> /mnt/info.txt
+cat /etc/angstrom-version >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "/proc/cpuinfo:" >> /mnt/info.txt
+cat /proc/cpuinfo >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "uname -a:" >> /mnt/info.txt
+uname -a >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "/proc/cmdline:" >> /mnt/info.txt
+cat /proc/cmdline >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "ifconfig:" >> /mnt/info.txt
+ifconfig >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "/etc/angstrom-build-info:" >> /mnt/info.txt
+cat /etc/angstrom-build-info >> /mnt/info.txt
+
+echo >> /mnt/info.txt
+echo "opkg list-installed:" >> /mnt/info.txt
+opkg list-installed >> /mnt/info.txt
+
+umount /mnt