Rtl8366 phy error during build, mt7915 error during build

I am kind of new to building openWRT firmware. I have been trying to get a good build for x86_64 with full DVB drivers support in order to use it with TVheadend, among other custom things. I am using a dell WYSE 5070 as the hardware with an asia rf 7915e wifi card and every build so far that i got to compile will not work with that wifi card yet which is why i tried getting the latest kernel version in my builds. I thought i had a good build just a couple weeks ago but i believe the pull i used to build from had just been moved to the APK package system and no packages were available for it so that build was dead in the water as soon as i flashed it to the emmc, although tvheadend and all of the dvb drivers were compiled into the kernel and tvheadend worked fine but luci was not compiled into it and couldnt be downloaded due to no apk packages being available and almost every subsequent build failed mostly due to apk versioning for various packages and it became a huge inconvenience to have to sort out one by one which packages would not build while doing a make clean between each attempt and wait hours just for it to fail with another package. So i saw on the forum someone said all package versioning had been fixed in the latest master pull so i pulled the latest master within the last 24 hours and am now attempting to build again. I have started out by choosing more packages and drivers that i will need to use immediately so this error i am about to post doesnt really affect me as i dont have the hardware to use the code at this time any may never have it in the future. The build seemed to fail while compiling the 8366 phy driver, the following the the error message....

drivers/net/phy/rtl8366_smi.c: In function 'rtl8366_debugfs_init':
drivers/net/phy/rtl8366_smi.c:944:14: error: void value not ignored as it ought to be
  944 |         node = debugfs_create_x16("reg", S_IRUGO | S_IWUSR, root,
      |              ^
drivers/net/phy/rtl8366_smi.c:968:14: error: void value not ignored as it ought to be
  968 |         node = debugfs_create_u8("vlan_4k_page", S_IRUGO | S_IWUSR, root,
      |              ^
make[10]: *** [scripts/Makefile.build:243: drivers/net/phy/rtl8366_smi.o] Error 1
make[9]: *** [scripts/Makefile.build:480: drivers/net/phy] Error 2
make[9]: *** Waiting for unfinished jobs....
make[8]: *** [scripts/Makefile.build:480: drivers/net] Error 2
make[8]: *** Waiting for unfinished jobs....
make[7]: *** [scripts/Makefile.build:480: drivers] Error 2
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [/home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/Makefile:1921: .] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[4]: *** [Makefile:25: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.modules] Error 2
make[3]: *** [Makefile:12: compile] Error 2
make[2]: *** [target/Makefile:32: target/linux/compile] Error 1
make[1]: *** [target/Makefile:25: /home/jason/Downloads/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make: *** [/home/jason/Downloads/openwrt/include/toplevel.mk:248: world] Error 2

well while i was typing the above post, the very next build attempt failed during compiling the mt7915 driver and i am pretty sure i absolutely need this code....

drivers/net/wireless/mediatek/mt76/mt7915/mmio.c: In function 'mt7915_mmio_wed_init_rx_buf':
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:628:38: error: initialization of 'struct mtk_rxbm_desc *' from incompatible pointer type 'struct mtk_wed_bm_desc *' [-Werror=incompatible-pointer-types]
  628 |         struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
      |                                      ^~~
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:657:21: error: invalid use of undefined type 'struct mtk_rxbm_desc'
  657 |                 desc->buf0 = cpu_to_le32(addr);
      |                     ^~
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:664:21: error: invalid use of undefined type 'struct mtk_rxbm_desc'
  664 |                 desc->token |= cpu_to_le32(FIELD_PREP(MT_DMA_CTL_TOKEN,
      |                     ^~
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c:666:21: error: increment of pointer to an incomplete type 'struct mtk_rxbm_desc'
  666 |                 desc++;
      |                     ^~
cc1: all warnings being treated as errors
make[13]: *** [scripts/Makefile.build:243: drivers/net/wireless/mediatek/mt76/mt7915/mmio.o] Error 1
make[12]: *** [scripts/Makefile.build:480: drivers/net/wireless/mediatek/mt76/mt7915] Error 2
make[12]: *** Waiting for unfinished jobs....
make[11]: *** [scripts/Makefile.build:480: drivers/net/wireless/mediatek/mt76] Error 2
make[10]: *** [scripts/Makefile.build:480: drivers/net/wireless/mediatek] Error 2
make[9]: *** [scripts/Makefile.build:480: drivers/net/wireless] Error 2
make[9]: *** Waiting for unfinished jobs....
make[8]: *** [scripts/Makefile.build:480: drivers/net] Error 2
make[8]: *** Waiting for unfinished jobs....
make[7]: *** [scripts/Makefile.build:480: drivers] Error 2
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [/home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/Makefile:1921: .] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[4]: *** [Makefile:25: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.modules] Error 2
make[3]: *** [Makefile:12: compile] Error 2
make[2]: *** [target/Makefile:32: target/linux/compile] Error 1
make[1]: *** [target/Makefile:25: /home/jason/Downloads/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make: *** [/home/jason/Downloads/openwrt/include/toplevel.mk:248: world] Error 2

hello, is there anybody out there?

for anyone who is internested.... i searched google and found an old patch described here https://patchwork.kernel.org/project/linux-mediatek/patch/.....

of the 5 or so areas patched, my current source tree matched everything except for the one line in drivers/net/wireless/mediatek/mt76/mt7915/mmio.c.

so in mmio.c i changed

struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;

to....

struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc;

i am still in the process of building the image but it obviously made it past the mt7915 driver.

not sure why that one file was using the old struct name as i did a make cleandist and re-cloned the master as described above on the date i described!

So you had older driver lurking in your tree after failed application upstream patch?
You know that you have to as a minimum mention source versions you are using?

thank you for replying brada4...

i am very new to attempting to compile openwrt from source so please bare with me. I did my best to clone the newest (1024) master branch as i read somewhere within the last week all modules were updated to compile with the APK changes. Perhaps you could direct me to the right file in the tree that verifies this.

During that last build, it seemed to make it past the mt7915 driver just fine but then it failed saying something about LZMAdec and LZMAenc did not have proper license information? a google search turned up nothing.... so i did a make clean, which deleted everything in the build_dir, and did another make -j5, it downloaded the source tree to build_dir and still the above mt7915 mmio.c problem was still there in the source tree so i modified it while the compiling was active, i fully expect it to also fail for the LZMA fault but we will see.

ERROR: modpost: missing MODULE_LICENSE() in lib/lzma/lzma_compress.o
ERROR: modpost: missing MODULE_LICENSE() in lib/lzma/lzma_decompress.o
ERROR: modpost: "LzmaEnc_WriteProperties" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaEnc_Destroy" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaEnc_MemEncode" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaEnc_SetProps" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaEncProps_Init" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaEnc_Create" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "LzmaDecode" [fs/jffs2/jffs2.ko] undefined!
ERROR: modpost: "ROOT_DEV" [drivers/mtd/mtd.ko] undefined!
ERROR: modpost: "register_mtd_blktrans_devs" [drivers/mtd/mtd.ko] undefined!
make[7]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1
make[6]: *** [/home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/Makefile:1873: modpost] Error 2
make[5]: *** [Makefile:234: __sub-make] Error 2
make[4]: *** [Makefile:25: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.63/.modules] Error 2
make[3]: *** [Makefile:12: compile] Error 2
make[2]: *** [target/Makefile:32: target/linux/compile] Error 1
make[1]: *** [target/Makefile:25: /home/jason/Downloads/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make: *** [/home/jason/Downloads/openwrt/include/toplevel.mk:248: world] Error 2

As far as the LZMA problems.....

while the image is still being built...... from within make kernel_menuconfig disabling FileSystems/MiscFS/JFFS2 and DeviceDrivers/MTDsupport... got around those faults. I do believe my wyse has an mtd device and i have been installing to it, but perhaps i dont really need those options, however, why can't it just compile the first time without issue?

vmlinux compiled fine this time....

but my build failed during what i believe to be during compiling rust as a module with reference to golang (the debug output is far tooo long to even post, let alone for me to give it enough time to figure out why), i had nothing enabled under go in make menuconfig.... i only have python, perl and rust enabled at the time.... i have since completely disabled everything pertaining to rust but kept python and perl. building again.

latest problem i cannot seem to overcome, kmod-br-netfilter fails to build stating:

"Package kmod-br-netfilter is missing dependencies for the following libraries:
bridge.ko"

when in fact bridge.ko is exactly where it should be in the build_dir. i do believe this one is kinda important for a wifi router.

so yesterday a battled some bluetooth dependency problems all day and finally gave up on bluetooth and removed all references to everything related to bluetooth in the kernel config.

when doing a make clean, followed by make every time i must manually edit the mmio.c file as described earlier after it downloads the source tree to build_dir and applies all patches while compiling is active and before it gets to the mt7915 driver otherwise it will fail as described (I'm guessing the server is missing a patch for the mmio.c file??), then it usually takes about 5 hours to get to the point i normally start seeing errors.

If i choose not to do a make clean after making minor changes to the kernel config then i must manually delete the following directories:

"openwrt/build_dir/target-x86_64_musl/kmod-32/ipkg-install/usr/bin"
"openwrt/build_dir/target-x86_64_musl/intel-microcode-3.20240531.1/intel-ucode-ipkg"

otherwise the compiling will fail saying directory or files already exist! not doing a make clean sometimes works and instead of waiting 5 hours to get back to the point of failure it only takes 20 mins or so, however sometimes it works and sometimes it doesn't recognize the changes made it just fails for the same reason, and sometimes doing a make clean and waiting 5 hours to get past that point works, sometimes it still fails for the same reasons.

after removing all bluetooth references my next failure has to do with kmod-usb-audio-6.6.63-r1.apk:

Package kmod-usb-audio is missing dependencies for the following libraries:
snd-ump.ko
make[3]: *** [modules/usb.mk:590: /home/jason/Downloads/openwrt/bin/targets/x86/64/packages/kmod-usb-audio-6.6.63-r1.apk] Error 1
make[2]: *** [package/Makefile:185: package/kernel/linux/compile] Error 1
make[2]: *** Waiting for unfinished jobs....

In my source tree the snd-ump.ko file does in fact exist in the proper drivers folder! i then used the following website to make a quick reference to what snd-ump.ko depends on...

https://www.kernelconfig.io/CONFIG_SND_UMP?q=snd-ump&kernelversion=6.6.63&arch=x86

That website claims it needs snd.ko and soundcore.ko. Both of these files were selected with a * in the kernel config and both of these files were located in the modules.builtin file. so i changed them from * to [m] in the kernel config then did a make without make clean after 20 minutes the build failed again for the same exact message as above and this time all three snd.ko, soundcore.ko and snd-ump.ko are all located in the proper drivers folder.

i will now change almost all sound related things to builtin then do another make clean, fix mmio.c and wait 5 hours to see what happens, hopefully that will work like it did for the bridge.ko issues i saw the other day.

Maybe I'm so new to this that i am doing something very basic incorrectly?? To me it seems like the kconfig files are not setup right and/or their are some problems in the gen-dependencies.sh file.

EDIT:
FYI for the dependency problems pertaining to bridge.ko... i believed that problem was solved by doing a wholesale change to almost all network related option from module [M] to built in [*]. i tried doing the same for bluetooth but obviously i didn't get all packages and just started disabling them all instead of building them in.

Package kmod-usb3 is missing dependencies for the following libraries:
xhci-pci-renesas.ko
make[3]: *** [modules/usb.mk:1812: /home/jason/Downloads/openwrt/bin/targets/x86/64/packages/kmod-usb3-6.6.63-r1.apk] Error 1
make[2]: *** [package/Makefile:185: package/kernel/linux/compile] Error 1
make[2]: *** Waiting for unfinished jobs....

well i guess heres the next one... its still not done "waiting on unfinished jobs"

i think this APK change was very very premature, im sorry guys

you know what the craziest part is???

i read in some other posts on this forum, from people within this project that actually have some power over the future of this project (supposedly official developers) asking everyone what new features they want to see in this project???

i just want to be able to compile what already exists and as a noobie if i make a mistake in the menuconfig it will help me correct my problems....

or maybe make sure old patches are active in the current source tree??

or maybe we fix different build issues like the two directories i must delete between makes if i choose not to do a make clean first??

anyhow i just wholesale enabled all usb options to be compiled directly into the kernel, hopefully that will get me beyond the build failures i just posted last time.

yet none of these so called developers want to comment on anything i say in my post here at all!?!?

honestly i'm not trying to be a mean and mad person, lets just have a discussion together and fix obvious problems in the cutting edge releases. please!

next one....

Package kmod-drm-i915 is missing dependencies for the following libraries:
cec.ko
make[3]: *** [modules/video.mk:504: /home/jason/Downloads/openwrt/bin/targets/x86/64/packages/kmod-drm-i915-6.6.63-r1.apk] Error 1
make[2]: *** [package/Makefile:185: package/kernel/linux/compile] Error 1
make[2]: *** Waiting for unfinished jobs....

it will probably be a couple days til i get back to this now.

string:18: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
/home/jason/Downloads/openwrt/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
make[3]: *** [Makefile:44: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/pypi/python-dateutil-2.9.0.post0/.built] Error 1
make[2]: *** [package/Makefile:185: package/feeds/packages/python-dateutil/compile] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/jason/Downloads/openwrt/staging_dir/hostpkg/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)

so after getting the python date util failure as stated above, i can no longer do a make with out a make clean otherwise i get this....

BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libavdevice.a(alldevices.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libavfilter.a(aeval.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libavformat.a(3dostr.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libavcodec.a(012v.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libswresample.a(audioconvert.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libswscale.a(alphablend.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-full/ffmpeg-6.1.2/ipkg-install/usr/lib/libavutil.a(adler32.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavdevice.a(alldevices.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavfilter.a(af_aformat.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavformat.a(aacdec.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavcodec.a(aac_ac3_parser.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libswresample.a(audioconvert.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavutil.a(adler32.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavdevice.a(alldevices.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavfilter.a(af_aformat.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavformat.a(aacdec.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavcodec.a(aac_ac3_parser.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libswresample.a(audioconvert.o): plugin needed to handle lto object
BFD: /home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-custom/ffmpeg-6.1.2/ipkg-install/usr/lib/libavutil.a(adler32.o): plugin needed to handle lto object
cp: cannot stat '/home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-audio-dec/ffmpeg-6.1.2/ipkg-install/usr/lib/libavfilter.so.': No such file or directory
cp: cannot stat '/home/jason/Downloads/openwrt/build_dir/target-x86_64_musl/ffmpeg-audio-dec/ffmpeg-6.1.2/ipkg-install/usr/lib/libswresample.so.
': No such file or directory
make[3]: *** [Makefile:779: /home/jason/Downloads/openwrt/bin/packages/x86_64/packages/libffmpeg-audio-dec-6.1.2-r1.apk] Error 1
make[2]: *** [package/Makefile:197: package/feeds/packages/ffmpeg/compile] Error 1
make[2]: *** Waiting for unfinished jobs....
data written to "hd.ids"
log written to "hd.log"
statistics:
1122 inconsistencies fixed
20 errors, 20 resolved
58304 items in
41734 items out

so i am not even sure what to do about the python date util problem other then just remove all references to python from the build config, i did my best at that but i am completely unable to remove a handful of pyhton related options. so i removed all python related options i could and will now do a make clean followed by another make.... the last make was almost 8 hours in when it failed with the python failure.