[U-Boot] [PATCH] imx: nitrogen6x: Convert Sabrelite to distro boot support
Gary Bisson
gary.bisson at boundarydevices.com
Tue Apr 10 11:50:53 UTC 2018
Hi Guillaume,
On Mon, Apr 09, 2018 at 05:17:44PM +0200, Guillaume Gardet wrote:
>
>
> Le 09/04/2018 à 16:40, Gary Bisson a écrit :
> > Hi Guillaume,
> >
> > Thanks for your patch! Switching the upstream nitrogen6x configuration
> > to distro bootcmd has been in our todo list for some time since we also
> > use that in our own git repo.
> >
> > On Fri, Apr 06, 2018 at 12:05:48PM +0200, Guillaume GARDET wrote:
> > > Boot tested with boot.scr script and EFI/Grub2 on mmc0 and mmc1 slots.
> > >
> > > Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr>
> > > Cc: Troy Kisky <troy.kisky at boundarydevices.com>
> > > Cc: Stefano Babic <sbabic at denx.de>
> > > Cc: Fabio Estevam <fabio.estevam at nxp.com>
> > > ---
> > > include/configs/nitrogen6x.h | 86 ++++++++++----------------------------------
> > > 1 file changed, 18 insertions(+), 68 deletions(-)
> > >
> > > diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
> > > index c73cfb7f7e..2e2c499cb6 100644
> > > --- a/include/configs/nitrogen6x.h
> > > +++ b/include/configs/nitrogen6x.h
> > > @@ -102,82 +102,32 @@
> > > #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
> > > #if defined(CONFIG_SABRELITE)
> > Please also switch nitrogen6x to it, not only sabrelite.
>
> Should we keep all the 6x scripts stuff or not?
No, we need to switch to something standard, let's remove it.
> > > +#define BOOT_TARGET_DEVICES(func) \
> > > + func(MMC, mmc, 0) \
> > > + func(MMC, mmc, 1) \
> > > + func(SATA, sata, 0) \
> > > + func(USB, usb, 0) \
> > > + func(PXE, pxe, na) \
> > That currently doesn't build because CMD_PXE isn't selected in the
> > sabrelite defconfig.
> > "include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before
> > ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’"
> >
> > Which brings a good point, all the above should depend on the storage
> > command being present, like done here [1].
>
> No, we just need to update the defconfig, see V2 of this patch sent earlier today.
I know updating the defconfig makes it build. My point is that it would
be more flexible to do like in the link provided so that someone that
removes CMD_PXE from the defconfig for any reason can still build.
> > > + func(DHCP, dhcp, na)
> > > +
> > > +#include <config_distro_bootcmd.h>
> > > +
> > > #define CONFIG_EXTRA_ENV_SETTINGS \
> > > - "script=boot.scr\0" \
> > > - "uimage=uImage\0" \
> > > "console=ttymxc1\0" \
> > > "fdt_high=0xffffffff\0" \
> > > "initrd_high=0xffffffff\0" \
> > > - "fdt_file=imx6q-sabrelite.dtb\0" \
> > > + "fdtfile=imx6q-sabrelite.dtb\0" \
> > I wish the default efi_fdtfile would work, Fabio is there any plan to
> > populate the ${soc} variable like it is done for i.MX7? [2]
> > Then a small patch in the nitrogen6x.c would set the proper board env
> > variable.
> >
> > That way there would be no difference in this header between sabrelite
> > vs. nitrogen6x.
> >
> > > "fdt_addr=0x18000000\0" \
> > Do we need to keep fdt_addr since we define fdt_addr_r below?
>
> It was for backward compatibility, if people had some script using it.
I think it should be dropped.
Regards,
Gary
More information about the U-Boot
mailing list