From 885fbdb25eb7418b0a27cb7f8207d4a56a07674e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 2 Mar 2026 07:24:03 +0000 Subject: [PATCH] dev-embedded/u-boot-tools: Sync with Gentoo It's from Gentoo commit a25550068e83334990cbde591af4e17f0d9ffc48. Signed-off-by: Flatcar Buildbot --- .../u-boot-tools-2025.01-no-bundled-dtc.patch | 27 +++++ ....ebuild => u-boot-tools-2024.01-r2.ebuild} | 3 +- .../u-boot-tools-2024.01-r3.ebuild | 112 ++++++++++++++++++ ....ebuild => u-boot-tools-2025.01-r2.ebuild} | 11 +- .../u-boot-tools-2025.01-r3.ebuild | 111 +++++++++++++++++ 5 files changed, 261 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch rename sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/{u-boot-tools-2024.01-r1.ebuild => u-boot-tools-2024.01-r2.ebuild} (96%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild rename sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/{u-boot-tools-2025.01.ebuild => u-boot-tools-2025.01-r2.ebuild} (89%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch new file mode 100644 index 0000000000..33cd6731ee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/files/u-boot-tools-2025.01-no-bundled-dtc.patch @@ -0,0 +1,27 @@ +Don't attempt to build the bundled dtc as we're not going to use it, +and it would require dtc[python] too anyway. +--- a/Makefile ++++ b/Makefile +@@ -594,7 +594,7 @@ else + # Carefully list dependencies so we do not try to build scripts twice + # in parallel + PHONY += scripts +-scripts: scripts_basic scripts_dtc include/config/auto.conf ++scripts: scripts_basic include/config/auto.conf + $(Q)$(MAKE) $(build)=$(@) + + ifeq ($(dot-config),1) +@@ -2057,11 +2057,11 @@ endif + + ifneq ($(dtstree),) + +-%.dtb: prepare3 scripts_dtc ++%.dtb: prepare3 + $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + + PHONY += dtbs dtbs_install +-dtbs: prepare3 scripts_dtc ++dtbs: prepare3 + $(Q)$(MAKE) $(build)=$(dtstree) + + dtbs_install: diff --git a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild index 1e13270fe5..ef729c46f5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,6 +23,7 @@ IUSE="envtools" RDEPEND=" dev-libs/openssl:= net-libs/gnutls:= + sys-apps/dtc[python] sys-apps/util-linux:= " DEPEND="${RDEPEND}" diff --git a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild new file mode 100644 index 0000000000..d58691bd9c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2024.01-r3.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 + https://github.com/u-boot/u-boot/commit/88b9b9c44c859bdd9bb227e2fdbc4cbf686c3343.patch + -> u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + sys-apps/dtc[python] + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + # https://github.com/u-boot/u-boot/pull/489 + "${DISTDIR}"/u-boot-tools-2024.01-fix-invalid-escape-sequence.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die + sed -i -e 's/cross_tools: tools/& envtools /' "${S}/Makefile" +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + if [[ ${CBUILD} != ${CHOST} ]] ; then + local myemakeargs=( + CROSS_COMPILE="${CHOST}"- + CROSS_BUILD=y + ) + local maketarget=$(usex envtools envtools cross_tools) + else + local myemakeargs=( + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${LDFLAGS}" + ) + local maketarget=$(usex envtools envtools tools-all) + fi + + myemakeargs+=( + V=1 + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + "${maketarget}" +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep img2srec mkeficapsule mkenvimage mkimage + fi + + if [[ ${CBUILD} == ${CHOST} ]]; then + dobin gen_eth_addr + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +} diff --git a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01.ebuild b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild similarity index 89% rename from sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01.ebuild rename to sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild index 004feee18e..50bb0d3033 100644 --- a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,6 +21,7 @@ IUSE="envtools" RDEPEND=" dev-libs/openssl:= net-libs/gnutls:= + >=sys-apps/dtc-1.4.6 sys-apps/util-linux:= " DEPEND="${RDEPEND}" @@ -31,6 +32,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${PN}-2025.01-no-bundled-dtc.patch +) + src_prepare() { default sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ @@ -55,10 +60,12 @@ src_compile() { HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)' HOSTLDFLAGS="${BUILD_LDFLAGS}" + DTC="dtc" + # Provided by sys-apps/dtc[python] + NO_PYTHON=1 ) emake "${myemakeargs[@]}" tools-only_defconfig - emake "${myemakeargs[@]}" \ NO_SDL=1 \ HOSTSTRIP=: \ diff --git a/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild new file mode 100644 index 0000000000..6f739854c3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-embedded/u-boot-tools/u-boot-tools-2025.01-r3.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="utilities for working with Das U-Boot" +HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome" +SRC_URI=" + https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2 +" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="envtools" + +RDEPEND=" + dev-libs/openssl:= + net-libs/gnutls:= + >=sys-apps/dtc-1.4.6 + sys-apps/util-linux:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/swig + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2025.01-no-bundled-dtc.patch +) + +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/{g,m,n,q}conf-cfg.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die + sed -i -e 's/cross_tools: tools/& envtools /' "${S}/Makefile" +} + +src_configure() { + tc-export AR BUILD_CC CC PKG_CONFIG + tc-export_build_env +} + +src_compile() { + # Unset a few KBUILD variables. Bug #540476 + unset KBUILD_OUTPUT KBUILD_SRC + + if [[ ${CBUILD} != ${CHOST} ]] ; then + local myemakeargs=( + CROSS_COMPILE="${CHOST}"- + CROSS_BUILD=y + ) + local maketarget=$(usex envtools envtools cross_tools) + else + local myemakeargs=( + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${LDFLAGS}" + ) + local maketarget=$(usex envtools envtools tools-all) + fi + + myemakeargs+=( + V=1 + DTC="dtc" + # Provided by sys-apps/dtc[python] + NO_PYTHON=1 + ) + + emake "${myemakeargs[@]}" tools-only_defconfig + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y \ + "${maketarget}" +} + +src_test() { :; } + +src_install() { + cd tools || die + + if ! use envtools; then + dobin dumpimage fdtgrep img2srec mkeficapsule mkenvimage mkimage + fi + + if [[ ${CBUILD} == ${CHOST} ]]; then + dobin gen_eth_addr + fi + + dobin env/fw_printenv + + dosym fw_printenv /usr/bin/fw_setenv + + insinto /etc + doins env/fw_env.config + + doman ../doc/mkimage.1 +}