[U-Boot-Users] Linux kernel ignoring bootargs

I'm trying to boot a Linux 2.6.17 kernel from U-Boot, and it appears that it's ignoring the bootargs variable in U-Boot.
Here is my U-Boot environment:
baudrate=115200 loads_echo=1 ethaddr=00:E0:0C:00:8C:01 eth1addr=00:E0:0C:00:8C:02 ipaddr=10.82.19.159 serverip=10.82.48.106 rootpath=/nfsroot0/u/timur/itx-ltib/rootfs gatewayip=10.82.19.254 netmask=255.255.252.0 hostname=timur-dev bootfile=/timur/uImage loadaddr=200000 netdev=eth0 tftpuboot=tftpboot $loadaddr timur/u-boot.bin; erase fe700000 fe77ffff; cp.b $loadaddr fe700000 $filesize; cmp.b $loadaddr fe700000 $filesize tftplinux=tftpboot $loadaddr /timur/uImage ethact=TSEC0 bootargs=root=/dev/nfs rw nfsroot=10.82.48.106:/nfsroot0/u/timur/itx-ltib/rootfs ip=10.82.19.159:10.82.48.106:10.82.19.254:255.255.252.0:timur-dev:eth0:off console=ttyS0,115200 stdin=serial stdout=serial stderr=serial
And here's what Linux says when it boots:
## Booting image at 00200000 ... Image Name: Linux-2.6.17-g339d76c5-dirty Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1401739 Bytes = 1.3 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Current stack ends at 0x0FF71D18 => set upper limit to 0x00800000 ## cmdline at 0x007FFF00 ... 0x007FFFA7 bd address = 0x0FF71FBC memstart = 0x00000000 memsize = 0x10000000 flashstart = 0xFE000000 flashsize = 0x01000000 flashoffset = 0x00000000 sramstart = 0x00000000 sramsize = 0x00000000 bootflags = 0x00000001 intfreq = 533.333 MHz busfreq = 266.666 MHz ethaddr = 00:E0:0C:00:8C:01 eth1addr = 00:E0:0C:00:8C:02 IP addr = 10.82.19.159 baudrate = 115200 bps No initrd ## Transferring control to Linux (at address 00000000) ... [ 0.000000] Using MPC834x ITX machine description .... [ 41.727079] IP-Config: Complete: [ 41.730136] device=eth0, addr=192.168.1.141, mask=255.255.255.0, gw=192.168.1.1, [ 41.737995] host=unknown, domain=, nis-domain=(none), [ 41.743479] bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
As you can see, it's using the wrong IP address. It's using the one hard-coded into the kernel's configuration. I thought 'bootargs' was supposed to override that?

Timur Tabi wrote:
I'm trying to boot a Linux 2.6.17 kernel from U-Boot, and it appears that it's ignoring the bootargs variable in U-Boot.
Try clearing bootargs, and then setting it again.
I had a similar issue, and this fixed it. My assumption was that I'd got a control character in there that made it appear sane, when in fact it was not. A binary dump of the arguments area would probably confirm it.
Also you need to watch out for repeated environment variables, if something is defined twice, it'll pickup the first, but redefinition will affect the second. I saw this when updating U-Boot and picking up the default environment, i.e., a couple of things appeared to be defined twice ... I figured it was user-error :)
Cheers Dave

David Hawkins wrote:
Timur Tabi wrote:
I'm trying to boot a Linux 2.6.17 kernel from U-Boot, and it appears that it's ignoring the bootargs variable in U-Boot.
Try clearing bootargs, and then setting it again.
Doesn't help.
It looks like there's a command line hard-coded into the kernel:
[ 0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.1:/nfsroot0/u/timur/itx-ltib/rootfs ip=192.168.1.141:192.168.1.1:192.168.1.1:255.255.255.0:unknown:eth0:off console=ttyS0,115200
I can't figure out how it got there. I know I put it there, because the IP addresses are correct for the test board that's in the lab. It's not correct, however, for the board in my office.
ACK! I just remembered - the command line is hard-coded in the device tree, which is hard-coded in the kernel image. Crap. Oh well, thanks for helping me remember!
participants (2)
-
David Hawkins
-
Timur Tabi