Skip to main content.

7.3. Passing Kernel Arguments

In nearly all cases, you will want to pass additional information to the Linux kernel; for instance, information about the root device or network configuration.

In U-Boot, this is supported using the bootargs environment variable. Its contents are automatically passed to the Linux kernel as boot arguments (or "command line" arguments). This allows the use of the same Linux kernel image in a wide range of configurations. For instance, by just changing the contents of the bootargs variable you can use the very same Linux kernel image to boot with an initrd ramdisk image, with a root filesystem over NFS, with a CompactFlash disk or from a flash filesystem.

As one example, to boot the Linux kernel image at address 0x400000 using the initrd ramdisk image at address 0x600000 as root filesystem, and with the flattened device tree blob at address 0x800000, and with the flattened device tree blob at address 0x800000, you can use the following commands:

=> setenv bootargs root=/dev/ram rw
=> bootm 0x400000 0x600000 0x800000  0x800000 

To boot the same kernel image with a root filesystem over NFS, the following command sequence can be used. This example assumes that your NFS server has the IP address "" and exports the directory "/opt/eldk-4.2/ppc_4xx" as root filesystem for the target. The target has been assigned the IP address "" and the hostname "canyonlands". A netmask of "" is used:

=> setenv bootargs root=/dev/nfs rw nfsroot= ip=
=> bootm 0x400000 - 0x800000  - 0x800000 

Please see also the files Documentation/initrd.txt and Documentation/nfsroot.txt in your Linux kernel source directory for more information about which options can be passed to the Linux kernel.

ALERT! 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
7.2. Flattened Device Tree Blob 1. Abstract 7.4. Boot Arguments Unleashed
Prev Home Next