mirror of
https://gitee.com/openharmony/startup_init
synced 2024-10-07 14:13:52 +00:00
!199 对init部件的依赖统一到libbegetutil模块
Merge pull request !199 from handy/1223
This commit is contained in:
commit
b6ee22cccd
71
interfaces/innerkits/BUILD.gn
Executable file
71
interfaces/innerkits/BUILD.gn
Executable file
@ -0,0 +1,71 @@
|
||||
# Copyright (c) 2021 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")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
config("exported_header_files") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [ "include/" ]
|
||||
}
|
||||
|
||||
fs_manager_sources = [
|
||||
"fs_manager/fs_manager_log.c",
|
||||
"fs_manager/fstab.c",
|
||||
"fs_manager/fstab_mount.c",
|
||||
]
|
||||
|
||||
ohos_shared_library("libbegetutil") {
|
||||
sources = [
|
||||
"file/init_file.c",
|
||||
"reboot/init_reboot_innerkits.c",
|
||||
"socket/init_socket.c",
|
||||
]
|
||||
sources += fs_manager_sources
|
||||
|
||||
include_dirs = [
|
||||
"./include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/startup/init_lite/services/include",
|
||||
"//base/startup/init_lite/services/include/param",
|
||||
"//base/startup/syspara_lite/hals/parameter/include",
|
||||
]
|
||||
deps = [
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/param:param_client",
|
||||
"//base/startup/init_lite/services/utils:libinit_utils",
|
||||
"//third_party/bounds_checking_function:libsec_shared",
|
||||
"//third_party/openssl:libcrypto_static",
|
||||
"//utils/native/base:utils",
|
||||
]
|
||||
|
||||
public_configs = [ ":exported_header_files" ]
|
||||
part_name = "init"
|
||||
install_images = [
|
||||
"system",
|
||||
"updater",
|
||||
]
|
||||
}
|
||||
|
||||
# For init only
|
||||
ohos_static_library("libfsmanager_static") {
|
||||
sources = fs_manager_sources
|
||||
include_dirs = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
"//base/startup/init_lite/services/include",
|
||||
]
|
||||
part_name = "init"
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Copyright (c) 2021 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("//build/ohos.gni")
|
||||
ohos_shared_library("dynamic_service") {
|
||||
sources = [ "dynamic_service.c" ]
|
||||
|
||||
include_dirs = [
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
||||
]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
install_images = [ "system" ]
|
||||
part_name = "init"
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright (c) 2021 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("//build/ohos.gni")
|
||||
service_file_sources =
|
||||
[ "//base/startup/init_lite/interfaces/innerkits/file/init_file.c" ]
|
||||
service_file_include = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
"//base/startup/init_lite/services/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
service_file_deps = [
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/utils:libinit_utils",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
ohos_static_library("libfile_static") {
|
||||
sources = service_file_sources
|
||||
include_dirs = service_file_include
|
||||
deps = service_file_deps
|
||||
}
|
||||
|
||||
ohos_shared_library("libfile") {
|
||||
sources = service_file_sources
|
||||
include_dirs = service_file_include
|
||||
deps = service_file_deps
|
||||
part_name = "init"
|
||||
install_images = [ "system" ]
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
# Copyright (c) 2021 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("//build/ohos.gni")
|
||||
|
||||
fs_manager_sources = [
|
||||
"fs_manager_log.c",
|
||||
"fstab.c",
|
||||
"fstab_mount.c",
|
||||
]
|
||||
|
||||
fs_manager_include_dirs = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
"//base/startup/init_lite/services/include",
|
||||
]
|
||||
|
||||
fs_manager_deps = [
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/utils:libinit_utils",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
ohos_shared_library("libfsmanager_shared") {
|
||||
sources = fs_manager_sources
|
||||
deps = fs_manager_deps
|
||||
include_dirs = fs_manager_include_dirs
|
||||
part_name = "init"
|
||||
install_images = [ "system" ]
|
||||
}
|
||||
|
||||
ohos_static_library("libfsmanager_static") {
|
||||
sources = fs_manager_sources
|
||||
deps = fs_manager_deps
|
||||
include_dirs = fs_manager_include_dirs
|
||||
part_name = "init"
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
# Copyright (c) 2021 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("//build/ohos.gni")
|
||||
|
||||
service_reboot_sources = [ "//base/startup/init_lite/interfaces/innerkits/reboot/init_reboot_innerkits.c" ]
|
||||
service_reboot_include = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
"//base/startup/init_lite/services/include/param",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
]
|
||||
service_reboot_deps = [
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/param:param_client",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
ohos_static_library("libreboot_static") {
|
||||
sources = service_reboot_sources
|
||||
include_dirs = service_reboot_include
|
||||
deps = service_reboot_deps
|
||||
}
|
||||
|
||||
ohos_shared_library("libreboot") {
|
||||
sources = service_reboot_sources
|
||||
include_dirs = service_reboot_include
|
||||
deps = service_reboot_deps
|
||||
part_name = "init"
|
||||
install_images = [ "system" ]
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
# Copyright (c) 2021 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("//build/ohos.gni")
|
||||
service_socket_sources =
|
||||
[ "//base/startup/init_lite/interfaces/innerkits/socket/init_socket.c" ]
|
||||
service_socket_include = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/include",
|
||||
"//base/startup/init_lite/services/log",
|
||||
"//third_party/bounds_checking_function/include",
|
||||
]
|
||||
service_socket_deps = [
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
|
||||
ohos_static_library("libsocket_static") {
|
||||
sources = service_socket_sources
|
||||
include_dirs = service_socket_include
|
||||
deps = service_socket_deps
|
||||
}
|
||||
|
||||
ohos_shared_library("libsocket") {
|
||||
sources = service_socket_sources
|
||||
include_dirs = service_socket_include
|
||||
deps = service_socket_deps
|
||||
part_name = "init"
|
||||
install_images = [
|
||||
"system",
|
||||
"updater",
|
||||
]
|
||||
}
|
18
ohos.build
18
ohos.build
@ -6,7 +6,23 @@
|
||||
"//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"
|
||||
"//base/startup/init_lite/services/begetctl:begetctl",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil"
|
||||
],
|
||||
"inner_kits": [{
|
||||
"header": {
|
||||
"header_files": [
|
||||
"init_socket.h",
|
||||
"dynamic_service.h",
|
||||
"init_file.h",
|
||||
"fs_manager/fs_manager_log.h",
|
||||
"fs_manager/fs_manager.h",
|
||||
"init_reboot.h"
|
||||
],
|
||||
"header_base": "//base/startup/init_lite/interfaces/innerkits/include/"
|
||||
},
|
||||
"name": "//base/startup/init_lite/interfaces/innerkits:libbegetutil"
|
||||
}
|
||||
],
|
||||
"test_list": [
|
||||
"//base/startup/init_lite/test/unittest:init_test"
|
||||
|
@ -123,7 +123,7 @@ if (defined(ohos_lite)) {
|
||||
"//third_party/libuv/include",
|
||||
]
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_static",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libfsmanager_static",
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/param:param_service",
|
||||
"//base/startup/init_lite/ueventd:libueventd_static",
|
||||
@ -173,11 +173,6 @@ if (defined(ohos_lite)) {
|
||||
deps = [
|
||||
":init",
|
||||
":init_etc",
|
||||
"//base/startup/init_lite/interfaces/innerkits/dynamic_service:dynamic_service",
|
||||
"//base/startup/init_lite/interfaces/innerkits/file:libfile",
|
||||
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_shared",
|
||||
"//base/startup/init_lite/interfaces/innerkits/reboot:libreboot",
|
||||
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
|
||||
"//base/startup/init_lite/services/param:param_client",
|
||||
"//base/startup/init_lite/services/param:param_service",
|
||||
]
|
||||
|
@ -40,8 +40,7 @@ ohos_executable("begetctl") {
|
||||
"//base/update/updateservice/interfaces/innerkits/include",
|
||||
]
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_shared",
|
||||
"//base/startup/init_lite/interfaces/innerkits/reboot:libreboot_static",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/init_lite/services/log:agent_log",
|
||||
"//base/startup/init_lite/services/param:param_client",
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
||||
|
@ -33,7 +33,7 @@ ohos_fuzztest("DoRebootFuzzTest") {
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
|
||||
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/reboot:libreboot_static",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/param:param_client",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
@ -56,7 +56,7 @@ ohos_fuzztest("GetControlFileFuzzTest") {
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
|
||||
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/file:libfile",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/utils:libinit_utils",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
@ -79,7 +79,7 @@ ohos_fuzztest("GetControlSocketFuzzTest") {
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
|
||||
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/socket:libsocket",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//third_party/bounds_checking_function:libsec_static",
|
||||
]
|
||||
@ -104,7 +104,7 @@ ohos_fuzztest("MountAllFstabFuzzTest") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/fs_manager:libfsmanager_static",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/init_lite/services/log:init_log",
|
||||
"//base/startup/init_lite/services/utils:libinit_utils",
|
||||
"//base/startup/init_lite/test/fuzztest:libfuzz_utils",
|
||||
@ -152,7 +152,7 @@ ohos_fuzztest("StartDynamicProcessFuzzTest") {
|
||||
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/dynamic_service:dynamic_service",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
||||
]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
@ -173,7 +173,7 @@ ohos_fuzztest("StopDynamicProcessFuzzTest") {
|
||||
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
|
||||
deps = [
|
||||
"//base/startup/init_lite/interfaces/innerkits/dynamic_service:dynamic_service",
|
||||
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
|
||||
"//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara",
|
||||
]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
|
Loading…
Reference in New Issue
Block a user