From 2e581b68c6f171989b656d79457acf0e71364cab Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Fri, 6 Dec 2024 23:18:18 +0000 Subject: [PATCH] Define reboot.recovery and watchdogd.recovery By removing the "recovery_available" property from "reboot" and "watchdogd" modules. "recovery_available" property should be used to allow the reverse dependencies recovery modules to depend on the module, not to install the module to the recovery partition. Test: m soong_generated_recovery_filesystem_test Bug: 381888358 Change-Id: I48014774714957885f3ad648ac302cc3c13687ae --- reboot/Android.bp | 21 ++++++++++++++++++--- watchdogd/Android.bp | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/reboot/Android.bp b/reboot/Android.bp index 7b243bd56..1cca82457 100644 --- a/reboot/Android.bp +++ b/reboot/Android.bp @@ -4,10 +4,25 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } -cc_binary { - name: "reboot", +cc_defaults { + name: "reboot_defaults", srcs: ["reboot.c"], shared_libs: ["libcutils"], cflags: ["-Werror"], - recovery_available: true, +} + +cc_binary { + name: "reboot", + defaults: [ + "reboot_defaults", + ], +} + +cc_binary { + name: "reboot.recovery", + defaults: [ + "reboot_defaults", + ], + recovery: true, + stem: "reboot", } diff --git a/watchdogd/Android.bp b/watchdogd/Android.bp index 03882082f..bc7ffb656 100644 --- a/watchdogd/Android.bp +++ b/watchdogd/Android.bp @@ -2,9 +2,8 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } -cc_binary { - name: "watchdogd", - recovery_available: true, +cc_defaults { + name: "watchdogd_defaults", srcs: ["watchdogd.cpp"], cflags: [ "-Wall", @@ -16,3 +15,19 @@ cc_binary { misc_undefined: ["signed-integer-overflow"], }, } + +cc_binary { + name: "watchdogd", + defaults: [ + "watchdogd_defaults", + ], +} + +cc_binary { + name: "watchdogd.recovery", + defaults: [ + "watchdogd_defaults", + ], + recovery: true, + stem: "watchdogd", +}