sama5d2 米尔核心板 tftp方式 更新 文件系统

在window 7 64位PC 上:

该PC的IP地址为:192.168.99.219

以管理员权限 启动tftpd32.exe:
这里写图片描述

参考地址:
https://www.at91.com/linux4sam/bin/view/Linux4SAM/BuildRootUse

板子需要插上网线:
板子进入uboot模式:
进入uboot:配置tftp服务:
setenv serverip 192.168.99.219
setenv ipaddr 192.168.99.53
setenv ethaddr 00:01:02:03:04:05
saveenv
重启板子 再次 进入 UBOOT模式:

1 ,erase the nand flash root file system partition (in our case nand flash size is about 256 MB)

U-Boot> nand erase 0x800000 0xF800000

2, download the UBI file system from TFTP to the board RAM (address 0x20000000)

tftp 0x20000000 sama5d2x-rootfs.ubi

步骤类似如下:

U-Boot> tftp 0x20000000 buildroot_2012.11.1-at91_sama5d3_linux4sam_4.0.ubi
gmacb0: PHY present at 7
gmacb0: link up, 1000Mbps full-duplex (lpa: 0x0300)
Using gmacb0 device
TFTP from server 10.159.245.147; our IP address is 10.159.245.199
Filename 'rootfs.ubi'.
Load address: 0x20000000
Loading: #################################################################
         #################################################################
         [...]
         #################################################################
         #
done
Bytes transferred = xxxxxxxx (yyyyyyy hex)

remember the number of Bytes transferred just indicated above. It will be useful for the nand write.trimffs command.
需要记住 yyyyyyy 供下面使用

3,write the filesystem from ram at offset 0x20000000 to nand flash at offset 0x800000 (Linux /dev/mtdblock1). Note the last parameter: it is the number of Bytes transferred indicated in the previous command.

U-Boot> nand write.trimffs 0x20000000 0x800000 0xyyyyyyy

NAND write: device 0 offset 0x800000, size 0x1c40000
 29622272 bytes written: OK

nand write.trimffs 0x20000000 0x800000      0x48e0000

4,reset

整体流程为:

进入uboot 模式:
setenv serverip 192.168.99.219
setenv ipaddr 192.168.99.53
setenv ethaddr 00:01:02:03:04:05
saveenv
reset
进入uboot 模式:
nand erase 0x800000 0xF800000
tftp 0x20000000 sama5d2x-rootfs.ubi
nand write.trimffs 0x20000000 0x800000 0x48e0000
reset

这里写图片描述

猜你喜欢

转载自blog.csdn.net/wowocpp/article/details/80771019