Closed i-nod closed 1 year ago
I modified the Makefile to overwrite compressed modules as you requested. Thanks for the suggestion.
This looks close to correct but you need a bit more from your other project. As it is now, DRV_DIR isn't defined. You could replace it with MODDESTDIR. You can compare it to this makefile from your other project and see that it defines DRV_DIR to what this project defines as MODDESTDIR. https://github.com/lwfinger/realtek_bluetooth/blob/master/Makefile
--- a/rtw89-BT/Makefile
+++ b/rtw89-BT/Makefile
@@ -36,12 +36,12 @@
@mkdir -p $(MODDESTDIR)
@install -p -D -m 644 *.ko $(MODDESTDIR)
ifeq ($(COMPRESS_GZIP), y)
- @gzip -f $(DRV_DIR)/btusb.ko
- @gzip -f $(DRV_DIR)/btrtl.ko
+ @gzip -f $(MODDESTDIR)/btusb.ko
+ @gzip -f $(MODDESTDIR)/btrtl.ko
endif
ifeq ($(COMPRESS_XZ), y)
- @xz -f $(DRV_DIR)/btusb.ko
- @xz -f $(DRV_DIR)/btrtl.ko
+ @xz -f $(MODDESTDIR)/btusb.ko
+ @xz -f $(MODDESTDIR)/btrtl.ko
endif
@depmod -a $(KVER)
@ohquait This is how I fixed it locally. It worked after that.
@ohquait After looking closely you missed one part. The compression check diff --git a/Makefile b/Makefile index c810d28..310cdf3 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,10 @@ NO_SKIP_SIGN := y endif
-ifneq ("","$(wildcard $(DRV_DIR)/.ko.gz)") +ifneq ("","$(wildcard $(MODDESTDIR)/.ko.gz)") COMPRESS_GZIP := y endif -ifneq ("","$(wildcard $(DRV_DIR)/.ko.xz)") +ifneq ("","$(wildcard $(MODDESTDIR)/.ko.xz)") COMPRESS_XZ := y endif
@lwfinger Can you add the above patch? DRV_DIR is not defined and needs to be MODDESTDIR.
I made that change. Do a 'git pull'.
Looks good, thanks.
For awhile I thought the driver didn't work for my asus x670-p motherboard. It turned out the default fedora btusb and btrtl drivers were taking priority over the ones I built and installed using make install. the .ko files were installed along side but weren't used until I removed the default .ko.xz files for btusb and btrtl. Maybe the makefile can account for this and install .ko.xz files or maybe remove the default ones?