DENX . DULG . HowCanIImplementAutomaticSoftwareUpdates

14.2.22. How can I implement automatic software updates?

How I can use U-Boot to make it easy for my end users to upgrade the firmware of the device?
This depends mainly on how you intend to distribute your software updates, and which physical interfaces are present (or usable for this purpose) on your device. Typically you will either distribute the software over the network, or you can use soMe type of storage device like USB mass storage device (memory stick etc.), SD cards etc.

U-Boot already supports such a feature on several boards. You will probably have to adapt the code and/or the actual behaviour to your specific hardware and/or requirements. Please see here for a starting point:
When auto-update support over TFTP is enabled, U-Boot will test in the initialization sequence if a specific image file is present on the TFTP server. If this is the case, the image will be downloaded and, if it is considered ok, installed into flash. For details, please read doc/README.update and/or see commits 4bae9090 and e83cc063.
Several boards implement this feature, all in a slightly different way; see board/trab/auto_update.c, board/mcc200/auto_update.c and board/esd/common/auto_update.c.

With this feature enabled, U-Boot will check during the init sequence if a USB mass storage device is plugged in, if this contains a readable file system, and check if this contains one or more known image files. Additionally it is possible to check if the image versions on the USB device are more recent than those already stored in flash. If all programmed criteria match, and if the images can be read without error, the content of the on-board storage (flash, NAND, etc.) gets automatically updated. Adaption for other storage devices (like SD card etc.) should be trivial to implement.

----- Revision r1.1 - 02 Feb 2010 - 08:00 - WolfgangDenk
Copyright © 2002-2021 by DENX Software Engineering