linux-openmoko_2.6.22.5.bb : commit the work for OM bug #910 now people
authorGraeme Gregory <dp@xora.org.uk>
Mon, 17 Dec 2007 08:09:25 +0000 (08:09 +0000)
committerGraeme Gregory <dp@xora.org.uk>
Mon, 17 Dec 2007 08:09:25 +0000 (08:09 +0000)
have had plenty of warning. Now kernel-image will flash new kernel in
postinst. Its noisy and leaves the kernel in / for now to ease debugging
of any problems people have.

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

index 09517fd..30784f0 100644 (file)
@@ -47,3 +47,7 @@ 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 4cad792..b093386 100644 (file)
@@ -49,3 +49,7 @@ 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 d081699..b659153 100644 (file)
@@ -1,5 +1,4 @@
 # extra stuff we need for openmoko that is not in linux.inc
-
 do_deploy_append() {
        mv ${DEPLOY_DIR_IMAGE}/modules-${PV}-${PR}-${MACHINE}.tgz ${DEPLOY_DIR_IMAGE}/modules-${PV}-${PR}-${MACHINE_CLASS}.tgz
        mv ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_CLASS}.bin
@@ -7,3 +6,17 @@ do_deploy_append() {
        ln -sf ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_CLASS}.bin ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE_CLASS}-latest.bin
 }
 
+RDEPENDS_kernel-image += "mtd-utils"
+
+pkg_postinst_kernel-image () {
+if test "x$D" != "x"; then
+        exit 1
+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}
+fi
+}
+
index c623504..d1b3c5e 100644 (file)
@@ -37,7 +37,6 @@ S = "${WORKDIR}/linux-${VANILLA_VERSION}"
 ##############################################################
 # kernel image resides on a seperate flash partition (for now)
 #
-FILES_kernel-image = ""
 ALLOW_EMPTY = "1"
 
 COMPATIBLE_HOST = "arm.*-linux"