summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2024-04-17 14:15:49 +0900
committerJiyong Park <jiyong@google.com>2024-04-17 14:36:55 +0900
commit12c64a758663cfecce7f71fcad960d94b4e04e58 (patch)
treecd425b597d62a89e852a425bb653c5229ddb62b7
parent6d6ff398b337561eb44b944f5b5c08ff388517af (diff)
downloadcore-12c64a758663cfecce7f71fcad960d94b4e04e58.tar.gz
Don't install Android-only dependencies to microdroid
init_second_stage_defaults provides properties that are common to both Android's init and Microdroid's init. Before this CL, it included target.product.required and target.recovery.required properties. The required dependencies were Android-specific; the dependencies included Android-only init.rc. Microdroid has its own init.rc (microdroid_init_rc module). This was problematic but so far it didn't cause an issue because those Android-only dependencies were not installed to Microdroid due to a bug in the build system. As we fix the build system bug, the Android-only dependencies started get installed to Microdroid, effectively overriding the Microdroid-only init.rc file. This made Microdroid fail to boot. Fixing this issue by moving the Android-only dependencies out of the defaults module and putting them on the Android's init. In addition to that, this CL removes the recovery variant for the Microdroid's init because it's not used. Bug: N/A Test: run AVF tests Change-Id: I09748f1123125cac74ce54fd5c360c9a3ba2f996
-rw-r--r--init/Android.bp16
1 files changed, 9 insertions, 7 deletions
diff --git a/init/Android.bp b/init/Android.bp
index ff82f7f18..6d63e41e2 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -259,6 +259,7 @@ cc_library_static {
"avf_build_flags_cc",
"libinit_defaults",
],
+ recovery_available: false,
cflags: ["-DMICRODROID=1"],
}
@@ -276,6 +277,13 @@ cc_defaults {
defaults: ["init_defaults"],
srcs: ["main.cpp"],
symlinks: ["ueventd"],
+}
+
+cc_binary {
+ name: "init_second_stage",
+ defaults: ["init_second_stage_defaults"],
+ static_libs: ["libinit"],
+ visibility: ["//visibility:any_system_partition"],
target: {
platform: {
required: [
@@ -310,18 +318,12 @@ cc_defaults {
}
cc_binary {
- name: "init_second_stage",
- defaults: ["init_second_stage_defaults"],
- static_libs: ["libinit"],
- visibility: ["//visibility:any_system_partition"],
-}
-
-cc_binary {
name: "init_second_stage.microdroid",
defaults: [
"avf_build_flags_cc",
"init_second_stage_defaults",
],
+ recovery_available: false,
static_libs: ["libinit.microdroid"],
cflags: ["-DMICRODROID=1"],
installable: false,