linux-openmoko.inc : gta01/02 wont use the same partition map going into
authorGraeme Gregory <dp@xora.org.uk>
Tue, 8 Jan 2008 13:39:58 +0000 (13:39 +0000)
committerGraeme Gregory <dp@xora.org.uk>
Tue, 8 Jan 2008 13:39:58 +0000 (13:39 +0000)
the future so use /proc/mtd to find the kernel partition.

conf/machine/fic-gta01.conf
conf/machine/fic-gta02.conf
packages/linux/linux-openmoko.inc

index baa2e55..ad0c64b 100644 (file)
@@ -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"
-
index 2b2d016..dad60e2 100644 (file)
@@ -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"
-
index b659153..2016acd 100644 (file)
@@ -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
 }