[U-Boot] [PATCH] fdt: Add warning about CONFIG_OF_EMBED
Simon Glass
sjg at chromium.org
Thu Dec 27 23:29:42 UTC 2018
Hi Lukasz,
On Wed, 19 Dec 2018 at 03:11, Lukasz Majewski <lukma at denx.de> wrote:
>
> Dear Simon and Simon,
>
> > Am 05.12.2018 um 14:57 schrieb Simon Glass:
> > > This option has crept into use with some boards. Add a warning to
> > > try to prevent this.
> > >
> > > As an example:
> > > https://lists.denx.de/pipermail/u-boot/2017-September/304966.html
> >
> > We have just discussed this in another thread. There seem to be ~109
> > defconfigs in the tree that enable OF_EMBED.
> >
> > I doubt all of them do this for fun, so we might want to collect the
> > reasons they do so. I do know two:
> >
> > - socfpga_stratix10_defconfig needs this to get a correct
> > u-boot-spl.hex
> > - I would need it to ensure in SPL, the DTB is in one block with the
> > other readonly parts. Without OF_EMBED, we have '.text', '.bss', DT.
>
> Another use case is imx6:
>
> When I want to use SPL's embedded DTB for early init, with OF_SEPARATE
> I get fdt_blob = (ulong *)&__bss_end; ,which points me to 0x18200060,
> which is in DDR (and there is either garbage nor DDR is not
> initialized at all).
>
> The above looks like the __bss_end is for u-boot proper.
>
> The workaround (for now) is to have OF_EMBED, which assigns
> gd->fdt_blob = __dtb_dt_spl_begin [1], and this is a correct address.
>
> Hence, I'm wondering if shall I assign:
> gd->fdt_blob = __dtb_dt_spl_begin;
>
> in my early SPL code (and do not use fdt_setup() function at all in
> SPL) ?
Or you could update fdt_setup() to do what you want (perhaps with a
new CONFIG?).
>
> Moreover, defining board_fdt_blob_setup() for _each_ IMX6 board which
> would switch to DM_MMC in SPL seems like an no acceptable solution.
>
>
> [1] - ./spl/dts/dt-spl.dtb.S:3:.global __dtb_dt_spl_begin --> Looks
> like __dtb_dt_spl_begin is exactly for this purpose.
Regards,
Simon
More information about the U-Boot
mailing list