linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.
@ 2021-03-03  6:09 Valdis Klētnieks
  2021-03-03  6:51 ` Heiner Kallweit
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2021-03-03  6:09 UTC (permalink / raw)
  To: Heiner Kallweit, David S. Miller; +Cc: netdev, linux-kernel

So my kernel build died..

  UPD     drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.S
make[4]: *** No rule to make target '/lib/firmware/rtl_nic/rtl8106e-1.fw', needed by 'drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.o'.  Stop.
make[3]: *** [scripts/Makefile.build:514: drivers/base/firmware_loader/builtin] Error 2

I tracked it down to a linux-firmware update that shipped everything with .xz compression:

% rpm2cpio linux-firmware-20201218-116.fc34.noarch.rpm | cpio -itv | grep 8106e-1
-rw-r--r--   1 root     root         1856 Dec 19 04:43 ./usr/lib/firmware/rtl_nic/rtl8106e-1.fw
631034 blocks
% rpm2cpio linux-firmware-20210208-117.fc34.noarch.rpm | cpio -itv|  grep 8106e-1
-rw-r--r--   1 root     root          848 Feb  8 16:38 ./usr/lib/firmware/rtl_nic/rtl8106e-1.fw.xz
340217 blocks

and my .config shows it's self-inflicted (no, I don't remember why it's in there):

# Firmware loader
CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

But then I take a closer look at  drivers/net/ethernet/realtek/r8169_main.c
#define FIRMWARE_8168D_1	"rtl_nic/rtl8168d-1.fw"
#define FIRMWARE_8168D_2	"rtl_nic/rtl8168d-2.fw"
#define FIRMWARE_8168E_1	"rtl_nic/rtl8168e-1.fw"

So now I'm mystified how this compressing all the firmware files is supposed to work...

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

* Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.
  2021-03-03  6:09 next-20210302 - build issue with linux-firmware and rtl_nic/ firmware Valdis Klētnieks
@ 2021-03-03  6:51 ` Heiner Kallweit
  2021-03-03  7:39   ` Valdis Klētnieks
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2021-03-03  6:51 UTC (permalink / raw)
  To: Valdis Klētnieks; +Cc: netdev, linux-kernel, David S. Miller

On 03.03.2021 07:09, Valdis Klētnieks wrote:
> So my kernel build died..
> 
>   UPD     drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.S
> make[4]: *** No rule to make target '/lib/firmware/rtl_nic/rtl8106e-1.fw', needed by 'drivers/base/firmware_loader/builtin/rtl_nic/rtl8106e-1.fw.gen.o'.  Stop.
> make[3]: *** [scripts/Makefile.build:514: drivers/base/firmware_loader/builtin] Error 2
> 
> I tracked it down to a linux-firmware update that shipped everything with .xz compression:
> 
> % rpm2cpio linux-firmware-20201218-116.fc34.noarch.rpm | cpio -itv | grep 8106e-1
> -rw-r--r--   1 root     root         1856 Dec 19 04:43 ./usr/lib/firmware/rtl_nic/rtl8106e-1.fw
> 631034 blocks
> % rpm2cpio linux-firmware-20210208-117.fc34.noarch.rpm | cpio -itv|  grep 8106e-1
> -rw-r--r--   1 root     root          848 Feb  8 16:38 ./usr/lib/firmware/rtl_nic/rtl8106e-1.fw.xz
> 340217 blocks
> 
> and my .config shows it's self-inflicted (no, I don't remember why it's in there):
> 
> # Firmware loader
> CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw"
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
> 
This is wrong, simply remove it.

> But then I take a closer look at  drivers/net/ethernet/realtek/r8169_main.c
> #define FIRMWARE_8168D_1	"rtl_nic/rtl8168d-1.fw"
> #define FIRMWARE_8168D_2	"rtl_nic/rtl8168d-2.fw"
> #define FIRMWARE_8168E_1	"rtl_nic/rtl8168e-1.fw"
> 
> So now I'm mystified how this compressing all the firmware files is supposed to work...
> 

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

* Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.
  2021-03-03  6:51 ` Heiner Kallweit
@ 2021-03-03  7:39   ` Valdis Klētnieks
  2021-03-03 10:26     ` Heiner Kallweit
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2021-03-03  7:39 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: netdev, linux-kernel, David S. Miller

On Wed, 03 Mar 2021 07:51:06 +0100, Heiner Kallweit said:
> > # Firmware loader
> > CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw"
> > CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
> > 
> This is wrong, simply remove it.

> > But then I take a closer look at  drivers/net/ethernet/realtek/r8169_main.c
> > #define FIRMWARE_8168D_1	"rtl_nic/rtl8168d-1.fw"
> > #define FIRMWARE_8168D_2	"rtl_nic/rtl8168d-2.fw"
> > #define FIRMWARE_8168E_1	"rtl_nic/rtl8168e-1.fw"

Yes, but then how are *these* filenames supposed to work? Is a userspace helper
supposed to be smart enough to append the .xz, and the EXTRA_FIRMWARE variant
for embedding out-of-tree firmware has to point at an uncompressed version? 


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

* Re: next-20210302 - build issue with linux-firmware and rtl_nic/ firmware.
  2021-03-03  7:39   ` Valdis Klētnieks
@ 2021-03-03 10:26     ` Heiner Kallweit
  0 siblings, 0 replies; 4+ messages in thread
From: Heiner Kallweit @ 2021-03-03 10:26 UTC (permalink / raw)
  To: Valdis Klētnieks; +Cc: netdev, linux-kernel, David S. Miller

On 03.03.2021 08:39, Valdis Klētnieks wrote:
> On Wed, 03 Mar 2021 07:51:06 +0100, Heiner Kallweit said:
>>> # Firmware loader
>>> CONFIG_EXTRA_FIRMWARE="rtl_nic/rtl8106e-1.fw"
>>> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
>>>
>> This is wrong, simply remove it.
> 
>>> But then I take a closer look at  drivers/net/ethernet/realtek/r8169_main.c
>>> #define FIRMWARE_8168D_1	"rtl_nic/rtl8168d-1.fw"
>>> #define FIRMWARE_8168D_2	"rtl_nic/rtl8168d-2.fw"
>>> #define FIRMWARE_8168E_1	"rtl_nic/rtl8168e-1.fw"
> 
> Yes, but then how are *these* filenames supposed to work? Is a userspace helper
> supposed to be smart enough to append the .xz, and the EXTRA_FIRMWARE variant
> for embedding out-of-tree firmware has to point at an uncompressed version? 
> 
There is no such thing as compressed firmware files, see here:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_nic

Your issue may be distro-specific, so you should check in a support forum of
your respective distro.

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

end of thread, other threads:[~2021-03-03 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03  6:09 next-20210302 - build issue with linux-firmware and rtl_nic/ firmware Valdis Klētnieks
2021-03-03  6:51 ` Heiner Kallweit
2021-03-03  7:39   ` Valdis Klētnieks
2021-03-03 10:26     ` Heiner Kallweit

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).