mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-27 18:30:52 +00:00
6c8cb918bc
Signed-off-by: chenshixu1 <chenshixu1@huawei.com> Change-Id: Ib34476e954008886a37d75e3b51753f6b39d1956
85 lines
2.3 KiB
Plaintext
Executable File
85 lines
2.3 KiB
Plaintext
Executable File
# 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/begetd.gni")
|
|
import("//build/ohos.gni")
|
|
|
|
config("exported_header_files") {
|
|
visibility = [ ":*" ]
|
|
include_dirs = [ "./include" ]
|
|
}
|
|
|
|
ohos_static_library("sandbox") {
|
|
sources = [
|
|
"sandbox.c",
|
|
"sandbox_namespace.c",
|
|
]
|
|
public_configs = [ ":exported_header_files" ]
|
|
include_dirs = [
|
|
"//base/startup/init/interfaces/innerkits/include",
|
|
"//base/startup/init/interfaces/innerkits/include",
|
|
]
|
|
if (target_cpu == "arm64" || target_cpu == "x86_64" ||
|
|
target_cpu == "riscv64") {
|
|
defines = [ "SUPPORT_64BIT" ]
|
|
}
|
|
deps = [
|
|
":chipset-sandbox.json",
|
|
":system-sandbox.json",
|
|
"//base/startup/init/services/utils:libinit_utils",
|
|
]
|
|
external_deps = [
|
|
"bounds_checking_function:libsec_static",
|
|
"cJSON:cjson",
|
|
"config_policy:configpolicy_util",
|
|
]
|
|
part_name = "init"
|
|
subsystem_name = "startup"
|
|
}
|
|
|
|
ohos_prebuilt_etc("system-sandbox.json") {
|
|
if (target_cpu == "arm64" || target_cpu == "x86_64" ||
|
|
target_cpu == "riscv64") {
|
|
source = "system-sandbox64.json"
|
|
} else {
|
|
source = "system-sandbox.json"
|
|
}
|
|
output = "//base/startup/init/services/sandbox/system-sandbox.json"
|
|
part_name = "init"
|
|
subsystem_name = "startup"
|
|
module_install_dir = "etc/sandbox"
|
|
install_enable = true
|
|
install_images = [
|
|
"system",
|
|
"updater",
|
|
]
|
|
}
|
|
|
|
ohos_prebuilt_etc("chipset-sandbox.json") {
|
|
if (target_cpu == "arm64" || target_cpu == "x86_64" ||
|
|
target_cpu == "riscv64") {
|
|
source = "chipset-sandbox64.json"
|
|
} else {
|
|
source = "chipset-sandbox.json"
|
|
}
|
|
output = "//base/startup/init/services/sandbox/chipset-sandbox.json"
|
|
part_name = "init"
|
|
subsystem_name = "startup"
|
|
module_install_dir = "etc/sandbox"
|
|
install_enable = true
|
|
install_images = [
|
|
"system",
|
|
"updater",
|
|
]
|
|
}
|