Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
fa73124e
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fa73124e
编写于
6月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!844 支持lite的部件名修改成init
Merge pull request !844 from Mupceet/uevent
上级
647e000c
9e813dd2
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
280 addition
and
209 deletion
+280
-209
bundle.json
bundle.json
+4
-10
device_info/BUILD.gn
device_info/BUILD.gn
+47
-45
interfaces/innerkits/BUILD.gn
interfaces/innerkits/BUILD.gn
+15
-0
interfaces/innerkits/init_module_engine/BUILD.gn
interfaces/innerkits/init_module_engine/BUILD.gn
+62
-55
interfaces/kits/BUILD.gn
interfaces/kits/BUILD.gn
+11
-9
services/begetctl/BUILD.gn
services/begetctl/BUILD.gn
+8
-7
services/init/lite/bundle.json
services/init/lite/bundle.json
+6
-4
services/loopevent/BUILD.gn
services/loopevent/BUILD.gn
+10
-0
services/modules/BUILD.gn
services/modules/BUILD.gn
+43
-37
services/param/BUILD.gn
services/param/BUILD.gn
+0
-1
test/BUILD.gn
test/BUILD.gn
+29
-0
test/unittest/BUILD.gn
test/unittest/BUILD.gn
+0
-8
ueventd/BUILD.gn
ueventd/BUILD.gn
+31
-23
ueventd/ueventd_main.c
ueventd/ueventd_main.c
+2
-0
watchdog/BUILD.gn
watchdog/BUILD.gn
+12
-10
未找到文件。
bundle.json
浏览文件 @
fa73124e
...
...
@@ -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:loopevent
group
"
,
"//base/startup/init_lite/services/modules:modules
group
"
,
"//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"
]
}
}
...
...
device_info/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
...
...
interfaces/innerkits/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
]
}
}
interfaces/innerkits/init_module_engine/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
]
}
}
interfaces/kits/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
]
}
}
}
services/begetctl/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
...
...
services/init/lite/bundle.json
浏览文件 @
fa73124e
...
...
@@ -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
"
]
}
}
...
...
services/loopevent/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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" ]
}
}
services/modules/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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" ]
}
}
services/param/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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 = []
...
...
test/BUILD.gn
0 → 100644
浏览文件 @
fa73124e
# 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" ]
}
}
}
test/unittest/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
]
}
ueventd/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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",
]
}
}
ueventd/ueventd_main.c
浏览文件 @
fa73124e
...
...
@@ -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
)
{
...
...
watchdog/BUILD.gn
浏览文件 @
fa73124e
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录