Android kernel for nougat - enable Android Accessory for android auto to work

154 Views Asked by At

Im trying to build a kernel with Android auto support. The kernel source is stock for oneplus 3 nougat 7.1.1 OOS version 4.5.0.

I need steps to add support for Android auto. I believe I should enable config_usb_f_acc=y.

I did that but I'm getting compile time errors:

drivers/usb/gadget/g_android.o:(___ksymtab_gpl+acc_ctrlrequest+0x0): multiple definition of `__ksymtab_acc_ctrlrequest'
drivers/usb/gadget/function/built-in.o:(___ksymtab_gpl+acc_ctrlrequest+0x0): first defined here
drivers/usb/gadget/g_android.o: In function `f_midi_disable':
/home/jesus/oneplus/android_kernel_oneplus_msm89963/./drivers/usb/gadget/function/f_midi.c:381: multiple definition of `__ksymtab_acc_disconnect'
drivers/usb/gadget/function/built-in.o:/home/jesus/oneplus/android_kernel_oneplus_msm89963/drivers/usb/gadget/function/f_accessory.c:436: first defined here
drivers/usb/gadget/g_android.o: In function `acc_ctrlrequest':
/home/jesus/oneplus/android_kernel_oneplus_msm89963/./drivers/usb/gadget/function/f_accessory.c:869: multiple definition of `acc_ctrlrequest'
drivers/usb/gadget/function/built-in.o:/home/jesus/oneplus/android_kernel_oneplus_msm89963/drivers/usb/gadget/function/f_accessory.c:869: first defined here
drivers/usb/gadget/g_android.o: In function `acc_ctrlrequest_configfs':
/home/jesus/oneplus/android_kernel_oneplus_msm89963/./drivers/usb/gadget/function/f_accessory.c:1417: multiple definition of `acc_ctrlrequest_configfs'
drivers/usb/gadget/function/built-in.o:/home/jesus/oneplus/android_kernel_oneplus_msm89963/drivers/usb/gadget/function/f_accessory.c:1417: first defined here
drivers/usb/gadget/g_android.o: In function `acc_disconnect':
/home/jesus/oneplus/android_kernel_oneplus_msm89963/./drivers/usb/gadget/function/f_accessory.c:1321: multiple definition of `acc_disconnect'
drivers/usb/gadget/function/built-in.o:/home/jesus/oneplus/android_kernel_oneplus_msm89963/drivers/usb/gadget/function/f_accessory.c:1321: first defined here
make[3]: *** [drivers/usb/gadget/built-in.o] Error 1

Any help regarding this?

The multiple function definition error I've checked and found that there was indeed no multiple definitions. To check that I duplicated the function acc_ctrlrequest and renamed it to acc_ctrlrequest1 and compiled. It's showing the same error for the newly created function. What's does this mean?

0

There are 0 best solutions below