Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146001307
D47068.1779092084.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D47068.1779092084.diff
View Options
diff --git a/net/wifi-firmware-kmod/Makefile.inc b/net/wifi-firmware-kmod/Makefile.inc
--- a/net/wifi-firmware-kmod/Makefile.inc
+++ b/net/wifi-firmware-kmod/Makefile.inc
@@ -55,10 +55,7 @@
.endfor
.endif
-# Add firmware files to plist.
-.for _f in ${DISTFILES_${FLAVOR}}
-PLIST_FILES+= ${KMODDIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}.ko
-.endfor
+PLIST= ${WRKDIR}/PLIST
# Split things into the full package (driver name) and more specific flavors.
FLAVORS= ${FWDRV} \
@@ -82,9 +79,27 @@
ONLY_FOR_ARCHS= aarch64 amd64 i386
ONLY_FOR_ARCHS_REASON= LinuxKPI driver only available for these architectures
-USES= kmod uidfix
-
+USES= uidfix
+# We do not need that anymore for the modern build but making it conditional on
+# OSVERSION seems to not add the _USES_install bits from kmod.mk.
+USES+= kmod
+
+.include <bsd.port.pre.mk>
+
+.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1401504)
+# src.git main 479905a1ed26c54ef29cdff65cf25f7feade654b (stable/14 2ca7b03d6275)
+# allows direct loading of firmware files. For anything before that we still need
+# to create kernel modules. We need to write a PLIST file so we can then simply use
+# COPYTREE_SHARE with adjusted permissions to copy the files over.
+BOOTFWDIR?= /boot/firmware
+_SHAREMODE= 0444
+NO_BUILD= yes
+.else
MAKE_ENV+= FWSRCDIR=${WRKSRC}/fw
+# Build failures on 14.1/poudriere:
+# ld: error: unknown argument '-fstack-protector-strong'
+SSP_UNSAFE= yes
+.endif
post-extract:
@${MKDIR} ${WRKSRC}/fw
@@ -93,6 +108,17 @@
@${CP} ${DISTDIR}/${DIST_SUBDIR}/WHENCE${DISTURL_SUFFIX} ${WRKSRC}/WHENCE.in
@${SED} -e "s@%%XXX%%@${WHENCE_REGEX:Q}@g" ${FILESDIR}/WHENCE.awk.in > ${WRKSRC}/WHENCE.awk
@${AWK} -f ${WRKSRC}/WHENCE.awk ${WRKSRC}/WHENCE.in > ${WRKSRC}/WHENCE
+################################################################################
+.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1401504)
+.for _f in ${DISTFILES_${FLAVOR}}
+ # Create firmware source directory and copy in distfile.
+ @${MKDIR} ${WRKSRC}/fw/${_f:H}
+ ${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@}
+ @${ECHO_CMD} ${BOOTFWDIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@} >> ${PLIST}
+.endfor
+.else
+################################################################################
+# Build kernel modules.
# Prepare toplevel Makefile and Makefile.inc.
@${ECHO_CMD} "SUBDIR=" > ${WRKSRC}/Makefile
@${SED} -e "s@%%FWDRV%%@${FWDRV}@g" \
@@ -114,11 +140,19 @@
# Create firmware source directory and copy in distfile.
@${MKDIR} ${WRKSRC}/fw/${_f:H}
${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@}
+ @${ECHO_CMD} ${KMODDIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}.ko >> ${PLIST}
.endfor
@${ECHO_CMD} '.include <bsd.subdir.mk>' >> ${WRKSRC}/Makefile
+################################################################################
+.endif
# Copy in additional licenses files.
.for _f in ${DISTFILES_${FLAVOR}_lic}
${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g}
.endfor
-.include <bsd.port.mk>
+.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1401504)
+do-install:
+ (cd ${WRKSRC}/fw/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${BOOTFWDIR})
+.endif
+
+.include <bsd.port.post.mk>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 8:14 AM (9 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28714783
Default Alt Text
D47068.1779092084.diff (3 KB)
Attached To
Mode
D47068: net/wifi-firmware-kmod: stop building kmods on main
Attached
Detach File
Event Timeline
Log In to Comment