bootcmd=cp.b 0xc4200000 0x7fc0 0x200000 ; bootm

// 倒计时到 0 以后,自动执行的指令

bootdelay=2

baudrate=38400

// 串口波特率,一般使用 38400

ethaddr=08:00:3e:26:0a:5c

bootfile="uImage"

ethact=lan911x

serverip=10.117.192.3

// 指定 linux 服务器的 ip 地址,在进行 tftp 等命令操作时会用到

gatewayip=10.117.192.1

// 指定网关地址

netmask=255.255.255.0

// 指定子网掩码

ipaddr=10.117.192.216

// 指定当前开发板的 ip 地址

bootargs=root=/dev/mtdblock0 mem=32M

// 传给 kernel 启动执行的参数,比如使用 ramdisk 还是 nfs 等

mtdparts=armflash.1:12M@0x400000(jffs2) console=ttyAMA0,38400 macaddr=0216 rootfstype=jffs2

stdin=serial

stdout=serial

stderr=serial

verify=n

附加:

bootdelay - uboot 启动后多少秒后自动执行 bootcmd 里设置的命令,即自启动,如果 bootcmd 参数没有配置,则bootdelay 不会起作用

jffs2 类型的 fs 直接在板上运行,并且地址从 0xc4400000 开始有 4M ,由 bootargs 参数里的 root=/dev/mtdblock0 mtdparts=armflash.1:4M@0x400000(jffs2) 这两项指定。 macaddr=08003e260a55 这个配置了板的 mac 地址,每块板都应该有一个不同的 mac 地址

30.Linux Kernel 常用参数样例

Ramdisk 启动参数 :

setenv bootargs root=/dev/ram0 initrd=0x2800000,24M rootfstype=ext2 mem=64M console=ttyAMA0

nfs 启动参数 :

setenv bootargs root=/dev/nfs nfsroot=192.168.1.7:/opt/yz/nfs,rw ip=192.168.1.160 mem=64M console=ttyAMA0

jffs2 启动参数 :

setenv bootargs root=/dev/mtdblock0 mem=16M mtdparts=armflash.1:4M@0x400000(jffs2) macaddr=9854 rootfstype=jffs2 console=ttyAMA0

31.ubbot 启动信息说明

U-Boot 1.1.3 (Apr 22 2008 - 10:21:13)

U-Boot code: 00800000 -> 00815850 BSS: -> 0081B184

RAM Configuration:

Bank #0: 00000000 64 MB

Flash: 16 MB

In:    serial

Out:   serial

Err:   serial

Net:   lan911x_init

lan911x

Hit any key to stop autoboot: 0

6.4.3 U-Boot的环境变量
有点类似 Shell , U-Boot 也使用环境变量。可以通过 printenv 命令查看环境变量的设置。
U-Boot> printenv
bootdelay=3
baudrate=115200
netmask=255.255.0.0
ethaddr=12:34:56:78:90:ab
bootfile=uImage
bootargs=console=ttyS0,115200 root=/dev/ram rw initrd=0x30800000,8M
bootcmd=tftp 0x30008000 zImage;go 0x30008000
serverip=192.168.1.1
ipaddr=192.168.1.100
stdin=serial
stdout=serial
stderr=serial
Environment size: 337/131068 bytes
U-Boot>
表6.5是常用环境变量的含义解释。通过printenv命令可以打印出这些变量的值。
表6.5                                                  U-Boot环境变量的解释说明
环 境 变 量 解 释 说 明
bootdelay
定义执行自动启动的等候秒数
baudrate
定义串口控制台的波特率
netmask
定义以太网接口的掩码
ethaddr
定义以太网接口的MAC地址
bootfile
定义缺省的下载文件
bootargs
定义传递给Linux内核的命令行参数
bootcmd
定义自动启动时执行的几条命令
serverip
定义tftp服务器端的IP地址
ipaddr
定义本地的IP地址
stdin
定义标准输入设备,一般是串口
stdout
定义标准输出设备,一般是串口
stderr
定义标准出错信息输出设备,一般是串口
U-Boot的环境变量都可以有缺省值,也可以修改并且保存在参数区。U-Boot的参数区一般有EEPROM和Flash两种设备。
环境变量的设置命令为setenv,在6.2.2节有命令的解释。
举例说明环境变量的使用。
=>setenv serverip 192.168.1.1
=>setenv ipaddr 192.168.1.100
=>setenv rootpath "/usr/local/arm/3.3.2/rootfs"
=>setenv bootargs "root=/dev/nfs rw nfsroot=/$(serverip):/$(rootpath) ip=

/$(ipaddr) "
=>setenv kernel_addr 30000000
=>setenv nfscmd "tftp /$(kernel_addr) uImage; bootm /$(kernel_addr) "
=>run nfscmd
上面定义的环境变量有serverip ipaddr rootpath bootargs kernel_addr。环境变量bootargs中还使用了环境变量,bootargs定义命令行参数,通过bootm命令传递给内核。环境变量 nfscmd中也使用了环境变量,功能是把uImage下载到指定的地址并且引导起来。可以通过run命令执行nfscmd脚本。

Uboot启动参数说明的更多相关文章

  1. uboot启动 及命令分析(3)

    u-boot命令 先贴一个重要结构,位于uboot/include/command.h,这个结构代表每个uboot命令 struct cmd_tbl_s { char     *name;   /* ...

  2. 嵌入式Linux驱动学习之路(五)u-boot启动流程分析

    这里说的u-boot启动流程,值得是从上电开机执行u-boot,到u-boot,到u-boot加载操作系统的过程.这一过程可以分为两个过程,各个阶段的功能如下. 第一阶段的功能: 硬件设备初始化. 加 ...

  3. (转载)U-boot启动完全分析

    1.1 U-Boot工作过程 U-Boot启动内核的过程可以分为两个阶段,两个阶段的功能如下: (1)第一阶段的功能 Ø 硬件设备初始化 Ø 加载U-Boot第二阶段代码到RAM空间 Ø 设置好栈 Ø ...

  4. u-boot启动流程分析(2)_板级(board)部分

    转自:http://www.wowotech.net/u-boot/boot_flow_2.html 目录: 1. 前言 2. Generic Board 3. _main 4. global dat ...

  5. u-boot启动流程分析(1)_平台相关部分

    转自:http://www.wowotech.net/u-boot/boot_flow_1.html 1. 前言 本文将结合u-boot的“board—>machine—>arch—> ...

  6. 基于devkit8600的2011.04版uboot启动代码Start.s分析

    /* * armboot - Startup Code for OMAP3530/ARM Cortex CPU-core * * Copyright (c) 2004 Texas Instrument ...

  7. 如何在Ubuntu下使用TF/SD 卡制作Exynos 4412 u-boot启动盘

    /** ****************************************************************************** * @author    Maox ...

  8. 如何在Mac下使用TF/SD 卡制作Exynos 4412 u-boot启动盘

    /** ****************************************************************************** * @author    Maox ...

  9. uboot启动linux的过程

    一.概述 linux内核镜像常见到的有两种形式,zImage和uImage.这两种文件的格式稍有差别,所以启动这两种格式的内核镜像也会有所不同.目前,uboot只支持启动uImage类型的镜像,对zI ...

随机推荐

  1. SocketAsyncEventArgs里的AcceptSocket能独立存在吗?

    独立存在是什么意思? 先来看一个例子.我们知道一个Socket对象(我们叫他ListenScoket)可以调用AcceptAsync并接受一个SocketAsyncEventArgs对象,如果操作成功 ...

  2. android 中使用svg

    http://www.see-source.com/blog/300000038/1189.html http://www.jianshu.com/p/30dfa5920658#

  3. twig 截取字符串

    <p>{{content|slice(0,100)}}</p> slice()截取content变量值,从0到100

  4. delete 和 truncate 的 区别

    如果要清空表中的所有记录,可以使用下面的两种方法: DELETE FROM table1     TRUNCATE TABLE table1 以下 为之区别: 1)执行速度和灵活性    trunca ...

  5. activiti基础--2----------------------(流程定义)

    Deployment 部署对象 1.一次部署的多个文件信息,对于不需要的流程可以删除和修改 2.对应的表 act_re_deployment #部署对象表 act_re_procdef #流程定义表 ...

  6. 为什么下了android 4.1 的SDK后在本地用浏览器看api说明文档时,浏览器打开api的html文件很慢?试了好几款浏览器都一样。为什么?

    http://www.oschina.net/question/436724_61401 http://www.google.com/jsapi  他惹的祸 注释掉就可以了- <!-- < ...

  7. model特性

    1.scope http://blog.csdn.net/lissdy/article/details/51107883 2.ActiveConcern http://www.tuicool.com/ ...

  8. 【leetcode刷题笔记】Distinct Subsequences

    Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence ...

  9. INT(M)表示什么意思?

    根据官方文档描述,int(M)中的M表示数据显示的宽度,与实际存储的长度无关. 1.也就是int(3)和int(11)能够存储的数据是一样的,都是从-2147483648到2147483647(或者0 ...

  10. 多图切换jQuery图片滑块插件

    在线演示 本地下载