zoukankan      html  css  js  c++  java
  • 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_jz2440linux-2.6.22.6Documentation fsroot.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

  • 相关阅读:
    45 个非常有用的 Oracle 查询语句
    [转载]java图片缩放处理
    [转载]java图片缩放处理
    十步完全理解SQL
    十步完全理解SQL
    day04_20170521_函数(二)
    to disable the entity lazy load, The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.
    wordpress mobile templates
    linq query, using int.parse to convert varchar to int while orderby
    appfabric 简单应用
  • 原文地址:https://www.cnblogs.com/liusiluandzhangkun/p/9036555.html
Copyright © 2011-2022 走看看