2008-10-10 08:54:49 Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63410
I'm trying to boot using physmap and yaffs2, but I get an error.
It seems like u-boot doesn't pass my boot-options to the kernel, or am I wrong? (maybe this message should be in the u-boot forum?)
bfin> set bootargs earlyprintk=serial,uart0,115200 console=ttyBF0,115200 noinitrd rw root=/dev/mtdblock2 rootfstype=yaffs2 nolock init=/bin/sh
bfin> run flashboot
## Booting image at 20100000 ...
Image Name: Linux-2.6.26.5-ADI-2009R1-pre-sv
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 1289359 Bytes = 1.2 MB
Load Address: 00800000
Entry Point: 00a3cf68
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = a3cf68
brd: module loaded
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre .nico@cam.org.
eth0: SMC91C11xFD (rev 2) at 24000300 IRQ 83 [nowait]
eth0: Invalid ethernet MAC address. Please set using ifconfig
Linux video capture interface: v2.00
physmap platform flash device: 04000000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00600000 : "kernel"
0x00600000-0x04000000 : "rootfs"
Generic platform RAM MTD, (c) 2004 Simtec Electronics
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear .greearb@candelatech.com.
All bugs added by David S. Miller .davem@redhat.com.
VFS: Cannot open root device ".NULL." or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 1024 mtdblock0 (driver?)
1f01 5120 mtdblock1 (driver?)
1f02 59392 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
QuoteReplyEditDelete
2008-10-10 09:49:13 Re: Kernel not getting correct bootargs from u-boot?
Robin Getz (UNITED STATES)
Message: 63414
Thomas:
You need to see what "flashboot" is doing - it could be setting the bootargs to something else. In U-Boot, just:
bfin> print flashboot
flashboot=bootm 0x20100000
or
bfin> print flashboot
run ramargs;run addip;bootm 0x20100000
Which is it on your board?
-Robin
QuoteReplyEditDelete
2008-10-10 11:04:03 Re: Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63426
flashboot only does bootm 0x20100000 so I thought it would take the bootargs var I set?
QuoteReplyEditDelete
2008-10-10 12:05:41 Re: Kernel not getting correct bootargs from u-boot?
Mike Frysinger (UNITED STATES)
Message: 63431
normally you would have gotten the entire output when using earlyprintk and it would have told you what boot cmdline Linux received from u-boot
QuoteReplyEditDelete
2008-10-10 12:07:00 Re: Kernel not getting correct bootargs from u-boot?
Mike Frysinger (UNITED STATES)
Message: 63432
but you can still double check with the post mortem trick ...
QuoteReplyEditDelete
2008-10-10 13:20:08 Re: Kernel not getting correct bootargs from u-boot?
Robin Getz (UNITED STATES)
Message: 63438
Thomas:
Yes - it should...
What does "print bootargs" show, and then - as Mike suggested - what does the kernel print out?
Also - make sure you are using the same version of U-Boot as kernel - the place where the bootargs were passed changed a few years ago.
-Robin
QuoteReplyEditDelete
2008-10-11 12:23:53 Re: Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63481
I'm not currently at the same location as the board, but I tried this, to save the environment:
bfin> saveenv
Saving Environment to Flash...
copy old content: sect_addr: 20000000 env_addr: 20004000 offset: 00004000
Protect off 20000000 ... 2000FFFF
Error: end address not on sector boundary
Does the bootm read bootargs from flash, or from the internal variables? Also, I'm using the latest uboot from svn trunk and this is also the same for uclinux. I did check the post mortem earlier, and that's when I started to think that the bootargs was missing, because it only printed parts of my bootargs.
QuoteReplyEditDelete
2008-10-11 12:28:46 Re: Kernel not getting correct bootargs from u-boot?
Mike Frysinger (UNITED STATES)
Message: 63482
the environment is initialized according to your configuration settings (CFG_ENV_IS_IN_XXX). this is typically flash. but after it's been initialized, all settings are in memory.
if your "saveenv" isnt working, it means your configuration settings are incorrect, or your flash driver is broken. if you're using the standard CFI driver, then that just leaves your configuration settings.
QuoteReplyEditDelete
2008-10-13 08:00:24 Re: Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63553
I modified u-boot to print out what it passed along, and here's both the u-boot output, and the post mortem from linux:
Starting Kernel at = a3cf68 with arguments: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,115200 console=ttyBF0,115200
<5>Kernel command line: console=ttyBF0,115200.
So I'm a bit puzzled...
-- Thomas
QuoteReplyEditDelete
2008-10-13 11:13:41 Re: Kernel not getting correct bootargs from u-boot?
Robin Getz (UNITED STATES)
Message: 63562
Thomas:
What versions of U-Boot and kernel are you using?
-Robin
QuoteReplyEditDelete
2008-10-13 13:06:13 Re: Kernel not getting correct bootargs from u-boot?
Mike Frysinger (UNITED STATES)
Message: 63569
did you compile the command line into the kernel ?
QuoteReplyEditDelete
2008-10-13 15:22:39 Re: Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63577
svn trunk from your tree, both u-boot and ucLinux. Last update was done early last week.
QuoteReplyEditDelete
2008-10-13 15:24:39 Re: Kernel not getting correct bootargs from u-boot?
Thomas Langås (NORWAY)
Message: 63578
Hmm, yes, according to .config there is a line:
CONFIG_CMDLINE="console=ttyBF0,115200"
Does this mean that the kernel won't read any commandline from the bootloader?
QuoteReplyEditDelete
2008-10-13 15:31:24 Re: Kernel not getting correct bootargs from u-boot?
Michael Hennerich (GERMANY)
Message: 63579
>Does this mean that the kernel won't read any commandline from the bootloader?
Exactly
-Michael