學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > linux的uboot的相關(guān)命令總結(jié)

linux的uboot的相關(guān)命令總結(jié)

時間: 佳洲1085 分享

linux的uboot的相關(guān)命令總結(jié)

  Linux中的uboot命令不太經(jīng)常用到,只需了解下即可。下面由學(xué)習(xí)啦小編為大家整理了Linux的uboot的相關(guān)命令總結(jié),希望對大家有幫助!

  linux的uboot的相關(guān)命令總結(jié)一

  <1> help --幫助命令

  linux的uboot的相關(guān)命令總結(jié)二、環(huán)境變量相關(guān)

  <2> printenv --查看環(huán)境變量也可以使用縮寫:print

  查看某一個環(huán)境變量的值,例子:printenv bootargs

  <3> setenv --添加、修改、刪除環(huán)境變量

  setenv name value //添加或者修改環(huán)境變量

  setenv name //刪除環(huán)境變量

  <4> saveenv --保存環(huán)境變量,將當(dāng)前定義的所有變量以及其值存入flash

  程序下載類命令:

  <5> tftp通過網(wǎng)絡(luò)下載,首先要配置網(wǎng)絡(luò):

  #setenv ethaddr 12:34:56:78:9A:BC

  #setenv ipaddr 192.168.0.3

  #setenv serverip 192.168.0.2 (tftp服務(wù)器的地址)

  #ping 192.168.0.2

  #tftp 0xc0008000 uImage.bin

  <6> bootm {addr} {arg} 執(zhí)行固定格式的二進(jìn)制程序

  #bootm 0xc0008000

  <7> md 顯示內(nèi)存的內(nèi)容

  md 采用十六進(jìn)制和ASCII碼兩種形式顯示內(nèi)存存儲單元的內(nèi)容

  md [.b | .w | .l ] address

  linux的uboot的相關(guān)命令總結(jié)三、擦除nand flash

  <8> nand erase 起始地址start 長度len

  擦除start處開始的,長度為len的區(qū)域

  范例:#nand erase 0x40000 0x50000

  <9> 讀寫nandflash

  nand write 內(nèi)存起始地址 flash起始地址 長度len

  將內(nèi)存起始地址處,長度為len的數(shù)據(jù),寫入flash起始地址處

  nand read 內(nèi)存起始地址 flash起始地址 長度len

  將flash起始地址處,長度為len的數(shù)據(jù),讀到內(nèi)存起始地址處。

  設(shè)置自啟動:

  <1>.設(shè)置從nand flash自啟動

  #setenv bootcmd nand read c0008000 40000 500000 \; bootm c0008000

  <2>.設(shè)置自動下載內(nèi)核到內(nèi)存并啟動

  #setenv bootcmd tftp c0008000 uImage.bin \; bootm c0008000

3634794