2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
2013-07-24 03:03:37 +02:00
|
|
|
#######################################
|
|
|
|
# init.rc
|
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2013-07-24 03:03:37 +02:00
|
|
|
LOCAL_MODULE := init.rc
|
|
|
|
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
2010-04-20 23:32:50 +02:00
|
|
|
|
2013-07-24 03:03:37 +02:00
|
|
|
include $(BUILD_PREBUILT)
|
2015-08-08 02:04:37 +02:00
|
|
|
|
|
|
|
#######################################
|
|
|
|
# asan.options
|
2015-09-18 20:59:46 +02:00
|
|
|
ifneq ($(filter address,$(SANITIZE_TARGET)),)
|
2015-08-08 02:04:37 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := asan.options
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT)
|
|
|
|
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
endif
|
|
|
|
|
2013-07-24 03:03:37 +02:00
|
|
|
#######################################
|
|
|
|
# init.environ.rc
|
2012-04-04 20:26:59 +02:00
|
|
|
|
2013-07-24 03:03:37 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE := init.environ.rc
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-08-08 02:04:37 +02:00
|
|
|
EXPORT_GLOBAL_ASAN_OPTIONS :=
|
2015-09-18 20:59:46 +02:00
|
|
|
ifneq ($(filter address,$(SANITIZE_TARGET)),)
|
2015-08-08 02:04:37 +02:00
|
|
|
EXPORT_GLOBAL_ASAN_OPTIONS := export ASAN_OPTIONS include=/system/asan.options
|
|
|
|
LOCAL_REQUIRED_MODULES := asan.options
|
|
|
|
endif
|
2013-07-24 03:03:37 +02:00
|
|
|
# Put it here instead of in init.rc module definition,
|
|
|
|
# because init.rc is conditionally included.
|
|
|
|
#
|
2015-07-29 00:14:39 +02:00
|
|
|
# create some directories (some are mount points) and symlinks
|
2015-10-28 21:13:37 +01:00
|
|
|
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)); \
|
2015-07-29 00:14:39 +02:00
|
|
|
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
|
2015-10-28 21:13:37 +01:00
|
|
|
LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/vendor
|
2015-11-11 23:49:47 +01:00
|
|
|
else
|
|
|
|
LOCAL_POST_INSTALL_CMD += ; ln -sf /system/vendor $(TARGET_ROOT_OUT)/vendor
|
2015-10-28 21:13:37 +01:00
|
|
|
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)))
|
2015-07-29 00:14:39 +02:00
|
|
|
endif
|
2013-07-24 03:03:37 +02:00
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
2014-06-14 18:11:02 +02:00
|
|
|
# Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed.
|
2014-08-05 16:42:34 +02:00
|
|
|
bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) | $(MD5SUM)))
|
2014-06-14 18:11:02 +02:00
|
|
|
bcp_dep := $(intermediates)/$(bcp_md5).bcp.dep
|
|
|
|
$(bcp_dep) :
|
|
|
|
$(hide) mkdir -p $(dir $@) && rm -rf $(dir $@)*.bcp.dep && touch $@
|
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in $(bcp_dep)
|
2013-07-24 03:03:37 +02:00
|
|
|
@echo "Generate: $< -> $@"
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@
|
2014-08-05 16:42:34 +02:00
|
|
|
$(hide) sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $@
|
2015-06-13 00:42:20 +02:00
|
|
|
$(hide) sed -i -e 's?%EXPORT_GLOBAL_ASAN_OPTIONS%?$(EXPORT_GLOBAL_ASAN_OPTIONS)?g' $@
|
2013-07-24 03:03:37 +02:00
|
|
|
|
2014-06-14 18:11:02 +02:00
|
|
|
bcp_md5 :=
|
|
|
|
bcp_dep :=
|
2013-07-24 03:03:37 +02:00
|
|
|
#######################################
|