原先若是空Image可以通过uart boot下载u-boot到ddr中运行,可参考" ymodem under ubuntu "
接下是u-boot启动后,通过tftp下载Image通过nor write写入。
(1) Copy vmlinux.bin, rootfs.arm.jffs2 and appfs.jffs2 to /tftpboot.
You can get images from /target/output/flash_bin/systems/xxxxxx/
(2) Reboot IRD. If you see "Hit any key to stop autoboot: " at serial port, please press any key.
(3) Commands at Uboot.
We need to set the following before flashing all images(uldr.bin,u-boot.bin,vmlinux,rootfs and appfs)
Apollo # setenv serverip <serverip addr>
Apollo # dhcp
Apollo # saveenv
Flash uldr(do this only you are upgrading the image from Beta4 to beta5)
#nor erase 0x0 0x100000
#tftp uldr_padded_64k.bin
#nor write 0x0 0x100000
Flash uboot(do this only you are upgrading the image from Beta4 to beta5)
#nor erase 0x100000 0x80000
#tftp u-boot_padded_512k.bin
#nor write 0x100000 0x80000
Flash vmlinux:
Apollo # tftp vmlinux.bin
Apollo # nor write kernel (OR nor write 0x8000 0x180000 0x500000)
Flash rootfs:
Apollo # tftp rootfs.arm.jffs2
Apollo # nor write rootfs ( OR nor write 0x8000 0x700000 0x2000000) (This will take approx 8-10 mins)
Flash appfs:
Apollo # tftp appfs.jffs2
Apollo # nor write appfs ( OR nor write 0x8000 0x2700000 0x2000000) (This will take approx 8-10 mins)
4. 设置启动参数如下
setenv norboot "nor read 0x180000 0x500000; go 0x8000"
setenv bootcmd "run norboot;"
setenv bootargs "noinitrd ip=dhcp console=ttyS1,115200n8 mtdparts=nx_2016:1536k@0k(boot),5m@1536k(kernel),32m@7m(root),32m@39m(appfs),-(extra) root=/dev/mtdblock2 rw rootfstype=jffs2"
或者setenv bootargs "noinitrd ip=dhcp console=ttyS1,115200n8 ${mtdparts} root=/dev/mtdblock2 rw rootfstype=jffs2"
引用${mtdparts}更可靠,但必须是双引号而不是单引号才能展开
否则总是产生类如下的错误:
[42949379.410000] IP-Config: Complete:
[42949379.420000] device=eth0, addr=172.16.10.68, mask=255.255.254.0, gw=172.16.10.254,
[42949379.420000] host=172.16.10.68, domain=cn.trid.com, nis-domain=(none),
[42949379.430000] bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
[42949379.440000] Looking up port of RPC 100003/2 on 0.0.0.0
[42949409.440000] rpcbind: server 0.0.0.0 not responding, timed out
[42949409.440000] Root-NFS: Unable to get nfsd port number from server, using default
[42949409.450000] Looking up port of RPC 100005/1 on 0.0.0.0
[42949439.450000] rpcbind: server 0.0.0.0 not responding, timed out
[42949439.450000] Root-NFS: Unable to get mountd port number from server, using default
[42949469.460000] Root-NFS: Server returned error -5 while mounting /tftpboot/172.16.10.68
[42949469.460000] VFS: Unable to mount root fs via NFS, trying floppy.
[42949469.470000] VFS: Cannot open root device "mtd2" or unknown-block(2,0)
[42949469.480000] Please append a correct "root=" boot option; here are the available partitions:
------------------------------------------------------ 附上sky的烧写地址 ---------------------------------
tftp vmlinux.bin
nand erase 0x180000 0x500000
nand write 0x180000 0x500000
tftp rootfs.arm.jffs2.nand
nand erase 0x700000 0x2000000
nand write 0x700000 0x2000000
tftp appfs.jffs2.nand
nand erase 0x2700000 0x2000000
nand write 0x2700000 0x2000000
setenv uboot_cmdline 1
setenv bootcmd 'run nandboot'
setenv bootargs noinitrd console=ttyS1,115200n8 mtdparts=nx_2017:1536k@0k(boot),5m@1536k(kernel),32m@7m(root),32m@39m(appfs),-(extra) root=/dev/mtdblock3 rw rootfstype=jffs2
saveenv