[Buildroot] [PATCH v4 13/20] boot/ti-k3-r5-loader: set binman environment

Dario Binacchi dario.binacchi at amarulasolutions.com
Wed Feb 21 10:19:50 UTC 2024


Hi Romain,

On Mon, Feb 19, 2024 at 11:15 AM Romain Naour <romain.naour at smile.fr> wrote:
>
> Hello Dario,
>
> Le 17/02/2024 à 17:02, Dario Binacchi a écrit :
> > Recent version of U-Boot use binman to provide a mechanism for building
> > images, from simple SPL + U-Boot combinations, to more complex
> > arrangements with many parts.
> >
> > The patch set the BINMAN_INDIRS environment variable to provide the
> > directory to search for binary blobs and select the packages required by
> > binman.
> >
> > Co-developed-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> >
> > ---
> >
> > Changes in v4:
> > - Drop the BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> >
> > Changes in v2:
> > - Change commit message
> > - Add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN option
> > - Select packages required by binman if
> >   BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN is enabled
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> > ---
> >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > index 0ffcb8235f2e..2a10024aedaa 100644
> > --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> > @@ -39,7 +39,13 @@ TI_K3_R5_LOADER_DEPENDENCIES = \
> >       host-pkgconf \
> >       $(BR2_MAKE_HOST_DEPENDENCY) \
> >       host-arm-gnu-toolchain \
> > -     host-openssl
> > +     host-openssl \
> > +     host-python-attrs \
> > +     host-python-jsonschema \
> > +     host-python-jsonschema-specifications \
> > +     host-python-pyyaml \
> > +     host-python-referencing \
> > +     host-python-rpds-py
>
> Most of theses new dependencies are not ti-k3-r5-loader dependencies but
> host-python-jsonschema runtime dependencies.

I removed the runtime dependencies and tried to modify the patch based
on your indications and your patch
(http://patchwork.ozlabs.org/project/buildroot/patch/20240213172817.2872849-11-romain.naour@smile.fr/),
but I'm encountering compilation errors specifically on the Python
modules that you indicated as runtime
dependencies. I tried to compile ti_am62x_sk_defconfig on your series
(i. e. "Add ti_j721e_sk_defconfig"),
but it seems like the HSFS option has disappeared.
So I need to add the runtime dependencies as well to compile correctly.

Thanks and regards,
Dario

>
> Note: host-python-jsonschema depends on
> BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS due to its runtime dependency on
> host-python-rpds-py.
>
> >
> >  TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
> >  TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
> > @@ -49,6 +55,10 @@ TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
> >       $(BR2_BISON_HOST_DEPENDENCY) \
> >       $(BR2_FLEX_HOST_DEPENDENCY)
> >
> > +ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)
>
> It's a u-boot package config option. just add host-python-pylibfdt the dependency.
>
> > +TI_K3_R5_LOADER_DEPENDENCIES += host-python-pylibfdt
> > +endif
> > +
> >  ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
> >  TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
> >  else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
> > @@ -58,6 +68,7 @@ TI_K3_R5_LOADER_MAKE_OPTS = \
> >       CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
> >       ARCH=arm \
> >       HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
> > +     BINMAN_INDIRS=$(BINARIES_DIR) \
>
> I suggested to add BR2_TARGET_TI_K3_R5_LOADER_USE_BINMAN but indeed we should
> use binman unconditionally for ti-k3-r5-loader package.
>
> http://patchwork.ozlabs.org/project/buildroot/patch/20240213172817.2872849-11-romain.naour@smile.fr/
>
> Best regards,
> Romain
>
>
> >       HOSTLDFLAGS="$(HOST_LDFLAGS)"
> >
> >  define TI_K3_R5_LOADER_BUILD_CMDS
>


-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi at amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info at amarulasolutions.com

www.amarulasolutions.com



More information about the buildroot mailing list