[PATCH v7 09/15] disk: Correct the conditions for SPL

AKASHI Takahiro takahiro.akashi at linaro.org
Fri Apr 15 05:52:47 CEST 2022


On Thu, Apr 14, 2022 at 08:31:12AM -0400, Tom Rini wrote:
> On Thu, Apr 14, 2022 at 05:21:52PM +0900, AKASHI Takahiro wrote:
> > Hi Simon,
> > 
> > On Mon, Feb 28, 2022 at 07:16:51AM -0700, Simon Glass wrote:
> > > These filesystems may have different settings for SPL and TPL. Use the
> > > correct Makefile variable to handle this.
> > > 
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > > 
> > > Changes in v7:
> > > - Add new patch to correct the conditions for SPL
> > > 
> > >  disk/Makefile | 10 +++++-----
> > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/disk/Makefile b/disk/Makefile
> > > index 6ce5a687b3..83f5af6069 100644
> > > --- a/disk/Makefile
> > > +++ b/disk/Makefile
> > > @@ -6,8 +6,8 @@
> > >  #ccflags-y += -DET_DEBUG -DDEBUG
> > >  
> > >  obj-$(CONFIG_PARTITIONS)	+= part.o
> > > -obj-$(CONFIG_$(SPL_)MAC_PARTITION)   += part_mac.o
> > > -obj-$(CONFIG_$(SPL_)DOS_PARTITION)   += part_dos.o
> > > -obj-$(CONFIG_$(SPL_)ISO_PARTITION)   += part_iso.o
> > > -obj-$(CONFIG_$(SPL_)AMIGA_PARTITION) += part_amiga.o
> > > -obj-$(CONFIG_$(SPL_)EFI_PARTITION)   += part_efi.o
> > > +obj-$(CONFIG_$(SPL_TPL_)MAC_PARTITION)   += part_mac.o
> > > +obj-$(CONFIG_$(SPL_TPL_)DOS_PARTITION)   += part_dos.o
> > > +obj-$(CONFIG_$(SPL_TPL_)ISO_PARTITION)   += part_iso.o
> > > +obj-$(CONFIG_$(SPL_TPL_)AMIGA_PARTITION) += part_amiga.o
> > > +obj-$(CONFIG_$(SPL_TPL_)EFI_PARTITION)   += part_efi.o
> > 
> > While none of CONFIG_TPL_xxx_PARTITION is defined,
> > how do those rules work for TPL?
> 
> The makefile logic means that if the options are added then they would
> work as intended.  With the options not being in Kconfig they'll simply
> never be evaluated to y.

Okay, so it is intentional.
But I believe that the changes made around disk/ are not enough.
For instance, in include/part.h, there still exist a couple of
   #ifdef CONFIG_PARTITIONS

So some functions are nullified even if SPL_PARTITIONS (and
particular partition table types) is enabled.

I'm trying to fix some of issues when addressing the issue:
  https://lists.denx.de/pipermail/u-boot/2022-April/481258.html

-Takahiro Akashi

> 
> -- 
> Tom




More information about the U-Boot mailing list