Linux – Uboot passes arguments to kernel!

bootboot-loaderkernellinux-kernelu-boot

How can uboot pass command line argument to kernel? I did some googling and got to know that it uses the bootargs environment variable. There it was mentioned that setenv bootargs key=value. Since I am using bash and don't have setenv I did this using export bootargs="value". But it's not affecting anything. I checked in /proc/cmdline the arguments remain the same.
Any idea what I am doing wrong?

Best Answer

There are two ways to pass arguments to kernel: 1. Compile them inside. 2. Use bootloader

So first check if your arguments are not compiled into kernel. Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.

Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.

It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.

Related Question