Re: RTL8159 firmware
From: Birger Koblitz
Date: Wed Jul 01 2026 - 16:33:11 EST
On 01/07/2026 21:29, Andrew Lunn wrote:
On Wed, Jul 01, 2026 at 07:24:13PM +0200, Birger Koblitz wrote:
Hi Jan,
On 7/1/26 19:13, Jan Hendrik Farr wrote:
Hi Birger,The code to create the binary firmware file is at:
it looks like the firmware file rtl_nic/rtl8159-1.fw isn't in linux-firmware yet.
Could you send it for people to potentially test?
Jan
https://gitlab.com/koblitz-rtlnic/rtlnic_fw
But I cannot submit the firmware itself to linux-firmware, as the sourcecode from
which the binary data is extracted is published by Realtek under the GPL.
The obvious work around is to not convert it to binary.
8152.c has a clear GPL-2.0 header. So you can edit that file, extract
the two arrays, and it would still be GPL. You can make the firmware
loader in the driver parse the ASCII array as it is. It also looks
like you can .xz or .zst compress it, and the kernel
_request_firmware() will handle the decompression for you.
The binary firmware file that the driver currently expects has the same
structure that is used also for the other supported chips, e.g. the
RTL8156 which were provided by Realtek and are already in the
rtl_nic directory of the firmware. There is a bit more information
in those files such as a pointer to the right flash update registers
and also version information to not update newer chips.
Another solution would be to publish the binaries with linux-firmware
alongside the bit of source code that creates the binaries. Firmware
file and source-code would be licensed under the GPL.
I still hope for a reaction from Realtek, though.
Birger