下载文件
{
ftpget -u 1 -p 1 192.168.1.110 a.out a.out
nfs 30000000(destination) 192.168.1.106:/home/fs/work/kernel/linux-2.6.22.6/arch/arm/boot/uImage(source)
nfs 30000000 192.168.1.106:/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.1.106:/work/jz2440/nfs_root/fs_mini_mdev ip=192.168.1.111:192.168.1.106:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.106:/home/fs/work/nfs_root/fs_mini_mdev ip=192.168.1.111:192.168.1.106:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.106:/home/fs/work/nfs_root/first_fs ip=192.168.1.111:192.168.1.106:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootcmd tftp 0x30007fc0 uImage \;bootm 0x30007fc0
mount -t nfs -o nolock 192.168.1.106:/home/fs/work/nfs_root/fs_mini_mdev /mnt
设置环境变量的两个文件:/etc/profile和.bashrc 修改完成后记得source ..
查看挂载的设备
cat /dev
cat /proc/devices (class_device)
有用的命令
1、ls -lrt/lnt(按时间顺序显示文件)
2、insmod(insert module)