Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 724bff2d authored by dhacker29's avatar dhacker29 Committed by Michael Bestas
Browse files

Conditionally create symlink /system/vendor if needed

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
parent b92b85c8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1220,6 +1220,18 @@ define create-system-vendor-symlink
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)"