[ORLinux] [PATCH] openrisc: enable passing of flatten device tree pointer
Jonas Bonn
jonas at southpole.se
Tue Jul 12 09:41:37 CEST 2011
On Mon, 2011-07-11 at 21:53 +0300, Stefan Kristiansson wrote:
> On 11.7.2011 19:54, Jonas Bonn wrote:
> > That looks pretty good. The only comment I have is that we probably
> > want to be passing the command line in as part of the device tree, not
> > as a separate part. The command line would in that case go in as part
> > of the "chosen" section, specifically the "bootargs" parameter.
> I don't think that they necessarily need to exclude each other,
> we could fall back on the device tree "bootargs" parameter
> if no command line kernel parameter has been provided.
> The way I see it, there are potential cases where the
> device tree structure would be static (i.e. unchangeable),
> but a dynamic command line is still desirable.
>
Not sure I agree... I'd like to be try to be as forward thinking as
possible on this. I'd like to see some specific examples where you
think that passing in a device tree isn't sufficient.
Even if there is a _static_ device tree available somewhere, that should
just be copied into memory and modified to reflect the desired boot
parameters. The same goes for the initrd/initramfs.
The bootloader should only need to pass in a pointer to a device tree
and nothing else in order to boot Linux. The bootloader can do whatever
modifications it wants in order to get that device tree into shape, but
the interface between bootloader and Linux should be clean and
specifically the device tree.
So, essentially, we have a single register passing the device tree to
Linux whereby the bootloader has modified the 'chosen' section so that
it includes something like the following:
chosen {
bootargs = "root=...";
initrd-start = <00002000>;
initrd-end = <00008000>;
}
A more interesting question, I think, is whether the bootloader should
pass in a "flattened device tree" or a "device tree"... opinions?
/Jonas
More information about the Linux
mailing list