Subject: bug#23409: unable to load free firmware

From: Quilro Ordonez <[email-masked]>
Date: Tue, 03 May 2016 15:10:10 -0500

El 2016-05-03 03:01, [email-masked] escribió:
> Eric Bavier <[email-masked]> skribis:
> 
>> On Sun, 01 May 2016 15:19:34 +0200
>> [email-masked] (Ludovic Courtès) wrote:
>> 
>>> Quilro Ordonez <[email-masked]> skribis:
>>> 
>>> > I am trying to lo use Broadcom wireless device on GuixSD. It is
>>> > confirmed to work with free drivers and free firmware. It works
>>> > correctly in Trisquel too.
>>> >
>>> > dmesg gives the following messages. I have included only the relevant
>>> > parts:
>>> 
>>> [...]
>>> 
>>> > [   20.591158] b43-phy0 ERROR: Firmware file "b43-open/ucode5.fw" not
>>> > found
>>> > [   21.313688] b43-phy0 ERROR: /*(DEBLOBBED)*/
>>> 
>>> “DEBLOBBED” would suggest that Linux-libre’s deblobbing script viewed 
>>> it
>>> as an opaque binary blob and thus patched it, which may be an issue
>>> here, no?
>> 
>> Does deblobbing happen at runtime too?  I thought it was only during
>> build time.
> 
> Right, it’s at at build time, but the “deblobbing script” leaves those
> “DEBLOBBED” messages in places where it has removed firmware loading
> capabilities.
> 
> It may be worth checking with the Linux-libre team what happens in this
> particular case—i.e., whether this code is erroneously deblobbed, or
> something else.
> 
> Quilíro: firmware files are searched for in the directory specified in
> the /sys/module/firmware_class/parameters/path pseudo-file (see the 
> (gnu
> build activation) module.)
> 
> Could you try, as root, something like (use the right package and 
> module
> name below):
> 
>   echo -n $(guix build b43-firmware-whatever)/lib/firmware \
>      > /sys/module/firmware_class/parameters/path
>   insmod b43-module-whatever-its-called
>   dmesg | tail
> 
> … and report back?

These are the three options I tested:

echo -n $(guix build b43-firmware-whatever)/lib/firmware      > 
/sys/module/firmware_class/parameters/path
echo -n $(guix build b43-open)/lib/firmware      > 
/sys/module/firmware_class/parameters/path
echo -n $(guix build b43-tools)/lib/firmware      > 
/sys/module/firmware_class/parameters/path
echo -n $(guix build openfwwf)/lib/firmware      > 
/sys/module/firmware_class/parameters/path
echo -n $(guix build openfwwf-firmware)/lib/firmware      > 
/sys/module/firmware_class/parameters/path

The results for all those in the order of:

guix build: error: openfwwf-firmware: unknown package
bash: /sys/module/firmware_class/parameters/path: Permiso denegado

(This is the result of the last test.)

> Also, can you show the output of:
> 
>   find $(guix build b43-firmware-whatever)/lib/firmware
> 
> ?
> 
> It should contain “b43-open/ucode5.fw”.

quiliro@komputilo ~$ find $(guix build openfwwf-firmware)/lib/firmware
guix build: error: openfwwf-firmware: unknown package
find: ‘/lib/firmware’: No existe el fichero o el directorio

>>> I assume you used the firmware packages that Leo copied.  Could you 
>>> get
>>> its author to submit it?  :-)
>> 
>> That would be me :)
> 
> Ah ha!  I suspected it but wasn’t sure.  :-)
> 
>> But I don't have the hardware to test it out on, and qemu doesn't
>> offer emulation of the broadcomm cards.
> 
> Good point.  Let’s test it with Quilíro.
> 
> Thanks!
> 
> Ludo’.

This is my config.scm
http://termbin.com/4qpx

And this is the output of the update with that config:

quiliro@komputilo ~$ sudo guix system reconfigure raw.scm
Password:
substitute: updating list of substitutes from 
'https://mirror.hydra.gnu.org'... updating list of substitutes from 
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from 'https://hydra.gnu.org'... 
100.0%
The following derivation will be built:
    /gnu/store/2cj80qdh89vd5zjnwg3m6cx0bhf97lac-grub.cfg.drv
/gnu/store/xv88rlnb9q1gk9vp7z5ih2dwf6rjd0kd-system
/gnu/store/sb9g34hmckfnnjpr471llqmyg4hckflm-grub.cfg
/gnu/store/myrc5cinlhpj2yilhzv5y0szz2ax2i6z-grub-2.00
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/msm5mb78xdfc49jp1400jwz9wfnmydrs-etc...
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
usermod: sin cambios
making '/gnu/store/xv88rlnb9q1gk9vp7z5ih2dwf6rjd0kd-system' the current 
system...
Installation finished. No error reported.