[oe-commits] org.oe.dev linux-openmoko.inc : improve to not flash on first boot from Shoragons
xora commit
openembedded-commits at lists.openembedded.org
Thu Jan 10 16:03:47 UTC 2008
linux-openmoko.inc : improve to not flash on first boot from Shoragons
suggestion. Also error out if we cant find the kernel mtd.
Author: xora at openembedded.org
Branch: org.openembedded.dev
Revision: 63b3be114577f06e728c111b2fda61626ac3faaa
ViewMTN: http://monotone.openembedded.org/revision/info/63b3be114577f06e728c111b2fda61626ac3faaa
Files:
1
packages/linux/linux-openmoko.inc
Diffs:
#
# mt diff -rfa111586634eab2d6f129aa33960db7ff9c5c208 -r63b3be114577f06e728c111b2fda61626ac3faaa
#
#
#
# patch "packages/linux/linux-openmoko.inc"
# from [26ac1c3cd91125014bb4e3b9e4f80b93fc877ccb]
# to [6f24382b0e0681456daf075975f293e1e06b0fb2]
#
============================================================
--- packages/linux/linux-openmoko.inc 26ac1c3cd91125014bb4e3b9e4f80b93fc877ccb
+++ packages/linux/linux-openmoko.inc 6f24382b0e0681456daf075975f293e1e06b0fb2
@@ -12,14 +12,22 @@ else
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
}
More information about the Openembedded-commits
mailing list