Broadcom wireless package installation

14 posts / 0 new
Last post
#1 Tue, 2014-10-14 11:30
DTM_NV
  • DTM_NV's picture
  • Offline
  • Last seen: 9 months 2 days ago
  • Joined: 2014-10-14

Hi Guys,

Been doing various thing with Alpine for about a year now and so far so good. I appreciate all the work the devs have put into it!

I recently became stuck when I ran up Alpine from USB on old Dell netbook and needed to get the Broadcom firmware/drivers working for the wireless adapter. I found the note at the bottom of the page which pointed me in the right direction: http://wiki.alpinelinux.org/wiki/Connecting_to_a_wireless_access_point

Working through the Wiki I installed the alpine-sdk, configured git and cloned aports, then compiled the b43 source into an apk package. All good.

My problem is that I now have a nice b43-firmware-4.150.10.5-r0.apk file and don't know how to install it! I have searched the forums and the Wiki with no luck. How do I tell apk to install from a local file?

Tue, 2014-10-14 14:36
ScrumpyJack
  • ScrumpyJack's picture
  • Offline
  • Last seen: 1 week 4 days ago
  • Joined: 2013-06-20

to add a package stored locally, just pass the path to apk add

apk add /home/dtm_nv/my_new_package.apk

Thu, 2014-10-16 13:26
DTM_NV
  • DTM_NV's picture
  • Offline
  • Last seen: 9 months 2 days ago
  • Joined: 2014-10-14

Thanks, I thought it would be something obvious like that. When I tried it however, I got:

alpine:~# apk add /home/dtm/packages/non-free/x86/b43-firmware-4.150.10.5-r0.apk
(1/1) Installing b43-firmware (4.150.10.5-r0)
ERROR: Failed to extract lib/firmware/b43/b0g0initvals5.fw: No such file or directory
ERROR: b43-firmware-4.150.10.5-r0: No such file or directory
1 errors; 147 MiB in 76 packages
alpine:~#

I have rebooted and run abuild again but still get the same result. Is this a problem with the apk file?

This is what the output of abuild -r looks like:

alpine:~/aports/non-free/b43-firmware$ abuild -r
>>> b43-firmware: Checking sanity of /home/dtm/aports/non-free/b43-firmware/APKBUILD...
>>> WARNING: b43-firmware: Missing package() function in APKBUILD
>>> b43-firmware: Analyzing dependencies...
>>> b43-firmware: Installing packages on builder: b43-fwcutter build-base
WARNING: Ignoring /home/dtm/packages//non-free/x86/APKINDEX.tar.gz: No such file or directory
(1/2) Installing b43-fwcutter (018-r1)
(2/2) Installing .makedepends-b43-firmware (0)
Executing busybox-1.22.1-r9.trigger
OK: 147 MiB in 78 packages
>>> b43-firmware: Cleaning temporary build dirs...
>>> b43-firmware: Fetching <a href="http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
" rel="nofollow">http://mirror2.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2
</a>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3797k  100 3797k    0     0   238k      0  0:00:15  0:00:15 --:--:--  471k
>>> b43-firmware: Checking md5sums...
broadcom-wl-4.150.10.5.tar.bz2: OK
>>> b43-firmware: Unpacking /var/cache/distfiles/broadcom-wl-4.150.10.5.tar.bz2...
>>> WARNING: b43-firmware: No package() function in APKBUILD
>>> b43-firmware: Entering fakeroot...
This file is recognised as:
  filename   :  wl_apsta_mimo.o
  version    :  410.2160
  MD5        :  cb8d70972b885b1f8883b943c0261a3c
Extracting b43/pcm5.fw
Extracting b43/ucode15.fw
Extracting b43/ucode14.fw
Extracting b43/ucode13.fw
Extracting b43/ucode11.fw
Extracting b43/ucode9.fw
Extracting b43/ucode5.fw
Extracting b43/lp0bsinitvals15.fw
Extracting b43/lp0initvals15.fw
Extracting b43/lp0bsinitvals14.fw
Extracting b43/lp0initvals14.fw
Extracting b43/a0g1bsinitvals13.fw
Extracting b43/a0g1initvals13.fw
Extracting b43/b0g0bsinitvals13.fw
Extracting b43/b0g0initvals13.fw
Extracting b43/lp0bsinitvals13.fw
Extracting b43/lp0initvals13.fw
Extracting b43/n0absinitvals11.fw
Extracting b43/n0bsinitvals11.fw
Extracting b43/n0initvals11.fw
Extracting b43/a0g1bsinitvals9.fw
Extracting b43/a0g0bsinitvals9.fw
Extracting b43/a0g1initvals9.fw
Extracting b43/a0g0initvals9.fw
Extracting b43/b0g0bsinitvals9.fw
Extracting b43/b0g0initvals9.fw
Extracting b43/a0g1bsinitvals5.fw
Extracting b43/a0g0bsinitvals5.fw
Extracting b43/a0g1initvals5.fw
Extracting b43/a0g0initvals5.fw
Extracting b43/b0g0bsinitvals5.fw
Extracting b43/b0g0initvals5.fw
>>> b43-firmware*: Running postcheck for b43-firmware
>>> b43-firmware*: Preparing package b43-firmware...
>>> b43-firmware*: Tracing dependencies...
>>> b43-firmware*: Package size: 284.0 KB
>>> b43-firmware*: Compressing data...
>>> b43-firmware*: Create checksum...
>>> b43-firmware*: Create b43-firmware-4.150.10.5-r0.apk
>>> b43-firmware: Cleaning up srcdir
>>> b43-firmware: Cleaning up pkgdir
>>> b43-firmware: Uninstalling dependencies...
>>> b43-firmware: Updating the cached abuild repository index...
>>> b43-firmware: Signing the index...
alpine:~/aports/non-free/b43-firmware$

Wed, 2014-10-15 11:16
ScrumpyJack
  • ScrumpyJack's picture
  • Offline
  • Last seen: 1 week 4 days ago
  • Joined: 2013-06-20

This worries me
"WARNING: b43-firmware: Missing package() function in APKBUILD"

Can you post the APKBUILD file here?

Thu, 2014-10-16 13:27
DTM_NV
  • DTM_NV's picture
  • Offline
  • Last seen: 9 months 2 days ago
  • Joined: 2014-10-14

It's this one, I just git cloned it as per usual: http://git.alpinelinux.org/cgit/aports/tree/non-free/b43-firmware/APKBUILD

alpine:/home/dtm/aports# cat non-free/b43-firmware/APKBUILD
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=b43-firmware
pkgver=4.150.10.5
pkgrel=0
pkgdesc="Firmware for b43 driver"
url="http://linuxwireless.org/en/users/Drivers/b43#firmware_installation"
license="propietary"
depends=""
makedepends="b43-fwcutter"
install=
subpackages=
arch="noarch"
source="http://mirror2.openwrt.org/sources/broadcom-wl-$pkgver.tar.bz2"
 
build() {
        install -d "$pkgdir"/lib/firmware
        b43-fwcutter -w "$pkgdir"/lib/firmware \
                "$srcdir"/broadcom-wl-$pkgver/driver/wl_apsta_mimo.o
}
 
md5sums="0c6ba9687114c6b598e8019e262d9a60  broadcom-wl-4.150.10.5.tar.bz2"
alpine:/home/dtm/aports#

Thu, 2014-10-16 09:48
ScrumpyJack
  • ScrumpyJack's picture
  • Offline
  • Last seen: 1 week 4 days ago
  • Joined: 2013-06-20

worked for me

alpine-dev-edge:~/b43-firmware$ abuild -r
>>> b43-firmware: Checking sanity of /home/scrumpyjack/b43-firmware/APKBUILD...
>>> WARNING: b43-firmware: Missing package() function in APKBUILD
>>> b43-firmware: Analyzing dependencies...
>>> b43-firmware: Installing packages on builder: b43-fwcutter build-base
(1/2) Installing b43-fwcutter (018-r1)
(2/2) Installing .makedepends-b43-firmware (0)
Executing busybox-1.22.1-r13.trigger
OK: 222 MiB in 83 packages
>>> b43-firmware: Cleaning temporary build dirs...
>>> b43-firmware: Checking md5sums...
broadcom-wl-4.150.10.5.tar.bz2: OK
>>> b43-firmware: Unpacking /var/cache/distfiles/broadcom-wl-4.150.10.5.tar.bz2...
>>> WARNING: b43-firmware: No package() function in APKBUILD
>>> b43-firmware: Entering fakeroot...
This file is recognised as:
  filename   :  wl_apsta_mimo.o
  version    :  410.2160
  MD5        :  cb8d70972b885b1f8883b943c0261a3c
Extracting b43/pcm5.fw
Extracting b43/ucode15.fw
Extracting b43/ucode14.fw
Extracting b43/ucode13.fw
Extracting b43/ucode11.fw
Extracting b43/ucode9.fw
Extracting b43/ucode5.fw
Extracting b43/lp0bsinitvals15.fw
Extracting b43/lp0initvals15.fw
Extracting b43/lp0bsinitvals14.fw
Extracting b43/lp0initvals14.fw
Extracting b43/a0g1bsinitvals13.fw
Extracting b43/a0g1initvals13.fw
Extracting b43/b0g0bsinitvals13.fw
Extracting b43/b0g0initvals13.fw
Extracting b43/lp0bsinitvals13.fw
Extracting b43/lp0initvals13.fw
Extracting b43/n0absinitvals11.fw
Extracting b43/n0bsinitvals11.fw
Extracting b43/n0initvals11.fw
Extracting b43/a0g1bsinitvals9.fw
Extracting b43/a0g0bsinitvals9.fw
Extracting b43/a0g1initvals9.fw
Extracting b43/a0g0initvals9.fw
Extracting b43/b0g0bsinitvals9.fw
Extracting b43/b0g0initvals9.fw
Extracting b43/a0g1bsinitvals5.fw
Extracting b43/a0g0bsinitvals5.fw
Extracting b43/a0g1initvals5.fw
Extracting b43/a0g0initvals5.fw
Extracting b43/b0g0bsinitvals5.fw
Extracting b43/b0g0initvals5.fw
>>> b43-firmware*: Running postcheck for b43-firmware
>>> b43-firmware*: Preparing package b43-firmware...
>>> b43-firmware*: Tracing dependencies...
>>> b43-firmware*: Package size: 300.0 KB
>>> b43-firmware*: Compressing data...
>>> b43-firmware*: Create checksum...
>>> b43-firmware*: Create b43-firmware-4.150.10.5-r0.apk
>>> b43-firmware: Cleaning up srcdir
>>> b43-firmware: Cleaning up pkgdir
>>> b43-firmware: Uninstalling dependencies...
>>> b43-firmware: Updating the cached abuild repository index...
>>> b43-firmware: Signing the index...
 
alpine-dev-edge:~/b43-firmware$ sudo apk add ../packages/scrumpyjack/x86_64/b43-firmware-4.150.10.5-r0.apk 
(1/1) Installing b43-firmware (4.150.10.5-r0)
OK: 222 MiB in 82 packages
alpine-dev-edge:~/b43-firmware$ apk info -a b43-firmware
b43-firmware-4.150.10.5-r0 description:
Firmware for b43 driver
 
b43-firmware-4.150.10.5-r0 webpage:
http://linuxwireless.org/en/users/Drivers/b43#firmware_installation
 
b43-firmware-4.150.10.5-r0 installed size:
307200
 
b43-firmware-4.150.10.5-r0 depends on:
 
b43-firmware-4.150.10.5-r0 provides:
 
b43-firmware-4.150.10.5-r0 is required by:
 
b43-firmware-4.150.10.5-r0 contains:
lib/firmware/b43/a0g0bsinitvals9.fw
lib/firmware/b43/b0g0bsinitvals13.fw
lib/firmware/b43/n0bsinitvals11.fw
lib/firmware/b43/pcm5.fw
lib/firmware/b43/a0g1initvals5.fw
lib/firmware/b43/ucode13.fw
lib/firmware/b43/lp0initvals13.fw
lib/firmware/b43/b0g0bsinitvals9.fw
lib/firmware/b43/a0g1bsinitvals13.fw
lib/firmware/b43/a0g1initvals9.fw
lib/firmware/b43/b0g0initvals5.fw
lib/firmware/b43/lp0bsinitvals14.fw
lib/firmware/b43/ucode15.fw
lib/firmware/b43/lp0initvals14.fw
lib/firmware/b43/b0g0bsinitvals5.fw
lib/firmware/b43/a0g1initvals13.fw
lib/firmware/b43/ucode14.fw
lib/firmware/b43/ucode11.fw
lib/firmware/b43/b0g0initvals9.fw
lib/firmware/b43/lp0bsinitvals13.fw
lib/firmware/b43/a0g1bsinitvals5.fw
lib/firmware/b43/lp0initvals15.fw
lib/firmware/b43/lp0bsinitvals15.fw
lib/firmware/b43/a0g1bsinitvals9.fw
lib/firmware/b43/a0g0initvals9.fw
lib/firmware/b43/n0initvals11.fw
lib/firmware/b43/b0g0initvals13.fw
lib/firmware/b43/n0absinitvals11.fw
lib/firmware/b43/a0g0bsinitvals5.fw
lib/firmware/b43/a0g0initvals5.fw
lib/firmware/b43/ucode9.fw
lib/firmware/b43/ucode5.fw
 
b43-firmware-4.150.10.5-r0 triggers:
 
b43-firmware-4.150.10.5-r0 has auto-install rule:
 
b43-firmware-4.150.10.5-r0 affects auto-installation of:
 
b43-firmware-4.150.10.5-r0 replaces:

try mine

http://st.ilet.to/b43-firmware-4.150.10.5-r0.apk

Thu, 2014-10-16 10:13
DTM_NV
  • DTM_NV's picture
  • Offline
  • Last seen: 9 months 2 days ago
  • Joined: 2014-10-14

Thanks for that, I pulled it down and tried it but I'm getting a similar error message!

alpine:/home/dtm/packages/non-free/x86# apk add --allow-untrusted b43-firmware-4.150.10.5-r0.apk
(1/1) Installing b43-firmware (4.150.10.5-r0)
ERROR: Failed to extract lib/firmware/b43/a0g0bsinitvals9.fw: No such file or directory
ERROR: b43-firmware-4.150.10.5-r0: No such file or directory
1 errors; 147 MiB in 76 packages

Interestingly though, the packages are different sizes...

alpine:~/packages/non-free/x86$ ls -l
total 156
-rw-r--r--    1 dtm      dtm            794 Oct 14 17:29 APKINDEX.tar.gz
-rw-r--r--    1 dtm      dtm          88207 Oct 16 19:03 b43-firmware-4.150.10.5-r0.apk
-rw-r--r--    1 dtm      dtm          64989 Oct 14 17:29 b43-firmware-4.150.10.5-r0_old.apk

I'm running the i686 build of Alpine 3.0.5 on USB. Is something up with my system?

Fri, 2014-11-28 23:07 (Reply to #7)
ibidem
  • ibidem's picture
  • Offline
  • Last seen: 2 years 6 months ago
  • Joined: 2014-01-03

I'd be wondering if /lib/firmware is readonly; check the output of mount

Sun, 2015-01-18 22:46 (Reply to #8)
rak136
  • rak136's picture
  • Offline
  • Last seen: 2 years 3 months ago
  • Joined: 2015-01-18

I tried running it ram only. /.mod_loop/firmware is read only in this setup. I'm guessing that his setup is also not sys. I attempted to use lbu and configured it to back up the firmware directory. I then modified the back up and repackaged it in the hopes it would override the firmware directory on boot up. It failed to do so and it actually took a lot longer to boot up. My usb stick timed out repeatedly. The computer I have does not boot correctly on usb devices so I'm stuck with the cdrom. Any suggestions on what to do next? I looked at the iso and tried to see if there would be an easy way to patch the firmware in. There is a list of apk's, but I am not sure if it loads all of them or if it uses the index or one of the configuration files to load them.

Tue, 2016-10-11 00:41
tniswong
  • tniswong's picture
  • Offline
  • Last seen: 7 months 2 weeks ago
  • Joined: 2016-10-11

Hi guys, I have this same problem.

I'm attempting to run Alpine Linux 3.4.4 on a Raspberry Pi 3.

I can manually compile the b43-firmware as instructed, and successfully generate the .apk file. Then, when attempting to Install the apk, I get errors related to writing to the lib/firmware directories as above.

ERROR: Failed to create lib/firmware/b43/........: No such file or directory

I'm sure this is related to /lib/firmware being part of the Read-only filesystem, and this is a run-from-ram install.

Any tips on how to get past this? Really need wifi, and dont want to have to get a redundant adapter....

Sun, 2016-11-13 19:02
Linux_newbie
  • Linux_newbie's picture
  • Offline
  • Last seen: 6 months 2 weeks ago
  • Joined: 2016-11-13

@DTM_NV: apk add b43-firmware-4.150.10.5-r0.apk

I installed alpine linux to harddisk and then try to setup broadcom wireless.
I got the same error when I build the b43 firmware: WARNING: Ignoring ... packages/non-free/x86_64/APKINDEX.tar.gz: No such file or directory.
I do get a b43-firmware-4.150.10.5-r0.apk file even though I get that warning.
I installed it with sudo apk add apk file name.

wireless still doesn't work. when I type "sudo ip link set wlan0 up", it gives "ip: ioctl 0x8914 failed: No error information"

After that I chmod the /lib/firmware to drwxrwxrwx. And I still get that warning, and wireless still doesn't work. same error.

The info on the wiki is kind of vague. I tried to follow it.
https://wiki.alpinelinux.org/wiki/Connecting_to_a_wireless_access_point

" Note: BROADCOM WIFI CHIPSET USERS will need to compile the firmware manually for their chipset. First, apk add alpine-sdk, then git clone aports from git.alpinelinux.org, switch to the aports/non-free/b43-firmware folder, then run abuild -r. Install the generated apk file. Run fwcutter, and you should be good to go."

What to do with fwcutter?? It took me a while to find "apk add b43-fwcutter" (need to connect to the internet through ethernet to do this.) gives a command called "b43-fwcutter" is that the fwcutter it talks about??

(hopefully someone figures this out a couple months later...)

Sat, 2016-12-24 16:32
sammarko
  • sammarko's picture
  • Offline
  • Last seen: 5 months 2 days ago
  • Joined: 2016-12-24

Hi all,
I am facing the same problem with Raspberry Pi. As everyone else, the compilation of the package runs OK despite the following warning
>>> WARNING: b43-firmware: No package() function in APKBUILD

Installing the generated APK is not successful, and gives the following errors:

(1/1) Installing b43-firmware (4.150.10.5-r0)
ERROR: Failed to create lib/firmware/b43/pcm5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode15.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode14.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode11.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/ucode5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0bsinitvals15.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0initvals15.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0bsinitvals14.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0initvals14.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1bsinitvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1initvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0bsinitvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0initvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0bsinitvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/lp0initvals13.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/n0absinitvals11.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/n0bsinitvals11.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/n0initvals11.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1bsinitvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g0bsinitvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1initvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g0initvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0bsinitvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0initvals9.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1bsinitvals5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g0bsinitvals5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g1initvals5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/a0g0initvals5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0bsinitvals5.fw: No such file or directory
ERROR: Failed to create lib/firmware/b43/b0g0initvals5.fw: No such file or directory
1 errors; 233 MiB in 84 packages

I think the wiki https://wiki.alpinelinux.org/wiki/Connecting_to_a_wireless_access_point does not provide enough information for compiling broadcom chipset and installing it successfully
Any thoughts or clues ?
Thanks!

Tue, 2016-12-27 06:04
sammarko
  • sammarko's picture
  • Offline
  • Last seen: 5 months 2 days ago
  • Joined: 2016-12-24

hi All,
just an update - in the Raspberry Pi I discovered that the correct kernel driver is already there !!.. the usb dongle should automatically be detected in dmesg
if you have a Broadcom Wireless adapter, you do not need to compile anything, just follow the wiki to activate.

Wed, 2017-02-01 08:44
tejpochiraju
  • tejpochiraju's picture
  • Offline
  • Last seen: 3 months 3 weeks ago
  • Joined: 2017-02-01

This might help others struggling with Alpine + built-in RPi 3 WiFi (no wlan0 device) because the official image is missing the required broadcom modules.
NB - Alpine for Raspberry Pi runs in diskless mode so root (/) is mounted in tmpfs. Changes are saved with {lbu include /path/; lbu commit} : https://wiki.alpinelinux.org/wiki/Installation
Steps:

1. Official image is missing wifi drivers for RPi3 - get drivers using following links - 1. https://wiki.alpinelinux.org/wiki/Connecting_to_a_wireless_access_point (refers to building this with {abuild -r}: http://git.alpinelinux.org/cgit/aports/tree/non-free/b43-firmware/APKBUILD also referenced in post 5 above) and 2. https://wiki.alpinelinux.org/wiki/Raspberry_Pi_3_-_Configuring_it_as_wireless_access_point_-AP_Mode
2. Once APK is built using link 1 above, extract using tar xzf (will create /lib/firmware/b43, you will need this and the downloaded brcmfmac43430-sdio* files (link 2) in step 4
3. Modules are loaded from /lib/firmware/ which is loop-back mounted from a read-only squashfs filesystem in /media/mmcblk0p1/boot/modloop-rpi2 - this needs to be modified and saved for modules to be accessible on next boot: http://stackoverflow.com/questions/10704353/how-do-i-write-to-make-changes-to-an-existing-squashfs-filesystem
4. Add the /lib/firmware/b43/ folder to /lib/firmware/ in the unsquashed folder (squashfs/modules/firmware...) and the downloaded brcmfmac43430-sdio* files to /lib/firmware/brcm/
5. Squash again in a separate location (with the same modloop-rpi2 name) and overwrite the /media/mmcblk0p1/boot/modloop-rpi2 file - if you try to squash over the existing file it appends a modules_1 folder instead of adding files to modules
6. Reboot and your wifi modules should be loaded automatically

Log in or register to post comments