Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144655011
D53679.1776041972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D53679.1776041972.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
@@ -82,25 +82,25 @@
ONLY_FOR_ARCHS_REASON= LinuxKPI driver only available for these architectures
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
-
-BOOT_LOADERCONFD= /boot/loader.conf.d
.include <bsd.port.pre.mk>
-.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1402000)
# 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.
+# allows direct loading of firmware files.
+# We write a PLIST file so we can then simply use COPYTREE_SHARE with adjusted
+# permissions to copy the files over.
+.if (${OSVERSION} < 1402000) || (${OSVERSION} >= 1500000 && ${OSVERSION} < 1500014)
+# For 13.5, which is the last supported release before plain firmware loading is
+# implemented, we did ship firmware in src/ still so there is no need to build.
+# Also mtw (mt7601u) was never in a version earlier than this.
+# XXX remove comment after April 2026 when 13.5 goes out of support as well.
+IGNORE= Not supported for this osversion.
+.endif
+
+BOOT_LOADERCONFD= /boot/loader.conf.d
BOOTFWDIR?= /boot/firmware
_SHAREMODE= 0444
NO_BUILD= yes
-.else
-MAKE_ENV+= FWSRCDIR=${WRKSRC}/fw
-.endif
post-extract:
@${MKDIR} ${WRKSRC}/fw
@@ -126,55 +126,25 @@
@${ECHO_CMD} "${BOOT_LOADERCONFD}/iwlwifi-${FLAVOR}.conf" >> ${PLIST}
.endif
################################################################################
-.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1402000)
.for _f in ${DISTFILES_${FLAVOR}:O:u}
# 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}.tmp
.endfor
+ # Create PLIST for firmware files.
(cd ${WRKSRC}/fw/ && ${FIND} . -type d -mindepth 1 | \
${AWK} -vB="${BOOTFWDIR}/" '{ sub("^./", "@dir "B); print; }') >> ${PLIST}.tmp
# Remove possibly duplicate @dir entries
@${SORT} -u ${PLIST}.tmp >> ${PLIST}
-.else
################################################################################
-# Build kernel modules.
- # Prepare toplevel Makefile and Makefile.inc.
- @${ECHO_CMD} "SUBDIR=" > ${WRKSRC}/Makefile
- @${SED} -e "s@%%FWDRV%%@${FWDRV}@g" \
- -e "s@%%FWSUBDIR%%@${FWSUBDIR}@g" \
- ${FILESDIR}/Makefile.inc.in > ${WRKSRC}/Makefile.inc
-.for _f in ${DISTFILES_${FLAVOR}:O:u}
- # We remove '.' and '-' as well as '/' as they don't work well in loader.conf.
- @${MKDIR} ${WRKSRC}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}
- # Create subdir (firmware file) Makefile.
- @${ECHO_CMD} "FWNAME=${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:T}" > ${WRKSRC}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}/Makefile
-.if (${_f:H:C,^[^/]*,,1:C,^/,,} != "")
- @${ECHO_CMD} "FWSUBSUBDIR=${_f:H:C,^[^/]*,,1:C,^/,,}" >> ${WRKSRC}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}/Makefile
-.endif
- # XXX-BZ recover firmware versions later again from somewhere? Pain to keep track though, else use 0 or ${FWDRV_VERSION}?
- @${ECHO_CMD} "VERSION=0" >> ${WRKSRC}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}/Makefile
- @${ECHO_CMD} '.include <bsd.kmod.mk>' >> ${WRKSRC}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}/Makefile
- # Add subdir to top-level Makefile.
- @${ECHO_CMD} "SUBDIR+=${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}" >> ${WRKSRC}/Makefile
- # 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}/lic/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g}
.endfor
-.if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1402000)
do-install:
(cd ${WRKSRC}/fw/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${BOOTFWDIR})
-.endif
post-install:
.if defined(COMPAT_LINUXKPI_SKB_MEM_LIMIT) && ${COMPAT_LINUXKPI_SKB_MEM_LIMIT} > 0
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 13, 12:59 AM (1 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28334290
Default Alt Text
D53679.1776041972.diff (4 KB)
Attached To
Mode
D53679: net/wifi-firmware-kmod: remove obsolete kernel module build code
Attached
Detach File
Event Timeline
Log In to Comment