[oe-commits] Angus Ainslie : initscripts : fixup the g_ether. sh scipt and remove some on openmoko distro

GIT User account git at amethyst.openembedded.net
Wed May 13 14:08:04 UTC 2009


Module: openembedded.git
Branch: fso/milestone5.5
Commit: c1f9d1f74099ba091c12470fa9baa1967a6ee64c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c1f9d1f74099ba091c12470fa9baa1967a6ee64c

Author: Angus Ainslie <nytowl at openmoko.org>
Date:   Wed May 13 08:01:45 2009 -0600

initscripts : fixup the g_ether.sh scipt and remove some on openmoko distro

---

 recipes/initscripts/initscripts-1.0/g_ether.sh |   14 +++++++++-----
 recipes/initscripts/initscripts_1.0.bb         |   14 ++++++--------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/recipes/initscripts/initscripts-1.0/g_ether.sh b/recipes/initscripts/initscripts-1.0/g_ether.sh
index 2271fb2..aad4364 100644
--- a/recipes/initscripts/initscripts-1.0/g_ether.sh
+++ b/recipes/initscripts/initscripts-1.0/g_ether.sh
@@ -28,19 +28,19 @@ if [ -z "$da" ] ; then
     # Ok, this is ugly.  We run before udev, so we need to rummage about in
     # /sys to see if we have an identity partition, and create the device
     # node if it doesn't already exist.
-    if [ ! -e /dev/mtd5ro -a -e /sys/class/mtd/mtd5ro/dev ] ; then
-      majmin=`sed -e 's|:| |' /sys/class/mtd/mtd5ro/dev`
-      mknod /dev/mtd5ro c $majmin
+    if [ ! -e /dev/mtd5 -a -e /sys/class/mtd/mtd5/dev ] ; then
+      majmin=`sed -e 's|:| |' /sys/class/mtd/mtd5/dev`
+      mknod /dev/mtd5 c $majmin
     fi
 
     # We should have the device node now.
-    if [ -e /dev/mtd5ro ] ; then
+    if [ -e /dev/mtd5 ] ; then
 
       # The partition is an ext2 filesystem; we probably should mount the
       # thing using a loopback mount and then read the correct file from it,
       # but we're running way early in the boot; not only will that be slow,
       # there's a good chance it may not even work (udev hasn't run yet).
-      da=`strings /dev/mtd5ro | grep ^U: | sed -n -e 's|U:\(..:..:..:..:..:..\).*|\1|p'`
+      da=`strings /dev/mtd5 | grep ^U: | sed -n -e 's|U:\(..:..:..:..:..:..\).*|\1|p'`
 
     fi
 
@@ -90,4 +90,8 @@ echo "options g_ether $daddr $haddr" >/etc/modprobe.d/g_ether.conf
 # And now, since this is first boot, we need to probe the module
 modprobe g_ether 2>/dev/null || true
 
+# try to slap the interface into working the first time
+ifdown usb0 || true
+ifup usb0 || true
+
 fi
diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb
index 2ad6422..8b96d89 100644
--- a/recipes/initscripts/initscripts_1.0.bb
+++ b/recipes/initscripts/initscripts_1.0.bb
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r113"
+PR = "r114"
 
 SRC_URI = "file://functions \
            file://halt \
@@ -79,9 +79,7 @@ do_install () {
 	if [ "${TARGET_ARCH}" = "arm" ]; then
 		install -m 0755 ${WORKDIR}/alignment.sh	${D}${sysconfdir}/init.d
 	fi
-#	if [ "${DISTRO}" = "openmoko" ]; then
-#		install -m 0755 ${WORKDIR}/g_ether.sh	${D}${sysconfdir}/init.d
-#	fi
+
 #
 # Install device dependent scripts
 #
@@ -127,9 +125,6 @@ do_install () {
 	if [ "${TARGET_ARCH}" = "arm" ]; then
 		ln -sf	../init.d/alignment.sh	${D}${sysconfdir}/rcS.d/S06alignment
 	fi
-#	if [ "${DISTRO}" = "openmoko" ]; then
-#		ln -sf	../init.d/g_ether.sh	${D}${sysconfdir}/rcS.d/S02g_ether.sh
-#	fi
 
 	install -m 0755		${WORKDIR}/device_table.txt		${D}${sysconfdir}/device_table
 }
@@ -139,8 +134,11 @@ do_install_append_angstrom () {
 	rm ${D}${sysconfdir}/init.d/devices ${D}${sysconfdir}/rcS.d/S05devices
 }
 
-# Oepnmoko persistent USB networking
 do_install_append_openmoko () {
+ 	# Oepnmoko persistent USB networking
 	install -m 0755 ${WORKDIR}/g_ether.sh	${D}${sysconfdir}/init.d
 	ln -sf	../init.d/g_ether.sh	${D}${sysconfdir}/rcS.d/S02g_ether.sh
+
+	# drop some things to speed up boot
+	rm ${D}${sysconfdir}/rcS.d/S02banner
 }





More information about the Openembedded-commits mailing list