Re: [PATCH v2 2/2] mips: generic: allow not building DTB in
From: Paul Burton
Date: Wed Jun 27 2018 - 12:01:24 EST
Hi Alexandre,
On Tue, Jun 26, 2018 at 04:07:43PM +0200, Alexandre Belloni wrote:
> > diff --git a/arch/mips/generic/vmlinux.its.S b/arch/mips/generic/vmlinux.its.S
> > index 1a08438fd893..9c954f2ae561 100644
> > --- a/arch/mips/generic/vmlinux.its.S
> > +++ b/arch/mips/generic/vmlinux.its.S
> > @@ -21,6 +21,7 @@
> > };
> > };
> >
> > +#if IS_ENABLED(CONFIG_BUILTIN_DTB)
>
> Thinking more about that, the conf@default configuration should probably
> not be removed if the platform is not using DT at all. Are there still
> MIPS platforms without DT support?
There are, but not ones that are supported by the generic platform so we
don't need to worry about those here. We basically have 2 cases to
consider:
1) FDT as an image within the FIT.
2) FDT embedded within the kernel binary, ie. legacy boards like
SEAD-3 (& Malta when I get its port to generic upstreamed).
Case 2 is where conf@default is most useful, since it allows the FIT
image to be loaded (presuming the board has a new enough bootloader)
without the bootloader knowing anything about the FDT. Legacy boards
with the DT built into the kernel then figure out which to use based on
the detect function given in their struct mips_machine.
So I think the most natural #ifdef here might be on
CONFIG_LEGACY_BOARDS, since it would be a little easier to understand at
a glance where the configuration is useful.
Thanks,
Paul
> > configurations {
> > default = "conf@default";
> >
> > @@ -29,4 +30,5 @@
> > kernel = "kernel@0";
> > };
> > };
> > +#endif
> > };