U-Boot Auto Update

Can U-Boot be configured to auto update itself, rootfs, and the kernel when a USB storage device is present?

I saw a brief mention of this in the U-Boot Guide, but the referenced source files do not exist.

I’m working with the 2016.11-toradex branch.

Yes this is possible. There are a number of ways you might do this. For example, you may code a simple script which is invoked by U-boot boot command (bootcmd) to start usb and check for the existence of a u-boot script file of a particular name on any present usb storage devices. If the file is indeed present, then you can run the script which would take care of updating the module. You of course must consider the security implications of this approach. Be aware that it takes a little time for USB to initialize in U-boot, so this process will increase your boot time.

I’m looking into the same issue, and don’t know what to do at this moment. Is there any instruction, document for how to do it?

Hi Chaoyong

As brandon explained, there are several ways to do it.
You might also look in this. There are also some examples with auto-flash using USB.

Hi, thanks for the answer. It seems like the source code link in this example is broken, I cannot open it. Can you give me a working link? Thanks a lot!

yeah, unfortunately. the link ist not working anymore. we will check internally for this issue and come back to you.

We have a script, which can be adapted to your needs.
The block “flash_blk” can be sd card or USB Stick.

Hi, is the link up yet? can anyone help

Hi @Achyuth_AGNA_555,

The link from Denx is not available anymore. If you want to search the u-boot documentation, take a look at this link: The U-Boot Documentation — Das U-Boot unknown version documentation

If you still want to access the mentioned link, you can do it trough the Wayback Machine, although not all features/links can be enabled: https://web.archive.org/web/20211202094431/http://www.denx.de/wiki/DULG/HowCanIImplementAutomaticSoftwareUpdates

If you still need help with that, please open a new ticket, since this one is very old and already solved.

Best Regards,