1
votes

I used to update firmware on embedded system through tools like tftp (with ethernet port or ethernet over usb), sd card or a simple usb stick.

I am currently working on a system without ethernet port, no usb port. Only a ttl/usb connexion to be able to access the console and a micro usb to supply it. I am currently building a linux image and a rootfs. The storage used on the board is emmc.

Is there a standard way to update linux/rootfs in Emmc, etc.. with u-boot by using a simple ttl/usb connexion ? I guess that I can part my flash in u-boot thanks to mmc command but I don't understand how to transfer my kernel image and my rootfs in emmc with a simple ttl/usb link.

1
I have the same issue. So I currently load linux kernel using the uboot ymodem (loady) and the kernel has an initramfs which is a stripped down version of the minimalfs. In theory once you load linux, you should be able to access the emmc easily. But for some reason my emmc causes the system to hang.preetam

1 Answers

3
votes

Is there a standard way to update linux/rootfs in Emmc, etc.. with u-boot by using a simple ttl/usb connexion ?

Yes, when only the serial console connection is available, a binary transfer protocol can be employed. These methods are identical to what is used with phone modems.
A U-Boot command for one transfer method is loadb.

=> help loadb
loadb - load binary file over serial line (kermit mode)

Usage:
loadb [ off ] [ baud ]
    - load binary file over serial line with offset 'off' and baudrate 'baud'
=>

Another U-Boot command for a transfer method is loads for binary data formatted as a Motorola S-record file:

=> help loads
loads - load S-Record file over serial line

Usage:
loads [ off ] [ baud ]
    - load S-Record file over serial line with offset 'off' and baudrate 'baud'
=>

These methods of course require the appropriate sending program on the other end of the serial link, just like tftpboot requires a TFTP server. A decent terminal emulator program, such as Minicom or TeraTerm, can perform the PC side of these transfers. Note that it's the sender that determines the file to transfer; the U-Boot side cannot request the file by name but only receives it.

If these commands are not already available in your U-Boot, then you'll have to edit the configuration and rebuild U-Boot.