The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 2 | |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 3 | ####################################### |
| 4 | # init.rc |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 5 | # Only copy init.rc if the target doesn't have its own. |
| 6 | ifneq ($(TARGET_PROVIDES_INIT_RC),true) |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 7 | include $(CLEAR_VARS) |
| 8 | |
| 9 | LOCAL_MODULE := init.rc |
| 10 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 11 | LOCAL_MODULE_CLASS := ETC |
| 12 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 13 | |
| 14 | include $(BUILD_PREBUILT) |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 15 | endif |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 16 | ####################################### |
| 17 | # init.environ.rc |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 18 | |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | LOCAL_MODULE_CLASS := ETC |
| 21 | LOCAL_MODULE := init.environ.rc |
| 22 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Colin Cross | 44b65d0 | 2010-04-20 14:32:50 -0700 | [diff] [blame] | 23 | |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 24 | # Put it here instead of in init.rc module definition, |
| 25 | # because init.rc is conditionally included. |
| 26 | # |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 27 | # create some directories (some are mount points) |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 28 | LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \ |
| 29 | sbin dev proc sys system data) |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 30 | |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 31 | include $(BUILD_SYSTEM)/base_rules.mk |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 32 | |
Ying Wang | 5748ee9 | 2013-07-23 18:03:37 -0700 | [diff] [blame] | 33 | $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in |
| 34 | @echo "Generate: $< -> $@" |
| 35 | @mkdir -p $(dir $@) |
| 36 | $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@ |
| 37 | |
| 38 | ####################################### |