uboot使用

      1.进入uboot源码包目录
      2.配置uboot

    TQ210:    make TQ210_config

    Smart210:   make smart210_config

    OK210:     make forlinx_linux_config

    OK6410:    make forlinx_nand_ram256_config

    Tiny6410:   make tiny6410_config

    TQ2440:   make TQ2440_config 

    Mini2440:   make mini2440_config

    3.编译uboot

    make ARCH=arm CROSS_COMPILE=arm-linux-

    4.编译完后uboot目录下产生uboot.bin二进制文件,这时就可以使用uboot啦.


    5.烧写uboot至开发板,可用dnw下载至开发板内存开始位置


    6.使用uboot

    help :查看当前开发板所支持的命令

    printenv(print) :查看环境变量  eg : print ipaddr

    setenv :添加 修改 删除  环境变量  eg : setenv ipaddr 192.168.1.102 (添加/修改)   setenv ipaddr (删                            除)

    saveenv :保存所有的环境变量至nandflash(断电不消失)

    tftp : 通过网络下载文件

    1.设置环境变量ipaddr serverip 至同一网段,可用ping命令查看网络是否连通(注意: pc需关闭防墙/selinux)

    2.配置tftp服务器,配置文件位于/etc/xinetd.d/tftp 。修改此文件如下:(tftpboot目录为服务器文件存放目 录)     

                       uboot使用


      3.将tftpboot目录权限改为777
      4.重启xinetd服务
      5.查看tftp服务是否启动  netstat -a | grep tftp
      6.使用tftp下载内核文件至开发板   (tftp 内存地址 下载文件)

    TQ210:    tftp 0xc0008000 uImage

    Smart210:  tftp 0x20000000 uImage

    OK210:     tftp 0xc0008000 uImage 

    OK6410:    tftp 0xc0008000 uImage

    Tiny6410:   tftp 0xc0008000 uImage

    TQ2440:    tftp 0x31000000 uImage

    Mini2440:   tftp 0x31000000 uImage


     bootm:运行固定格式的二进制程序  (bootm {addr} {arg} eg: bootm 0xc0008000)

     md :显示内存区域内容   (md.b c0000000)

     mm :修改内存区域内容   (mm c0000000)

     nand erase :擦除nandflash   (nand erase {起始地址} {len})

     nand write :从内存写数据到nandflash   (nand write c0008000 400000 500000)从内存c0008000处写到nandflash 4M处,大小为5M

     nand read :nandflash读数据到内存 (nand read 内存起始地址 Flash起始地址 长度len)

     


    附:1.设置从nand flash 自动启动

    setenv bootcmd nand read c0008000 400000 500000 \; bootm c0008000

    2.设置自动下载内核到内存后启动

    setenv bootcmd tftp c0008000 uImage \; bootm c0008000

    • 0
      点赞
    • 0
      收藏
      觉得还不错? 一键收藏
    • 0
      评论

    “相关推荐”对你有帮助么?

    • 非常没帮助
    • 没帮助
    • 一般
    • 有帮助
    • 非常有帮助
    提交
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值