未验证 提交 fa73124e 编写于 作者: O openharmony_ci 提交者: Gitee

!844 支持lite的部件名修改成init

Merge pull request !844 from Mupceet/uevent
......@@ -40,16 +40,11 @@
"//base/startup/init_lite/ueventd:startup_ueventd",
"//base/startup/init_lite/watchdog:watchdog",
"//base/startup/init_lite/services/begetctl:begetctl_cmd",
"//base/startup/init_lite/services/loopevent:loopevent",
"//base/startup/init_lite/services/modules:modules",
"//base/startup/init_lite/services/loopevent:loopeventgroup",
"//base/startup/init_lite/services/modules:modulesgroup",
"//base/startup/init_lite/services/param:parameter",
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//base/startup/init_lite/interfaces/innerkits:libbeget_proxy",
"//base/startup/init_lite/interfaces/innerkits/file:libfile",
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
"//base/startup/init_lite/interfaces/innerkits/init_module_engine:init_module_engine",
"//base/startup/init_lite/interfaces/innerkits:innergroup",
"//base/startup/init_lite/device_info:device_info_group",
"//base/startup/init_lite/test/exec_test:exectest",
"//base/startup/init_lite/interfaces/kits:kitsgroup"
],
"inner_kits": [
......@@ -95,8 +90,7 @@
}
],
"test": [
"//base/startup/init_lite/test/unittest:init_test",
"//base/startup/init_lite/test/fuzztest:fuzztest"
"//base/startup/init_lite/test:testgroup"
]
}
}
......
......@@ -11,59 +11,61 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//base/startup/init_lite/begetd.gni")
import("//build/ohos.gni")
import("//build/ohos/sa_profile/sa_profile.gni")
if (!defined(ohos_lite)) {
import("//build/ohos.gni")
import("//build/ohos/sa_profile/sa_profile.gni")
ohos_sa_profile("device_info_profile") {
sources = [ "etc/3902.xml" ]
part_name = "init"
}
ohos_sa_profile("device_info_profile") {
sources = [ "etc/3902.xml" ]
part_name = "init"
}
ohos_prebuilt_etc("device_info.cfg") {
source = "etc/deviceinfoservice.cfg"
relative_install_dir = "init"
part_name = "init"
}
ohos_prebuilt_etc("device_info.cfg") {
source = "etc/deviceinfoservice.cfg"
relative_install_dir = "init"
part_name = "init"
}
ohos_shared_library("deviceinfoservice") {
sources = [
"//base/startup/init_lite/interfaces/innerkits/syspara/param_comm.c",
"device_info_stub.cpp",
]
ohos_shared_library("deviceinfoservice") {
sources = [
"//base/startup/init_lite/interfaces/innerkits/syspara/param_comm.c",
"device_info_stub.cpp",
]
include_dirs = [
".",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/interfaces/innerkits/include/syspara",
"//base/startup/init_lite/interfaces/innerkits/syspara",
"//base/startup/init_lite/interfaces/hals",
]
defines = [
"INIT_AGENT",
"_GNU_SOURCE",
"USE_MBEDTLS",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/mbedtls:mbedtls_shared",
]
include_dirs = [
".",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/interfaces/innerkits/include/syspara",
"//base/startup/init_lite/interfaces/innerkits/syspara",
"//base/startup/init_lite/interfaces/hals",
]
defines = [
"INIT_AGENT",
"_GNU_SOURCE",
"USE_MBEDTLS",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/mbedtls:mbedtls_shared",
]
external_deps = [
"access_token:libaccesstoken_sdk",
"hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
"utils_base:utils",
]
install_images = [ "system" ]
part_name = "init"
external_deps = [
"access_token:libaccesstoken_sdk",
"hilog_native:libhilog",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr_standard:samgr_proxy",
"utils_base:utils",
]
install_images = [ "system" ]
part_name = "init"
}
}
group("device_info_group") {
if (enable_ohos_startup_init_feature_deviceinfo) {
if (!defined(ohos_lite) && enable_ohos_startup_init_feature_deviceinfo) {
deps = [
":device_info.cfg",
":device_info_profile",
......
......@@ -139,6 +139,9 @@ if (defined(ohos_lite)) {
head_files =
[ "//base/startup/init_lite/interfaces/innerkits/include/syspara" ]
}
group("libbeget_proxy") {
}
} else {
import("//build/ohos.gni")
modulemgr_sources = [
......@@ -281,3 +284,15 @@ if (defined(ohos_lite)) {
part_name = "init"
}
}
group("innergroup") {
deps = [ ":libbegetutil" ]
if (!defined(ohos_lite)) {
deps += [
":libbeget_proxy",
"file:libfile",
"init_module_engine:modulegroup",
"socket:libsocket",
]
}
}
......@@ -11,70 +11,77 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
import("//build/ohos/native_stub/native_stub.gni")
if (defined(ohos_lite)) {
group("libinit_module_engine") {
}
} else {
import("//build/ohos.gni")
import("//build/ohos/native_stub/native_stub.gni")
#
# exported include directories
#
config("init_module_engine_exported_config") {
visibility = [ ":*" ]
include_dirs = [
"include/",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/log",
]
}
#
# exported include directories
#
config("init_module_engine_exported_config") {
visibility = [ ":*" ]
include_dirs = [
"include/",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/log",
]
}
#
# innerkits for module development
#
ohos_native_stub_library("libinit_module_engine") {
output_extension = "so"
public_configs = [ ":init_module_engine_exported_config" ]
stub_description_file = "./stub/libinit.stub.json"
}
#
# innerkits for module development
#
ohos_native_stub_library("libinit_module_engine") {
output_extension = "so"
public_configs = [ ":init_module_engine_exported_config" ]
stub_description_file = "./stub/libinit.stub.json"
}
#
# For init linking,
# export symbols defined in this json files only
#
ohos_native_stub_versionscript("libinit_stub_versionscript") {
stub_description_file = "./stub/libinit.stub.json"
}
#
# For init linking,
# export symbols defined in this json files only
#
ohos_native_stub_versionscript("libinit_stub_versionscript") {
stub_description_file = "./stub/libinit.stub.json"
}
#
# Generate empty library with symlink name to satisfy init loading required libraries
#
ohos_native_stub_library("libinit_stub_empty") {
output_extension = "so"
stub_description_file = "./stub/libinit.stub.empty.json"
part_name = "init"
install_enable = true
symlink_target_name = [ "libinit_module_engine.so" ]
}
#
# Generate empty library with symlink name to satisfy init loading required libraries
#
ohos_native_stub_library("libinit_stub_empty") {
output_extension = "so"
stub_description_file = "./stub/libinit.stub.empty.json"
part_name = "init"
install_enable = true
symlink_target_name = [ "libinit_module_engine.so" ]
}
config("init_module_engine_sources_config") {
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/init_module_engine/include",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/log",
]
}
config("init_module_engine_sources_config") {
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/init_module_engine/include",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/log",
]
}
ohos_source_set("init_module_engine_sources") {
sources = [ "init_modulemgr.c" ]
public_configs = [ ":init_module_engine_sources_config" ]
ohos_source_set("init_module_engine_sources") {
sources = [ "init_modulemgr.c" ]
public_configs = [ ":init_module_engine_sources_config" ]
}
}
#
# init module engine all modules
#
group("init_module_engine") {
deps = [
":libinit_module_engine",
":libinit_stub_empty",
]
group("modulegroup") {
if (!defined(ohos_lite)) {
deps = [
":libinit_module_engine",
":libinit_stub_empty",
]
}
}
......@@ -14,15 +14,17 @@
import("//build/ohos.gni")
group("kitsgroup") {
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbeget_proxy",
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
]
deps += [ "syscap:deviceinfo_ndk" ]
if (support_jsapi) {
deps += [
"jskits:deviceinfo",
"jskits:systemparameter",
if (!defined(ohos_lite)) {
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbeget_proxy",
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
]
deps += [ "syscap:deviceinfo_ndk" ]
if (support_jsapi) {
deps += [
"jskits:deviceinfo",
"jskits:systemparameter",
]
}
}
}
......@@ -54,12 +54,6 @@ if (defined(ohos_lite)) {
"//third_party/bounds_checking_function:libsec_static",
]
}
group("begetctl_cmd") {
if (enable_ohos_startup_init_feature_begetctl_liteos &&
ohos_kernel_type != "liteos_m") {
deps = [ ":begetctl" ]
}
}
} else {
import("//build/ohos.gni")
......@@ -208,8 +202,15 @@ if (defined(ohos_lite)) {
install_enable = true
part_name = "init"
}
}
group("begetctl_cmd") {
group("begetctl_cmd") {
if (defined(ohos_lite)) {
if (enable_ohos_startup_init_feature_begetctl_liteos &&
ohos_kernel_type != "liteos_m") {
deps = [ ":begetctl" ]
}
} else {
deps = [
":begetctl",
":param",
......
......@@ -29,11 +29,13 @@
},
"build": {
"sub_component": [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//base/startup/init_lite/services:startup_init",
"//base/startup/init_lite/ueventd:startup_ueventd",
"//base/startup/init_lite/watchdog:watchdog",
"//base/startup/init_lite/services/begetctl:begetctl_cmd",
"//base/startup/init_lite/watchdog:init_watchdog",
"//base/startup/init_lite/ueventd:ueventd"
"//base/startup/init_lite/services/loopevent:loopeventgroup",
"//base/startup/init_lite/services/modules:modulesgroup",
"//base/startup/init_lite/services/param:parameter"
],
"inner_kits": [
{
......@@ -52,7 +54,7 @@
}
],
"test": [
"//base/startup/init_lite/services:startup_init"
"//base/startup/init_lite/test:testgroup"
]
}
}
......
......@@ -63,3 +63,13 @@ if (defined(ohos_lite)) {
subsystem_name = "startup"
}
}
group("loopeventgroup") {
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux") {
deps = [ ":loopevent" ]
}
} else {
deps = [ ":loopevent" ]
}
}
......@@ -11,48 +11,54 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//base/startup/init_lite/begetd.gni")
import("//build/ohos.gni")
ohos_shared_library("bootchart") {
sources = [ "bootchart/bootchart.c" ]
include_dirs = [
".",
"//base/startup/init_lite/services/include/param",
]
deps = [
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
]
external_deps = [ "init:libinit_module_engine" ]
part_name = "init"
if (target_cpu == "arm64") {
module_install_dir = "lib64/init"
} else {
module_install_dir = "lib/init"
if (!defined(ohos_lite)) {
import("//base/startup/init_lite/begetd.gni")
import("//build/ohos.gni")
ohos_shared_library("bootchart") {
sources = [ "bootchart/bootchart.c" ]
include_dirs = [
".",
"//base/startup/init_lite/services/include/param",
]
deps = [
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
]
external_deps = [ "init:libinit_module_engine" ]
part_name = "init"
if (target_cpu == "arm64") {
module_install_dir = "lib64/init"
} else {
module_install_dir = "lib/init"
}
}
}
config("libbootchart_static_config") {
include_dirs = [ "." ]
}
config("libbootchart_static_config") {
include_dirs = [ "." ]
}
ohos_source_set("libbootchart_static") {
sources = [ "bootchart/bootchart_static.c" ]
public_configs = [ ":libbootchart_static_config" ]
public_configs += [ "//base/startup/init_lite/interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
ohos_source_set("libbootchart_static") {
sources = [ "bootchart/bootchart_static.c" ]
public_configs = [ ":libbootchart_static_config" ]
public_configs += [ "//base/startup/init_lite/interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
}
}
group("modules") {
deps = [ ":bootchart" ]
group("static_modules") {
if (!defined(ohos_lite)) {
deps = [ ":libbootchart_static" ]
}
}
group("static_modules") {
deps = [ ":libbootchart_static" ]
group("modulesgroup") {
if (!defined(ohos_lite)) {
deps = [ ":bootchart" ]
}
}
......@@ -11,7 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//base/startup/init_lite/begetd.gni")
import("//build/ohos.gni")
group("parameter") {
deps = []
......
# Copyright (c) 2022 Huawei Device Co., Ltd.
# 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.
import("//base/startup/init_lite/begetd.gni")
group("testgroup") {
testonly = true
if (!defined(ohos_lite)) {
deps = [
"exec_test:exectest",
"fuzztest:fuzztest",
"moduletest:paramtestmodule",
"unittest:init_unittest",
]
} else {
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
deps = [ "unittest/lite:init_test" ]
}
}
}
......@@ -276,11 +276,3 @@ ohos_unittest("init_unittest") {
"init/service_unittest.cpp",
]
}
group("init_test") {
testonly = true
deps = [
":init_unittest",
"//base/startup/init_lite/test/moduletest:paramtestmodule",
]
}
......@@ -13,6 +13,14 @@
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux") {
service_ueventd_deps = [
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
]
executable("ueventd_linux") {
sources = [
"//base/startup/init_lite/services/utils/init_utils.c",
......@@ -36,27 +44,14 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/ueventd/include",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_static",
]
deps = service_ueventd_deps
deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
}
copy("ueventd.config") {
sources = [ "etc/ueventd_l1.config" ]
outputs = [ "$root_out_dir/etc/ueventd.config" ]
}
}
group("ueventd") {
if (ohos_kernel_type == "linux") {
deps = [
":ueventd.config",
":ueventd_linux",
]
} else {
deps = []
}
}
} else {
import("//build/ohos.gni")
service_ueventd_sources = [
......@@ -79,16 +74,10 @@ if (defined(ohos_lite)) {
service_ueventd_deps = [
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
]
group("startup_ueventd") {
deps = [
"//base/startup/init_lite/ueventd:libueventd_ramdisk_static",
"//base/startup/init_lite/ueventd:ueventd",
"//base/startup/init_lite/ueventd:ueventd.config",
]
}
#
# exported include directories
......@@ -125,7 +114,7 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/interfaces/innerkits/include",
]
deps = service_ueventd_deps
deps += [ "//base/startup/init_lite/interfaces/innerkits:libbegetutil" ]
deps += [ "//base/startup/init_lite/services/param/linux:param_client" ]
cflags = []
if (build_selinux) {
......@@ -150,3 +139,22 @@ if (defined(ohos_lite)) {
]
}
}
group("startup_ueventd") {
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux") {
deps = [
":ueventd.config",
":ueventd_linux",
]
} else {
deps = []
}
} else {
deps = [
"//base/startup/init_lite/ueventd:libueventd_ramdisk_static",
"//base/startup/init_lite/ueventd:ueventd",
"//base/startup/init_lite/ueventd:ueventd.config",
]
}
}
......@@ -49,6 +49,8 @@ static void PollUeventdSocketTimeout(int ueventSockFd)
int main(int argc, char **argv)
{
// start log
EnableInitLog(INIT_INFO);
char *ueventdConfigs[] = {"/etc/ueventd.config", "/vendor/etc/ueventd.config", NULL};
int i = 0;
while (ueventdConfigs[i] != NULL) {
......
......@@ -11,10 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
group("watchdog") {
deps = [ ":watchdog_service" ]
}
if (defined(ohos_lite)) {
executable("watchdog_service") {
sources = [
......@@ -33,12 +29,6 @@ if (defined(ohos_lite)) {
defines += [ "LINUX_WATCHDOG" ]
}
}
group("init_watchdog") {
if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
deps = [ ":watchdog_service" ]
}
}
} else {
import("//build/ohos.gni")
ohos_executable("watchdog_service") {
......@@ -54,3 +44,15 @@ if (defined(ohos_lite)) {
part_name = "init"
}
}
group("watchdog") {
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
deps = [ ":watchdog_service" ]
} else {
deps = []
}
} else {
deps = [ ":watchdog_service" ]
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册