Convert init_vendor to Android.bp
`init_first_stage` is a dependency of `init_vendor` only when `BOARD_USES_RECOVERY_AS_BOOT` is false. Since `BOARD_USES_RECOVERY_AS_BOOT` is already defined in `build/make/core/android_soong_config_vars.mk` within a soong_namespace, we can use the `soong_config_module_type` to easily convert this to Android.bp. Bug: 347600829 Test: m init_vendor Change-Id: I1ddcd5fb62983b01e51452c9b7367750e03e7f48
This commit is contained in:
parent
a1188013f3
commit
064ac0bf15
2 changed files with 21 additions and 17 deletions
|
|
@ -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"],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
Loading…
Add table
Reference in a new issue