23.05.4 compile +tvheadend +Hauppauge WinTV-dualHD drivers for Netgear D7800

Hi, I'm trying to compile Openwrt including drivers for usb dvb-t2 stick
https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-dualHD
If I understand correctly there are two versions of this stick which require different firmware:
dvb-demod-si2168-b40-01.fw for ID 2040:0265 (old one)
dvb-demod-si2168-d60-01.fw for ID 2040:8265 (new one)
So I included both in files/lib/firmware.

Compilation stops with error
*** No rule to make target '/lib/firmware/dvb-demod-si2168-d60-01.fw', needed by 'drivers/base/firmware_loader/builtin/dvb-demod-si2168-d60-01.fw.gen.o'. Stop.
This usually means wrong path or filename but I checked and re-checked and it seems correct.
So I tried removing dvb-demod-si2168-d60-01.fw firmware and its path and then it compiles correctly.
Restoring it I get error again

ionice -c 3 nice -n 20 make defconfig download clean world V=sc > d60.log

Truncated log:
https://paste.debian.net/hidden/45d541b1/

Complete log file

https://www.dropbox.com/scl/fi/kd316kdnak02wq7ru3908/d60.log?rlkey=lci1a4ro5r99mi3ruc1t2uw6r&st=5qfe0od4&dl=0

.config:
https://www.dropbox.com/scl/fi/b4jbf2c28m6soer9lmqgh/.config?rlkey=x3d34u2dssaz3abny5e3x04eh&st=xav1e4w1&dl=0

.config.target

https://www.dropbox.com/scl/fi/8kntg9oa6w3tpc3vbr7o4/config.target?rlkey=yuakbkrvn6rxodcni727dubdk&st=0scyo1l4&dl=0

Any idea? Thanks

Leave out the firmware for now, you can copy that over at runtime (those are just plain files, copied as-is, e.g. via scp -O) - try to get the rest (which is more important/ more difficult) working first.

this may help it's what i used a one point

Two side notes (likely unrelated to OpenWrt, but of a general nature):

  1. I figured out that you will also need the si2157 firmware (dvb-tuner-si2157-a30-01.fw) for the DualHD to work properly. It won't complain about a missing file, it simply won't work.
  2. I have a 2040:8265 model, but it loads the dvb-demod-si2168-b40-01.fw

My experience is from Armbian, haven't tried in OpenWrt yet.

Hi again and thanks for all replies.
I did some testing and finally managed to successfully compile.
Some notes for myself and anyone who would like to try this:

I included
dvb-demod-si2168-b40-01.fw
dvb-demod-si2168-d60-01.fw
dvb-tuner-si2157-a30-01.fw
for (2040:8265) WinTV-dualHD in lib/firmware folder but in
kernel_menuconfig -> generic driver options -> firmware loader
I only listed dvb-demod-si2168-b40-01.fw.
(Thanks @Shine)
I found out you can load any firmware file in /lib/firmware even if it won't be used, better than loading it at runtime.(And will it survive a reboot?) You made me think about it and gave me the idea @slh, thanks.

I included
dvb-demod-m88ds3103.fw
for (0572:6831) DVBSky S960 DVB-S2 tuner
and listed it in firmware loader

I included
dvb-usb-it9135-01.fw
dvb-usb-it9135-02.fw
dvb-usb-it9137-01.fw
for (048d:9006) IT9135 BDA Afatech DVB-T HDTV Dongle in lib/firmware
but in firmware loader I only listed
dvb-usb-it9135-02.fw

Since I made several copies of the compilation work folder for testing, I realized I had to manually correct the path written in
staging_dir/hostpkg/bin/2to3-3.11
because it won't change by itself, even after "make clean"

After installing the new firmware I had to change group for /etc/tvheadend folder and reboot or else it could not save settings after channel search:
#cd /etc
#chown -R :dvb tvheadend
#chmod -R g+w tvheadend
#reboot

Also, I could not find a simple way to reset tvheadend settings, I may save settings from openwrt menu and restore them afterwards, but this resets everything..
I saved /etc/tvheadend folder and I could copy it over but I didn't try yet.

Thanks @Lucky1, I'm sure your patch is useful but I'm not a coder and I didn't know where to start. Where to find instructions?

For anyone interested, this was done on linux Mint. Here are
.config
.config.target
opkg list-installed
openwrt-23.05.4-config

Also, this device Netgear D7800
still requires
uci set system.@system[0].compat_version=2.0
uci commit system

every time before sysupgrade or else it won't work.
I thought this was fixed but maybe I'm wrong.

I will survive a reboot, but not a sysupgrade (/etc/sysupgrade.conf would be possible, but careful in terms of size and to only defining firmware blobs there).

I just found out I cannot download my own file. Is there a forum rule about that or is it just me?