BCM4331 Native Driver for Linux

This is an update to the new Macbook post, in which I said I had to use Ndiswrapper to drive the BCM4331 wireless adapter. Now there is a native solution here. The steps are explained in detail. However I was not able to use patched compat-wireless-2011-08-27. In 2.6.39 (ck-patched) kernel, it refused to detect any wireless network; in 3.0 kernel, it simply wouldn't load. Modprobe complained about unknown symbols.

Today I tried an updated version of compat-wireless, which was labeled as 2011-09-27, and it worked in both kernels. Note that the patches mentioned in the link above are not needed anymore, and also that since kernel.org has been down forever, I downloaded the compat-wireless module from here. I made some PKGBUILDs for the firmware of BCM4331 and compat-wireless based on the PKGBUILD of compat-wireless-patched. Here they are~~

pkgname=b43-firmware
pkgver=5.100.138
pkgrel=1
pkgdesc='Firmware for BCM43xx wireless adapters'
url='http://wireless.kernel.org/'
arch=('x86_64')
license=('GPL')
depends=()
makedepends=("b43-fwcutter")
source=("http://www.lwfinger.com/b43-firmware/broadcom-wl-${pkgver}.tar.bz2")
sha1sums=('21691a8c99c66f58d18f863ee43593d1633b454c')

# install=install

build() {
  msg "Nothing to build..."
}

package() {
    mkdir -pv "${pkgdir}/lib/firmware"
    cd "${srcdir}"
    b43-fwcutter -w "${pkgdir}/lib/firmware" \
        broadcom-wl-5.100.138/linux/wl_apsta.o
}

Another one

pkgname=compat-wireless
pkgver=20110927
realver=2011-09-27
pkgrel=1
pkgdesc='Compat wireless driver, enabled for b43 support.'
url='http://wireless.kernel.org/'
arch=('x86_64')
license=('GPL')
depends=('linux' "b43-firmware")
makedepends=('linux-api-headers' 'linux-headers')
source=("compat-wireless-2.6.tar.bz2")
sha1sums=('e6b6fd94aa6e9442c1ff0daaf09e0690866ce787')

install=install

build() {
    cd "${srcdir}/${pkgname}-${realver}"
    scripts/driver-select b43
    if grep '# CONFIG_B43_PHY_HT=y' config.mk; then
      sed -i 's/# CONFIG_B43_PHY_HT=y/CONFIG_B43_PHY_HT=y/g' config.mk
    fi
    make
}

package() {
    cd "${srcdir}/${pkgname}-${realver}"
    make INSTALL_MOD_PATH="${pkgdir}" install-modules
    find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;

    install -d "${pkgdir}"/usr/sbin
    install scripts/{athenable,athload,b43enable,b43load,\
        iwl-enable,iwl-load,madwifi-unload} \
        "${pkgdir}"/usr/sbin/

    install -d "${pkgdir}"/usr/lib/compat-wireless
    install scripts/{check_depmod,modlib.sh} \
        "${pkgdir}"/usr/lib/compat-wireless/

    install -d "${pkgdir}"/lib/udev/rules.d
    install udev/50-compat_firmware.rules \
        "${pkgdir}"/lib/udev/rules.d/
    install udev/compat_firmware.sh \
        "${pkgdir}"/lib/udev/
}
comments powered by Disqus