[U-Boot] Automatic firmware upgrade using USB DFU

Tamás Bondár public at tamasbondar.info
Tue Aug 19 00:18:23 CEST 2014


Dear All,

I am trying to implement an automatic firmware upgrade functionality on 
a U-Boot / embedded Linux board the following way. If anyone has done 
something similar before, please, comment if this is the right approach 
to the problem or I should choose a different solution? The hardware is 
a BeagleBone Black acting as the DFU device (to be updated). It is 
connected to a host machine (PC) that downloads the new firmware using 
USB DFU.


So, here are my planned steps for DFU fw upgrade.

1) A U-Boot environment variable is set from embedded Linux if a fw 
upgrade is required. Then the board is rebooted.

2) In the boot-up script, U-Boot checks the value of the environment 
variable and enters DFU mode instead of booting the Linux kernel. This 
command is executed to enter DFU mode: 'dfu 0 mmc 0'.

3) At this point the host recognises the DFU device and downloads the 
new firmware image.

4) After the download has finished, the environment variable is reset 
to indicate normal boot and the board is rebooted.

5) Board boots up using the new firmware.


When tested this manually, I found a problem in step 4) because U-Boot 
requires pressing Ctrl+C after the download finished. This suggests me 
that DFU can't be controlled by a script as I described above. Is this 
correct? What is the idea behind waiting for Ctrl+C and not returning 
immediately? Any comments or hints are appreciated.

Thanks,
-Tamás



More information about the U-Boot mailing list