[oe-commits] Julian_chu : linux-openmoko: To Modify the post-install script then it

GIT User account git at amethyst.openembedded.net
Wed Dec 17 12:56:45 UTC 2008


Module: openembedded.git
Branch: john_lee/openmoko-merges
Commit: c398adea59103fb6e045c31f966a31dff28b1bdf
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c398adea59103fb6e045c31f966a31dff28b1bdf

Author: Julian_chu <julian_chu at openmoko.com>
Date:   Tue Dec  9 01:52:10 2008 +0800

linux-openmoko: To Modify the post-install script then it
will not flash kernel image after upgrade kernel if people
boot from SD card.

---

 packages/linux/linux-openmoko.inc |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/packages/linux/linux-openmoko.inc b/packages/linux/linux-openmoko.inc
index c986975..278a01d 100644
--- a/packages/linux/linux-openmoko.inc
+++ b/packages/linux/linux-openmoko.inc
@@ -56,9 +56,14 @@ do_deploy_append() {
 RDEPENDS_kernel-image += "mtd-utils"
 
 pkg_postinst_kernel-image () {
+
+# Get the lastest root file system value of boot args
+boot_arg=`cat /proc/cmdline |tr " " "\n"|grep "root=" |tail -n 1`
+has_mtdblock=`echo $boot_arg |grep mtdblock`
+
 if test "x$D" != "x"; then
         exit 1
-else
+elif test "empty$has_mtdblock" != "empty"; then
 	if [ -f ${sysconfdir}/default/flashkernel ] ; then
 		echo "Upgrading Kernel in Flash"
 		echo "DO NOT stop this process"
@@ -79,6 +84,8 @@ else
 	else
 		touch ${sysconfdir}/default/flashkernel
 	fi
+else
+        echo "You are not booting from NAND, don't flash kernel into mtdblock."
 fi
 }
 





More information about the Openembedded-commits mailing list