Compile only the btusb.ko with kernel source

Hi I was trying to compile the bluetooth kernel driver on the nano board from the kernel source code :https://developer.nvidia.com/embedded/dlc/kernel-sources-r2423
under kernel/drivers/bluetooth I run the following command:

# make -C /lib/modules/`uname -r`/build M=$PWD
make: Entering directory '/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9'
  CC [M]  /home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.o
/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c: In function ‘vhci_get_user’:
/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c:127:17: error: passing argument 1 of ‘hci_recv_frame’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  hci_recv_frame(skb);
                 ^~~
In file included from /home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c:40:0:
./include/net/bluetooth/hci_core.h:1030:5: note: expected ‘struct hci_dev *’ but argument is of type  struct sk_buff *’
 int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb);
     ^~~~~~~~~~~~~~
/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c:127:2: error: too few arguments to function ‘hci_recv_frame’
  hci_recv_frame(skb);
  ^~~~~~~~~~~~~~
In file included from /home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c:40:0:
./include/net/bluetooth/hci_core.h:1030:5: note: declared here
 int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb);
     ^~~~~~~~~~~~~~
/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c: In function ‘vhci_open’:
/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.c:245:17: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
  hdev->send     = vhci_send_frame;
                 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:341: recipe for target '/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.o' failed
make[1]: *** [/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth/hci_vhci.o] Error 1
Makefile:1629: recipe for target '_module_/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth' failed
make: *** [_module_/home/wenbin/Desktop/Ampak/bluetooth/kernel/drivers/bluetooth] Error 2
make: Leaving directory '/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9'

Is there any steps I missed ?

Hi,

Actually our official way to build kernel module is through the cross-compilation on host.
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fkernel_custom.html%23wwpID0E0PB0HA

Did you enable something new in the defconfig to build this driver?