aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2023-01-18 19:25:57 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-01-18 19:25:57 +0000
commit2797146c86f37bbf18da7183c25485ec4b5b20f3 (patch)
treedfaa7298512ee08acc5ebef0680e097656915338
parent854afb66739b2827c911d7cf658c7cd3757a9331 (diff)
parent1143aaf7729f7489808be7a288905d15a738706e (diff)
downloadbuild-2797146c86f37bbf18da7183c25485ec4b5b20f3.tar.gz
Merge "Fix generic ramdisk build failures on dedicated recovery partitions"
-rw-r--r--core/base_rules.mk6
-rw-r--r--target/product/generic_ramdisk.mk5
2 files changed, 10 insertions, 1 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 00f5f2190f..18730aa0e3 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -600,7 +600,11 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
# Manually handle the case where the
# output file is in the recovery or ramdisk partition.
ifneq (,$(filter $(TARGET_RECOVERY_ROOT_OUT)/%,$(my_module_path)))
- my_init_rc_path := $(TARGET_RECOVERY_ROOT_OUT)/system/etc
+ ifneq (,$(filter $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/%,$(my_module_path)))
+ my_init_rc_path := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/system/etc
+ else
+ my_init_rc_path := $(TARGET_RECOVERY_ROOT_OUT)/system/etc
+ endif
else ifneq (,$(filter $(TARGET_RAMDISK_OUT)/%,$(my_module_path)))
my_init_rc_path := $(TARGET_RAMDISK_OUT)/system/etc
else
diff --git a/target/product/generic_ramdisk.mk b/target/product/generic_ramdisk.mk
index c7dcd60886..ebac62fd6b 100644
--- a/target/product/generic_ramdisk.mk
+++ b/target/product/generic_ramdisk.mk
@@ -29,11 +29,16 @@ PRODUCT_PACKAGES += \
adb_debug.prop \
userdebug_plat_sepolicy.cil \
+
+# For targets using dedicated recovery partition, generic ramdisk
+# might be relocated to recovery partition
_my_paths := \
$(TARGET_COPY_OUT_RAMDISK)/ \
$(TARGET_COPY_OUT_DEBUG_RAMDISK)/ \
system/usr/share/zoneinfo/tz_version \
system/usr/share/zoneinfo/tzdata \
+ $(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/system \
+
# We use the "relaxed" version here because tzdata / tz_version is only produced
# by this makefile on a subset of devices.