On Wed, Mar 05, 2025 at 07:15:50AM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Tue, 4 Mar 2025 at 13:41, Tom Rini <[email protected]> wrote:
> >
> > It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
> > Makefiles as part of the macros to determine when to do something in our
> > Makefiles based on what phase of the build we are in. For consistency,
> > bring this down to a single macro and use "$(PHASE_)" only.
> >
> > Signed-off-by: Tom Rini <[email protected]>
> > ---
> > Cc: Simon Glass <[email protected]>
> >
> > This leads a little bit of dead code in scripts/Makefile.xpl that I
> > didn't remove as this is an RFC. This also omits expanding on our build
> > documentation slightly.
> >
> > With the following patches applied (which are correct regardless of this
> > RFC and so separate):
> > https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
> > https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
> >
> > There's no change in the resulting build before/after this patch.
> >
> > We could do the other direction and drop $(PHASE_) in favour of $(XPL_)
> > but that would require updating the logic of how XPL_ is defined.
> 
> These are not the same thing at present:
> 
> XPL_ refers to any xPL phase
> PHASE_ refers to a particular xPL phase
> 
> Since it doesn't change the build, it must be fine. It's just surprising, to 
> me.

Erm, this is what we have in scripts/Makefile.xpl today:

ifdef CONFIG_XPL_BUILD
XPL_ := SPL_
ifeq ($(CONFIG_VPL_BUILD),y)
PHASE_ := VPL_
else
ifeq ($(CONFIG_TPL_BUILD),y)
PHASE_ := TPL_
else
PHASE_ := SPL_
endif
endif
else
XPL_ :=
PHASE_ :=
endif

Which is why I sent the two fixes first, for places that relied on
CONFIG_SPL_FOO=y in a TPL (PowerPC and their spl->tpl->U-Boot chain) or
VPL (sandbox didn't set TPL_DM_I2C but did set SPL_DM_I2C) phase of the
build.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to