summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bill Peckham <bpeckham@google.com> 2019-07-03 15:58:48 -0700
committer Bill Peckham <bpeckham@google.com> 2019-07-03 15:58:48 -0700
commit1f9b8f0cc6fe9a1e65eb33218bd77e75a85e4310 (patch)
tree303106e7213116841867939b1ce0b53ba1868d20
parent28142690baa94cbe91aa19183de6a0666a7498b1 (diff)
Move definition of create-vendor-odm-symlink within BUILDING_VENDOR_IMAGE
When we build the system image separately from the vendor image, we need the /vendor/odm link (if any) to be created in the vendor build, not the system build. This change moves the create-vendor-odm-symlink function outside the BUILDING_SYSTEM_IMAGE gaurd, and inside the BUILDING_VENDOR_IMAGE gaurd. Bug: 136516335 Test: Build vendor image, verify that /vendor/odm -> /odm Change-Id: I6edf5d6d1fa0b2f632f67113f69a49b43f719941
-rw-r--r--core/Makefile30
1 files changed, 15 insertions, 15 deletions
diff --git a/core/Makefile b/core/Makefile
index 838a96c599..d8001fac5e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2290,21 +2290,6 @@ define create-system-product_services-symlink
endef
endif
-# Create symlink /vendor/odm to /odm if necessary.
-ifdef BOARD_USES_ODMIMAGE
-define create-vendor-odm-symlink
-$(hide) if [ -d $(TARGET_OUT_VENDOR)/odm ] && [ ! -h $(TARGET_OUT_VENDOR)/odm ]; then \
- echo 'Non-symlink $(TARGET_OUT_VENDOR)/odm detected!' 1>&2; \
- echo 'You cannot install files to $(TARGET_OUT_VENDOR)/odm while building a separate odm.img!' 1>&2; \
- exit 1; \
-fi
-$(hide) ln -sf /odm $(TARGET_OUT_VENDOR)/odm
-endef
-else
-define create-vendor-odm-symlink
-endef
-endif
-
# $(1): output file
define build-systemimage-target
@echo "Target system fs image: $(1)"
@@ -2869,6 +2854,21 @@ $(INSTALLED_FILES_FILE_VENDOR) : $(INTERNAL_VENDORIMAGE_FILES) $(FILESLIST) $(FI
$(hide) $(FILESLIST) $(TARGET_OUT_VENDOR) > $(@:.txt=.json)
$(hide) $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
+# Create symlink /vendor/odm to /odm if necessary.
+ifdef BOARD_USES_ODMIMAGE
+define create-vendor-odm-symlink
+$(hide) if [ -d $(TARGET_OUT_VENDOR)/odm ] && [ ! -h $(TARGET_OUT_VENDOR)/odm ]; then \
+ echo 'Non-symlink $(TARGET_OUT_VENDOR)/odm detected!' 1>&2; \
+ echo 'You cannot install files to $(TARGET_OUT_VENDOR)/odm while building a separate odm.img!' 1>&2; \
+ exit 1; \
+fi
+$(hide) ln -sf /odm $(TARGET_OUT_VENDOR)/odm
+endef
+else
+define create-vendor-odm-symlink
+endef
+endif
+
vendorimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor)
BUILT_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img