Difference between revisions of "CELF Project Proposal/Add DFU support to U-Boot"
|Line 58:||Line 58:|
== Comments ==
== Comments ==
Latest revision as of 13:21, 27 August 2015
- Merge DFU support into mainline U-Boot
- Mike Frysinger
The USB Implementers Forum have created an official Device Firmware Upgrade (DFU) USB device class. This simplifies and standardizes the process of upgrading firmware greatly as the device is able to describe named partitions. The user merely selects the target partition by name and specifies the file to write to it. It is even bidirectional -- DFU may be used to extract the firmware from the device. This leads to obvious and trivial methods for backing up and restoring not only the devices operating code, but even the user's personal data and configuration settings.
The OpenMoko guys have implemented support for this spec in their fork of U-Boot. Sadly, interest has waned from the OpenMoko side for working with U-Boot mainline and merging not only their board-specific code, but the fun features they've added along the way (such as DFU). They've started their own bare-bones boot loader from scratch ("Qi") and focus is now on that. Their U-Boot appears to be in good shape though as it is maintained in a git repo forked from the mainline tree around version 1.3.2. This should ease the process of reviewing changes and updating to newer versions greatly.
Anyone who has played with an OpenMoko device can attest to the usefulness of this functionality. The entire kernel, root filesystem, and even bootloader itself is easily updated with the dfu-utils userspace package (based on libusb, so portable to Windows/BSDs/etc...). Only a USB cable is needed to attach the OpenMoko to your computer -- no need to talk to the device yourself over something messy like a serial console let alone be forced to run the commands yourself (load/erase/write/etc...), or setup your own personal LAN. If your new kernel/rootfilesystem is messed up in some/any way, you merely reboot the phone and load a different firmware image.
Additional follow-on work
One could also write a portable graphical frontend to dfu-utils to simplify the process to the point where non-technical people (i.e. your mom) can update the firmware.
- DFU Intro: http://wiki.openmoko.org/wiki/USB_DFU
- DFU Utilities:
- U-Boot: http://wiki.openmoko.org/wiki/U-boot
- U-Boot: http://www.denx.de/wiki/U-Boot/WebHome
- USB DFU Spec: http://www.usb.org/developers/devclass_docs/DFU_1.1.pdf
- see Merge DFU support into mainline U-Boot
This should take about a month to update, test, and merge.
This is now complete upstream.