Memo: Use record of openWRT's TFTP method of programming program

Memo: OpenWRT's TFTP method of programming program usage record
Note: This article is a usage memo record.
1).
TFTP server installation and configuration reference instructions
ubuntu16.04-64

	$ sudo apt install tftp-hua tftpd-hua
    $ cat /etc/default/tftpd-hpa
    # /etc/default/tftpd-hpa
		TFTP_USERNAME="tftp"
		TFTP_DIRECTORY="/var/lib/tftpboot"  #服务器文件存放的位置
		TFTP_ADDRESS=":69"
		TFTP_OPTIONS="--secure"

Check the server file storage location /var/lib/tftpboot

2).
Copy the bin file compiled by openWRT to the specified folder of the tftp server

$ sudo cp -r 
bin/targets/ramips/mt7621/
openwrt-19.07-snapshot-unknown-ramips-mt7621-mikrotik_rb750gr3-initramfs-kernel.bin(编译生成文件路径及名称) 
/var/lib/tftpboot/iverson_uImage(TFTP 服务器的路径及文件名,此文件名需要结合uboot程序中预制文件名相同).

3).
Burning environment The configuration of ubuntu16's IP address is manual, according to uboot's default ip address configuration is 10.10.10.3, pay attention to the conformity with uboot's pre-configured configuration parameters. Put the openWRT development board and the ubuntu16 host in the same network segment (in layman's terms, it is under the same router).

4).
Press and hold the reset button of the openWRT router development board and power on the development board; the programming option output by uboot will appear
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
5: Load system code then write to Flash via Httpd.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
You chose 2 to
choose 2 to burn the program directly to the development board; if it is a test verification, you can choose 1 to write the code to sdram and verify first.

Guess you like

Origin blog.csdn.net/weixin_38387929/article/details/109636981