Updating firmware via serial port

Due to hardware or driver issues you might not be able to update your firmware via Ethernet and TFTP from U-Boot. Still having U-Boot on replying on the serial port, allows you to update firmware with the loadb and update command.

Update from RAM was recently added as source media for the update command, though it is not available on official DUB-2.3.0.3 (nor earlier).
 
Update from RAM can be done using manual U-Boot commands. The tricky part is that the eMMC must be written using mmc command, which accepts units in blocks (512-byte) instead of in bytes. So we need to transform the value of $filesize to blocks:
=> loadb          <-- transfer file
=> setexpr $filesizeblks $filesize / 512
=> setexpr $filesizeblks $filesizeblks + 1
=> mmc write $loadaddr $filesizeblks

Last updated: Oct 04, 2024

Filed Under

Embedded

Recently Viewed

No recently viewed articles

Did you find this article helpful?