Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional
@ 2026-10-24 15:10 Fiona Klute via buildroot
  2026-10-24 15:10 ` [Buildroot] [PATCH 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman Fiona Klute via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Fiona Klute via buildroot @ 2026-10-24 15:10 UTC (permalink / raw)
  To: buildroot; +Cc: Meena Murthy, James Hilliard, 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>
---
Tested with engicam_px30_core_defconfig, which uses U-Boot
2025.04. With BR2_TARGET_UBOOT_BINMAN_NEEDS_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_PKG_RESOURCES=y.

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

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 381a12197d..3e46293796 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -379,6 +379,20 @@ 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_PKG_RESOURCES
+	bool "Binman needs pkg-resources (U-Boot version < 2025.10)"
+	depends on BR2_TARGET_UBOOT_USE_BINMAN
+	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..ed66feafd1 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_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] 4+ messages in thread

* [Buildroot] [PATCH 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman
  2026-10-24 15:10 [Buildroot] [PATCH 1/2] boot/uboot: make binman dependency on host-python-pkg-resources optional Fiona Klute via buildroot
@ 2026-10-24 15:10 ` Fiona Klute via buildroot
  2026-10-24 21:29   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Fiona Klute via buildroot @ 2026-10-24 15:10 UTC (permalink / raw)
  To: buildroot; +Cc: Meena Murthy, James Hilliard, Fiona Klute

The defconfig uses U-Boot 2025.04, so binman fails without
pkg_resources. Also update the kernel to the latest release of the
6.12 series.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
Compile-tested only to verify the U-Boot option, I do not have the
board.

 configs/engicam_px30_core_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/engicam_px30_core_defconfig b/configs/engicam_px30_core_defconfig
index be5c56e19f..10f3d3157c 100644
--- a/configs/engicam_px30_core_defconfig
+++ b/configs/engicam_px30_core_defconfig
@@ -9,7 +9,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/engicam/px30core/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.22"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.114"
 BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/px30-engicam-px30-core-ctouch2-of10"
@@ -36,6 +36,7 @@ BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
 BR2_TARGET_UBOOT_USE_BINMAN=y
+BR2_TARGET_UBOOT_BINMAN_NEEDS_PKG_RESOURCES=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
 BR2_TARGET_UBOOT_SPL=y
-- 
2.55.0

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

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

* Re: [Buildroot] [PATCH 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman
  2026-10-24 15:10 ` [Buildroot] [PATCH 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman Fiona Klute via buildroot
@ 2026-10-24 21:29   ` Thomas Petazzoni via buildroot
  2026-10-24 21:54     ` Fiona Klute via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-24 21:29 UTC (permalink / raw)
  To: Fiona Klute; +Cc: buildroot, Meena Murthy, James Hilliard

On Sat, Oct 24, 2026 at 05:10:43PM +0200, Fiona Klute via buildroot wrote:
> The defconfig uses U-Boot 2025.04, so binman fails without
> pkg_resources. Also update the kernel to the latest release of the
> 6.12 series.

Thanks for the patch. However, I don't think we should do the Linux
kernel version bump in the same patch.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] configs/engicam_px30_core_defconfig: require pkg_resources for binman
  2026-10-24 21:29   ` Thomas Petazzoni via buildroot
@ 2026-10-24 21:54     ` Fiona Klute via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Fiona Klute via buildroot @ 2026-10-24 21:54 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Meena Murthy, James Hilliard

Am 24.10.26 um 23:29 schrieb Thomas Petazzoni:
> On Sat, Oct 24, 2026 at 05:10:43PM +0200, Fiona Klute via buildroot wrote:
>> The defconfig uses U-Boot 2025.04, so binman fails without
>> pkg_resources. Also update the kernel to the latest release of the
>> 6.12 series.
> 
> Thanks for the patch. However, I don't think we should do the Linux
> kernel version bump in the same patch.
That's fair. Also I forgot to update the hash file, which would've 
worked only as long as it's the most recently packaged version. Anyway, 
sent v2 without the kernel version bump.

Best regards,
Fiona

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

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

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

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

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