jz2440烧写开发板uboot,内核和文件系统等的相关命令

下载文件
{
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)

扫描二维码关注公众号,回复: 826171 查看本文章

猜你喜欢

转载自www.cnblogs.com/liusiluandzhangkun/p/9036555.html