Was this page helpful?

U-boot

http://www.denx.de/wiki/U-Boot/

U-boot 是bootloader 其中一種 ,一般是最底層. user 怎樣都無法動到的區塊. 除非FW 帶了uboot區更新錯.
當一般嵌入式系統發生刷磚狀況時,若沒有動到 uboot, 還是可以透過uboot 做軔體恢復.

控制 UBoot需要用  終端介面 (TTL port)

需要的軟/硬體

  1. TTL to USB or COM port 板
  2. 上述板子所附的 Driver (USB to COM)
     

Orion SoC Nas Serial 的設定

  • speed: 115200
  • data bit: 8
  • stop bit: 1
  • flow control: RTS/CTS
  • parity: none

設定 U-boot

如果 TTL 連接正確,當機器開機時就會看到所有輸出訊息,其中會顯示 "Hit any key to stop autoboot",按任何鍵就會停止開機動作。

u-boot_msg.png

U-boot 常用指令 Netronix>> 為提示命令

Netronix>> printenv   #顯示uboot所有設定
Netronix>> loady # 以串口傳送 fw image
Netronix>> setenv ip  # 設定uboot ip
Netronix>> setenv serverip #設定 Server ip (如NFS or tftp)
Netronix>> tftpboot 0x0800000 xxxx.image # 從0x80000 dram位置啟動 tftp server 上 xxxx.image
Netronix>> nand erase 0x0 0x60000    # 擦除 NAND 
Netronix>> nand write 0x0800000 0x0 0x60000 #寫入 NAND 
Netronix>> saveenv #儲存uboot 設定 
Netronix>> reset #重新開機
Netronix>>help

 

 範例用uboot 寫入 uboot ,kernel ,rootfs 三種軔體

tftpboot 0x0800000 u-boot.kwb
nand erase 0x0 0x60000
nand write 0x0800000 0x0 0x60000

 dhcp 0x2000000 x.x.x.x:sheeva-2.6.37-uImage
 nand erase 0x100000 0x400000
 nand write 0x2000000 0x100000 0x400000

dhcp 0x2000000 x.x.x.x:pwnplug_1.1_Community_ubinized_5-21-2012.img
nand erase 0x500000 0x1fb00000
nand write.e 0x2000000 0x500000 0x14680000 setenv bootargs console=ttyS0,115200 
mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) 
ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv mainlineLinux yes
setenv arcNumber 2097

 

Was this page helpful?
標籤 (Edit tags)
  • No tags

文件 1

文件大小日期附件上傳者 
 u-boot_msg.png
U-Boot
35.37 KB18:24, 14 Apr 2012alang動作
您必須 登入 才能發佈評論。
Powered by MindTouch Core