add l1 ueventd

Signed-off-by: xionglei6 <xionglei6@huawei.com>
This commit is contained in:
xionglei6 2021-11-02 09:38:26 +08:00
parent 46c36d1343
commit da3ce95e81
2 changed files with 61 additions and 1 deletions

View File

@ -10,8 +10,51 @@
# 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.
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux") {
executable("ueventd_linux") {
sources = [
"//base/startup/init_lite/services/utils/init_utils.c",
"//base/startup/init_lite/services/utils/list.c",
"//base/startup/init_lite/ueventd/ueventd.c",
"//base/startup/init_lite/ueventd/ueventd_device_handler.c",
"//base/startup/init_lite/ueventd/ueventd_firmware_handler.c",
"//base/startup/init_lite/ueventd/ueventd_main.c",
"//base/startup/init_lite/ueventd/ueventd_read_cfg.c",
"//base/startup/init_lite/ueventd/ueventd_socket.c",
]
if (!defined(ohos_lite)) {
defines = [ "__MUSL__" ]
defines += [ "_GNU_SOURCE" ]
include_dirs = [
".",
"//third_party/bounds_checking_function/include",
"//base/startup/init_lite/services/log",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/utils",
"//kernel/linux-4.19/include/uapi",
]
deps = [
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
]
}
copy("ueventd.config") {
sources = [ "etc/ueventd_l1.config" ]
outputs = [ "$root_out_dir/etc/ueventd.config" ]
}
}
group("ueventd") {
if (ohos_kernel_type == "linux") {
deps = [ ":ueventd_linux" ]
} else {
deps = []
}
}
} else {
import("//build/ohos.gni")
ohos_executable("ueventd") {

17
ueventd/etc/ueventd_l1.config Executable file
View File

@ -0,0 +1,17 @@
# 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.
[device]
# <device name> <mode> <uid> <gid>
/dev/binder 0666 0 0
/dev/mmz_userdev 0666 0 0