U-Boot Passing Kernel Arguments
来源:互联网 发布:qq ubuntu 安装包下载 编辑:程序博客网 时间:2024/06/05 02:19
本文转载至:http://www.denx.de/wiki/view/DULG/LinuxKernelArgs
In nearly all cases, you will want to pass additional information tothe Linux kernel; for instance, information about the root device ornetwork configuration.
In U-Boot, this is supported using the bootargs
environment variable. Its contents are automatically passed to theLinux kernel as boot arguments (or "command line" arguments). This allows the use of the same Linux kernel image in a wide range of configurations. Forinstance, by just changing the contents of thebootargs
variable you can use the very same Linuxkernel image to boot with aninitrd
ramdisk image,with a root filesystem over NFS, with aCompactFlash disk or from aflash filesystem.
As one example, to boot the Linux kernel image at address0x400000 usingthe initrd
ramdisk image at address0x600000 asroot filesystem, and with the flattened device tree blob at address 0x800000, and with the flattened device tree blob at address 0xFC1E0000, you can use the following commands:
=> setenv bootargs root=/dev/ram rw=> bootm0x400000 0x600000 0x800000 0xFC1E0000
To boot the same kernel image with a root filesystem over NFS, thefollowing command sequence can be used. This example assumes that yourNFS server has the IP address "192.168.1.1" and exports the directory"/opt/eldk-4.2/ppc_4xx" as root filesystem for the target. The target has beenassigned the IP address "192.168.100.6" and the hostname "canyonlands". A netmaskof "255.255.0.0" is used:
=> setenv bootargs root=/dev/nfs rw nfsroot=192.168.1.1:/opt/eldk-4.2/ppc_4xx ip=192.168.100.6:192.168.1.1:192.168.1.1:255.255.0.0:canyonlands::off=> bootm0x400000 - 0x800000 - 0xFC1E0000
Please see also the files Documentation/initrd.txt
and Documentation/nfsroot.txt
in your Linux kernelsource directory for more information about which options can bepassed to the Linux kernel.
Note: Once your system is up and running, if you have a simple shell login,you can normally examine the boot arguments that were used by the kernel for the most recent boot with the command:
$ cat /proc/cmdline
- U-Boot Passing Kernel Arguments
- 【zz】linux kernel boot arguments
- linux kernel boot arguments(bootargs的设置)
- cross、u-boot、kernel、ramdisk
- cross、u-boot、kernel、ramdisk
- sabrelite u-boot,kernel编译
- u-boot 7、启动kernel
- hen passing arguments
- passing arguments by reference
- U-Boot 编译(嵌入式U-BOOT,kernel编译)
- 從u-boot傳bootargs給kernel
- u-boot到kernel的参数传递
- u-boot+kernel不能正常运行
- Booting Linux kernel using U-Boot
- 用IDE调试u-boot/kernel
- U-boot 与kernel的关系
- 源码下载:busybox/u-boot/kernel
- u-boot向kernel传递参数
- Ten years of Taiyuan from the pollution first to best practices _ Shanxi news _ Shanxi News Network
- Storm Topology的生命周期过程分析
- dbms_xplan函数包
- 博客文章common文件
- ANDROID文件存储位置切换
- U-Boot Passing Kernel Arguments
- PNG的使用技巧
- TinyOS学习 - Ubuntu 12.04LTS安装TinyOS 2.1.1后make telosb报错之解决方案
- Session 管理
- Quick-Cocos2d-x CCHttpRequest详细说明及用法
- 为Jekyll博客添加RSS feed订阅功能
- PIC 里面关于 __CONFIG( ) 配置位
- UISearchBar基本用法及searchBar常用代理方法
- ZOJ Problem Set - 2812 Quicksum