Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional
@ 2026-10-25 21:21 Fiona Klute via buildroot
  2026-10-25 21:21 ` [Buildroot] [PATCH v3 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman Fiona Klute via buildroot
  2026-10-26 21:33 ` [Buildroot] [PATCH v3 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Klute via buildroot @ 2026-10-25 21:21 UTC (permalink / raw)
  To: buildroot; +Cc: Meena Murthy, James Hilliard, Thomas Petazzoni, Fiona Klute

Binman needs pkg_resources only in U-Boot versions before 2025.10,
otherwise the dependency is unnecessary and best avoided.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
Changes v2 -> v3:
* rename option to
  BR2_TARGET_UBOOT_BINMAN_NEEDS_HOST_PYTHON_PKG_RESOURCES
* remove unnecessary "depends on"

Tested with engicam_px30_core_defconfig, which uses U-Boot
2025.04. With
BR2_TARGET_UBOOT_BINMAN_NEEDS_HOST_PYTHON_PKG_RESOURCES=y the build
works, without it binman fails because it cannot import pkg_resources.

engicam_px30_core_defconfig appears to be the only defconfig that uses
binman *and* a U-Boot version < 2025.10 according to output of:

grep UBOOT_CUSTOM $(grep -R -l BR2_TARGET_UBOOT_USE_BINMAN configs/)

Nonetheless, if any defconfigs you care about use binman, please
verify and if needed (preferably) update U-Boot or enable
BR2_TARGET_UBOOT_BINMAN_NEEDS_HOST_PYTHON_PKG_RESOURCES=y.

 boot/uboot/Config.in | 13 +++++++++++++
 boot/uboot/uboot.mk  |  4 +++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 381a12197d..ad3efaf4be 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -379,6 +379,19 @@ config BR2_TARGET_UBOOT_USE_BINMAN
 
 	  https://docs.u-boot.org/en/v2026.10/develop/package/binman.html
 
+if BR2_TARGET_UBOOT_USE_BINMAN
+
+config BR2_TARGET_UBOOT_BINMAN_NEEDS_HOST_PYTHON_PKG_RESOURCES
+	bool "binman needs host-python-pkg-resources"
+	help
+	  In U-Boot versions before 2025.10 binman uses the Python
+	  module pkg_resources, which used to be provided by
+	  python-setuptools before version 82.0.0. Select this option
+	  to use backported pkg_resources when building old U-Boot
+	  versions.
+
+endif
+
 menu "U-Boot binary format"
 
 config BR2_TARGET_UBOOT_FORMAT_AIS
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index a7e831f6c3..ba6f608751 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -312,10 +312,12 @@ ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),y)
 # https://source.denx.de/u-boot/u-boot/-/blob/v2024.04/tools/buildman/requirements.txt
 UBOOT_DEPENDENCIES += \
 	host-python-jsonschema \
-	host-python-pkg-resources \
 	host-python-pyyaml \
 	host-python-yamllint
 UBOOT_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR)
+ifeq ($(BR2_TARGET_UBOOT_BINMAN_NEEDS_HOST_PYTHON_PKG_RESOURCES),y)
+UBOOT_DEPENDENCIES += host-python-pkg-resources
+endif
 endif
 
 # prior to u-boot 2013.10 the license info was in COPYING. Copy it so
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-26 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 21:21 [Buildroot] [PATCH v3 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional Fiona Klute via buildroot
2026-10-25 21:21 ` [Buildroot] [PATCH v3 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman Fiona Klute via buildroot
2026-10-26 21:33 ` [Buildroot] [PATCH v3 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox