-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (31 loc) · 1009 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FW_DIR := /lib/firmware/rtlbt
DRV_SRC_DIR := bluetooth_uart_driver
MDL_DIR := /lib/modules/$(shell uname -r)
DRV_DIR := $(MDL_DIR)/kernel/drivers/bluetooth
TOOL_SRC_DIR := rtk_hciattach
TOOL_DIR := /usr/sbin
FIRMWARE_DIR := 8723D
install:
mkdir -p $(FW_DIR)
make -C $(FIRMWARE_DIR)
echo "copy patch file success!"
- rmmod hci_uart
make -C $(DRV_SRC_DIR)
#mv -n $(DRV_DIR)/hci_uart.ko $(FW_DIR)/hci_uart.bk
cp -f $(DRV_SRC_DIR)/hci_uart.ko $(DRV_DIR)/hci_uart.ko
depmod -a $(MDL_DIR)
make -C $(DRV_SRC_DIR) clean
echo "make hci_uart_driver success!"
make -C $(TOOL_SRC_DIR)
cp -f $(TOOL_SRC_DIR)/rtk_hciattach $(TOOL_DIR)/rtk_hciattach
make -C $(TOOL_SRC_DIR) clean
echo "make rtk_hciattach success!"
uninstall:
mv -f $(FW_DIR)/hci_uart.bk $(DRV_DIR)/hci_uart.ko
depmod -a $(MDL_DIR)
- rm -f $(FW_DIR)/hci_uart.bk
rm -f $(FW_DIR)/rtlbt_fw
rm -f $(FW_DIR)/rtlbt_config
echo "uninstall hci_uart_driver success!"
rm -f $(TOOL_DIR)/rtk_hciattach
echo "uninstall rtk_hciattach success!"