From d5c43ec74e175cf758993130136431f7f6327f8d Mon Sep 17 00:00:00 2001 From: chengjinsong2 Date: Thu, 3 Nov 2022 15:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E9=85=8D?= =?UTF-8?q?=E7=BD=AE,=E8=A7=A3=E5=86=B3liteos=5Fm=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengjinsong2 Change-Id: I61a9f79db58b0b59de7e31764b1787f9a3386156 --- lingpi/config.json | 3 +-- lingpi/hals/utils/sys_param/BUILD.gn | 25 +++++++++++++++++++++ lingpi/hals/utils/sys_param/hal_sys_param.c | 23 +++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 lingpi/hals/utils/sys_param/BUILD.gn create mode 100644 lingpi/hals/utils/sys_param/hal_sys_param.c diff --git a/lingpi/config.json b/lingpi/config.json index 4b625c2..0b230e6 100755 --- a/lingpi/config.json +++ b/lingpi/config.json @@ -51,8 +51,7 @@ { "subsystem": "startup", "components": [ - { "component": "bootstrap_lite", "features":[] }, - { "component": "syspara_lite", "features":[] } + { "component": "bootstrap_lite", "features":[] } ] }, { diff --git a/lingpi/hals/utils/sys_param/BUILD.gn b/lingpi/hals/utils/sys_param/BUILD.gn new file mode 100644 index 0000000..cf440b4 --- /dev/null +++ b/lingpi/hals/utils/sys_param/BUILD.gn @@ -0,0 +1,25 @@ +# 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. + +static_library("hal_sysparam") { + sources = [ "hal_sys_param.c" ] + include_dirs = [ "//base/startup/init/interfaces/hals" ] + defines = [ + "INCREMENTAL_VERSION=\"${ohos_version}\"", + "BUILD_TYPE=\"${ohos_build_type}\"", + "BUILD_USER=\"${ohos_build_user}\"", + "BUILD_TIME=\"${ohos_build_time}\"", + "BUILD_HOST=\"${ohos_build_host}\"", + "BUILD_ROOTHASH=\"${ohos_build_roothash}\"", + ] +} diff --git a/lingpi/hals/utils/sys_param/hal_sys_param.c b/lingpi/hals/utils/sys_param/hal_sys_param.c new file mode 100644 index 0000000..fe1a976 --- /dev/null +++ b/lingpi/hals/utils/sys_param/hal_sys_param.c @@ -0,0 +1,23 @@ +/* + * 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. + */ + +#include "hal_sys_param.h" + +static const char OHOS_SERIAL[] = {"1234567890"}; // if not provid serial algorithm,Serial will use this default value. + +const char* HalGetSerial(void) +{ + return OHOS_SERIAL; +} \ No newline at end of file -- Gitee