rt5350 uboot 명령의 간단한 분석
12019 단어 rt5350
rt5350이 켜진 인터페이스에 들어갑니다.이때 4를 입력하면 uboot 명령줄에 들어갑니다. 여기서 간단한 설정을 할 수 있습니다.
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.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
You choosed 4
0
raspi_read: from:40028 len:6
.
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Oct 9 2013 - 21:17:42)
RT5350 #
help 를 입력합니다.uboot에서 지원하는 모든 명령을 볼 수 있습니다.
RT5350 # help
? - alias for 'help'
bootm - boot application image from memory
cp - memory copy
erase - erase SPI FLASH memory
go - start application at address 'addr'
help - print online help
loadb - load binary file over serial line (kermit mode)
md - memory display
mdio - Ralink PHY register R/W command !!
mm - memory modify (auto-incrementing)
mw - memory write (fill)
nm - memory modify (constant address)
printenv- print environment variables
reset - Perform RESET of the CPU
rf - read/write rf register
saveenv - save environment variables to persistent storage
setenv - set environment variables
tftpboot- boot image via network using TFTP protocol
version - print monitor version
우리는 아래의 몇 가지 명령을 입력한다.서버 ipaddr bootfile 설정
RT5350 # setenv serverip 192.168.10.117
RT5350 # setenv ipaddr 192.168.10.111
RT5350 # setenv bootfile openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin
RT5350 # saveenv
Saving Environment to SPI Flash...
raspi_read: from:30000 len:10000
.Erasing SPI Flash...
raspi_erase: offs:30000 len:10000
.
Writing to SPI Flash...
raspi_write: to:30000 len:10000
.
done
명령 설명: setenv: 변수 수정 방법: setenv 변수 값saveenv 변수를 flash에 저장합니다.저장하지 않으면전기가 떨어지면 변수는 다시 원래의 수치로 돌아간다
다음은우리는 printenv를 사용하여 변수가 모두 수정되었는지 확인한다
RT5350 # printenv
bootcmd=tftp
bootdelay=5
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
kernel_addr=BFC40000
u-boot=u-boot.bin
load=tftp 8A100000 $(u-boot)
u_b=protect off 1:0-1;era 1:0-1;cp.b 8A100000 BC400000 $(filesize)
loadfs=tftp 8A100000 root.cramfs
u_fs=era bc540000 bc83ffff;cp.b 8A100000 BC540000 $(filesize)
test_tftp=tftp 8A100000 root.cramfs;run test_tftp
ethact=Eth0 (10/100-M)
filesize=3ff0cb
fileaddr=80800000
autostart=no
stdin=serial
stdout=serial
stderr=serial
serverip=192.168.10.117
ipaddr=192.168.10.111
bootfile=openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin
Environment size: 880/4092 bytes
reset 를 입력하여 다시 시작합니다.2 를 입력하여 브러시 인터페이스에 들어가서 수정 성공 여부를 확인하십시오
RT5350 # reset
U-Boot 1.1.3 (Oct 9 2013 - 21:17:42)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5None)
DRAM_CONF_FROM: EEPROM
DRAM_SIZE: 256 Mbits SDR
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Oct 9 2013 Time:21:17:42
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 360 MHZ ####
estimate memory size =32 Mbytes
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.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
You choosed 2
0
raspi_read: from:40028 len:6
.
2: System Load Linux Kernel then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.10.111) ==:192.168.10.111
Input server IP (192.168.10.117) ==:192.168.10.117
Input Linux Kernel filename (openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin) ==:openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin
우리는 볼 수 있다.세 변수의 수정이 모두 효력이 발생했다.다음에 브러시를 하면 우리는 항상 수동으로 이 세 가지 변수를 기입할 필요가 없다.세 번만 돌려주면 돼.