From cb5565aee93dcc66e259aa7a030acee1074197cc Mon Sep 17 00:00:00 2001 From: Graeme Gregory Date: Tue, 8 Jan 2008 13:39:58 +0000 Subject: [PATCH] linux-openmoko.inc : gta01/02 wont use the same partition map going into the future so use /proc/mtd to find the kernel partition. --- conf/machine/fic-gta01.conf | 3 --- conf/machine/fic-gta02.conf | 3 --- packages/linux/linux-openmoko.inc | 7 +++++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/conf/machine/fic-gta01.conf b/conf/machine/fic-gta01.conf index baa2e55dc1..ad0c64bef2 100644 --- a/conf/machine/fic-gta01.conf +++ b/conf/machine/fic-gta01.conf @@ -44,6 +44,3 @@ EXTRA_IMAGEDEPENDS += "dfu-util-native" # tune for S3C24x0 include conf/machine/include/tune-arm920t.inc -# set partition to flash kernel into -MTD_KERNEL_PARTITION = "/dev/mtd2" - diff --git a/conf/machine/fic-gta02.conf b/conf/machine/fic-gta02.conf index 2b2d016089..dad60e20c8 100644 --- a/conf/machine/fic-gta02.conf +++ b/conf/machine/fic-gta02.conf @@ -46,6 +46,3 @@ include conf/machine/include/tune-arm920t.inc # build YAFFS2 IMAGE_FSTYPES ?= "jffs2 yaffs2" -# set partition to flash kernel into -MTD_KERNEL_PARTITION = "/dev/mtd2" - diff --git a/packages/linux/linux-openmoko.inc b/packages/linux/linux-openmoko.inc index b659153733..2016acdb63 100644 --- a/packages/linux/linux-openmoko.inc +++ b/packages/linux/linux-openmoko.inc @@ -15,8 +15,11 @@ else echo "Upgrading Kernel in Flash" echo "DO NOT stop this process" - ${bindir}/flash_eraseall ${MTD_KERNEL_PARTITION} - ${bindir}/nandwrite -p ${MTD_KERNEL_PARTITION} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} + 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} fi } -- 2.39.5