Skip to content
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

DKMS compatibility #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@ DRV_DIR := $(MDL_DIR)/kernel/drivers/bluetooth
ifneq ($(KERNELRELEASE),)

obj-m := rtk_btusb.o
KVER := $(KERNELRELEASE)
KDIR := /lib/modules/$(KVER)/build

else
PWD := $(shell pwd)
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif

all:
$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
rm -rf *.o *.mod.c *.mod.o *.ko *.symvers *.order *.a
endif

install:
mkdir -p $(FW_DIR)
cp -f rlt8723a_chip_b_cut_bt40_fw_asic_rom_patch-svn8511-0x0020342E-20121105-LINUX_USB.bin $(FW_DIR)/rtk8723a.bin
cp -f rtl8723a_config.bin $(FW_DIR)/.
cp -f rtk_btusb.ko $(DRV_DIR)/rtk_btusb.ko
depmod -a $(MDL_DIR)
depmod -a $(KVER)
@echo "install rtk_btusb success!"

uninstall:
rm -f $(DRV_DIR)/rtk_btusb.ko
depmod -a $(MDL_DIR)
depmod -a $(KVER)
rm -f $(FW_DIR)/rtk8723a.bin
echo "uninstall rtk_btusb success!"
10 changes: 10 additions & 0 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MAKE="make all
INCLUDEDIR=/lib/modules/$kernelver/build/include"
MAKE_smp="make SMP=1 all
INCLUDEDIR=/lib/modules/$kernelver/build/include"
DEST_MODULE_LOCATION="/kernel/drivers/bluetooth/rtk_btusb"
PACKAGE_NAME="rtk_btusb"
PACKAGE_VERSION="v0.8"
REMAKE_INITRD="no"
MODULE_NAME="rtk_btusb.o"
CLEAN="make clean"