the future so use /proc/mtd to find the kernel partition.
# tune for S3C24x0
include conf/machine/include/tune-arm920t.inc
-# set partition to flash kernel into
-MTD_KERNEL_PARTITION = "/dev/mtd2"
-
# build YAFFS2
IMAGE_FSTYPES ?= "jffs2 yaffs2"
-# set partition to flash kernel into
-MTD_KERNEL_PARTITION = "/dev/mtd2"
-
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
}