public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/11] mx7dsabresd: Add Windows boot support for iMX7 Sabre
Date: Tue, 17 Jul 2018 17:02:30 +0000	[thread overview]
Message-ID: <1531846949.2283.122.camel@impinj.com> (raw)
In-Reply-To: <CY4PR2101MB080289A51741780FE34A4789975C0@CY4PR2101MB0802.namprd21.prod.outlook.com>

On Tue, 2018-07-17 at 01:41 +0000, Henry Beberman wrote:
> > -----Original Message-----
> > From: Trent Piepho <tpiepho@impinj.com>
> > Sent: Monday, July 16, 2018 11:22 AM
> > To: Henry Beberman <Henry.Beberman@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@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.

Easy enough to split out and put first.  The person on different
hardware trying to figure out the u-boot build spaghetti it's helped
much knowing the person who added it was working on windows 10 support,
but nothing about the reason for this change.

> > 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. 

But isn't it odd that not a single other driver is wrapped this way? 
What's special here?

I think the underlying flaw is the the kbuild system doesn't support
the concept of building multiple times in different modes, e.g. main,
SPL, TPL.  And rather than design something, one gets layers of board
specific hacks.

  reply	other threads:[~2018-07-17 17:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14  0:11 [U-Boot] [PATCH 00/11] Enable Windows 10 IoT Core on i.MX6 and i.MX7 Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 01/11] imx: Add bootcmd to load and run UEFI from mmc Henry Beberman
2018-07-16 17:16   ` Trent Piepho
2018-07-16 22:28     ` Henry Beberman
2018-07-16 22:45       ` Trent Piepho
2018-07-16 23:56         ` Henry Beberman
2018-07-17 17:24           ` Trent Piepho
2018-07-18  0:52             ` Henry Beberman
2018-07-17 17:09     ` Fabio Estevam
2018-07-17 17:20       ` Henry Beberman
2018-08-07 11:11   ` Stefano Babic
2018-08-07 11:16     ` Tom Rini
2018-08-07 13:45       ` Alexander Graf
2018-08-08  2:24         ` Henry Beberman
2018-08-15 14:46           ` Alexander Graf
2018-07-14  0:11 ` [U-Boot] [PATCH 02/11] arm: Allow U-Boot Proper to run in normal world Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 03/11] spl: Add FIT boot into OP-TEE then U-Boot proper Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 04/11] spl: imx: Add optional lds to keep SPL entirely in on-chip RAM Henry Beberman
2018-07-16 17:32   ` Trent Piepho
2018-07-16 22:48     ` Henry Beberman
2018-08-07 12:17   ` Stefano Babic
2018-08-08  3:22     ` Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 05/11] mx6sabresd: Add Windows boot support for iMX6 Sabre Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 07/11] mx6cuboxi: Add Windows boot support for mx6cuboxi Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 06/11] mx7dsabresd: Add Windows boot support for iMX7 Sabre Henry Beberman
2018-07-16 18:22   ` Trent Piepho
2018-07-17  1:41     ` Henry Beberman
2018-07-17 17:02       ` Trent Piepho [this message]
2018-07-17 21:31         ` Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 08/11] udoo_neo: Add Windows boot support for UDOO Neo Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 09/11] cl-som-imx7: Add Windows boot support for cl-som-imx7 Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 11/11] imx: Add MAC addresses to global page to pass MAC into UEFI Henry Beberman
2018-07-14  0:11 ` [U-Boot] [PATCH 10/11] imx: Reserve a global page in memory to pass configuration to UEFI Henry Beberman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1531846949.2283.122.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox