summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-10 23:11:30 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-01-10 23:11:30 +0000
commitf4f969a659645ac0ad184f1959f9213e0ae8be53 (patch)
tree2c870292829a5c1f3e77e9bb0f256b74295456db /packages/linux
parente83cd15cbbe73ab0dd97f3e07056d6e0fc03be59 (diff)
parent7e8411a730dbfa42b70ac583e14f64bd0465f2a3 (diff)
merge of '503b3ade200ad628a4b30fab228c365b8c0cf2ea'
and '9910934c4f018cde20787ccaa558640752542098'
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux-openmoko.inc20
1 files changed, 14 insertions, 6 deletions
diff --git a/packages/linux/linux-openmoko.inc b/packages/linux/linux-openmoko.inc
index 2016acdb63..4f1981c8b3 100644
--- a/packages/linux/linux-openmoko.inc
+++ b/packages/linux/linux-openmoko.inc
@@ -12,14 +12,22 @@ pkg_postinst_kernel-image () {
if test "x$D" != "x"; then
exit 1
else
- echo "Upgrading Kernel in Flash"
- echo "DO NOT stop this process"
+ if [ -f ${sysconfdir}/default/flashkernel ] ; then
+ echo "Upgrading Kernel in Flash"
+ echo "DO NOT stop this process"
- MTD_KERNEL_PARTITION=`cat /proc/mtd | grep kernel | cut -d':' -f1`
- MTD_KERNEL_PARTITION=/dev/$MTD_KERNEL_PARTITION
+ MTD_KERNEL_PARTITION=`cat /proc/mtd | grep kernel | cut -d':' -f1`
+ MTD_KERNEL_PARTITION=/dev/$MTD_KERNEL_PARTITION
- ${bindir}/flash_eraseall $MTD_KERNEL_PARTITION
- ${bindir}/nandwrite -p $MTD_KERNEL_PARTITION /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
+ if [ "x$MTD_KERNEL_PARTITION" = "x" ] ; then
+ exit 1
+ fi
+
+ ${bindir}/flash_eraseall $MTD_KERNEL_PARTITION
+ ${bindir}/nandwrite -p $MTD_KERNEL_PARTITION /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
+ else
+ touch ${sysconfdir}/default/flashkernel
+ fi
fi
}