Merge "Move all of init to libinit"
am: ad939afaf4
Change-Id: Ib2df5914dd2f24958d95f5b9dfe01577c8b796b0
This commit is contained in:
commit
12fbce5c2a
6 changed files with 67 additions and 83 deletions
111
init/Android.bp
111
init/Android.bp
|
@ -58,6 +58,34 @@ cc_defaults {
|
|||
cppflags: ["-DUSER_MODE_LINUX"],
|
||||
}
|
||||
},
|
||||
static_libs: [
|
||||
"libbootloader_message",
|
||||
"libfs_mgr",
|
||||
"libfec",
|
||||
"libfec_rs",
|
||||
"libhidl-gen-utils",
|
||||
"libsquashfs_utils",
|
||||
"liblogwrap",
|
||||
"libext4_utils",
|
||||
"libcutils",
|
||||
"libbase",
|
||||
"libc",
|
||||
"libseccomp_policy",
|
||||
"libselinux",
|
||||
"liblog",
|
||||
"libcrypto_utils",
|
||||
"libcrypto",
|
||||
"libc++_static",
|
||||
"libdl",
|
||||
"libsparse",
|
||||
"libz",
|
||||
"libprocessgroup",
|
||||
"libavb",
|
||||
"libkeyutils",
|
||||
"libprotobuf-cpp-lite",
|
||||
"libpropertyinfoserializer",
|
||||
"libpropertyinfoparser",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_static {
|
||||
|
@ -65,40 +93,38 @@ cc_library_static {
|
|||
defaults: ["init_defaults"],
|
||||
srcs: [
|
||||
"action.cpp",
|
||||
"bootchart.cpp",
|
||||
"builtins.cpp",
|
||||
"capabilities.cpp",
|
||||
"descriptors.cpp",
|
||||
"devices.cpp",
|
||||
"firmware_handler.cpp",
|
||||
"import_parser.cpp",
|
||||
"init.cpp",
|
||||
"init_first_stage.cpp",
|
||||
"keychords.cpp",
|
||||
"log.cpp",
|
||||
"parser.cpp",
|
||||
"persistent_properties.cpp",
|
||||
"persistent_properties.proto",
|
||||
"property_service.cpp",
|
||||
"property_type.cpp",
|
||||
"reboot.cpp",
|
||||
"security.cpp",
|
||||
"selinux.cpp",
|
||||
"service.cpp",
|
||||
"sigchld_handler.cpp",
|
||||
"subcontext.cpp",
|
||||
"subcontext.proto",
|
||||
"rlimit_parser.cpp",
|
||||
"tokenizer.cpp",
|
||||
"uevent_listener.cpp",
|
||||
"ueventd.cpp",
|
||||
"ueventd_parser.cpp",
|
||||
"util.cpp",
|
||||
"watchdogd.cpp",
|
||||
],
|
||||
whole_static_libs: ["libcap"],
|
||||
static_libs: [
|
||||
"libbase",
|
||||
"libhidl-gen-utils",
|
||||
"libselinux",
|
||||
"liblog",
|
||||
"libprocessgroup",
|
||||
"libfs_mgr",
|
||||
"libprotobuf-cpp-lite",
|
||||
"libpropertyinfoserializer",
|
||||
"libpropertyinfoparser",
|
||||
],
|
||||
include_dirs: [
|
||||
"system/core/mkbootimg",
|
||||
],
|
||||
|
@ -125,42 +151,7 @@ cc_binary {
|
|||
"make_f2fs",
|
||||
],
|
||||
static_executable: true,
|
||||
srcs: [
|
||||
"bootchart.cpp",
|
||||
"builtins.cpp",
|
||||
"init.cpp",
|
||||
"init_first_stage.cpp",
|
||||
"keychords.cpp",
|
||||
"reboot.cpp",
|
||||
"sigchld_handler.cpp",
|
||||
"ueventd.cpp",
|
||||
"watchdogd.cpp",
|
||||
],
|
||||
static_libs: [
|
||||
"libinit",
|
||||
"libbootloader_message",
|
||||
"libfs_mgr",
|
||||
"libfec",
|
||||
"libfec_rs",
|
||||
"libhidl-gen-utils",
|
||||
"libsquashfs_utils",
|
||||
"liblogwrap",
|
||||
"libext4_utils",
|
||||
"libcutils",
|
||||
"libbase",
|
||||
"libc",
|
||||
"libselinux",
|
||||
"liblog",
|
||||
"libcrypto_utils",
|
||||
"libcrypto",
|
||||
"libc++_static",
|
||||
"libdl",
|
||||
"libsparse",
|
||||
"libz",
|
||||
"libprocessgroup",
|
||||
"libavb",
|
||||
"libkeyutils",
|
||||
],
|
||||
srcs: ["main.cpp"],
|
||||
symlinks: [
|
||||
"sbin/ueventd",
|
||||
"sbin/watchdogd",
|
||||
|
@ -174,6 +165,7 @@ cc_binary {
|
|||
cc_test {
|
||||
name: "init_tests",
|
||||
defaults: ["init_defaults"],
|
||||
static_executable: true,
|
||||
srcs: [
|
||||
"devices_test.cpp",
|
||||
"init_test.cpp",
|
||||
|
@ -187,36 +179,17 @@ cc_test {
|
|||
"ueventd_test.cpp",
|
||||
"util_test.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
],
|
||||
static_libs: [
|
||||
"libinit",
|
||||
"libhidl-gen-utils",
|
||||
"libselinux",
|
||||
"libcrypto",
|
||||
"libprotobuf-cpp-lite",
|
||||
"libpropertyinfoparser",
|
||||
],
|
||||
static_libs: ["libinit"],
|
||||
}
|
||||
|
||||
cc_benchmark {
|
||||
name: "init_benchmarks",
|
||||
static_executable: true,
|
||||
defaults: ["init_defaults"],
|
||||
srcs: [
|
||||
"subcontext_benchmark.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
],
|
||||
static_libs: [
|
||||
"libinit",
|
||||
"libselinux",
|
||||
"libcrypto",
|
||||
"libprotobuf-cpp-lite",
|
||||
],
|
||||
static_libs: ["libinit"],
|
||||
}
|
||||
|
||||
subdirs = ["*"]
|
||||
|
|
|
@ -41,16 +41,7 @@ init_cflags += \
|
|||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_CPPFLAGS := $(init_cflags)
|
||||
LOCAL_SRC_FILES:= \
|
||||
bootchart.cpp \
|
||||
builtins.cpp \
|
||||
init.cpp \
|
||||
init_first_stage.cpp \
|
||||
keychords.cpp \
|
||||
reboot.cpp \
|
||||
sigchld_handler.cpp \
|
||||
ueventd.cpp \
|
||||
watchdogd.cpp \
|
||||
LOCAL_SRC_FILES := main.cpp
|
||||
|
||||
LOCAL_MODULE:= init
|
||||
|
||||
|
|
|
@ -746,7 +746,3 @@ int main(int argc, char** argv) {
|
|||
|
||||
} // namespace init
|
||||
} // namespace android
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
android::init::main(argc, argv);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ void DumpState();
|
|||
|
||||
void ResetWaitForProp();
|
||||
|
||||
int main(int argc, char** argv);
|
||||
|
||||
} // namespace init
|
||||
} // namespace android
|
||||
|
||||
|
|
21
init/main.cpp
Normal file
21
init/main.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "init.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
android::init::main(argc, argv);
|
||||
}
|
|
@ -25,6 +25,7 @@
|
|||
#include <android-base/unique_fd.h>
|
||||
|
||||
#include "builtins.h"
|
||||
#include "result.h"
|
||||
#include "system/core/init/subcontext.pb.h"
|
||||
|
||||
namespace android {
|
||||
|
|
Loading…
Reference in a new issue