[libcamera-devel] AOSP integration help needed.
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Oct 28 02:42:58 CET 2020
Hi Roman,
On Tue, Oct 27, 2020 at 09:01:55PM +0200, Roman Stratiienko wrote:
> Hi,
>
> I want to use a libcamera as AOSP Camera HAL.
> Can anybody give some guidelines on how to do this?
> Are there any plans to include Android.{bp/mk} into the tree?
Android.mk is deprecated in Android, so the only viable option to
integrate with the Android build system is Android.bp. However, this
doesn't play well with meson, and doesn't offer an easy solution for the
header and source files that are generated as part of the build process
(and there will be more of them in the future). We have discussed these
issues with the Google Android developers responsible for the Soong
build system during the Linux Plumbers conference earlier this year, and
they have made it clear that they don't care about third-party packages
integration in AOSP, and that they have no plan to introduce any feature
in their build system that could make our life even a tiny bit easier.
This leaves us with two easy but unpractical options, and a hard one.
- Compile libcamera as a binary blob. This is the path that mesa3d is
taking for instance (they're also meson-based). It's clearly not
ideal.
- Generate the header and source files on a regular Linux system, and
manually write Android.bp files tailored to the particular Android
environment (for instance skipping parts of libcamera that can't be
supported on Android, such as udev-based device enumeration). This
requires a bit of manual work, I know it has been done and proven to
work, but it's not something we can merge in the libcamera tree. We
could possibly merge a script in utils/ to streamline this process and
generate the Android.bp files if someone wanted to develop that.
- Implement a meson frontend in Go to integrate with the Soong build
system, parsing the meson.build files to compile the project. This is
the hard option, it requires lots of work, but would lead to the
cleanest result. It's however not entirely clear if future changes in
the Android Soong build system could cause this to break, and Google
has rejected an offer from a meson developer to implement this for
them, saying they wouldn't use it.
I think you can tell I'm fairly frustrated by the Android build system
maintainers at Google, constantly rejecting all proposals and refusing
to consider third-party packages is quite rude and obnoxious.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list