下载文件 { ftpget -u 1 -p 1 192.168.2.110 a.out a.out nfs 30000000(destination) 192.168.2.109:/home/fs/work/kernel/linux-2.6.22.6/arch/arm/boot/uImage(source) nfs 30000000 192.168.2.109:/home/fs/work/kernel/linux-2.6.22.6/arch/arm/boot/uImage }
烧写bootloader { tftp: tftp 30000000 u-boot.bin //tftp 30000000 u-boot_new.bin nand erase bootloader nand write 30000000 bootloader //nand write.jffs2 30000000 bootloader ; not good }
烧写内核 { tftp: tftp 30000000 uImage? //tftp 30000000 uImage_new nand erase kernel nand write 30000000 kernel //nand write.jffs2 30000000 kernel ;not good }
烧写文件系统 { tftp: tftp 30000000 fs_qtopia.yaffs2 //tftp 30000000 fs_mini_mdev_new.jffs2 nand erase root nand write.yaffs2 30000000 260000 2f80000 //nand write.yaffs2 30000000 $(filesize) //nand write.yaffs2 30000000(目标文件所在内存地址) 260000(偏移地址) $(filesize)文件大小 //可以通过mtd查看地址信息 }
内核启动参数设置设置: 1、 从flash启动
set bootcmd nand read 0x30000000 0x60000 0x200000\;bootm 0x30000000; set bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0;
2、 网络加载 参考: linux-2.6.22.6_jz2440\linux-2.6.22.6\Documentation\nfsroot.txt
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.2.109:/home/jz2440/nfs_root/fs_mini_mdev,proto=tcp,nolock ip=192.168.2.111:192.168.2.109:192.168.2.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.2.109:/home/fs/work/nfs_root/first_fs ip=192.168.2.111:192.168.2.109:192.168.2.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootcmd tftp 0x30007fc0 uImage \;bootm 0x30007fc0;
查看挂载的设备 cat /dev? cat /proc/devices (class_device)
有用的命令 1、ls -lrt/lnt(按时间顺序显示文件) 2、insmod(insert module)
一、内核引导之bootcmd参数设置 ? ??要设置bootloader的serverip=192.168.1.102(Linux服务器的IP地址,保证和开发板的IP在同一网段) ? ??①? ? 通过tftp服务引导内核 ????????setenv bootcmd 'tftp 0x30007FC0 uImage;bootm 0x30007FC0' ? ? ② ???通过NFS服务引导内核 ????????setenv bootcmd 'nfs 0x30007FC0 192.168.1.102:/home/tshwang/arm_linux/nfs/uImage;bootm 0x30007FC0' ????③ ? ?通过nand引导内核 ????????setenv bootcmd 'nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0'
二、挂载根文件系统之bootargs参数设置 ? ??①? ? 通过Nand读取挂载根文件系统 ????????????set bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0 rootfstype=yaffs ????②? ? 通过NFS挂载根文件系统 ?????????????set bootargs noinitrd ?root=/dev/nfs nfsroot=192.168.1.102:/home/tshwang/arm_linux/nfs/rootfs/myfirst_rootfs ?ip=192.168.1.117:192.168.1.102:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0 rootfstype=yaffs
|