[Bug 1344] New: Kernel upgrade fails with GTA01 rootfs on SDHC

bugzilla-daemon at bugzilla.openmoko.org bugzilla-daemon at bugzilla.openmoko.org
Mon Apr 14 23:43:58 CEST 2008


           Summary: Kernel upgrade fails with GTA01 rootfs on SDHC
           Product: OpenMoko
           Version: 2007.2
          Platform: Neo1973
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: kernel
        AssignedTo: openmoko-kernel at lists.openmoko.org
        ReportedBy: cwixon at usa.net
                CC: buglog at lists.openmoko.org

I don't know exactly where to categorize this, because it's not really a kernel
issue, but more related to packaging and flashing . . . feel free to reclassify
this bug.

In any event, I'm running an AUTOREV rootfs (built myself) on my SDHC card via
the procedure described here:

Accordingly, my kernel is in NAND where it usually goes.

When the kernel gets upgraded via ipkg/opkg, the new kernel-image .ipk file has
a postinst script that is supposed to erase the kernel partition and reflash it
with the new kernel.  But that's not working.  Looks like this:

   root at thrakkorzog:/$opkg upgrade
   Configuring kernel-image-2.6.24
   Upgrading kernel in Flash
   DO NOT stop this process
   /usr/bin/flash_eraseall: /dev/: Is a directory
   postinst script returned status 1
   Nothing to be done
   Collected errors:
   ERROR: kernel-image-2.6.24.postinst returned 1
   root at thrakkorzog:/$

So I looked into this a little further, and it appears that the postinst script
does some hackery based on grepping "kernel" in the contents of /proc/mtd to
determine where to flash.  That should indicate where the kernel lives.  But on
my device:

   root at thrakkorzog:/$cat /proc/mtd
   dev:     size       erasesize   name
   mtd0:    04000000   00004000    "neo1973-nand"

And that's all.  So the kernel doesn't show up at all, and the flash operation

But I know it's there, and the default NAND partitioning scheme is in place (I
even have a basic rootfs in NAND, but I don't boot from it).

My workaround is to have a custom .bb for the kernel based on the official one
but with a few defconfig tweaks (turn OFF mmc debug messages) and removal of the
postinst flash operations to allow it to succeed.  I haven't tested this yet
because there's something wrong with the openmoko git repository, but that's
another problem . . .

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the openmoko-kernel mailing list