mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
This commit adds a new apex override for the Thread HAL which uses a simulation RCP. This will be used by goldfish emulators. Note that this can't be defined in /device/generic/goldfish because of below error: ``` [100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/build.sdk_phone64_x86_64.ninja FAILED: out/soong/build.sdk_phone64_x86_64.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.sdk_phone64_x86_64.variables -o o ut/soong/build.sdk_phone64_x86_64.ninja --globListDir sdk_phone64_x86_64 --globFile out/soong/globs-sdk_phone64_x86_64.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.sdk_phone64_x86_64.bui ld Android.bp Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk' Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existing optional_uses_libs 'wear-sdk' error: hardware/interfaces/threadnetwork/aidl/default/Android.bp:103:1: "com.android.hardware.threadnetwork" depends on undefined module "goldfish-threadnetwork-service.rc". Module "com.android.hardware.threadnetwork" is defined in namespace "." which can read these 1 namespaces: ["."] Module "goldfish-threadnetwork-service.rc" can be found in these namespaces: ["device/generic/goldfish"] ``` Bug: 356079409 Test: verified that "adb shell cmd thread_network join" works Change-Id: I5356df53486fe9555ab34a0c8402e7be1b31309f
141 lines
3.2 KiB
Plaintext
141 lines
3.2 KiB
Plaintext
//
|
|
// Copyright (c) 2022 Google LLC.
|
|
// All rights reserved.
|
|
//
|
|
// This document is the property of Google LLC, Inc. It is
|
|
// considered proprietary and confidential information.
|
|
//
|
|
// This document may not be reproduced or transmitted in any form,
|
|
// in whole or in part, without the express written permission of
|
|
// Google LLC.
|
|
|
|
cc_binary {
|
|
name: "android.hardware.threadnetwork-service",
|
|
vendor: true,
|
|
relative_install_path: "hw",
|
|
|
|
shared_libs: [
|
|
"libbinder_ndk",
|
|
"liblog",
|
|
],
|
|
|
|
static_libs: [
|
|
"android.hardware.threadnetwork-V1-ndk",
|
|
"libbase",
|
|
"libcutils",
|
|
"libutils",
|
|
"openthread-common",
|
|
"openthread-hdlc",
|
|
"openthread-platform",
|
|
"openthread-posix",
|
|
"openthread-spi",
|
|
"openthread-url",
|
|
],
|
|
|
|
stl: "c++_static",
|
|
|
|
srcs: [
|
|
"main.cpp",
|
|
"service.cpp",
|
|
"socket_interface.cpp",
|
|
"thread_chip.cpp",
|
|
"utils.cpp",
|
|
],
|
|
}
|
|
|
|
cc_fuzz {
|
|
name: "android.hardware.threadnetwork-service.fuzzer",
|
|
|
|
defaults: ["service_fuzzer_defaults"],
|
|
shared_libs: [
|
|
"libbinder_ndk",
|
|
],
|
|
|
|
static_libs: [
|
|
"android.hardware.threadnetwork-V1-ndk",
|
|
"libbase",
|
|
"liblog",
|
|
"openthread-common",
|
|
"openthread-hdlc",
|
|
"openthread-platform",
|
|
"openthread-posix",
|
|
"openthread-spi",
|
|
"openthread-url",
|
|
],
|
|
|
|
srcs: [
|
|
"socket_interface.cpp",
|
|
"thread_chip.cpp",
|
|
"utils.cpp",
|
|
"fuzzer.cpp",
|
|
],
|
|
|
|
fuzz_config: {
|
|
cc: [
|
|
"zhanglongxia@google.com",
|
|
],
|
|
},
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "threadnetwork-default.xml",
|
|
src: "threadnetwork-default.xml",
|
|
sub_dir: "vintf",
|
|
installable: false,
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "threadnetwork-service.rc",
|
|
src: "threadnetwork-service.rc",
|
|
installable: false,
|
|
}
|
|
|
|
filegroup {
|
|
name: "com.android.hardware.threadnetwork_manifest",
|
|
srcs: ["manifest.json"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "com.android.hardware.threadnetwork_file_contexts",
|
|
srcs: ["file_contexts"],
|
|
}
|
|
|
|
apex {
|
|
name: "com.android.hardware.threadnetwork",
|
|
manifest: ":com.android.hardware.threadnetwork_manifest",
|
|
file_contexts: ":com.android.hardware.threadnetwork_file_contexts",
|
|
key: "com.android.hardware.key",
|
|
certificate: ":com.android.hardware.certificate",
|
|
updatable: false,
|
|
vendor: true,
|
|
|
|
binaries: [
|
|
"android.hardware.threadnetwork-service",
|
|
"ot-rcp",
|
|
],
|
|
|
|
prebuilts: [
|
|
"threadnetwork-default.xml", // vintf_fragment
|
|
"threadnetwork-service.rc", // init_rc
|
|
"android.hardware.thread_network.prebuilt.xml", // permission
|
|
],
|
|
}
|
|
|
|
prebuilt_etc {
|
|
name: "threadnetwork-service-simulation-rcp.rc",
|
|
src: "threadnetwork-service-simulation-rcp.rc",
|
|
installable: false,
|
|
}
|
|
|
|
// Thread HAL service which uses a simulation RCP (i.e. ot-rcp),
|
|
// typically used in emulator devices.
|
|
override_apex {
|
|
name: "com.android.hardware.threadnetwork-simulation-rcp",
|
|
base: "com.android.hardware.threadnetwork",
|
|
prebuilts: [
|
|
"threadnetwork-service-simulation-rcp.rc",
|
|
"threadnetwork-default.xml",
|
|
"android.hardware.thread_network.prebuilt.xml",
|
|
],
|
|
}
|