uboot-envtools: set nonshared flag correctly per-subpackage

Currently, uboot-envtools is being built for a (shared) instruction
set (phase2 in buildbots) instead of target-specific (phase1 in builbots).
So the package does not contain the uci-defaults file specific for each
target_subtarget. (Only the fortunate target with coincidentally the same
instruction set and target as the SDK chosen by the buildbot will have the
uci-defaults file.)

This commit sets the nonshared flag correctly in the Makefile so that
uboot-envtools is built for the target-specific (phase 1).

This is done by using the PKGFLAGS variable which is intended for
per-binary flags (instead of PKG_FLAGS which has a global scope), as
stated in some old commits 349e7b635e[1], 2d7eaf2e15[2], 064e7c8f00[3] and
2cb75cd8b9[4].

While at here, use PKG_URL, instead of URL, which is intended for global
scope. As stated in commit e32edf712b[5].

[1] 349e7b635e
[2] 2d7eaf2e15
[3] 064e7c8f00
[4] 2cb75cd8b9
[5] e32edf712b

Fixes: #19040
Fixes: 46e376c ("uboot-tools: migrate uboot-envtools to uboot-tools")

Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19180
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Mario Andrés Pérez 2025-06-22 19:13:27 +02:00 committed by Robert Marko
parent 6a1d7bf52b
commit dc80e69801

View file

@ -9,6 +9,7 @@ PKG_SOURCE_URL:= \
https://ftp.denx.de/pub/u-boot \ https://ftp.denx.de/pub/u-boot \
https://mirror.cyberbits.eu/u-boot \ https://mirror.cyberbits.eu/u-boot \
ftp://ftp.denx.de/pub/u-boot ftp://ftp.denx.de/pub/u-boot
PKG_URL:=http://www.denx.de/wiki/U-Boot
PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
@ -19,6 +20,7 @@ PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README PKG_LICENSE_FILES:=Licenses/README
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
#PKG_FLAGS:=nonshared # Use PKGFLAGS instead of PKG_FLAGS for per-binary flags
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -27,7 +29,6 @@ define Package/dumpimage
CATEGORY:=Utilities CATEGORY:=Utilities
SUBMENU:=Boot Loaders SUBMENU:=Boot Loaders
TITLE:=dumpimage lists and extracts data from U-Boot images. TITLE:=dumpimage lists and extracts data from U-Boot images.
URL:=http://www.denx.de/wiki/U-Boot
endef endef
define Package/dumpimage/description define Package/dumpimage/description
@ -42,7 +43,6 @@ define Package/fit-check-sign
CATEGORY:=Utilities CATEGORY:=Utilities
SUBMENU:=Boot Loaders SUBMENU:=Boot Loaders
TITLE:=verify uImage.FIT TITLE:=verify uImage.FIT
URL:=http://www.denx.de/wiki/U-Boot
endef endef
define Package/fit-check-sign/description define Package/fit-check-sign/description
@ -53,9 +53,8 @@ define Package/uboot-envtools
SECTION:=utils SECTION:=utils
CATEGORY:=Utilities CATEGORY:=Utilities
SUBMENU:=Boot Loaders SUBMENU:=Boot Loaders
PKG_FLAGS+=nonshared PKGFLAGS+=nonshared
TITLE:=read/modify U-Boot bootloader environment TITLE:=read/modify U-Boot bootloader environment
URL:=http://www.denx.de/wiki/U-Boot
endef endef
define Package/uboot-envtools/description define Package/uboot-envtools/description