MC7430 and Android RIL Integration

Dear,

I have been trying to compile and integrating the RIL for Android Oreo, installed in a INFORCE 6640SBC board.

I was reading the RIL documentation, but some information are very confused.

First of all, I would like to know how to compile this RIL file on Ubuntu 18.04.
I am supposing that it is necessary to use the Android NDK r17(https://developer.android.com/ndk) for creating a toolchain and using it for compiling the RIL.

Creating the ./android-ndk-r17c/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir ./arm64

I used the compiler prefix arm64/bin/arm-linux-androideabi-

There is a Makefile in ‘/kernel/hikey-linaro/drivers/net/usb/’, but is a Makefile without target. So, when I run “make”, nothing happens.

Second, I would like to know how to integrate it. The RIL integration guide says “Copy to appropriate path” but do not say which are. I suppose is different for each plataform, but I am not sure.

Finally, after that, I would like to know the android commands for connecting my Android BSP to the Internet using the Sierra module (I already have the simcard).

Obs: when I type ‘dmesg | grep Sierra’ on adb shell, I could see that the board ‘knows’ that there is a sierra module connected at USB.

If somebody could help me, I will be very thankful. If anybody provide the step-by-step for creating the “.ko” files for android considering any platform, I suppose I can modify and using it for mine.

Thanks.

Update: I created the drivers GobiNet.ko, sierra_net.ko and sierra.ko.
For that, I compiled the kernel hikey_linaro and compiled the drivers using the abovementioned toolchain.

Unfortunatelly, when I try to install the drivers using insmod, I receive the following error message:

$ insmod sierra_net.ko
insmod: failed to load sierra_net.ko: Exec format error

I have a guess the problem is the kernel. I tried to compile it using the hikey_linaro kernel (version 3.18) and also the msm kernel (3.18). But it do not work.

Does anyone have any idea how to correctly compile and install the drivers?
Just for remember: the Android Oreo is installed in a INFORCE 6640SBC board with Qualcomm Snapdragon 820E processor.

Thanks.