View source for FreeRunner backup kernel

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Return to FreeRunner backup kernel.

Personal tools

Freerunner backup kernel

The Freerunner NAND partition for the monolithic kernel is set to be 8MBytes, but currently kernels are around 2MBytes in size. This allows us to stash a second, backup kernel in that partition for use in an emergency. If your USB network connection is unavailable was knocked out for some reason, or the modules in the rootfs are bad and crash on every boot, this can be highly useful to have alongside DFU as a boot menu option eventually.


Since this was only implemented after production, factory Freerunners do not currently have a recovery kernel, but it's possible to add as described here.

Once you installed the recovery kernel, it won't get overwritten by subsequent DFU kernel updates because DFU only erases as far as it writes, which is no more than 2MBytes for normal kernel update.

Current packaging compatability issue

Right this second the packaged kernels erase the whole partition on update, but I am requesting that be changed so they won't touch the backup kernel either.

Installing the backup kernel

Recovery kernels are "moredrivers" kernels that include the critical drivers in the main kernel already. Additionally, because they share a partition with the normal kernel, they are around 6MB in size to get the recovery part at the 4MB offset as shown in the picture above.

You can get a 6MB recovery image from here: 6M recovery kernel image

Just DFU it in normally to the kernel partition. When the issue about packaged erase is fixed, subsequent updates by DFU or kernel package will update the first kernel normally, but leave the backup one at +4MBytes alone.

Selecting the backup kernel in U-Boot

This one-liner at the U-Boot prompt will boot you into the backup kernel. (FIXME: integrate into boot menu to make all this actually useful)

setenv bootcmd nand read.e 0x32000000 kernel \; setenv bootargs \${mtdparts} rootfstype=jffs2 root=/dev/mtdblock6 console=tty0 console=ttySAC2,115200 loglevel=3 init=/sbin/init \; bootm 0x32400000 ; boot