summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2015-11-02 21:54:42 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-11-02 21:54:42 +0000
commit6e699df21e1b08aa2e9eb18ef1c44788549ae8ed (patch)
tree6a7b76f1755b1c6dd0a797f93c87a42cd89bdbb3 /rootdir
parent518d043c8693835061b02ecbbee4b82fc61a776e (diff)
parent52b59159458a574e11f03940840d63feeb648883 (diff)
downloadsystem_core-6e699df21e1b08aa2e9eb18ef1c44788549ae8ed.tar.gz
system_core-6e699df21e1b08aa2e9eb18ef1c44788549ae8ed.tar.bz2
system_core-6e699df21e1b08aa2e9eb18ef1c44788549ae8ed.zip
Merge "rootdir: Allow board specific folders and symlinks in root directory"
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/Android.mk16
1 files changed, 10 insertions, 6 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 8b1699634..b134f9353 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -41,17 +41,21 @@ endif
# because init.rc is conditionally included.
#
# create some directories (some are mount points) and symlinks
-local_post_install_cmd_base := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
- sbin dev proc sys system data oem acct cache config storage mnt root); \
+LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
+ sbin dev proc sys system data oem acct cache config storage mnt root $(BOARD_ROOT_EXTRA_FOLDERS)); \
ln -sf /system/etc $(TARGET_ROOT_OUT)/etc; \
ln -sf /sys/kernel/debug $(TARGET_ROOT_OUT)/d; \
ln -sf /storage/self/primary $(TARGET_ROOT_OUT)/sdcard
ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
- LOCAL_POST_INSTALL_CMD := $(local_post_install_cmd_base); mkdir -p $(TARGET_ROOT_OUT)/vendor
-else
- LOCAL_POST_INSTALL_CMD := $(local_post_install_cmd_base)
+ LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/vendor
+endif
+ifdef BOARD_ROOT_EXTRA_SYMLINKS
+# BOARD_ROOT_EXTRA_SYMLINKS is a list of <target>:<link_name>.
+ LOCAL_POST_INSTALL_CMD += $(foreach s, $(BOARD_ROOT_EXTRA_SYMLINKS),\
+ $(eval p := $(subst :,$(space),$(s)))\
+ ; mkdir -p $(dir $(TARGET_ROOT_OUT)/$(word 2,$(p))) \
+ ; ln -sf $(word 1,$(p)) $(TARGET_ROOT_OUT)/$(word 2,$(p)))
endif
-local_post_install_cmd_base :=
include $(BUILD_SYSTEM)/base_rules.mk