Uimage-flasher

NOTE: This page is obsolete. Please use the omap4boot utility Ref: http://pandaboard.org/content/usb-downloader-and-usb-second-stage-bootloader-omap4

Introduction
Each time we need to update the kernel image on SD Card, we need to take the SD card out of the PandaBoard and attach it to the PC, mount the boot partition, update the kernel image, unmount the boot partition and reconnect it to the PandaBoard. This process becomes tedious if one has to experiment with different kernels. It would be nice if we can export the SD Card over the USB so that we can update / replace the kernel image on the SD card without taking it off of the PandaBoard.

uImage-flasher
Anand Gadiyar has put together uImage-flasher that is a combination of uImage+initramfs along with g_file_storage.ko. This solution lets the PandaBoard export its SD card over the USB.

Features
* USB EHCI, SMSC95xx, USB-serial, USB-storage enabled * MUSB built in device-only mode - all gadgets available * 5.6 MB size (need to reduce further) * Networking untested - need someone to report if something needs to be enabled * Built using the gitorious panda kernel plus a minimal filesystem at [2]. * Kconfig embedded into the kernel in case someone wants to recreate the setup

How to Use
Copy the uImage-flasher to your SD card. the uImage-flasher is availalbe at this location. set the following bootargs and load the image

* set bootargs console=ttyO2,115200n8 * mmcinit 0 * fatload mmc 0 80300000 uImage-flasher; bootm

No other settings are needed in the bootargs.

To start the file-storage gadget, just run `/flashdrive.sh` Connect the USB OTG cable to PandaBoard and the PC. This will export the SD card over the USB. From your PC you can add any uImage you want to the SD card. No need to take the SD card out of the PandaBoard. Once the kernel image is added you can boot with it.

Be sure to unmount the boot partition and the file-system partition from your PC before removing the USB OTG cable.

To-Do
* reduce the smaller image size even more to a bare minimum * add SDP/Blaze support (trivial to do, will get this in v0.2 as soon as I get a chance to test it out) * use generic omap2plus_defconfig to get this running on all OMAPs * (This is harder to do due to MUSB not behaving well with that config right now - lower priority) * try and get the smaller image booting in < 0.5s (takes ~6s now, not including uncompression and image copy) * enhance the superset image to add more stuff (low-priority, I'll work on it only if someone thinks it's useful - the bare minimum one looks more interesting) * add kexec tools to the filesystems to be able to reboot into the new kernel directly * try and switch to uClibc for cutting down image size some more (low priority; no bandwidth) * document on omappedia (I could use some help here)

Long term goal is to add USB mass-storage+SD write support to u-boot/barebox so that it can be used directly.