u-boot flash emmc ttl serial

泄露秘密 提交于 2019-12-24 12:54:59

问题


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:


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.



来源:https://stackoverflow.com/questions/28042023/u-boot-flash-emmc-ttl-serial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!