Bug 276811 - sysutils/u-boot-master used BINARY_ALIAS with = could we change this to +=?
Summary: sysutils/u-boot-master used BINARY_ALIAS with = could we change this to +=?
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-uboot (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-03 19:32 UTC by crb
Modified: 2024-02-07 14:09 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description crb 2024-02-03 19:32:47 UTC
I have a port for u-boot that uses the u-boot-master framework however my port needs to call gdd instead of the system dd.  I want to use BINARY_ALIAS but the master port Makefile use = instead of += to set its own BINARY_ALIAS thus blowing away mine.  could we change this?

diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index 646876fdb261..d35cca756ecb 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -28,7 +28,7 @@ BUILD_DEPENDS+=       e2fsprogs-libuuid>=0:misc/e2fsprogs-libuuid \
                gnutls>=0:security/gnutls
 
 USES=          bison gmake python:build pkgconfig shebangfix tar:bz2
-BINARY_ALIAS=  bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
+BINARY_ALIAS+= bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
 
 SHEBANG_FILES= tools/binman/binman
 SSP_UNSAFE=    yes
Comment 1 crb 2024-02-04 03:58:59 UTC
It would also be nice if we could use ?= for assignment of UBOOT_PLIST_ZYNQ_7000 and 
UBOOT_MOVE_ZYNQ_7000 so that my port could override them. (I don't need uEnv.txt)

diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index 646876fdb261..120ad397aa57 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -28,7 +28,7 @@ BUILD_DEPENDS+=       e2fsprogs-libuuid>=0:misc/e2fsprogs-libuuid \
                gnutls>=0:security/gnutls
 
 USES=          bison gmake python:build pkgconfig shebangfix tar:bz2
-BINARY_ALIAS=  bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
+BINARY_ALIAS+= bison=${LOCALBASE}/bin/bison dtc=${LOCALBASE}/bin/dtc sed=gsed python3=${PYTHON_CMD}
 
 SHEBANG_FILES= tools/binman/binman
 SSP_UNSAFE=    yes
@@ -82,8 +82,8 @@ UBOOT_METADATA_ALLWINNER64_RAW_OFFSET=        1
 UBOOT_METADATA_ALLWINNER64_RAW_BS=     128k
 
 # Overrides for Zynq 7000 family
-UBOOT_PLIST_ZYNQ_7000=u-boot.img boot.bin uEnv.txt
-UBOOT_MOVE_ZYNQ_7000=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt
+UBOOT_PLIST_ZYNQ_7000?=u-boot.img boot.bin uEnv.txt
+UBOOT_MOVE_ZYNQ_7000?=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt
 
 # Overrides for RPI family
 UBOOT_PLIST_RPI=       u-boot.bin
Comment 2 Warner Losh freebsd_committer freebsd_triage 2024-02-06 19:26:44 UTC
You could add / override those items after the .include of the master makefile, no? Wouldn't that work?