一、烧写
1. 启动开关:
SD卡启动: 1-2-3(off) 4-5-6-7-8(on)
nand启动: 1-2-3-6-7(off) 4-5-8(on)
2. usb烧写Linux
SMDK6410 # dnw 50008000
SMDK6410 # nand erase 0 100000
SMDK6410 # nand write.uboot 50008000 0 100000
3. usb烧写kernel
SMDK6410 # dnw 50008000
SMDK6410 # nand erase 100000 500000
SMDK6410 # nand write.e 50008000 100000 500000
4. usb烧写文件系统 rootfs.yaffs2-nand2g
SMDK6410 # dnw 50008000
SMDK6410 # nand write.yaffs2 50008000 600000 8b38000
5. SD卡启动bootcmd
fatload mmc 0:1 50008000 zImage; bootm 50008000
fatload mmc 0:1 50008000 u-boot_nand.bin; nand erase 0 100000; nand write.uboot 50008000 0 100000
fatload mmc 0:1 50008000 zImage_nand; nand erase 100000 500000; nand write.e 50008000 100000 500000
fatload mmc 0:1 50008000 rootfs.yaffs; nand erase 600000 2000000; nand write.e 50008000 600000 2000000
二、编译与文件系统
1. uboot编译
a. CROSS_COMPILE=/opt/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
注意: 此处一定要是arm-none**,如果不是这个很有可能报错。
b. make forlinx_nand_ram256_config
适用于256M内存开发板的config
2. 制作文件系统
sun@ubuntu:/work/6410/rootfs$ sudo /opt/6410/4.3.2/bin/mkyaffs2image-nand2g FileSystem-Yaffs2 rootfs.yaffs
制作文件系统时的库拷贝:
sun@ubuntu:/opt/6410/4.3.2/arm-none-linux-gnueabi/libc/lib$ sudo cp -arf ./* /work/6410/yaffs2/lib/
3. uoot中设定参数
SMDK6410 # setenv ipaddr 192.168.6.221
SMDK6410 # setenv serverip 192.168.6.220
从nfs启动:
setenv bootargs "root=/dev/nfs nfsroot=192.168.6.220:/work/6410/yaffs2 ip=192.168.6.221:192.168.6.220:192.168.6.1:255.255.255.0:witech.com.cn:eth0:off console=ttySAC0,115200"
从nand启动:
setenv bootargs "root=/dev/mtdblock2 rootfstype=yaffs2 console=ttySAC0,115200"
setenv bootargs "root=/dev/mtdblock2 rootfstype=yaffs2 console=ttySAC0,115200 init=/linuxrc rootwait=5"
nand write.yaffs 0x30000000 root $(filesize)
注意:nfs 挂载出现: nfs: server 192.168.4.249 not responding, still trying
大意是说具有较高的传送速率的NFS主机网卡和较低速率的目标机网卡之间不匹配,要解决此问题需要在挂载文件系统时添加额外的参数
解决: mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.4.249:/root /mnt/test
阅读(1537) | 评论(0) | 转发(0) |