b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Trouble loading firmware (error -2)
@ 2015-10-02 17:23 Zlatko Calusic
  2015-10-03 11:43 ` Chris Bainbridge
  0 siblings, 1 reply; 3+ messages in thread
From: Zlatko Calusic @ 2015-10-02 17:23 UTC (permalink / raw)
  To: b43-dev

Hello,

please help with this issue, the error message is cryptic I don't know 
what error -2 means:

b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with 
error -2
b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with 
error -2
b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed 
with error -2
b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed 
with error -2
b43-phy0 ERROR: Firmware file "b43/ucode30_mimo.fw" not found
b43-phy0 ERROR: Firmware file "b43-open/ucode30_mimo.fw" not found
b43-phy0 ERROR: You must go to 
http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and 
download the correct firmware for this driver version. Please carefully 
read all instructions on this website.

Yet, ls -al /lib/firmware/b43/ucode30_mimo.fw:

-rw-r--r-- 1 root root 39632 Apr  6 18:09 /lib/firmware/b43/ucode30_mimo.fw

it's there, as put by b43-fwcutter package (Debian 1:019-2). Though I 
don't have b43-open directory, tried symlinking it, didn't help.

The kernel is virgin 4.2.0 Linus, custom compiled, relevant config 
entries below, am I missing something?

CONFIG_B43=y
CONFIG_B43_BCMA=y
# CONFIG_B43_BUSES_BCMA_AND_SSB is not set
CONFIG_B43_BUSES_BCMA=y
# CONFIG_B43_BUSES_SSB is not set
CONFIG_B43_BCMA_PIO=y
CONFIG_B43_PHY_N=y
# CONFIG_B43_PHY_HT is not set
# CONFIG_B43_DEBUG is not set
# CONFIG_B43LEGACY is not set
CONFIG_BCMA=y
CONFIG_BCMA_BLOCKIO=y
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
CONFIG_BCMA_HOST_PCI=y
# CONFIG_BCMA_HOST_SOC is not set
CONFIG_BCMA_DRIVER_PCI=y
# CONFIG_BCMA_DRIVER_GMAC_CMN is not set
# CONFIG_BCMA_DEBUG is not set

CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set

Thanks for any help and please Cc: (not subscribed).

-- 
Zlatko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Trouble loading firmware (error -2)
  2015-10-02 17:23 Trouble loading firmware (error -2) Zlatko Calusic
@ 2015-10-03 11:43 ` Chris Bainbridge
  2015-10-04 20:46   ` Zlatko Calusic
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Bainbridge @ 2015-10-03 11:43 UTC (permalink / raw)
  To: b43-dev

On 2 October 2015 at 18:23, Zlatko Calusic <zcalusic@bitsync.net> wrote:
> Hello,
>
> please help with this issue, the error message is cryptic I don't know what
> error -2 means:
>
> b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error
> -2
> b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error
> -2
> b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with
> error -2
> b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with
> error -2
> b43-phy0 ERROR: Firmware file "b43/ucode30_mimo.fw" not found
> b43-phy0 ERROR: Firmware file "b43-open/ucode30_mimo.fw" not found
> b43-phy0 ERROR: You must go to
> http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download
> the correct firmware for this driver version. Please carefully read all
> instructions on this website.
>
> Yet, ls -al /lib/firmware/b43/ucode30_mimo.fw:
>
> -rw-r--r-- 1 root root 39632 Apr  6 18:09 /lib/firmware/b43/ucode30_mimo.fw
>
> it's there, as put by b43-fwcutter package (Debian 1:019-2). Though I don't
> have b43-open directory, tried symlinking it, didn't help.
>
> The kernel is virgin 4.2.0 Linus, custom compiled, relevant config entries
> below, am I missing something?
>
> CONFIG_B43=y

Are you using an initrd? The b43 driver tries to load the firmware
when it is initialised. If b43 is builtin (not a module) then the load
will happen at boot time - when the initrd is mounted, but before the
real root - and the firmware won't be found. The solution is to either
copy the firmware to the initrd, or build b43 as a module and make
sure the module isn't on the initrd.

> CONFIG_FIRMWARE_IN_KERNEL=y

Trying to include the firmware blobs in to the kernel binary is
unlikely to work for b43, because b43/main.c only defines 7 firmware
files in MODULE_FIRMWARE(). There are ~117 firmware files in
/lib/firmware/b43 and your wifi card requires some subset of those,
probably not the 7 that are defined.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Trouble loading firmware (error -2)
  2015-10-03 11:43 ` Chris Bainbridge
@ 2015-10-04 20:46   ` Zlatko Calusic
  0 siblings, 0 replies; 3+ messages in thread
From: Zlatko Calusic @ 2015-10-04 20:46 UTC (permalink / raw)
  To: b43-dev

On 03.10.2015 13:43, Chris Bainbridge wrote:
> On 2 October 2015 at 18:23, Zlatko Calusic <zcalusic@bitsync.net> wrote:
>> Hello,
>>
>> please help with this issue, the error message is cryptic I don't know what
>> error -2 means:
>>
>> b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error
>> -2
>> b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error
>> -2
>> b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with
>> error -2
>> b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with
>> error -2
>> b43-phy0 ERROR: Firmware file "b43/ucode30_mimo.fw" not found
>> b43-phy0 ERROR: Firmware file "b43-open/ucode30_mimo.fw" not found
>> b43-phy0 ERROR: You must go to
>> http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download
>> the correct firmware for this driver version. Please carefully read all
>> instructions on this website.
>>
>> Yet, ls -al /lib/firmware/b43/ucode30_mimo.fw:
>>
>> -rw-r--r-- 1 root root 39632 Apr  6 18:09 /lib/firmware/b43/ucode30_mimo.fw
>>
>> it's there, as put by b43-fwcutter package (Debian 1:019-2). Though I don't
>> have b43-open directory, tried symlinking it, didn't help.
>>
>> The kernel is virgin 4.2.0 Linus, custom compiled, relevant config entries
>> below, am I missing something?
>>
>> CONFIG_B43=y
>
> Are you using an initrd? The b43 driver tries to load the firmware
> when it is initialised. If b43 is builtin (not a module) then the load
> will happen at boot time - when the initrd is mounted, but before the
> real root - and the firmware won't be found. The solution is to either
> copy the firmware to the initrd, or build b43 as a module and make
> sure the module isn't on the initrd.
>
>> CONFIG_FIRMWARE_IN_KERNEL=y
>
> Trying to include the firmware blobs in to the kernel binary is
> unlikely to work for b43, because b43/main.c only defines 7 firmware
> files in MODULE_FIRMWARE(). There are ~117 firmware files in
> /lib/firmware/b43 and your wifi card requires some subset of those,
> probably not the 7 that are defined.
>

Thank you very much Chris for this great reply. I would've spent lots of 
time trying to figure this out alone.

First I set CONFIG_FIRMWARE_IN_KERNEL=n as it obviously doesn't help my 
case. Still it didn't work because initramfs is not pulling the needed 
firmware. This I solved with a simple /etc/initramfs-tools/hooks/b43 hook:

#! /bin/sh -e
mkdir -p "${DESTDIR}/lib/firmware"
cp -a /lib/firmware/b43 "${DESTDIR}/lib/firmware"

And now all is well, firmware gets loaded, wifi works.

Best regards,

-- 
Zlatko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-04 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 17:23 Trouble loading firmware (error -2) Zlatko Calusic
2015-10-03 11:43 ` Chris Bainbridge
2015-10-04 20:46   ` Zlatko Calusic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).