Index: net/Makefile =================================================================== --- net/Makefile +++ net/Makefile @@ -1584,7 +1584,7 @@ SUBDIR += widentd SUBDIR += wifi-firmware-ath10k-kmod SUBDIR += wifi-firmware-ath11k-kmod - SUBDIR += wifi-firmware-base + SUBDIR += wifi-firmware-kmod SUBDIR += wifi-firmware-mt76-kmod SUBDIR += wifi-firmware-rtw88-kmod SUBDIR += wifi-firmware-rtw89-kmod Index: net/wifi-firmware-ath10k-kmod/Makefile =================================================================== --- net/wifi-firmware-ath10k-kmod/Makefile +++ net/wifi-firmware-ath10k-kmod/Makefile @@ -1,4 +1,4 @@ -BASEDIR= ${.CURDIR}/../wifi-firmware-base +BASEDIR= ${.CURDIR}/../wifi-firmware-kmod FWDRV= ath10k FWSUBDIR= ath10k @@ -85,4 +85,4 @@ ${DISTFILES_QCA9984_hw10_lic} \ ${DISTFILES_QCA99X0_hw20_lic} -.include "${BASEDIR}/Makefile" +.include "${BASEDIR}/Makefile.inc" Index: net/wifi-firmware-ath11k-kmod/Makefile =================================================================== --- net/wifi-firmware-ath11k-kmod/Makefile +++ net/wifi-firmware-ath11k-kmod/Makefile @@ -1,4 +1,4 @@ -BASEDIR= ${.CURDIR}/../wifi-firmware-base +BASEDIR= ${.CURDIR}/../wifi-firmware-kmod FWDRV= ath11k FWSUBDIR= ath11k @@ -102,4 +102,4 @@ # ${DISTFILES_WCN6855_hw20_lic} \ # ${DISTFILES_WCN6750_hw10_lic} -.include "${BASEDIR}/Makefile" +.include "${BASEDIR}/Makefile.inc" Index: net/wifi-firmware-base/Makefile =================================================================== --- /dev/null +++ net/wifi-firmware-base/Makefile @@ -1,83 +0,0 @@ -PORTNAME= wifi-firmware-${FWDRV}-kmod -PORTVERSION= ${FWDRV_VERSION} -CATEGORIES= net -MASTER_SITES= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ -MASTER_SITES+= LOCAL/bz:mkbuild - -MAINTAINER= bz@FreeBSD.org -COMMENT= Firmware modules for ${FWDRV} ${FLAVOR} WiFi NIC -WWW?= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/${FWSUBDIR} - -FWDRV_VERSION?= 0 -FWDRV?= base - -LICENSE_NAME?= firmware license (${FWDRV}) -LICENSE_FILE?= ${WRKSRC}/${LICENSE} -LICENSE_PERMS?= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept - -EXTRACT_SUFX= -DISTURL_SUFFIX= ?h=${PORTVERSION} - -# Sanity checks -.if !defined(FWDRV) || !defined(FWSUBDIR) || !defined(FWSUBS) || \ - !defined(FWDRV_VERSION) || !defined(LICENSE) || \ - !defined(DISTFILES_fw) || !defined(DISTFILES_lic) -IGNORE= is a metaport or misconfigured child port; there is nothing to build -.endif - -# Split things up in case we decide to make this flavors once we add support for more drivers. -DISTFILES= \ - ${DISTFILES_fw} \ - ${DISTFILES_lic} \ - ${LICENSE}${DISTURL_SUFFIX} \ - WHENCE${DISTURL_SUFFIX} \ - modules_${FWDRV}fw_${PORTVERSION}.tar.gz:mkbuild - -DIST_SUBDIR= linux-firmware/${FWDRV}fw -EXTRACT_ONLY= modules_${FWDRV}fw_${PORTVERSION}.tar.gz - -ONLY_FOR_ARCHS= aarch64 amd64 i386 -ONLY_FOR_ARCHS_REASON= LinuxKPI driver only available for these architectures - -USES= kmod uidfix - -post-extract: - @${MV} ${WRKDIR}/${FWDRV}fw ${WRKSRC} - @${CP} ${DISTDIR}/${DIST_SUBDIR}/${LICENSE}${DISTURL_SUFFIX} ${WRKSRC}/${LICENSE} - @${CP} ${DISTDIR}/${DIST_SUBDIR}/WHENCE${DISTURL_SUFFIX} ${WRKSRC}/WHENCE.in - @${AWK} -f ${WRKSRC}/WHENCE.awk ${WRKSRC}/WHENCE.in > ${WRKSRC}/WHENCE - @${MKDIR} ${WRKSRC}/fw -.for _f in ${DISTFILES_fw} - @${MKDIR} ${WRKSRC}/fw/${_f:H} - ${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@} -.endfor -.for _f in ${DISTFILES_lic} - ${CP} ${DISTDIR}/${DIST_SUBDIR}/${_f} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} -.endfor - -# Internal hack we should probably upstream. -# Add WHENCE file next to license where it makes sense despite not being a license. -_USES_stage+= 881:post-install-license -post-install-license: - ${INSTALL_DATA} ${WRKSRC}/WHENCE ${STAGEDIR}${_LICENSE_DIR}/ -.for _f in ${DISTFILES_lic} - ${INSTALL_DATA} ${WRKSRC}/fw/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} \ - ${STAGEDIR}${_LICENSE_DIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} -.endfor - -.include - -MAKE_ENV+= FWSRCDIR=${WRKSRC}/fw/${FWSUBDIR} -MAKE_FLAGS+= -C ${WRKSRC}/${FLAVOR} - -# Add firmware files. -.for _f in ${DISTFILES_fw} -PLIST_FILES+= ${KMODDIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,.,_,g:S,-,_,g:S,/,_,g}.ko -.endfor -# Record extra license files. -PLIST_FILES+= ${_LICENSE_DIR}/WHENCE -.for _f in ${DISTFILES_lic} -PLIST_FILES+= ${_LICENSE_DIR}/${_f:C@(^[^?]*)${DISTURL_SUFFIX:Q}@\1@:S,/,_,g} -.endfor - -.include Index: net/wifi-firmware-base/pkg-descr =================================================================== --- net/wifi-firmware-base/pkg-descr +++ /dev/null @@ -1 +0,0 @@ -WiFi firmware build master port. Index: net/wifi-firmware-kmod/Makefile =================================================================== --- /dev/null +++ net/wifi-firmware-kmod/Makefile @@ -0,0 +1,18 @@ +PORTNAME= wifi-firmware-kmod +PORTVERSION= 20230508 +CATEGORIES= net + +MAINTAINER= bz@FreeBSD.org +COMMENT= Firmware modules for WiFi NIC drivers +WWW= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/ + +USES= metaport + +RUN_DEPENDS= \ + wifi-firmware-ath10k-kmod>0:net/wifi-firmware-ath10k-kmod \ + wifi-firmware-ath11k-kmod>0:net/wifi-firmware-ath11k-kmod \ + wifi-firmware-mt76-kmod>0:net/wifi-firmware-mt76-kmod \ + wifi-firmware-rtw88-kmod>0:net/wifi-firmware-rtw88-kmod \ + wifi-firmware-rtw89-kmod>0:net/wifi-firmware-rtw89-kmod + +.include Index: net/wifi-firmware-kmod/pkg-descr =================================================================== --- /dev/null +++ net/wifi-firmware-kmod/pkg-descr @@ -0,0 +1 @@ +Meta port for the firmware modules for the WiFi NIC drivers. Index: net/wifi-firmware-mt76-kmod/Makefile =================================================================== --- net/wifi-firmware-mt76-kmod/Makefile +++ net/wifi-firmware-mt76-kmod/Makefile @@ -1,4 +1,4 @@ -BASEDIR= ${.CURDIR}/../wifi-firmware-base +BASEDIR= ${.CURDIR}/../wifi-firmware-kmod FWDRV= mt76 FWSUBDIR= mediatek @@ -28,4 +28,4 @@ ${DISTFILES_mt7921} DISTFILES_lic= -.include "${BASEDIR}/Makefile" +.include "${BASEDIR}/Makefile.inc" Index: net/wifi-firmware-rtw88-kmod/Makefile =================================================================== --- net/wifi-firmware-rtw88-kmod/Makefile +++ net/wifi-firmware-rtw88-kmod/Makefile @@ -1,4 +1,4 @@ -BASEDIR= ${.CURDIR}/../wifi-firmware-base +BASEDIR= ${.CURDIR}/../wifi-firmware-kmod FWDRV= rtw88 FWSUBDIR= rtw88 @@ -31,4 +31,4 @@ DISTFILES_lic= \ ${FWSUBDIR}/README${DISTURL_SUFFIX} -.include "${BASEDIR}/Makefile" +.include "${BASEDIR}/Makefile.inc" Index: net/wifi-firmware-rtw89-kmod/Makefile =================================================================== --- net/wifi-firmware-rtw89-kmod/Makefile +++ net/wifi-firmware-rtw89-kmod/Makefile @@ -1,4 +1,4 @@ -BASEDIR= ${.CURDIR}/../wifi-firmware-base +BASEDIR= ${.CURDIR}/../wifi-firmware-kmod FWDRV= rtw89 FWSUBDIR= rtw89 @@ -25,4 +25,4 @@ DISTFILES_lic= -.include "${BASEDIR}/Makefile" +.include "${BASEDIR}/Makefile.inc"