(韦)dnw无法使用,uboot+ 通过tftp ,nfs 下载之nand flash

片内SRAM运行程序:
原理:通过nor flash 启动开发板后 +dnw 下载程序到nand flash 然后开发板重启,nand flash启动 观察效果

部分电脑dnw不能运行,不过还可以通过tftp nfs 来下载 不过原理一样 都是先下之内存,然后写之nand flash (聪明的你,还会发现dnw usb下载有个内存地址可设置)
说明:
linux        192.168.1.200
win          192.168.1.100
mini2440   192.168.1.201

通过tftp方式(网线插上)
首先linux  [root@localhost ti]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:0B:B7:52  
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0b:b752/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3685728 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5538158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1126873419 (1.0 GiB)  TX bytes:4264312441 (3.9 GiB)
          Interrupt:193 Base address:0x2024 
我借助linux的tftp服务器(windows上的也可以的)
开启tftp服务后:
[root@localhost ti]# netstat -a |grep tftp
udp        0      0 *:tftp                      *:*        
我已将裸机例子的gpio的leds.bin cp 之tftp服务的目录下

[root@localhost leds]# ls /tftpboot/leds.bin -l
-rwxr-xr-x 1 root root 136 10-24 21:38 /tftpboot/leds.bin

开发板启动后uboot界面:

##### 100ask Bootloader for OpenJTAG #####
[n] Download u-boot to Nand Flash
[o] Download u-boot to Nor Flash
[k] Download Linux kernel uImage
[j] Download root_jffs2 image
[y] Download root_yaffs image
[d] Download to SDRAM & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the Nand Flash
[s] Set the boot parameters
[b] Boot the system
[r] Reboot u-boot
[q] Quit from menu
Enter your selection: 
按q进入

Environment size: 317/131068 bytes
OpenJTAG> setenv serverip 192.168.1.200
OpenJTAG> setenv ipaddr 192.168.1.201
OpenJTAG> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
OpenJTAG> ping 192.168.1.200
dm9000 i/o: 0x20000000, id: 0x90000a46 
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
host 192.168.1.200 is alive
已通(别网线没插,一直在ping)

OpenJTAG> tftp 30000000 leds.bin
dm9000 i/o: 0x20000000, id: 0x90000a46 
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
TFTP from server 192.168.1.200; our IP address is 192.168.1.201
Filename 'leds.bin'.
Load address: 0x30000000
Loading: #
done
Bytes transferred = 136 (88 hex)
下载完毕,(别tftp服务没开启,一直在下载)

OpenJTAG> nand write 30000000 0 40000
 
NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK

写nand flash

开发板重启,nand flash启动

2 nfs方式 
开启nfs服务
[root@localhost speaker_on]# netstat -a |grep nfs
tcp        0      0 *:nfs                       *:*                         LISTEN      
udp        0      0 *:nfs                       *:*                               
nfs 配置

   more /etc/exports                          

/                       *(rw,sync,no_root_squash)


uboot启动后
OpenJTAG> nfs 30000000 192.168.1.200:/speaker_on.bin
下载之内存,后面就跟tftp一样了





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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值