From: "David Grab" <d.grab@hima.com>
To: <wd@denx.de>
Cc: linuxppc-embedded@ozlabs.org
Subject: AW: AW: initrd rootfs ramdisk
Date: Wed, 6 Jul 2005 11:07:13 +0200 [thread overview]
Message-ID: <000c01c5820a$19fc5be0$f201a8c0@SN7606> (raw)
In-Reply-To: <20050705160149.3BDF7353A5E@atlas.denx.de>
>> >But the kernel prints the boot parameters just fine.
>>
>> Maybe because i defined it in kernel configuration! But from u-boot i
don´t
>> get any arguments.
>Then you must be using a wrong image type. Are you sure you use "make
>uImage" to build your kernel image for U-Boot?
No, i´m using kernel 2.6.11.6 from kernel.org. It´s compiled with the actual
ELDK and made with "make uImage".
>> I thougt i can give the linux kernel position from u-boot where initrd is
>> located, but i have the same problem.
>You don;t. U-Boot passes this information automatically.
>> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
>> loop: loaded (max 8 devices)
>> VFS: Cannot open root device "<NULL>" or unknown-block(3,1)
>> Please append a correct "root=" boot option
>> Kernel panic - not syncing: VFS: Unable to mount root fs on
>> unknown-block(3,1)
>Block device 3, 1 is /dev/hda1 - is your ramdisk known to be working?
Ramdisk is from ELDK build with mkimage like mentioned in FAQ.
I debugged to see what happens. First of all machine init in
\arch\ppc\kernel\setup.c is called. In this function a call to platform_init
is made. But the platform init of my own board files are called not the
implementation of setup.c which is only available if
CONFIG_PPC_MULTIPLATFORM is set. In my own platform_init is only a call to
find_bootinfo which is resulting in NULL because rec->tag is 0. That´s the
reason why parse_bootinfo don´t set the CMD_LINE, etc..
struct bi_record *find_bootinfo(void)
{
struct bi_record *rec;
rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));
if ( rec->tag != BI_FIRST ) {
/*
* This 0x10000 offset is a terrible hack but it will go away when
* we have the bootloader handle all the relocation and
* prom calls -- Cort
*/
rec = (struct bi_record
*)_ALIGN((ulong)__bss_start+0x10000+(1<<20)-1,(1<<20));
if ( rec->tag != BI_FIRST )
return NULL;
}
return rec;
}
In this line rec is set to 0xc0300000
rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));
if definitions are in both lines true because rec->tag is 0
in this line rec address is also 0xc0300000
rec = (struct bi_record
*)_ALIGN((ulong)__bss_start+0x10000+(1<<20)-1,(1<<20));
The following line in my own board.c platform_init gets the board
information. So u-boot pass the informations quite well.
if (r3)
__res = *(bd_t *)(r3 + KERNELBASE);
So what is wrong with my find_bootinfo function? Why is rec->tag zero?
Thx for advice,
David
next prev parent reply other threads:[~2005-07-06 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-05 6:36 initrd rootfs ramdisk David Grab
2005-07-05 8:18 ` Wolfgang Denk
2005-07-05 11:18 ` AW: " David Grab
2005-07-05 16:01 ` Wolfgang Denk
2005-07-06 9:07 ` David Grab [this message]
2005-07-06 10:30 ` AW: " David Grab
[not found] <20050720203355.027CF67CF6@ozlabs.org>
2005-07-20 22:05 ` T Ziomek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000c01c5820a$19fc5be0$f201a8c0@SN7606' \
--to=d.grab@hima.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).