|
楼主 |
发表于 2016-6-27 21:57:17
|
显示全部楼层
板子已经烧写好PMON了。这里练习一下烧写内核和文件系统的操作步骤。最后再尝试烧写PMON。
命令按照V2.0手册上的说明,这里补充说一条命令。就是第一条命令,如果不给PMON设置地址的话,在烧写vmlinuz的时候会报
“tftp: sendto: No route to host”的错误。
PMON> ifaddr syn0 192.168.0.99 // 2.0手册虽然没有提,1.3的手册有详细说明,关键的一步
bootp=8000b874
PMON> ping 192.168.0.100 // ping 2-3秒,ctrl+c中断,如果最后是0% packet loss 就说明ping通了
PING 192.168.0.100 (192.168.0.100): 56 data bytes
64 bytes from 192.168.0.100: icmp_seq=0 ttl=64 time=1.419 ms
64 bytes from 192.168.0.100: icmp_seq=1 ttl=64 time=0.508 ms
--- 192.168.0.100 ping statistics ---
27 packets transmitted, 27 packets received, 0% packet loss
round-trip min/avg/max = 0.369/0.500/1.419 ms
PMON> break! // 这个break是拷贝SecureCRT里的内容时按ctrl+c造成的
PMON> mtd_erase /dev/mtd1
mtd_erase working:
0x07200000
mtd_erase work done!
PMON> devcp tftp://192.168.0.100/vmlinuz /dev/mtd0
2173480PMON>
PMON> set al /dev/mtd0
PMON> devcp tftp://192.168.0.100/nfsyaffs-uart2-null.img /dev/mtd1 yaf nw
7434240PMON> set append " root=/dev/mtdblock1"
PMON> set append " $append console=ttyS2,115200"
PMON> set append " $append noinitrd init=/linuxrc rw rootfstype=yaffs2"
PMON> set append " $append video=lslbfb:480x272-16@60 fbcon=rotate:1 consoleblank=0"
PMON> reboot
yaffs: dev is 32505857 name is "mtdblock1" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:1.
devtmpfs: mounted
Freeing unused kernel memory: 200k freed
#mount all.....
#Starting mdev.....
Processing /etc/profile.....
Done!
[root@Loongson-gz:/]#
至此内核和文件系统烧录成功。
按照上一楼的方法,再次写入hello。可以看到程序是可以跑起来的
|
|