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.