zoukankan      html  css  js  c++  java
  • U-boot新手入门

    U-boot新手入门

    一。编译U-boot

    二。U-boot命令详解

      1.帮助命令

        # help

        autoscr -run script from memory

        base -print or set address offset

        bdinfo -print Board Info structure

        bootm -boot application image from memory

      2.环境变量相关命令

       (1). 查看环境变量#printenv

          ipaddr=192.168.0.1

          ethaddr=12:34:56:78:9A:BC

          serverip=192.168.1.5

       (2). 修改环境变量

          setenv 添加、修改、删除环境变量

          **setenv name value ...

            -add/modify environment variable 'name' to 'value‘

          **setenv name

            -deleteenvironment variable 'name'

          #setenv myboard 210

          #printenv

          serverip=192.168.1.5

          myboard=210

       (3). 保存环境变量#saveenv

          将当前定义所以变量及其值存到flash中 

      3.程序下载命令

       (1). tftp网络下载

          注意:使用tftp,需要先配置好网络

          #setenv ethaddr 12:34:56:78:9A:BC

          #setenv ipaddr 192.168.0.3

          #setenv serverip 192.168.0.2(tftp服务器的地址)

          #ping 192.168.0.2(tftp服务器的地址)

          范例:

          #tftp 0x31000000 uImage

          把tftp服务器上的uImage下载到0x31000000处。

       (2). USB下载

       (3). 串口下载

      4.内存操作命令

        (1). md +地址

        (2). md.d +地址

        (3). mm  修改内存的值

      5.Flash操作命令

        (1).nand erase  起始地址start长度len擦除start处开始的,长度为len的区域

          范例:

            #nand erase 0x400000 0x500000

        (2).nand write  内存起始地址flash起始地址长度len将内存起始地址处,长度为len的数据,写入flash起始地址处。

          范例:

            #nand write 31000000 400000 500000

        (3).nand read 内存起始地址flash起始地址长度len将flash起始地址处,长度为len的数据,读到内存起始地址处。

          范例:

            #nand read 31000000 400000 500000

      6.程序执行命令

        #bootm 0x31000000

      7.设置自动启动

        (1).设置从nand flash自动启动

          #setenv bootcmdnand read 31000000 400000 500000 ; bootm 31000000

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

          #setenv bootcmdtftp 31000000 uImage ; bootm 31000000

  • 相关阅读:
    lua 取table长度
    [转] 理解 LSTM 网络
    [转]An Intuitive Explanation of Convolutional Neural Networks
    [转]How rival bots battled their way to poker supremacy
    【转】Principles of training multi-layer neural network using backpropagation
    [转]霍夫丁不等式与真实的机器学习
    [转]PLA算法总结及其证明
    jinja2 宏的简单使用总结(macro)
    Python 装饰器
    PYTHON REQUESTS的安装与简单运用
  • 原文地址:https://www.cnblogs.com/lvxiaoning/p/4982538.html
Copyright © 2011-2022 走看看