PINE64
longsleep installed headers for dkms usage - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6)
+--- Thread: longsleep installed headers for dkms usage (/showthread.php?tid=1378)



longsleep installed headers for dkms usage - Faye - 06-14-2016

I tried to build the realtek bluetooth driver by checking out the github for my version and applying the config.gz before running make modules and it still thinks the version is different.  Can you supply a kernel headers tarball for use with dkms?

I have fixed up the Makefile (I think) and created a dkms.conf file to allow for automatic module compilation but it complains about symbol versions not being identical.

Code:
ubuntu@fjords:~$ cat /usr/src/rtk_btusb-v0.8/Makefile
FW_DIR    := /lib/firmware/rtk_bt
MDL_DIR    := /lib/modules/$(shell uname -r)
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

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 $(KVER)
    @echo "install rtk_btusb success!"

uninstall:
    rm -f $(DRV_DIR)/rtk_btusb.ko
    dumped -a $(KVER)
    rm -f $(FW_DIR)/rtk8723a.bin
    echo "uninstall rtk_btusb success!"
ubuntu@fjords:~$ cat /usr/src/rtk_btusb-v0.8/dkms.conf 
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"
Of course I might just be using the wrong driver for the Pine64, I was basing it off the wlan driver.


RE: longsleep installed headers for dkms usage - longsleep - 06-14-2016

Kernel headers are there - latest kernel tarbal in /usr/src


RE: longsleep installed headers for dkms usage - xalius - 06-15-2016

Quick question? Is that the right driver Faye is trying to build, it looks like the USB variant of the 8723 to me...


RE: longsleep installed headers for dkms usage - Faye - 06-15-2016

(06-15-2016, 02:28 PM)xalius Wrote: Quick question? Is that the right driver Faye is trying to build, it looks like the USB variant of the 8723 to me...

I can answer that really quickly, it isn't (or at least doesn't work for me)  I hoped that would be the quick one to test.
I've compiled the other tools now.  It didn't work on ttyS3, haven't had time to try with the other interfaces.


Faye


RE: longsleep installed headers for dkms usage - xalius - 06-15-2016

I played with https://github.com/lwfinger/rtl8723bs_bt earlier and got to talk to the BT part of the RTL, the tool seems to handshake and upload a binary to the module but I didnt get it to actually register as a BT adapter with Linux after that:

http://pastebin.com/Z3RUS9kc

The correct tty seems to be /dev/ttyS1 which corresponds to the schematic and the device tree definitions...