morrownr / 88x2bu

Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets
435 stars 73 forks source link

Added support for multiple kernel versions and Arch Linux as a tested distribution #27

Closed Rubo3 closed 3 years ago

Rubo3 commented 3 years ago

Hi! I've done some research and I found that in order to support different kernel versions on the same machine the option -v ${KERNEL_VERSION} has to be added to the dkms commands. When I switched to another kernel and ran install-driver.sh, dkms add exited with return code 3, for the module was already in its tree, but I thought that was not a problem, because even if it was already there, it would have to be built again anyway, against the current kernel headers, so I modified the script to continue the execution in that case. I've also added Arch Linux as a tested distribution, I've added the kernel versions I tested and the Arch website. Finally, I've added bash as the code language where it was needed, in order to enable the syntax highlighting. If you don't like it, you can remove it. I think the driver removal is up to you, if you like to remove it for all the kernels, you can keep using the option --all, otherwise the option -v ${KERNEL_VERSION} has to be added in remove-driver.sh, too. What do you think?

morrownr commented 3 years ago

This looks like good work. I need time to test before merging. Thanks.

morrownr commented 3 years ago

I am going to merge as I don't see any problems. I do see a lot of good ideas. Thanks.

morrownr commented 3 years ago

After merging I found some serious problems during testing. I reverted all changes related to dkms in the install and remove files. Can I get you to remove the driver and do a fresh installation using your proposed changes? That should make it obvious what the problem is. During installation, build can't find the source files because it is now looking at a location that is different than where the cp command copied them. Let me know what you think.