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

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值