[PATCH 12/18] include: armv7: Enable distroboot across all configs

Manorit Chawdhry m-chawdhry at ti.com
Mon Jul 17 10:09:05 CEST 2023


Hi Simon,

On 17:40-20230715, Simon Glass wrote:
> Hi Manorit,
> 
> On Thu, 13 Jul 2023 at 23:54, Manorit Chawdhry <m-chawdhry at ti.com> wrote:
> >
> > Since K3 devices are moving towards distroboot, remove duplicates and
> > add it in common file to import from.
> >
> > Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
> > ---
> >  include/configs/am62ax_evm.h      | 71 ---------------------------------------
> >  include/configs/am62x_evm.h       | 27 ---------------
> >  include/configs/j721e_evm.h       | 31 -----------------
> >  include/configs/j721s2_evm.h      |  3 --
> >  include/configs/ti_armv7_common.h | 50 +++++++++++++++++++++++++++
> >  5 files changed, 50 insertions(+), 132 deletions(-)
> 
> Can you use standard boot instead?
> 
> [..]
> 
> > diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
> > index 149a74d98e8a..dbbeff34ba82 100644
> > --- a/include/configs/ti_armv7_common.h
> > +++ b/include/configs/ti_armv7_common.h
> > @@ -154,4 +154,54 @@
> >  #define NETARGS ""
> >  #endif
> >
> > +#ifdef CONFIG_ARM64
> > +#ifdef CONFIG_DISTRO_DEFAULTS
> > +#ifdef CONFIG_CMD_PXE
> > +# define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
> > +#else
> > +# define BOOT_TARGET_PXE(func)
> > +#endif
> > +
> > +#ifdef CONFIG_CMD_DHCP
> > +# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
> > +#else
> > +# define BOOT_TARGET_DHCP(func)
> > +#endif
> > +
> > +#ifdef CONFIG_CMD_MMC
> > +#define BOOT_TARGET_MMC(func) \
> > +       func(TI_MMC, ti_mmc, na) \
> > +       func(MMC, mmc, 0) \
> > +       func(MMC, mmc, 1)
> > +#else
> > +#define BOOT_TARGET_MMC(func)
> > +#endif
> > +
> > +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance)
> > +
> > +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance)           \
> > +       "ti_mmc "
> > +
> > +#ifdef CONFIG_CMD_USB
> > +# define BOOT_TARGET_USB(func) func(USB, usb, 0)
> > +#else
> > +# define BOOT_TARGET_USB(func)
> > +#endif
> > +
> > +#define BOOT_TARGET_DEVICES(func) \
> > +       BOOT_TARGET_MMC(func) \
> > +       BOOT_TARGET_USB(func) \
> > +       BOOT_TARGET_PXE(func) \
> > +       BOOT_TARGET_DHCP(func)
> > +
> > +#include <config_distro_bootcmd.h>
> 
> With standard boot you should be able to drop all of the above, since
> the normal order is mmc, usb, pxe, dhcp by default. But you can add a
> "boot_targets" env var if you like.
> 
> The one exception is TI_MMC. What is that, exactly?
> 

TI_MMC is our custom boot mechanism that we actually support as a part
of our SDK, we had been using this in am62ax like the way I have done
here, am not really sure why we hooked it into the distroboot if that is
the question that you are asking, maybe Nishanth/Bryan can help with
that as Bryan had done it for am62ax [0] but we do this boot mechanism
for sure.

[0]: https://lore.kernel.org/u-boot/20221224011525.4696-5-bb@ti.com/

Regards,
Manorit

> > +
> > +/* Incorporate settings into the U-Boot environment */
> > +#define CFG_EXTRA_ENV_SETTINGS                                 \
> > +       BOOTENV
> > +
> > +#endif
> > +
> > +#endif /* CONFIG_ARM64 */
> > +
> >  #endif /* __CONFIG_TI_ARMV7_COMMON_H__ */
> >
> > --
> > 2.40.1
> >
> 
> Regards,
> Simon


More information about the U-Boot mailing list