diff --git a/init/Android.bp b/init/Android.bp index 57e5a681a..6526a934e 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -162,7 +162,7 @@ libinit_cc_defaults { }, release_write_appcompat_override_system_properties: { cflags: ["-DWRITE_APPCOMPAT_OVERRIDE_SYSTEM_PROPERTIES"], - } + }, }, static_libs: [ "libavb", @@ -663,3 +663,23 @@ sh_binary { src: "extra_free_kbytes.sh", filename_from_src: true, } + +soong_config_module_type { + name: "board_use_recovery_as_boot_phony", + module_type: "phony", + config_namespace: "ANDROID", + bool_variables: ["BOARD_USES_RECOVERY_AS_BOOT"], + properties: ["required"], +} + +board_use_recovery_as_boot_phony { + name: "init_vendor", + soong_config_variables: { + BOARD_USES_RECOVERY_AS_BOOT: { + required: [], + conditions_default: { + required: ["init_first_stage"], + }, + }, + }, +} diff --git a/init/Android.mk b/init/Android.mk deleted file mode 100644 index 4b85c15ea..000000000 --- a/init/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2005 The Android Open Source Project - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := init_vendor -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE -ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_REQUIRED_MODULES := \ - init_first_stage \ - -endif # BOARD_USES_RECOVERY_AS_BOOT -include $(BUILD_PHONY_PACKAGE)