-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure alma 9.4 #141
Comments
Hi @zenonp From the README: Note: Red Hat Enterprise Linux (RHEL) and distros based on RHEL are supported by Red Hat devs due to the way kernel patches are handled in Red Hat. I support knowledgable RHEL developers if they want to merge the required support and keep it current. I reserve the right to delete this support without notice if it causes any problems. Current RHEL maintainer: none |
Hi The problems start in osdep_service.c at this point: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) And we know that RH kernels include quite a lot of backports, so what RH calls "5.14.0" is likely a mishmash of 5.14 and various later kernels. I tried #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0)) and osdep_service.o was built successfully, only for the build to break a bit later at os_intfs.c:2142:9: error: too many arguments to function ‘netif_napi_add’ Now, I can keep testing until I weed out all the errors, but I'm not a developer and I don't know how to patch your code with the right "if rhel then this, else that"-conditionals. Would you be willing to do that part? Edit: On second thought it might be better to just fork to something that works on this specific kernel, rather than having a moving target for each and every RH kernel update. I'll start the weeding and then see where I get. |
I can offer suggestions if you want usb wireless.
https://github.com/morrownr/88x2bu-20210702
Think about it and let me know what option or options you want to explore. |
I've been a bit overwhelmed by other stuff, so it took time. But it's done. With the patch below the module compiles and works with a 2357:0120 TP-Link Archer T2U PLUS [RTL8821AU]. In fact I'm posting this through the T2U running on the modified 8821au-20210708 that I just compiled. So now we know what kernel version(s) a Redhat 5.14.0-427.20.1 really is. From there on, it would take someone with more knowledge of RH kernels and more dedication than myself, to create and maintain an el9-compatible version of the code.
I needed a driver for the T2U. I bought it by mistake, thinking that it had in-kernel support, and ended up here instead. It was only €15, I could have put it in the pile of "things that might be useful some other day", but making it work was not so far away and it was definitely more satisfactory. Edit 2024-08-23: I just found out that the patch below was incomplete. Now it is complete. ====
|
The problem with RH kernels is that "(LINUX_VERSION_CODE >= KERNEL_VERSION(x, y, z))" means absolutely nothing and can never be trusted. So it occurs to me that the way to get around this, is to test directly for what some particular kernel expects. Say, with the very first code change above, test whether adapter-> expects four of five arguments and then do accordingly. I don't know whether this could be done, yet less how, but it would be universal and cover any kernel of any distribution, patched or not. |
Hey, I deal with api changes regularly so I understand the challenges... but then Red Hat comes along and mucks things up. If I were to try to support RHEL, it would take many additional hours of my time and I already do not have enough time to do what I want to do. My suggestion is that we investigate what drivers for wifi chips are already being made available and look in that direction. Run the following commands and then copy and paste the results here: $ cd /usr/lib/modules/$(uname -r)/kernel/drivers/net/wireless/mediatek/mt76 |
There's a mix of files and directories there, so therefore
|
Yes, but there must be some way to easily figure out what a kernel expects. For example my last edit above, kthread_complete_and_exit or complete_and_exit, could be picked up directly from System.map without knowing the kernel version. And it should be possible to find whether int link_id should be used or not by looking in cfg80211.h. Things like that. The benefit of this method is not so much that it would support RH kernels (RH should do that themselves), but that it is version-independent and 100% fail-safe.
I understand that and I'm not asking you to do anything. I'm just putting forward ideas that could be picked up by you, by someone else, or even by myself, now or at some other point in time. BTW, looking at install_driver.sh I just realised that I don't need to learn C to do this; I can probably do it in bash with a few grep and sed commands from install_driver.sh itself. |
There is a driver for the mt7612u AC1200 chip.
There is a driver for the mt7610u AC600 chip.
That is the pcie driver for the mt7921au AXE3000 chip. There is also a usb version of the driver. It is not clear why it is not being compiled. So, you do have options. The Main Menu for this site is: https://github.com/morrownr/USB-WiFi Menu item 2 is the Plug and Play List. It has sections on the mt7612u and mt7610u based adapters. There is also the option to investigate an effort to upstream a new 8821/11au driver: The first message in that thread gives information on the project and points you to the repo where the code is being worked. It is a manual installation but that is just for testing. Once the driver is in the kernel, it will be plug and play. You may run into the same issues with this driver that you do with the driver in this repo that you are trying to compile. I can understand why Red Hat would have thought what they are doing to the kernel was a good idea at one time but it is no longer a good idea and just causes problems. |
Thank you for the suggestions, I appreciate your effort. On the downside, I am currently in Greece where none of these adapters seem to be on sale (or they're very hard to find because of a widespread indifference in this country towards giving exact technical specifications). I found them and I can get them from elsewhere in the EU, but then shipping gets pretty steep. On the upside, my Archer T2U now works just fine. So my focus has shifted from getting the adapter to work, to getting this driver to compile and work no matter what.
I can see their point in phasing in changes gradually and conservatively, but after all these years they should at least have figured an easy way, even a fully-fledged ABI, to tell the user what code he is running. |
kernel, kernel-devel and kernel-headers 5.14.0-427.20.1, dkms 3.0.13-1 gcc and kernel gcc matching 11.4.1 20231218. Build log attached.
make.log
screen.log
The text was updated successfully, but these errors were encountered: