Compare commits

..

No commits in common. "09bcd8cac95caf1bfb03e9ed2ce612caaf57e71f" and "c1ba66a8852eff2e04fdadded078f4c17b98a947" have entirely different histories.

6 changed files with 23 additions and 68 deletions

View File

@ -1,33 +0,0 @@
From 17be025e940fea23e6fdb7019f08fe9b3d656b91 Mon Sep 17 00:00:00 2001
From: s_c_c <shichuchao@huawei.com>
Date: Mon, 1 Apr 2024 20:14:11 +0800
Subject: [PATCH] feat for embedded fix config_safwk include_dirs
---
services/safwk/BUILD.gn | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/services/safwk/BUILD.gn b/services/safwk/BUILD.gn
index e25ecb9..09a6acc 100644
--- a/services/safwk/BUILD.gn
+++ b/services/safwk/BUILD.gn
@@ -12,6 +12,7 @@
# limitations under the License.
import("//build/ohos.gni")
+import("//build/config/sysroot.gni")
################################################################################
config("config_safwk") {
@@ -20,7 +21,7 @@ config("config_safwk") {
"//foundation/systemabilitymgr/safwk/services/safwk/include",
"//foundation/systemabilitymgr/samgr/services/lsamgr/include",
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
- "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
+ "${sysroot}/usr/include/ipc",
]
}
--
2.20.1 (Apple Git-117)

View File

@ -13,24 +13,24 @@
import("//build/ohos.gni") import("//build/ohos.gni")
import("//build/ohos_var.gni") import("//build/ohos_var.gni")
import("//build/config/sysroot.gni")
# 建立所需头文件链接 # 建立所需头文件链接
exec_script("//build/openeuler/script/link.py", [ "--src_target", "${sysroot}/usr/include/safwk/system_ability.h", "--dest_target", exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk/system_ability.h", "--dest_target",
rebase_path("//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/system_ability.h") ], "string") rebase_path("//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk/system_ability.h") ], "string")
exec_script("//build/openeuler/script/link.py", [ "--src_target", "${sysroot}/usr/include/safwk", "--dest_target", exec_script("//build/openeuler/script/link.py", [ "--src_target", "/usr/include/safwk", "--dest_target",
rebase_path("//foundation/systemabilitymgr/safwk/services/safwk/include") ], "string") rebase_path("//foundation/systemabilitymgr/safwk/services/safwk/include") ], "string")
config("system_ability_config") { config("system_ability_config") {
visibility = [ ":*" ] visibility = [ ":*" ]
include_dirs = [ include_dirs = [
"${sysroot}/usr/include/safwk", "../../../services/safwk/include",
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
] ]
} }
ohos_prebuilt_shared_library("system_ability_fwk") { ohos_prebuilt_shared_library("system_ability_fwk") {
source = "${sysroot}/usr/lib64/libsystem_ability_fwk.z.so" source = "/usr/lib64/libsystem_ability_fwk.z.so"
public_configs = [ ":system_ability_config" ] public_configs = [ ":system_ability_config" ]

View File

@ -6,7 +6,7 @@
Name: systemabilitymgr_safwk Name: systemabilitymgr_safwk
Version: 1.0.0 Version: 1.0.0
Release: 5 Release: 2
Summary: System ability manager Summary: System ability manager
License: Apache-2.0 License: Apache-2.0
Url: https://gitee.com/openharmony/systemabilitymgr_safwk Url: https://gitee.com/openharmony/systemabilitymgr_safwk
@ -18,7 +18,6 @@ Source5: start_services.sh
Source6: stop_services.sh Source6: stop_services.sh
Patch1: 0000-remove-dependency-on-hitrace-safwk.patch Patch1: 0000-remove-dependency-on-hitrace-safwk.patch
Patch2: 0001-feat-for-embedded-fix-config_safwk-include_dirs.patch
BuildRequires: gcc, make, hilog, libboundscheck BuildRequires: gcc, make, hilog, libboundscheck
BuildRequires: libatomic,libicu-devel, libxml2-devel, cjson-devel BuildRequires: libatomic,libicu-devel, libxml2-devel, cjson-devel
@ -52,7 +51,6 @@ mkdir -p %{samgr_dir}
%setup -q -D -T -a 1 -c -n %{samgr_dir} %setup -q -D -T -a 1 -c -n %{samgr_dir}
# patch命令统一使用-P来指定第几个patch # patch命令统一使用-P来指定第几个patch
%patch -P1 -p1 -d %{samgr_dir}/safwk %patch -P1 -p1 -d %{samgr_dir}/safwk
%patch -P2 -p1 -d %{samgr_dir}/safwk
%build %build
rm -rf %{_builddir}/out rm -rf %{_builddir}/out
@ -109,15 +107,6 @@ ln -s /usr/include/safwk/system_ability.h %{safwk_path}/interfaces/innerkits/saf
%{build_opt}/* %{build_opt}/*
%changelog %changelog
* Tue Apr 2 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-5
- Fix BUILD.gn sysroot path for embedded
* Mon Apr 1 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-4
- Fix config_safwk include_dirs for embedded
* Wed Mar 27 2024 tianhang <tian_hang@hoperun.com> - 1.0.0-3
- update version to 1.0.0-3
-
* Mon Dec 18 2023 Peng He <hepeng68@huawei.com> - 1.0.0-2 * Mon Dec 18 2023 Peng He <hepeng68@huawei.com> - 1.0.0-2
- Add shell scripts for services start/stop - Add shell scripts for services start/stop

View File

@ -12,10 +12,9 @@
# limitations under the License. # limitations under the License.
import("//build/ohos.gni") import("//build/ohos.gni")
import("//build/config/sysroot.gni")
ohos_prebuilt_executable("sa_main") { ohos_prebuilt_executable("sa_main") {
source = "${sysroot}/usr/bin/sa_main" source = "/usr/bin/sa_main"
install_enable = true install_enable = true
part_name = "safwk" part_name = "safwk"

View File

@ -92,10 +92,17 @@ start_process() {
fi fi
} }
# 判断参数是否为空 # 如果有进程还在,暂停服务防止双进程存在
if [ -z "$1" ]; then if pgrep -x "samgr" > /dev/null; then
log error "Usage: $0 [all|samgr|huks|deviceauth|softbus|device_manager|dfs|datamgr]" log info "service is running, stop it"
exit 1 /system/bin/stop_services.sh all
sleep 2
fi
# 软链接动态库
if [ ! -e "/usr/lib64/libsec_shared.z.so" ]; then
log info "libsec_shared.z.so not exist, create it"
ln -s /usr/lib64/libboundscheck.so /usr/lib64/libsec_shared.z.so
fi fi
# 新建日志目录 # 新建日志目录
@ -111,10 +118,10 @@ if [ ! -e "/etc/SN" ]; then
echo "$ipv4_address" | sudo tee /etc/SN > /dev/null echo "$ipv4_address" | sudo tee /etc/SN > /dev/null
fi fi
# 软链接动态库 # 判断参数是否为空
if [ ! -e "/usr/lib64/libsec_shared.z.so" ]; then if [ -z "$1" ]; then
log info "libsec_shared.z.so not exist, create it" log error "Usage: $0 [all|samgr|huks|deviceauth|softbus|device_manager|dfs|datamgr]"
ln -s /usr/lib64/libboundscheck.so /usr/lib64/libsec_shared.z.so exit 1
fi fi
# 检查 $LD_LIBRARY_PATH 是否包含 "/system/lib64",如果不包含则加入 # 检查 $LD_LIBRARY_PATH 是否包含 "/system/lib64",如果不包含则加入
@ -148,13 +155,6 @@ if [ ! -e "/dev/binder" ]; then
fi fi
cd ${BIN_PATH} || exit cd ${BIN_PATH} || exit
# 如果有进程还在,暂停服务防止双进程存在
if pgrep -x "samgr" > /dev/null; then
log info "service is running, stop it"
/system/bin/stop_services.sh all
sleep 2
fi
# 验证参数并执行相应命令 # 验证参数并执行相应命令
if [ "$1" == "all" ]; then if [ "$1" == "all" ]; then
log info "Starting all services..." log info "Starting all services..."

View File

@ -7,13 +7,13 @@
# 定义map保存参数和对应执行的shell命令 # 定义map保存参数和对应执行的shell命令
declare -A COMMAND_MAP=( declare -A COMMAND_MAP=(
["datamgr"]="pkill -f distributeddata"
["dfs"]="pkill -f distributedfile" ["dfs"]="pkill -f distributedfile"
["dm"]="pkill -f device_manager" ["dm"]="pkill -f device_manager"
["softbus"]="pkill -f softbus_server" ["softbus"]="pkill -f softbus_server"
["deviceauth"]="pkill -f deviceauth_service" ["deviceauth"]="pkill -f deviceauth_service"
["huks"]="pkill -f huks_service" ["huks"]="pkill -f huks_service"
["samgr"]="pkill -f samgr" ["samgr"]="pkill -f samgr"
["datamgr"]="pkill -f distributeddata"\
) )
# 日志打印函数 # 日志打印函数