1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

[bwn] Initial support for the v5 firmware

This is just to support the initial v5 firmware for one of the PHY-N
NICs I'm going to do some development.

It only pulls out the specific v5 mimo firmware for the BCM4312 NIC
I am playing with; I'm adding it so we at least have the framework
to pull things out of the v5 firmware.

The existing NICs still use v4 firmware and I don't plan on changing
that for some time as bwn(4) doesn't yet support the newer firmware API
and descriptor layouts.
This commit is contained in:
Adrian Chadd 2016-05-05 22:50:22 +00:00
parent ab46ff36a4
commit 70511cd4b1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=414669
3 changed files with 33 additions and 3 deletions

View File

@ -2,12 +2,12 @@
# $FreeBSD$
PORTNAME= bwn-firmware
PORTVERSION= 0.1.0
PORTVERSION= 0.1.1
CATEGORIES= net
MASTER_SITES= http://downloads.openwrt.org/sources/ \
http://mirror2.openwrt.org/sources/
PKGNAMESUFFIX= -kmod
DISTFILES= ${FWFILE} ${FWFILE_LP}
DISTFILES= ${FWFILE} ${FWFILE_LP} ${FWFILE_N}
EXTRACT_ONLY=
MAINTAINER= swhetzel@gmail.com
@ -33,17 +33,30 @@ FIRMWARES_LP= \
lp0bsinitvals14 lp0bsinitvals15 \
n0bsinitvals11
FIRMWARES_N= \
ucode16_mimo \
n0initvals16 n0initvals24 \
n0bsinitvals16 n0bsinitvals24 \
WRKSRC= ${WRKDIR}
FWNAME= bwn_v4
FWFILE= broadcom-wl-${FWVERSION}.tar.bz2
FWVERSION= 4.150.10.5
KMODNAME= ${FWNAME}_ucode
FWNAME_LP= bwn_v4_lp
FWFILE_LP= broadcom-wl-${FWVERSION_LP}.tar.bz2
FWVERSION_LP= 4.178.10.4
KMODNAME_LP= ${FWNAME_LP}_ucode
FWNAME_N= bwn_v4_n
FWFILE_N= broadcom-wl-${FWVERSION_N}.tar.bz2
FWVERSION_N= 5.100.138
KMODNAME_N= ${FWNAME_N}_ucode
PLIST_SUB= KMODNAME="${KMODNAME}" \
KMODNAME_LP="${KMODNAME_LP}"
KMODNAME_LP="${KMODNAME_LP}" \
KMODNAME_N="${KMODNAME_N}"
NO_PACKAGE= this is a modified version of a restricted firmware
@ -75,8 +88,22 @@ do-build:
@${ECHO_CMD} ".include <bsd.kmod.mk>" >> ${WRKSRC}/lp/v4/Makefile
@cd ${WRKSRC}/lp/v4; make all
cd ${WRKSRC} && \
tar xjf ${DISTDIR}/${FWFILE_N}
mkdir -p ${WRKSRC}/n
b43-fwcutter -w ${WRKSRC}/n \
${WRKSRC}/broadcom-wl-${FWVERSION_N}/linux/wl_apsta.o
${TOUCH} ${WRKSRC}/n/v4/ucode.fw
@${ECHO_CMD} "KMOD= ${KMODNAME_N}" > ${WRKSRC}/n/v4/Makefile
@${ECHO_CMD} "FIRMWS= ${FIRMWARES_N:C/.*/&.fw:${FWNAME}_&/}" >> \
${WRKSRC}/n/v4/Makefile
@${ECHO_CMD} ".include <bsd.kmod.mk>" >> ${WRKSRC}/n/v4/Makefile
@cd ${WRKSRC}/n/v4; make all
do-install:
@cd ${WRKSRC}/bg/v4; ${SETENV} ${MAKE_ENV} KMODDIR="${STAGEDIR}${KMODDIR}" make install
@cd ${WRKSRC}/lp/v4; ${SETENV} ${MAKE_ENV} KMODDIR="${STAGEDIR}${KMODDIR}" make install
@cd ${WRKSRC}/n/v4; ${SETENV} ${MAKE_ENV} KMODDIR="${STAGEDIR}${KMODDIR}" make install
.include <bsd.port.mk>

View File

@ -2,3 +2,5 @@ SHA256 (broadcom-wl-4.150.10.5.tar.bz2) = a9f4e276a4d8d3a1cd0f2eb87080ae89b77f0a
SIZE (broadcom-wl-4.150.10.5.tar.bz2) = 3888794
SHA256 (broadcom-wl-4.178.10.4.tar.bz2) = 32f6ad98facbb9045646fdc8b54bb03086d204153253f9c65d0234a5d90ae53f
SIZE (broadcom-wl-4.178.10.4.tar.bz2) = 5986780
SHA256 (broadcom-wl-5.100.138.tar.bz2) = f1e7067aac5b62b67b8b6e4c517990277804339ac16065eb13c731ff909ae46f
SIZE (broadcom-wl-5.100.138.tar.bz2) = 13514651

View File

@ -1,2 +1,3 @@
/%%KMODDIR%%/%%KMODNAME%%.ko
/%%KMODDIR%%/%%KMODNAME_LP%%.ko
/%%KMODDIR%%/%%KMODNAME_N%%.ko