[oe-commits] John Lee : linux-openmoko: don't flash kernel if using SD card.
GIT User account
git at amethyst.openembedded.net
Thu Dec 18 16:13:36 UTC 2008
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 5c6f095127528bb59c3922fbdfae0800bb687621
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5c6f095127528bb59c3922fbdfae0800bb687621
Author: John Lee <john_lee at openmoko.org>
Date: Thu Dec 18 23:53:14 2008 +0800
linux-openmoko: don't flash kernel if using SD card.
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-devel_git.bb | 2 +-
packages/linux/linux-openmoko.inc | 9 ++++++++-
packages/linux/linux-openmoko_2.6.24+git.bb | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/packages/linux/linux-openmoko-devel_git.bb b/packages/linux/linux-openmoko-devel_git.bb
index d3f5d3f..94cc8eb 100644
--- a/packages/linux/linux-openmoko-devel_git.bb
+++ b/packages/linux/linux-openmoko-devel_git.bb
@@ -10,7 +10,7 @@ KERNEL_VERSION = "${KERNEL_RELEASE}"
OEV = "oe2"
PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCREV}"
-PR = "r0"
+PR = "r1"
SRC_URI = "\
git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy-tracking \
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
}
diff --git a/packages/linux/linux-openmoko_2.6.24+git.bb b/packages/linux/linux-openmoko_2.6.24+git.bb
index 6f62b3d..48b7eff 100644
--- a/packages/linux/linux-openmoko_2.6.24+git.bb
+++ b/packages/linux/linux-openmoko_2.6.24+git.bb
@@ -8,7 +8,7 @@ KERNEL_VERSION = "${KERNEL_RELEASE}"
OEV = "oe3"
PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCREV}"
-PR = "r0"
+PR = "r1"
SRC_URI = "\
git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable \
More information about the Openembedded-commits
mailing list