[U-Boot] [PATCH 06/11] mx7dsabresd: Add Windows boot support for iMX7 Sabre

Henry Beberman Henry.Beberman at microsoft.com
Tue Jul 17 01:41:09 UTC 2018


> -----Original Message-----
> From: Trent Piepho <tpiepho at impinj.com>
> Sent: Monday, July 16, 2018 11:22 AM
> To: Henry Beberman <Henry.Beberman at microsoft.com>; u-
> boot at lists.denx.de
> Cc: fabio.estevam at nxp.com; adrian.alonso at nxp.com
> Subject: Re: [U-Boot] [PATCH 06/11] mx7dsabresd: Add Windows boot
> support for iMX7 Sabre
> 
> On Sat, 2018-07-14 at 00:11 +0000, Henry Beberman wrote:
> > From: Henry Beberman <henry.beberman at microsoft.com>
> >
> > This patch adds a new bootable configuration for Windows 10 IoT Core
> > on the i.MX7 Dual Sabre board.
> >
> > It enables SPL on the i.MX7 Sabre in order to support the FIT load of
> > OP-TEE and U-Boot proper.
> >
> 
> > diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index
> > f186120684..3fb9b72703 100644
> > --- a/drivers/gpio/Makefile
> > +++ b/drivers/gpio/Makefile
> > @@ -7,10 +7,13 @@ ifndef CONFIG_SPL_BUILD
> >  obj-$(CONFIG_DWAPB_GPIO)	+= dwapb_gpio.o
> >  obj-$(CONFIG_AXP_GPIO)		+= axp_gpio.o
> >  endif
> > +
> > +ifeq ($(CONFIG_$(SPL_TPL_)DM),y)
> >  obj-$(CONFIG_DM_GPIO)		+= gpio-uclass.o
> >
> >  obj-$(CONFIG_DM_PCA953X)	+= pca953x_gpio.o
> >  obj-$(CONFIG_DM_74X164)		+= 74x164_gpio.o
> > +endif
> 
> It doesn't look like this patch is specific to mx7 or Windows.  Perhaps it should
> be in a different commit?

I agree that this change probably belongs in its own patch.
I've left it in this patch so far because it's required to build the new mx7dsabresd_nt_defconfig.

> Also, the help text for SPL_DM says it turns on basic DM support in SPL.  But
> not any specific hardware drivers.  Those all have additional config options to
> turn them on.  It doesn't seems right to bundle a selection of GPIO drivers
> along with CONFIG_SPL_DM.

This issue has cropped up because this patch adds SPL support to mx7dsabresd, but intentionally does not enable SPL_DM.
The defconfig contains CONFIG_DM_74X164 for use in U-Boot Proper, but because drivers/gpio/Makefile also runs during the SPL portion of the build that config still pulls in the 74X164 driver which fails to build due to missing dependencies.

Wrapping the DM objects in CONFIG_$(SPL_TPL_)DM ensures that DM is actually enabled for the current portion of the build when deciding to build the DM drivers. 

Thanks,
Henry


More information about the U-Boot mailing list