How to add and build libmbim-1.18.0 in Hikey960 android AOSP source?


#1

I have a Hikey960 embedded board.

I would like to using MBIM(mbimcli) I/F on Hikey960 board for data connection with Modem module.
I need to add and build “mbimcli” execution program for control MBIM I/F.

libmbim-1.18.0 is released as below link.

For build libmbim-1.18.0.tar.xz in AOSP android-9.0.0 source,
it provides “Makefile.am” and “Makefile.in” audomake script.

But Android AOSP Hikey960(android-9.0.0) is using Android.bp for soong build.

<Question?>
How to add and build “libmbim-1.18.0.tar.xz” in android AOSP android-9.0.0 source?
I would like to use the mbimcli command in the adb shell on Hikey960 device.

Please, help and share a way to build Makefile.am on AOSP android-9.0.0 source.

Thank you.


#2

You really have two options;

  1. Write an android makefile for it,
  2. Cross compile it statically and copy in the compiled binaries.

Both may not be trivial.