On Sun, Feb 27, 2011 at 05:09:13PM +0100, Wolfgang Denk wrote:
Dear Shawn Guo,
Hi Wolfgang,
In message 20110226173040.GD2672@S2100-06.ap.freescale.net you wrote:
I'm still a little bit new to dt. I thought the bootargs in chosen node will always apply when dt is enabled. It just took me some time to figure out that u-boot 'bootargs' env will anyway overwrite the one from chosen.
This is not quite correct. U-Boot will not always overwrite the settings from "chosen", but only if you provide any "better" settings by defining the "bootargs" environment variable.
str = getenv("bootargs"); if (str != NULL) {
...
Yes, that's what I meant. And I know I can force to get the bootargs from chosen node by clearing u-boot bootargs env with 'set bootargs'.
The 'force' is hard-coded as 1, so it always overwrites. Knowing that may save your some time, if you are green hands as me ;)
If you don't want to use the U-Boot settings, then just don't define any. If you bother to define such data, it is assumed that you actually want to see it used.
Yes, understood. Usually, we have u-boot bootargs env saved to play with non-dt kernel, so it is there for most cases. And I instinctively thought that bootargs from chosen node will be applied when booting a dt kernel. Clearly I was wrong.
I'm not blaming the implementation at all, and it actually makes the debugging easier for it let us change bootargs without running dtc and loading dtb over again. And I just want to share the info to save people's time, in case that someone else may misuse it as what I did.
Thanks.