`
mmdev
  • 浏览: 12932467 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

從u-boot傳bootargs給kernel

阅读更多

1. rebuild u-boot with CONFIG_CMDLINE_TAG defined in include/configs/XXX.h
2. in u-boot:

setenv bootargs xxx=xxx;
Refer to uImage + u-boot的啟動方式 任一方法,用go的不行
setenv flashaddr 10040000;setenv kfile uImage; setenv ramaddr 1500000;tftp $(ramaddr) $(kfile); bootm $(ramaddr);
結果

Star Dorado2 # setenv bootargs xxx=xxx;
Star Dorado2 # setenv flashaddr 10040000;setenv kfile uImage; setenv
ramaddr 1500000;tftp $(ramaddr) $(kfile); bootm $(ramaddr);
config VSC7385
MAC0 PHY Link Status : UP!
INIT VSC8601
VSC8601 Type B Chip
TFTP from server 172.20.5.185; our IP address is 172.20.150.151
Filename 'uImage'.
Load address: 0x1500000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
###################################################
done
Bytes transferred = 1590076 (18433c hex)
## Booting image at 01500000 ...
Image Name: Linux-2.6.16-star
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1590012 Bytes = 1.5 MB
Load Address: 01500000
Entry Point: 01500040
Verifying Checksum ... OK
XIP Kernel Image ... OK

Starting kernel ...

Uncompressing
Linux................................................................................................ done, booting the kernel.
Linux version 2.6.16-star (root@test-laptop) (gcc version 3.4.6) #7 Tue Jun
3 14:41:53 CST 2008
CPU: FA526id(wb) [66015261] revision 1 (ARMv4)
Machine: STAR STR9100
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU0: D cache: 16384 bytes, associativity 2, 16 byte lines, 512 sets
CPU clock at 250MHz
AHB clock at 125MHz
APB clock at 62MHz
Enable I-ScratchPad Address Start : c002c000
Built 1 zonelists
Kernel command line: xxx=xxx
(..............................................)





转载:非常不错的u-boot ppt
http://blog.chinaunix.net/u/22617/showart_466018.html



bootm命令浅析
http://blog.chinaunix.net/u1/47239/showart_377972.html

http://blog.csdn.net/menuconfig/archive/2008/04/09/2270429.aspx
http://www.sudu.cn/info/html/edu/linux/20070102/291441.html


使用initrd文件系统 U-boot引导Linux方法
http://linux.chinaitlab.com/administer/753535.html

bootm 0x100000 0x240000
(其中:0x100000是linux内核在flash中的地址,0x240000是initrd在flash中的地
址)

setenv bootargs console=ttyS0,115200n8 root=/dev/ram rw mem=32M
当u-boot使用上面的设置时,能够正常引导linux加载initrd !


http://www.hhcn.com/cgi-bin/topic.cgi?forum=3&topic=735
14.3.5. Linux Kernel Ignores my bootargs

Question:
Why doesn't the kernel use the command-line options I set in the "bootargs"
environment variable in U-Boot when I boot my target system?

Answer:
This problem is typical for ARM systems only. The following discussion is
ARM-centric:

First, check to ensure that you have configured your U-Boot build so that
CONFIG_CMDLINE_TAG is enabled. (Other tags like CONFIG_SETUP_MEMORY_TAGS or
CONFIG_INITRD_TAG may be needed, too.)
This ensures that u-boot will boot
the kernel with a command-line tag that incorporates the kernel options you
set in the "bootargs" environment variable.

If you have the CONFIG_CMDLINE_TAG option configured, the problem is almost
certainly with your kernel build. You have to instruct the kernel to pick up
the boot tags at a certain address
. This is done in the machine descriptor
macros, which are found in the processor start-up C code for your
architecture. For the Intel DBPXA250 "Lubbock" development board, the
machine descriptor macros are located at the bottom of the file
arch/arm/mach-pxa/lubbock.c, and they look like this:

MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform")
MAINTAINER("MontaVista Software Inc.")
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
FIXUP(fixup_lubbock)
MAPIO(lubbock_map_io)
INITIRQ(lubbock_init_irq)
MACHINE_END

The machine descriptor macros for your machine will be located in a similar
file in your kernel source tree. Having located your machine descriptor
macros, the next step is to find out where U-Boot puts the kernel boot tags
in memory for your architecture
. On the Lubbock, this address turns out to
be the start of physical RAM plus 0x100, or 0xa0000100. Add the
"BOOT_PARAMS" macro with this address to your machine descriptor macros; the
result should look something like this:

MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform")
MAINTAINER("MontaVista Software Inc.")
BOOT_PARAMS(0xa0000100)
BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
FIXUP(fixup_lubbock)
MAPIO(lubbock_map_io)
INITIRQ(lubbock_init_irq)
MACHINE_END

If there is already a BOOT_PARAMS macro in your machine descriptor macros,
modify it so that it has the correct address. Then, rebuild your kernel and
re-install it on your target. Now the kernel should be able to pick up the
kernel options you have set in the "bootargs" environment variable.

分享到:
评论

相关推荐

    IMX6开发板如何写死u-boot中的bootargs

    文档包含在Imax6开发板 如何在启动U-boot之后 环境变量直接写死,不用在烧写完U-boot之后,用户每行每行的去设置了!

    IAMX6开发板如何写死u-boot中的bootargs

    IAMX6开发板如何写死u-boot中的bootargsIAMX6开发板如何写死u-boot中的bootargs

    如何写死u-boot中的bootargs

    i.mx系列产品在启动时,最先起来的是u-boot,u-boot起来以后,需要在u-boot中设置环境参数,设置不正确的话板子无法正常启动。并且每次更新都很麻烦,所以这里通过修改u-boot源码中的命令的话使用起来会非常方便,...

    u-boot-1.1.6-TQ6410_V0.1

    5、支持内存内容显示、对比、修改 6、支持bootm、bootargs设置 ★ 提供源代码 -ARM11 S3C6410 UOOBT underlying software start-up support SD-WINCE LINUX TQ6410 u-boot version: u-boot-1.1.6 main function: 1, ...

    u-boot常用命令集锦

    这是从网上找到的一篇关于uboot常用命令的集锦,通过自己的整理然后上传到网上,非常的实用,送给有需要的朋友

    U-Boot_Flash分区信息传递给内核1

    事实上,bootargs中的"root=/dev/mtdblockx"只是告诉内核,root fs从第x个区,以此类推.至于这个分区对应MTD device(N

    blackfin uClinux使用NFS挂载文件方法

    blackfin uClinux使用NFS挂载文件方法

    Linux启动bootargs参数分析

    Linux启动bootargs参数分析

    Hi3518_SDK中文资料

    # 以下操作假设您的单板上已经有u-boot,使用网口烧写uboot、kernel及rootfs到Flash中。 # Demo单板默认为从SPI Flahs启动。 1、配置tftp服务器 # 可以使用任意的tftp服务器; # 如果使用hi3518a,将package/...

    bootargs

    bootargs

    uboott移植实验手册及技术文档

    实验三 移植U-Boot-1.3.1 实验 【实验目的】 了解 U-Boot-1.3.1 的代码结构,掌握其移植方法。 【实验环境】 1、Ubuntu 7.0.4发行版 2、u-boot-1.3.1 3、FS2410平台 4、交叉编译器 arm-softfloat-linux-gnu-...

    bootargs参数解析2020-08-26.pdf

    本文档编写于2020-08-24,PDF带标签。主要介绍bootargs参数的各个参数的含义,举例说明,最后给出几种常见的bootargs参数的形式。

    Uboot命令详细解析

    uboot命令详解

    USB初始化分析

    linux - USB初始化分析 如果在boot参数(对u-boot是在bootargs里面加:nousb)里面有nousb,输出: usbcore: USB support disabled,然后退出。 如果在boot参数()里面没有nousb,则进行USB的初始化工作。

    bootargs.bin

    bootargs.bin

    uboot bootargs 参数详解

    uboot bootargs bootcmd 参数详解

    uboot提取设置的bootargs 参数分析

    介绍了Uboot启动过程中在bootargs 和bootcmd 中设置的启动参数流向

    bootargs.img

    从重庆电信hg680-j备份出的bootargs.img文件。机器拆开,发现主板同上海电信hg680-j CA版包括布局、零件、外观、版号、代工厂都是一摸一样的。但我的系统扫描出的CPU为hi3798mv100 非CA版。如有需要可以刷机尝试。...

    BPI-Mainline-bsp:支持BananaPi BPI -M1 M1Plus M2 M3

    使用32MB FAT32引导分区(从1MB开始)对sdcard进行分区,其余部分使用ext4格式的rootfs分区进行分区。 您可以根据需要更改引导分区的大小。 在启动分区上创建文件boot.cmd。 -------------------------------------...

Global site tag (gtag.js) - Google Analytics