Kernel configuration

I need to compile the module “USB driver for GSM and CDMA modems” and integrate it to system.img
how to modify the kernel config & Android makefile and integrate this module to system.img.

When i compile manually, it’s throwing compilation error shown below,

elinux@android:~/projects/dragon410c/lollipop/APQ8016_410C_LA.BR.1.2.4-01810-8x16.0_5.1.1_Lollipop_P2/kernel$ make -j16 ARCH=arm CROSS_COMPILE=arm-linux-androideabi- modules

CC [M] drivers/usb/serial/usb_wwan.o
In file included from include/linux/kernel.h:14:0,
from drivers/usb/serial/usb_wwan.c:25:
drivers/usb/serial/usb_wwan.c: In function ‘usb_wwan_in_work’:
include/linux/dynamic_debug.h:64:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘ssize_t’ [-Wformat=]
error, forbidden warning: dynamic_debug.h:64
make[3]: *** [drivers/usb/serial/usb_wwan.o] Error 1
make[2]: *** [drivers/usb/serial] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

1 Like
  1. Have you looked into fixing the warning in the code? I think you should.

  2. I usually rebuild the kernel and images by using a script like this one below (instead of make ARCH…)


cd ./APQ8016_410C_LA.BR.1.2.4-01810-8x16.0_5.1.1_Lollipop_P2
source build/
lunch msm8916_64-userdebug

read -p "Clean [y/N]? : " clean
if [ "${clean}" = "y" ];then
        make -j8 clean

read -p "Build Everything? [y/N]: " foo
if [ "${foo}" = "y" ]; then
        make -j8
        read -p "press return to build the kernel  " foo
        make -j8 bootimage

I just used these commands to configure and compile kernel

/path/to/asop$source build/
/path/to/asop$lunch msm8916_64-userdebug
/path/to/asop$make -j32 kernelconfig // to enable modules
/path/to/asop$make -j32 bootimage
/path/to/asop$make -j32 systemimage

Check compile time of the img files and flash using fastboot