2009-03-04 11:32:55 +08:00
|
|
|
# Copyright 2005 The Android Open Source Project
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
2015-02-04 09:12:07 +08:00
|
|
|
builtins.cpp \
|
|
|
|
devices.cpp \
|
|
|
|
init.cpp \
|
|
|
|
init_parser.cpp \
|
|
|
|
keychords.cpp \
|
|
|
|
parser.cpp \
|
|
|
|
property_service.cpp \
|
|
|
|
signal_handler.cpp \
|
|
|
|
ueventd.cpp \
|
|
|
|
ueventd_parser.cpp \
|
|
|
|
util.cpp \
|
|
|
|
watchdogd.cpp \
|
|
|
|
|
|
|
|
LOCAL_CPPFLAGS += \
|
2015-02-03 08:43:32 +08:00
|
|
|
-Wall \
|
|
|
|
-Werror -Wno-error=deprecated-declarations \
|
|
|
|
-Wno-unused-parameter \
|
2014-04-02 06:15:38 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
ifeq ($(strip $(INIT_BOOTCHART)),true)
|
2015-02-04 09:12:07 +08:00
|
|
|
LOCAL_SRC_FILES += bootchart.cpp
|
|
|
|
LOCAL_CPPFLAGS += -DBOOTCHART=1
|
2009-03-04 11:32:55 +08:00
|
|
|
endif
|
|
|
|
|
2012-01-19 05:38:34 +08:00
|
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
2015-02-04 09:12:07 +08:00
|
|
|
LOCAL_CPPFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1 -DALLOW_DISABLE_SELINUX=1
|
2012-01-19 05:38:34 +08:00
|
|
|
endif
|
|
|
|
|
2014-03-07 07:07:42 +08:00
|
|
|
# Enable ueventd logging
|
2015-02-04 09:12:07 +08:00
|
|
|
#LOCAL_CPPFLAGS += -DLOG_UEVENTS=1
|
2014-03-07 07:07:42 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_MODULE:= init
|
|
|
|
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
|
|
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)
|
|
|
|
|
2012-10-17 14:07:05 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libfs_mgr \
|
fs_mgr: Capture the output of e2fsck and add to the kernel log
Currently, the output of e2fsck is not saved, and we have no insight
into how many errors e2fsck is finding and fixing. Using the new
abbreviated logging feature in liblogwrap, up to the first 100 lines,
and last 4K bytes of the output of e2fsck is captured by fs_mgr, and
added to the kernel log.
Usually, the filesystem will be clean, and this will only add a few
lines to the kernel log on boot, but when things go wrong, it should
save enough to indicate what the problem is, without potentially
filling the kernel log with only e2fsck output if the filesystem is
really corrupted.
Change-Id: I9c264798e6fe721c8f818b5ce15d0975027ddbdd
2013-03-20 10:38:44 +08:00
|
|
|
liblogwrap \
|
2012-10-17 14:07:05 +08:00
|
|
|
libcutils \
|
fs_mgr: Capture the output of e2fsck and add to the kernel log
Currently, the output of e2fsck is not saved, and we have no insight
into how many errors e2fsck is finding and fixing. Using the new
abbreviated logging feature in liblogwrap, up to the first 100 lines,
and last 4K bytes of the output of e2fsck is captured by fs_mgr, and
added to the kernel log.
Usually, the filesystem will be clean, and this will only add a few
lines to the kernel log on boot, but when things go wrong, it should
save enough to indicate what the problem is, without potentially
filling the kernel log with only e2fsck output if the filesystem is
really corrupted.
Change-Id: I9c264798e6fe721c8f818b5ce15d0975027ddbdd
2013-03-20 10:38:44 +08:00
|
|
|
liblog \
|
2012-10-17 14:07:05 +08:00
|
|
|
libc \
|
2013-02-23 10:11:41 +08:00
|
|
|
libselinux \
|
|
|
|
libmincrypt \
|
|
|
|
libext4_utils_static
|
2012-01-13 21:48:47 +08:00
|
|
|
|
2014-11-25 07:43:34 +08:00
|
|
|
# Create symlinks
|
|
|
|
LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(TARGET_ROOT_OUT)/sbin; \
|
|
|
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/ueventd; \
|
|
|
|
ln -sf ../init $(TARGET_ROOT_OUT)/sbin/watchdogd
|
2014-03-07 07:07:42 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_EXECUTABLE)
|