Merge "Add bootcontrol HAL APEX" into main am: aefc0473b8 am: d99cf00892 am: 8bb9aa13e8 am: 028ed0763c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2756126

Change-Id: I29b3419909002e1b7aea2bb05ed0ee8cf5f6985d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jooyung Han 2023-09-21 05:58:30 +00:00 committed by Automerger Merge Worker
commit 28a58017fd
7 changed files with 80 additions and 15 deletions

View file

@ -20,6 +20,7 @@ cc_library_shared {
srcs: ["BootControl.cpp"],
shared_libs: [
"libbase",
"liblog",
"libhidlbase",
"libhardware",

View file

@ -35,14 +35,13 @@ cc_defaults {
],
shared_libs: [
"android.hardware.boot@1.1",
"libbase",
"liblog",
],
static_libs: [
"libbootloader_message",
"libfstab",
],
}
cc_library_static {
@ -52,7 +51,13 @@ cc_library_static {
recovery_available: true,
vendor_available: true,
srcs: ["libboot_control.cpp"],
srcs: [
"libboot_control.cpp",
],
static_libs: [
"android.hardware.boot@1.1",
"libbase",
],
}
cc_library_shared {
@ -67,6 +72,8 @@ cc_library_shared {
"libboot_control",
],
shared_libs: [
"android.hardware.boot@1.1",
"libbase",
"libhardware",
],
}

View file

@ -20,6 +20,7 @@ cc_library_shared {
srcs: ["BootControl.cpp"],
shared_libs: [
"libbase",
"liblog",
"libhidlbase",
"libhardware",

View file

@ -27,7 +27,39 @@ cc_defaults {
name: "android.hardware.boot-service_common",
relative_install_path: "hw",
defaults: ["libboot_control_defaults"],
srcs: [
"main.cpp",
"BootControl.cpp",
],
}
cc_binary {
name: "android.hardware.boot-service.default",
defaults: ["android.hardware.boot-service_common"],
vendor: true,
stl: "c++_static",
shared_libs: [
"libbinder_ndk",
"liblog",
],
static_libs: [
"android.hardware.boot@1.1",
"android.hardware.boot-V1-ndk",
"libbase",
"libboot_control",
],
installable: false, // installed in APEX
}
cc_binary {
name: "android.hardware.boot-service.default_recovery",
defaults: ["android.hardware.boot-service_common"],
init_rc: ["android.hardware.boot-service.default_recovery.rc"],
vintf_fragments: ["android.hardware.boot-service.default.xml"],
recovery: true,
shared_libs: [
"libbase",
"libbinder_ndk",
@ -37,19 +69,35 @@ cc_defaults {
static_libs: [
"libboot_control",
],
srcs: ["main.cpp", "BootControl.cpp"],
}
cc_binary {
name: "android.hardware.boot-service.default",
defaults: ["android.hardware.boot-service_common"],
init_rc: ["android.hardware.boot-service.default.rc"],
prebuilt_etc {
name: "android.hardware.boot-service.default.rc",
src: "android.hardware.boot-service.default.rc",
installable: false,
}
prebuilt_etc {
name: "android.hardware.boot-service.default.xml",
src: "android.hardware.boot-service.default.xml",
sub_dir: "vintf",
installable: false,
}
apex {
name: "com.android.hardware.boot",
vendor: true,
}
manifest: "apex_manifest.json",
file_contexts: "apex_file_contexts",
key: "com.android.hardware.key",
certificate: ":com.android.hardware.certificate",
updatable: false,
cc_binary {
name: "android.hardware.boot-service.default_recovery",
defaults: ["android.hardware.boot-service_common"],
init_rc: ["android.hardware.boot-service.default_recovery.rc"],
recovery: true,
binaries: [
"android.hardware.boot-service.default",
],
prebuilts: [
"android.hardware.boot-service.default.rc",
"android.hardware.boot-service.default.xml",
],
}

View file

@ -1,4 +1,4 @@
service vendor.boot-default /vendor/bin/hw/android.hardware.boot-service.default
service vendor.boot-default /apex/com.android.hardware.boot/bin/hw/android.hardware.boot-service.default
class early_hal
user root
group root

View file

@ -0,0 +1,3 @@
(/.*)? u:object_r:vendor_file:s0
/etc(/.*)? u:object_r:vendor_configs_file:s0
/bin/hw/android\.hardware\.boot-service\.default u:object_r:hal_bootctl_default_exec:s0

View file

@ -0,0 +1,5 @@
{
"name": "com.android.hardware.boot",
"version": 1,
"vendorBootstrap": true
}