bluetooth: convert to apex
* Use device as an identifier in package names so APEXs on rpi4/rpi5 trees can co-exist. Somehow apex definitions escape the soong namespace. It doesn't complain about duplicate package names but dependecies later in the build after analyzing Android.bp files and generating ninja file. FAILED: ninja: ... multiple rules generate com.android.hardware.bluetooth.rpi-deps-info [-w dupbuild=err] https://android.googlesource.com/platform/build/soong/+/refs/heads/main/README.md#namespaces * Not sure if this is an AOSP bug or intended behaviour for apex targets. Don't like using the rpi4/rpi5 tags but couldn't come up with better solution to limit the visibility that worked. * General cleanups. As APEX package contains all dependencies that are needed for the service, remove unused shared libraries. Run 'bpfmt -s -w Android.bp'.
This commit is contained in:
@@ -6,28 +6,51 @@
|
||||
cc_binary {
|
||||
name: "android.hardware.bluetooth-service.rpi",
|
||||
relative_install_path: "hw",
|
||||
init_rc: ["bluetooth-service-rpi.rc"],
|
||||
vintf_fragments: ["bluetooth-service-rpi.xml"],
|
||||
vendor: true,
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
],
|
||||
srcs: [
|
||||
"BluetoothHci.cpp",
|
||||
"main.cpp",
|
||||
"net_bluetooth_mgmt.cpp",
|
||||
"service.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"android.hardware.bluetooth-V1-ndk",
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"libhidlbase",
|
||||
"liblog",
|
||||
"libutils",
|
||||
],
|
||||
static_libs: [
|
||||
"android.hardware.bluetooth.async",
|
||||
"android.hardware.bluetooth.hci",
|
||||
],
|
||||
shared_libs: [
|
||||
"android.hardware.bluetooth-V1-ndk",
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"liblog",
|
||||
"libutils",
|
||||
],
|
||||
installable: false,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "android.hardware.bluetooth-service.rpi.rc",
|
||||
src: "android.hardware.bluetooth-service.rpi.rc",
|
||||
installable: false,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "android.hardware.bluetooth-service.rpi.xml",
|
||||
src: "android.hardware.bluetooth-service.rpi.xml",
|
||||
sub_dir: "vintf",
|
||||
installable: false,
|
||||
}
|
||||
|
||||
apex {
|
||||
name: "com.android.hardware.bluetooth.rpi4",
|
||||
manifest: "apex_manifest.json",
|
||||
file_contexts: "apex_file_contexts",
|
||||
key: "com.android.hardware.key",
|
||||
certificate: ":com.android.hardware.certificate",
|
||||
updatable: false,
|
||||
vendor: true,
|
||||
|
||||
binaries: ["android.hardware.bluetooth-service.rpi"],
|
||||
prebuilts: [
|
||||
"android.hardware.bluetooth-service.rpi.rc",
|
||||
"android.hardware.bluetooth-service.rpi.xml",
|
||||
],
|
||||
}
|
||||
|
Reference in New Issue
Block a user