Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c08d504 authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "Move all of init to libinit" am: ad939afa am: 12fbce5c

am: 0dfd62f2

Change-Id: I6db82e4b9bec0f62522621507a5600c9955ff063
parents 72fc33fc 0dfd62f2
Loading
Loading
Loading
Loading
+42 −69
Original line number Diff line number Diff line
@@ -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 = ["*"]
+1 −10
Original line number Diff line number Diff line
@@ -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

+0 −4
Original line number Diff line number Diff line
@@ -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);
}
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,8 @@ void DumpState();

void ResetWaitForProp();

int main(int argc, char** argv);

}  // namespace init
}  // namespace android

init/main.cpp

0 → 100644
+21 −0
Original line number Diff line number Diff line
/*
 * 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);
}
Loading