We don't need to build a vendor image in CM, just create the symlink
for Nexus devices that use a vendor partition
To use add BOARD_NEEDS_VENDORIMAGE_SYMLINK := true to BoardConfig.mk
Change-Id: Id39ee89007af39346f0887796ed3cbad81765c46
endef
endif
+# Only Create symlink /system/vendor to /vendor if necessary.
+ifdef BOARD_NEEDS_VENDORIMAGE_SYMLINK
+define create-system-vendor-symlink
+$(hide) if [ -d $(TARGET_OUT)/vendor ] && [ ! -h $(TARGET_OUT)/vendor ]; then \
+ echo 'Non-symlink $(TARGET_OUT)/vendor detected!' 1>&2; \
+ echo 'You cannot install files to $(TARGET_OUT)/vendor while building a separate vendor.img!' 1>&2; \
+ exit 1; \
+fi
+$(hide) ln -sf /vendor $(TARGET_OUT)/vendor
+endef
+endif
+
# $(1): output file
define build-systemimage-target
@echo "Target system fs image: $(1)"