Hi3520d uboot uImage rootfs 移植与升级
生活随笔
收集整理的這篇文章主要介紹了
Hi3520d uboot uImage rootfs 移植与升级
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝、升級hi3520DDEMO板開發開發環境
? ? # 如果您使用的hi3520D的DEMO板,可以按照以下步驟燒寫u-boot,內核以及文件系統,以下步驟均使用網絡來更新。
? ? # 通常,您拿到的單板中已經有u-boot,如果沒有的話,就需要使用仿真器進行燒寫。
? ? # 更詳細的操作步驟及說明,請參見01.software\board\documents目錄下的《Linux開發環境用戶指南》。
? ? # 以下操作假設您的單板上已經有u-boot,使用網口燒寫uboot、kernel及rootfs到Flash中。
? ? # Demo單板默認為從SPI Flahs啟動。
1、配置tftp服務器
? ? # 可以使用任意的tftp服務器,將package/image_uclibc(或image_glibc)下的相關文件拷貝到tftp服務器目錄下。
? ??
2、參數配置
? ? # 單板上電后,敲任意鍵進入u-boot。設置serverip(即tftp服務器的ip)、ipaddr(單板ip)和ethaddr(單板的MAC地址)。
? ? setenv serverip xx.xx.xx.xx
? ? setenv ipaddr xx.xx.xx.xx?
? ? setenv ethaddr xx:xx:xx:xx:xx:xx
? ? setenv netmask xx.xx.xx.xx
? ? setenv gatewayip xx.xx.xx.xx
? ? ping serverip,確保網絡暢通。
3、燒寫映像文件到SPI Flash
? ? 以16M SPI Flash為例。
? ? 1)地址空間說明
? ? ? ? | ? ? ?1M ? ? ? | ? ? ?4M ? ? ? | ? ? ?11M ? ? ?|
? ? ? ? |---------------|---------------|---------------|
? ? ? ? | ? ? boot ? ? ?| ? ? kernel ? ?| ? ? rootfs ? ?|
? ? ? ? 以下的操作均基于圖示的地址空間分配,您也可以根據實際情況進行調整。
? ? 2)燒寫u-boot
? ? ? ? sf probe 0
? ? ? ? mw.b 82000000 ff 100000
? ? ? ? tftp 0x82000000 u-boot-hi3520D.bin
? ? ? ? sf probe 0
? ? ? ? sf erase 0 100000
? ? ? ? sf write 82000000 0 100000
? ? ? ? reset ? ?
? ? 3)燒寫內核
? ? ? ? mw.b 82000000 ff 400000
? ? ? ? tftp 82000000 uImage_hi3520d_full ?
? ? ? ? sf probe 0
? ? ? ? sf erase 100000 400000
? ? ? ? sf write 82000000 100000 400000
? ? 4)燒寫文件系統
? ? ? ? mw.b 82000000 ff b00000
? ? ? ? tftp 0x82000000 rootfs_uclibc_64k.jffs2
sf probe 0
? ? ? ? sf erase 500000 b00000
? ? ? ? sf write 82000000 500000 b00000
? ? 5)設置啟動參數
/*** flash啟動 ***/
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),11M(rootfs)'
/*** nfs啟動 ***/
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/nfs nfsroot=192.168.1.134:/source/rootfs ip=192.168.1.34:192.168.1.134:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc'
? ? ? ? setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x400000;bootm 0x82000000'
? ? ? ? saveenv
? ? # 如果您使用的hi3520D的DEMO板,可以按照以下步驟燒寫u-boot,內核以及文件系統,以下步驟均使用網絡來更新。
? ? # 通常,您拿到的單板中已經有u-boot,如果沒有的話,就需要使用仿真器進行燒寫。
? ? # 更詳細的操作步驟及說明,請參見01.software\board\documents目錄下的《Linux開發環境用戶指南》。
? ? # 以下操作假設您的單板上已經有u-boot,使用網口燒寫uboot、kernel及rootfs到Flash中。
? ? # Demo單板默認為從SPI Flahs啟動。
1、配置tftp服務器
? ? # 可以使用任意的tftp服務器,將package/image_uclibc(或image_glibc)下的相關文件拷貝到tftp服務器目錄下。
? ??
2、參數配置
? ? # 單板上電后,敲任意鍵進入u-boot。設置serverip(即tftp服務器的ip)、ipaddr(單板ip)和ethaddr(單板的MAC地址)。
? ? setenv serverip xx.xx.xx.xx
? ? setenv ipaddr xx.xx.xx.xx?
? ? setenv ethaddr xx:xx:xx:xx:xx:xx
? ? setenv netmask xx.xx.xx.xx
? ? setenv gatewayip xx.xx.xx.xx
? ? ping serverip,確保網絡暢通。
3、燒寫映像文件到SPI Flash
? ? 以16M SPI Flash為例。
? ? 1)地址空間說明
? ? ? ? | ? ? ?1M ? ? ? | ? ? ?4M ? ? ? | ? ? ?11M ? ? ?|
? ? ? ? |---------------|---------------|---------------|
? ? ? ? | ? ? boot ? ? ?| ? ? kernel ? ?| ? ? rootfs ? ?|
? ? ? ? 以下的操作均基于圖示的地址空間分配,您也可以根據實際情況進行調整。
? ? 2)燒寫u-boot
? ? ? ? sf probe 0
? ? ? ? mw.b 82000000 ff 100000
? ? ? ? tftp 0x82000000 u-boot-hi3520D.bin
? ? ? ? sf probe 0
? ? ? ? sf erase 0 100000
? ? ? ? sf write 82000000 0 100000
? ? ? ? reset ? ?
? ? 3)燒寫內核
? ? ? ? mw.b 82000000 ff 400000
? ? ? ? tftp 82000000 uImage_hi3520d_full ?
? ? ? ? sf probe 0
? ? ? ? sf erase 100000 400000
? ? ? ? sf write 82000000 100000 400000
? ? 4)燒寫文件系統
? ? ? ? mw.b 82000000 ff b00000
? ? ? ? tftp 0x82000000 rootfs_uclibc_64k.jffs2
sf probe 0
? ? ? ? sf erase 500000 b00000
? ? ? ? sf write 82000000 500000 b00000
? ? 5)設置啟動參數
/*** flash啟動 ***/
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),11M(rootfs)'
/*** nfs啟動 ***/
setenv bootargs 'mem=64M console=ttyAMA0,115200 root=/dev/nfs nfsroot=192.168.1.134:/source/rootfs ip=192.168.1.34:192.168.1.134:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc'
? ? ? ? setenv bootcmd 'sf probe 0;sf read 0x82000000 0x100000 0x400000;bootm 0x82000000'
? ? ? ? saveenv
總結
以上是生活随笔為你收集整理的Hi3520d uboot uImage rootfs 移植与升级的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件工程师笔试编程题
- 下一篇: 029--PM话术模板