From: Matthew Lear <matt@bubblegen.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] Mips, U-Boot and ramdisk
Date: Tue, 23 Jun 2009 10:54:07 +0100 [thread overview]
Message-ID: <4A40A63F.6010100@bubblegen.co.uk> (raw)
In-Reply-To: <4A3F9B62.5070107@sch.bme.hu>
Hi Robert.
> I set the bootargs variable to: root=\dev\ram (I used: set bootargs
> root=/dev/ram)
> But when I'm trying to start the Linux with the
>
> bootm 81000000 81FFFFC0
>
> the Linux can't find the ramdisk. It write out:
>
> Initrd not found or empty - disabling initrd
Do you see U-Boot detecting and loading the ram disk image once you invoke your
bootm command above? eg:
## Loading RAMDisk Image at 00500000 ...
Image Name: uboot ext2 ramdisk rootfs
Created: 2009-06-15 14:39:13 UTC
Image Type: M68K Linux RAMDisk Image (gzip compressed)
Data Size: 5219290 Bytes = 5 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to 4fa79000, end 4ff733da ... OK
I believe that for U-Boot to pass the ram disk image information to the kernel,
it needs to be able to detect the ram disk image in the first place. You can use
U-Boot's mkimage utility to add a header onto your ram disk image.
> But when I set its address into the bootargs (so the bootargs:
> root=/dev/ram rd_start=0x82000000 rd_size=0x191160), it works well; it
> successfully find the image, and can mount it.
This is because you're explicitly telling the kernel where to find the ram disk
image in memory. Take a look at drivers/block/brd.c in the kernel src.
> How does the U-Boot pass the ramdisk information? It sets some kind of
> environment variables in the bootm.c. But it doesn't work for me. Why?
> (I could use the bootargs solution in this case, but I'm afraid, it
> can't pass other arguments too, like ethernet address, etc.)
This is arch specific in U-Boot but I'd also check that your MIPS kernel has
support for a) correctly parsing the U-Boot environment provided to it and b)
providing the required data to other parts of the kernel for utilisation of the
ram disk, eg initrd_start / initrd_end as an example.
If you're struggling to pass other args to the kernel then it sounds like there
is more of a fundamental issue somewhere, though. Maybe just double check
Documentation/kernel-parameters.txt to make sure you're passing syntax in a form
that the kernel will recognise?
Hope that helps.
Cheers,
-- Matt
next prev parent reply other threads:[~2009-06-23 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 14:55 [U-Boot] Mips, U-Boot and ramdisk Robert Hodaszi
2009-06-23 9:25 ` Detlev Zundel
2009-06-23 10:14 ` Robert Hodaszi
2009-06-23 9:54 ` Matthew Lear [this message]
2009-06-23 10:38 ` Robert Hodaszi
2009-06-23 12:45 ` Robert Hodaszi
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=4A40A63F.6010100@bubblegen.co.uk \
--to=matt@bubblegen.co.uk \
--cc=u-boot@lists.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