From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot as a next bootloader in a chain - reading the kernel boot args provided by the previous stage bootlader?
Date: Mon, 16 Nov 2015 11:52:43 +0100 [thread overview]
Message-ID: <20151116115243.2fa43462@lilith> (raw)
In-Reply-To: <CAMduVEc2wjfyokYHpwx2=Uds0nAzOGk56hzeAr1fOky9_=P9GQ@mail.gmail.com>
Hello Wojciech,
On Mon, 16 Nov 2015 10:42:50 +0100, Wojciech Zabolotny
<wzab01@gmail.com> wrote:
> Hi,
>
> I need to use U-Boot (or barebox) as a bootloader in a Raspberry Pi
> based system to extend booting flexibility.
> The problem however is that certain kernel boot arguments are prepared
> by the previous stage bootloader (start.elf)
> basing on the properties of the individual board.
> For example in one of the boards I use, the kernel command line when a
> standard kernel is booted, looks as follows (MAC address and serial
> number are partially masked for privacy):
>
> dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480
> bcm2708.boardrev=0xd bcm2708.serial=0x6f15XXXX
> smsc95xx.macaddr=B8:27:EB:XX:XX:XX bcm2708_fb.fbswap=1
> sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000
> vc_mem.mem_size=0x20000000 console=ttyAMA0 root=/dev/mmcblk0p2
> rootwait
>
> Only the "console=ttyAMA0 root=/dev/mmcblk0p2 rootwait" is provided by
> the user (in the cmdline.txt file). The rest is generated by the
> start.elf.
>
> Of course when I boot the u-boot.bin instead of zImage, the same
> parameters are passed to it, but the U-Boot is not able to read them
> and to pass them to the finally booted kernel.
> As U-Boot shares a lot of code with the Linux kernel it should be
> possible to add necessary functions.
> It could be useful in all applications where U-Boot is used as an
> additional stage in the boot chain e.g., to add new booting
> functionalities (booting from the network, booting from the flash disk
> etc.).
>
> I have found a nice description, how the paremeters are passed in ARM
> architecture:
> http://www.simtec.co.uk/products/SWLINUX/files/booting%5Farticle.html
> but of course the solution should be probably portable (or implemented
> for each platform independently with unified API).
Not sure what kind of answer you're asking for here. Do you want to
know if what you're suggesting is feasible? Are you looking for someone
to implement it? Are you going to implement it yourself but asking for
feedback?
> --
(aside: if the above should be a signature delimiter, then it lacks a
space after the dashes)
Amicalement,
--
Albert.
next prev parent reply other threads:[~2015-11-16 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 9:42 [U-Boot] U-Boot as a next bootloader in a chain - reading the kernel boot args provided by the previous stage bootlader? Wojciech Zabolotny
2015-11-16 10:52 ` Albert ARIBAUD [this message]
2015-11-16 12:09 ` Wojciech Zabolotny
2015-11-16 12:47 ` Albert ARIBAUD
-- strict thread matches above, loose matches on Subject: below --
2016-01-25 15:46 Wael Almattar
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=20151116115243.2fa43462@lilith \
--to=albert.u.boot@aribaud.net \
--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