mirror of
https://github.com/openharmony/vendor_alientek.git
synced 2026-07-01 20:36:49 -04:00
@@ -11,6 +11,7 @@ The repository is mainly developed by OpenHarmony community, rather than the typ
|
||||
|
||||
//vendor/ohos
|
||||
| rtos_demo --- Basic competence verification demo
|
||||
| rtos_demo_xts --- Basic competence verification xts demo
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
//vendor/ohos
|
||||
| rtos_demo --- 基础能力验证demo
|
||||
| rtos_demo_xts --- xts
|
||||
```
|
||||
|
||||
## 使用说明
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 8356f58d0016c009604b4fc9959e911da112e27a Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Sat, 17 Sep 2022 14:06:48 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=E6=94=AF=E6=8C=81UniProton?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: I085f6b953098eddd20cbf3dbb6b7458c7a4f055d
|
||||
---
|
||||
services/source/BUILD.gn | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/source/BUILD.gn b/services/source/BUILD.gn
|
||||
index 50a61cb..077b888 100644
|
||||
--- a/services/source/BUILD.gn
|
||||
+++ b/services/source/BUILD.gn
|
||||
@@ -20,7 +20,7 @@ static_library("bootstrap") {
|
||||
"//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
|
||||
"//utils/native/lite/include",
|
||||
]
|
||||
- if (ohos_kernel_type == "liteos_m") {
|
||||
+ if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
include_dirs += []
|
||||
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
|
||||
include_dirs += [ "//third_party/bounds_checking_function/include" ]
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From b76bb1c5c4cf74e33ec04a8beddcd9b1d7c85a05 Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Sat, 17 Sep 2022 14:08:53 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81UniProton?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: Iabd5c28e88173247b84ec074e395092cc3b125e4
|
||||
---
|
||||
frameworks/bundle.json | 4 ++--
|
||||
frameworks/parameter/BUILD.gn | 2 +-
|
||||
frameworks/parameter/src/BUILD.gn | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/frameworks/bundle.json b/frameworks/bundle.json
|
||||
index d9c2103..c09b50f 100644
|
||||
--- a/frameworks/bundle.json
|
||||
+++ b/frameworks/bundle.json
|
||||
@@ -28,10 +28,10 @@
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
- "sub_component": [],
|
||||
+ "sub_component": [ "//base/startup/syspara_lite/frameworks/parameter:parameter_notes" ],
|
||||
"test": [
|
||||
"//base/startup/syspara_lite/frameworks/unittest/parameter:unittest"
|
||||
]
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/frameworks/parameter/BUILD.gn b/frameworks/parameter/BUILD.gn
|
||||
index 3e18233..0e91416 100644
|
||||
--- a/frameworks/parameter/BUILD.gn
|
||||
+++ b/frameworks/parameter/BUILD.gn
|
||||
@@ -16,7 +16,7 @@ import("//build/lite/config/component/lite_component.gni")
|
||||
import("//build/lite/ndk/ndk.gni")
|
||||
|
||||
ndk_lib("parameter_notes") {
|
||||
- if (ohos_kernel_type != "liteos_m") {
|
||||
+ if (ohos_kernel_type != "liteos_m" && ohos_kernel_type != "uniproton") {
|
||||
lib_extension = ".so"
|
||||
}
|
||||
if (enable_ohos_startup_init_feature_begetctl_liteos == false) {
|
||||
diff --git a/frameworks/parameter/src/BUILD.gn b/frameworks/parameter/src/BUILD.gn
|
||||
index 6d602a8..b25dd89 100644
|
||||
--- a/frameworks/parameter/src/BUILD.gn
|
||||
+++ b/frameworks/parameter/src/BUILD.gn
|
||||
@@ -13,7 +13,7 @@
|
||||
import("//base/startup/init/begetd.gni")
|
||||
import("../config.gni")
|
||||
|
||||
-if (ohos_kernel_type == "liteos_m") {
|
||||
+if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
static_library("sysparam") {
|
||||
if (enable_ohos_startup_init_feature_begetctl_liteos == false) {
|
||||
include_dirs = [
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,21 +1,58 @@
|
||||
From e99b760b67da75d391488a922f4a69faa9a84b40 Mon Sep 17 00:00:00 2001
|
||||
From cebef3877765b4fbb073a5d37b5e05b484655aaa Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Mon, 5 Sep 2022 20:34:17 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81uniproton=E5=86=85?=
|
||||
=?UTF-8?q?=E6=A0=B8?=
|
||||
Date: Sat, 17 Sep 2022 14:01:19 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81uniproton?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: I0369e2bfe650b18ddd39481ebcd33b4bc1461f4f
|
||||
Change-Id: I034ae188e89b87a19d713613410b9890bb7457c6
|
||||
---
|
||||
BUILD.gn | 5 +++++
|
||||
components/xts.json | 2 ++
|
||||
config/BUILD.gn | 5 +++++
|
||||
config/BUILDCONFIG.gn | 4 ++--
|
||||
config/component/lite_component.gni | 4 ++--
|
||||
ohos_var.gni | 2 +-
|
||||
4 files changed, 10 insertions(+), 5 deletions(-)
|
||||
6 files changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 1c04a37..d6f38fe 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -90,6 +90,11 @@ group("ohos") {
|
||||
"//kernel/liteos_m:build_kernel_image") {
|
||||
deps += [ component_target ]
|
||||
}
|
||||
+ } else if (product_configed_component.component == "uniproton") {
|
||||
+ if (component_target !=
|
||||
+ "//kernel/uniproton:build_kernel_image") {
|
||||
+ deps += [ component_target ]
|
||||
+ }
|
||||
} else {
|
||||
deps += [ component_target ]
|
||||
}
|
||||
diff --git a/components/xts.json b/components/xts.json
|
||||
index 68676c3..b37dc74 100755
|
||||
--- a/components/xts.json
|
||||
+++ b/components/xts.json
|
||||
@@ -16,6 +16,7 @@
|
||||
"adapted_kernel": [
|
||||
"liteos_a",
|
||||
"liteos_m",
|
||||
+ "uniproton",
|
||||
"linux"
|
||||
],
|
||||
"features": [],
|
||||
@@ -41,6 +42,7 @@
|
||||
"adapted_kernel": [
|
||||
"liteos_a",
|
||||
"liteos_m",
|
||||
+ "uniproton",
|
||||
"linux"
|
||||
],
|
||||
"features": [],
|
||||
diff --git a/config/BUILD.gn b/config/BUILD.gn
|
||||
index b101f43..24b77d5 100644
|
||||
--- a/config/BUILD.gn
|
||||
@@ -55,7 +92,7 @@ index e53cddf..89abbe3 100755
|
||||
default_executable_configs += [ "//build/lite/config:static_pie_config" ]
|
||||
default_executable_configs += [ "//build/lite/config:pie_executable_config" ]
|
||||
diff --git a/config/component/lite_component.gni b/config/component/lite_component.gni
|
||||
index 9bcbdee..74ac10e 100644
|
||||
index 190772d..ff8a72f 100644
|
||||
--- a/config/component/lite_component.gni
|
||||
+++ b/config/component/lite_component.gni
|
||||
@@ -19,7 +19,7 @@ template("lite_library") {
|
||||
@@ -67,7 +104,7 @@ index 9bcbdee..74ac10e 100644
|
||||
group(target_name) {
|
||||
if (defined(invoker.sources)) {
|
||||
assert(invoker.sources != "")
|
||||
@@ -57,7 +57,7 @@ template("lite_library") {
|
||||
@@ -54,7 +54,7 @@ template("lite_library") {
|
||||
if (shared_lib) {
|
||||
cflags += [ "-fPIC" ]
|
||||
cflags_cc += [ "-fPIC" ]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
From abf165f0a2f57c0ad5b6c3509614d26d33b2ef42 Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Sat, 24 Sep 2022 09:11:23 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81UniProton=E5=86=85?=
|
||||
=?UTF-8?q?=E6=A0=B8?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: I046525c68808962b352972180d58a05447f619d9
|
||||
---
|
||||
BUILD.gn | 2 +-
|
||||
bundle.json | 3 ++-
|
||||
communication/broadcast/BUILD.gn | 2 +-
|
||||
samgr/BUILD.gn | 2 +-
|
||||
samgr/adapter/BUILD.gn | 12 +++++++-----
|
||||
samgr/source/BUILD.gn | 2 +-
|
||||
6 files changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 636562c..d64ad05 100755
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -41,7 +41,7 @@ copy("ConfigFiles") {
|
||||
}
|
||||
|
||||
ndk_lib("samgr_lite_ndk") {
|
||||
- if (ohos_kernel_type == "liteos_m") {
|
||||
+ if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
lib_extension = ".a"
|
||||
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
|
||||
lib_extension = ".so"
|
||||
diff --git a/bundle.json b/bundle.json
|
||||
index 019313b..1c028e9 100644
|
||||
--- a/bundle.json
|
||||
+++ b/bundle.json
|
||||
@@ -20,6 +20,7 @@
|
||||
"adapted_kernel": [
|
||||
"liteos_a",
|
||||
"liteos_m",
|
||||
+ "uniproton",
|
||||
"linux"
|
||||
],
|
||||
"rom": "62KB",
|
||||
@@ -40,4 +41,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/communication/broadcast/BUILD.gn b/communication/broadcast/BUILD.gn
|
||||
index 51fd524..0823025 100755
|
||||
--- a/communication/broadcast/BUILD.gn
|
||||
+++ b/communication/broadcast/BUILD.gn
|
||||
@@ -20,7 +20,7 @@ config("broadcast_public") {
|
||||
]
|
||||
}
|
||||
|
||||
-if (ohos_kernel_type == "liteos_m") {
|
||||
+if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
static_library("broadcast") {
|
||||
sources = [
|
||||
"source/broadcast_service.c",
|
||||
diff --git a/samgr/BUILD.gn b/samgr/BUILD.gn
|
||||
index 3e22d90..9945161 100644
|
||||
--- a/samgr/BUILD.gn
|
||||
+++ b/samgr/BUILD.gn
|
||||
@@ -34,7 +34,7 @@ config("samgr_public") {
|
||||
]
|
||||
}
|
||||
|
||||
-if (ohos_kernel_type == "liteos_m") {
|
||||
+if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
static_library("samgr") {
|
||||
sources = [
|
||||
"registry/service_registry.c",
|
||||
diff --git a/samgr/adapter/BUILD.gn b/samgr/adapter/BUILD.gn
|
||||
index d0c41af..d2d2d5a 100755
|
||||
--- a/samgr/adapter/BUILD.gn
|
||||
+++ b/samgr/adapter/BUILD.gn
|
||||
@@ -19,7 +19,7 @@ config("samgr_adapter_public") {
|
||||
]
|
||||
}
|
||||
|
||||
-if (ohos_kernel_type == "liteos_m") {
|
||||
+if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
static_library("samgr_adapter") {
|
||||
sources = [
|
||||
"cmsis/memory_adapter.c",
|
||||
@@ -30,10 +30,12 @@ if (ohos_kernel_type == "liteos_m") {
|
||||
|
||||
public_configs = [ ":samgr_adapter_public" ]
|
||||
|
||||
- include_dirs = [
|
||||
- "//kernel/liteos_m/kal/",
|
||||
- "//kernel/liteos_m/kal/cmsis",
|
||||
- ]
|
||||
+ if (ohos_kernel_type == "liteos_m") {
|
||||
+ include_dirs = [
|
||||
+ "//kernel/liteos_m/kal/",
|
||||
+ "//kernel/liteos_m/kal/cmsis",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/samgr/source/BUILD.gn b/samgr/source/BUILD.gn
|
||||
index 30c7b79..4b81e2d 100755
|
||||
--- a/samgr/source/BUILD.gn
|
||||
+++ b/samgr/source/BUILD.gn
|
||||
@@ -23,7 +23,7 @@ config("samgr_source_public") {
|
||||
]
|
||||
}
|
||||
|
||||
-if (ohos_kernel_type == "liteos_m") {
|
||||
+if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
|
||||
static_library("samgr_source") {
|
||||
sources = [
|
||||
"common.c",
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 6f066e0b6c42363ed259804058730690761bea5e Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Sat, 17 Sep 2022 16:34:30 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81UniProton?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: Ifdcdea39696605dca511926c62f43e1d1206894b
|
||||
---
|
||||
build_lite/BUILD.gn | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/build_lite/BUILD.gn b/build_lite/BUILD.gn
|
||||
index 6f1021bc5..93f253cb1 100644
|
||||
--- a/build_lite/BUILD.gn
|
||||
+++ b/build_lite/BUILD.gn
|
||||
@@ -48,6 +48,12 @@ lite_component("acts_component") {
|
||||
"//test/xts/acts/update_lite/dupdate_hal:ActsUpdaterFuncTest",
|
||||
"//test/xts/acts/startup_lite/bootstrap_hal:ActsBootstrapTest",
|
||||
]
|
||||
+ } else if (ohos_kernel_type == "uniproton") {
|
||||
+ all_features += [
|
||||
+ "//test/xts/acts/commonlibrary_lite/file_hal:ActsUtilsFileTest",
|
||||
+ "//test/xts/acts/startup_lite/bootstrap_hal:ActsBootstrapTest",
|
||||
+ ]
|
||||
+ features += [ "//test/xts/acts/communication_lite/lwip_hal:ActsLwipTest" ]
|
||||
} else if (ohos_kernel_type == "liteos_a") {
|
||||
all_features += [
|
||||
"//test/xts/acts/kernel_lite:ActsKernelTest",
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
From 92331eafb5defd179fde9b4b84cff0943c18b131 Mon Sep 17 00:00:00 2001
|
||||
From: wangchen <253227059@qq.com>
|
||||
Date: Fri, 9 Sep 2022 09:37:19 +0000
|
||||
Subject: [PATCH] Signed-off-by: wangchen <253227059@qq.com> Change-Id:
|
||||
I2466b069d9d208548cb454c6c00b59259cf1faeb
|
||||
From 8b69e1cebcafcfd5eaec925f4c1e8879ba7e18cb Mon Sep 17 00:00:00 2001
|
||||
From: zhushengle <zhushengle@huawei.com>
|
||||
Date: Sat, 24 Sep 2022 16:01:17 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81uniproton=E5=86=85?=
|
||||
=?UTF-8?q?=E6=A0=B8?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: zhushengle <zhushengle@huawei.com>
|
||||
Change-Id: If88760acfaaec8049ab68061084cd857328e2f3f
|
||||
---
|
||||
BUILD.gn | 17 +-
|
||||
porting/uniproton/include/__strerror.h | 105 +
|
||||
@@ -228,7 +233,7 @@ Subject: [PATCH] Signed-off-by: wangchen <253227059@qq.com> Change-Id:
|
||||
porting/uniproton/include/wchar.h | 207 ++
|
||||
porting/uniproton/include/wctype.h | 79 +
|
||||
porting/uniproton/include/wordexp.h | 41 +
|
||||
porting/uniproton/kernel/BUILD.gn | 66 +
|
||||
porting/uniproton/kernel/BUILD.gn | 68 +
|
||||
porting/uniproton/kernel/musl.gni | 68 +
|
||||
.../kernel/src/__ctype_get_mb_cur_max.c | 7 +
|
||||
.../uniproton/kernel/src/__errno_location.c | 9 +
|
||||
@@ -266,7 +271,7 @@ Subject: [PATCH] Signed-off-by: wangchen <253227059@qq.com> Change-Id:
|
||||
porting/uniproton/kernel/src/wcrtomb.c | 39 +
|
||||
porting/uniproton/kernel/src/wctomb.c | 8 +
|
||||
porting/uniproton/kernel/src/write.c | 8 +
|
||||
261 files changed, 21201 insertions(+), 5 deletions(-)
|
||||
261 files changed, 21203 insertions(+), 5 deletions(-)
|
||||
create mode 100644 porting/uniproton/include/__strerror.h
|
||||
create mode 100644 porting/uniproton/include/aio.h
|
||||
create mode 100644 porting/uniproton/include/alloca.h
|
||||
@@ -21106,10 +21111,10 @@ index 00000000..5460002d
|
||||
+#endif
|
||||
diff --git a/porting/uniproton/kernel/BUILD.gn b/porting/uniproton/kernel/BUILD.gn
|
||||
new file mode 100644
|
||||
index 00000000..814d31b2
|
||||
index 00000000..b62bba18
|
||||
--- /dev/null
|
||||
+++ b/porting/uniproton/kernel/BUILD.gn
|
||||
@@ -0,0 +1,66 @@
|
||||
@@ -0,0 +1,68 @@
|
||||
+# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
+# Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
|
||||
+#
|
||||
@@ -21156,11 +21161,13 @@ index 00000000..814d31b2
|
||||
+ ]
|
||||
+
|
||||
+ include_dirs += [
|
||||
+ "//kernel/uniproton/kernel/arch/include",
|
||||
+ "//kernel/uniproton/kernel/include",
|
||||
+ "//kernel/uniproton/utils",
|
||||
+ "//kernel/uniproton/UniProton/src/mem",
|
||||
+ "//kernel/uniproton/UniProton/src/arch/include",
|
||||
+ "//kernel/uniproton/UniProton/src/include",
|
||||
+ "//kernel/uniproton/UniProton/src/utility/lib/include",
|
||||
+ "//kernel/uniproton/UniProton/src/mem",
|
||||
+ "//kernel/uniproton/UniProton/src/mem/include",
|
||||
+ "//kernel/uniproton/UniProton/src/include",
|
||||
+ "//kernel/uniproton/UniProton/src/om/include",
|
||||
+ "//third_party/musl/porting/uniproton/include",
|
||||
+ ]
|
||||
+
|
||||
@@ -23295,5 +23302,5 @@ index 00000000..2919151e
|
||||
+ return syscall_cp(1, fd, buf, count);
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -27,4 +27,5 @@
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
group("rtos_demo") {
|
||||
deps = [ "app" ]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other materials
|
||||
# provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
# to endorse or promote products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
static_library("app") {
|
||||
sources = [
|
||||
"app.c",
|
||||
]
|
||||
include_dirs = [ "//utils/native/lite/include" ]
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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 "app.h"
|
||||
|
||||
static void BoardEntry(void)
|
||||
{
|
||||
#if (OS_SUPPORT_KERNEL_TEST == 1)
|
||||
TestInit();
|
||||
#else
|
||||
TestTask();
|
||||
#endif
|
||||
}
|
||||
|
||||
CORE_INIT(BoardEntry);
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef _APP_H
|
||||
#define _APP_H
|
||||
#include "ohos_init.h"
|
||||
extern int TestInit(void);
|
||||
extern void TestTask(void);
|
||||
#endif
|
||||
@@ -7,12 +7,48 @@
|
||||
"board": "st/stm32f407zg",
|
||||
"kernel_type": "uniproton",
|
||||
"kernel_version": "3.0.0",
|
||||
"bin_list": [
|
||||
{
|
||||
"force_link_libs": [
|
||||
"app"
|
||||
]
|
||||
}
|
||||
],
|
||||
"subsystems": [
|
||||
{
|
||||
"subsystem": "kernel",
|
||||
"components": [
|
||||
{ "component": "uniproton", "features":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "startup",
|
||||
"components": [
|
||||
{ "component": "bootstrap_lite", "features": [] },
|
||||
{
|
||||
"component": "syspara_lite",
|
||||
"features": [
|
||||
"enable_ohos_startup_init_lite_use_posix_file_api = false"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "systemabilitymgr",
|
||||
"components": [
|
||||
{
|
||||
"component": "samgr_lite",
|
||||
"features": [
|
||||
"config_ohos_systemabilitymgr_samgr_lite_shared_task_size = 4096"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "commonlibrary",
|
||||
"components": [
|
||||
{ "component": "file", "features":[] }
|
||||
]
|
||||
}
|
||||
],
|
||||
"third_party_dir": "",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
static_library("hal_sysparam") {
|
||||
sources = [ "hal_sys_param.c" ]
|
||||
include_dirs = [ "//base/startup/init_lite/interfaces/hals" ]
|
||||
include_dirs = [ "//base/startup/syspara_lite/hals" ]
|
||||
defines = [
|
||||
"INCREMENTAL_VERSION=\"${ohos_version}\"",
|
||||
"BUILD_TYPE=\"${ohos_build_type}\"",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
static_library("hal_token_static") {
|
||||
static_library("hal_token") {
|
||||
sources = [ "hal_token.c" ]
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -1 +1,155 @@
|
||||
|
||||
#
|
||||
# Arch Modules Configuration
|
||||
#
|
||||
OS_ARCH_ARMV7_M=y
|
||||
|
||||
#
|
||||
# ARM7-M Sepecfic Configuration
|
||||
#
|
||||
INTERNAL_OS_CORTEX_M4=y
|
||||
INTERNAL_OS_PLATFORM_M4=y
|
||||
|
||||
#
|
||||
# M4 Sepecfic Configuration
|
||||
#
|
||||
# end of ARM7-M Sepecfic Configuration
|
||||
|
||||
#
|
||||
# Generic Configuration
|
||||
#
|
||||
OS_HARDWARE_PLATFORM="OS_CORTEX_M4"
|
||||
OS_CPU_TYPE="OS_STM32F407"
|
||||
OS_MAX_CORE_NUM=1
|
||||
INTERNAL_OS_BYTE_ORDER_LE=y
|
||||
OS_BYTE_ORDER="OS_LITTLE_ENDIAN"
|
||||
# end of Generic Configuration
|
||||
# end of Arch Modules Configuration
|
||||
|
||||
#
|
||||
# Core Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# IPC Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Event feature configuration
|
||||
#
|
||||
OS_OPTION_EVENT=y
|
||||
# end of Event feature configuration
|
||||
|
||||
OS_OPTION_QUEUE=y
|
||||
|
||||
#
|
||||
# Semaphore feature configuration
|
||||
#
|
||||
# end of IPC Modules Configuration
|
||||
|
||||
#
|
||||
# Kernel Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# IRQ Modules Configuration
|
||||
#
|
||||
OS_OPTION_HWI_COMBINE=y
|
||||
OS_OPTION_HWI_PRIORITY=y
|
||||
OS_OPTION_HWI_ATTRIBUTE=y
|
||||
OS_OPTION_HWI_MAX_NUM_CONFIG=y
|
||||
# end of IRQ Modules Configuration
|
||||
|
||||
#
|
||||
# Exc Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Task module Configuration
|
||||
#
|
||||
OS_OPTION_TASK=y
|
||||
|
||||
#
|
||||
# TASK features configuration
|
||||
#
|
||||
OS_OPTION_TASK_DELETE=y
|
||||
OS_OPTION_TASK_SUSPEND=y
|
||||
OS_OPTION_TASK_INFO=y
|
||||
OS_OPTION_TASK_YIELD=y
|
||||
# end of TASK features configuration
|
||||
|
||||
OS_TSK_PRIORITY_HIGHEST=0
|
||||
OS_TSK_PRIORITY_LOWEST=31
|
||||
OS_TSK_NUM_OF_PRIORITIES=32
|
||||
OS_TSK_CORE_BYTES_IN_PID=3
|
||||
# end of Task module Configuration
|
||||
|
||||
#
|
||||
# Timer Modules Configuration
|
||||
#
|
||||
INTERNAL_OS_SWTMR=y
|
||||
# end of Timer Modules Configuration
|
||||
# end of Kernel Modules Configuration
|
||||
# end of Core Modules Configuration
|
||||
|
||||
#
|
||||
# MM Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# OM Modules Configuration
|
||||
#
|
||||
OS_OPTION_CPUP=y
|
||||
|
||||
#
|
||||
# CPUP features configuration
|
||||
#
|
||||
INTERNAL_OS_CPUP_THREAD=y
|
||||
OS_OPTION_CPUP_WARN=y
|
||||
# end of CPUP features configuration
|
||||
|
||||
#
|
||||
# Error Report Module Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Hook feature configuration
|
||||
#
|
||||
# end of OM Modules Configuration
|
||||
|
||||
#
|
||||
# security Modules Configuration
|
||||
#
|
||||
OS_OPTION_RND=y
|
||||
# end of security Modules Configuration
|
||||
|
||||
#
|
||||
# Fs Modules Configuration
|
||||
#
|
||||
OS_SUPPORT_FS=y
|
||||
|
||||
#
|
||||
# Fs features configuration
|
||||
#
|
||||
OS_SUPPORT_LITTLEFS=1
|
||||
OS_LFS_MAX_OPEN_FILES=32
|
||||
OS_LFS_MAX_MOUNT_SIZE=3
|
||||
# end of Fs features configuration
|
||||
# end of Fs Modules Configuration
|
||||
|
||||
#
|
||||
# Net Modules Configuration
|
||||
#
|
||||
OS_SUPPORT_NET=y
|
||||
|
||||
#
|
||||
# Net features configuration
|
||||
#
|
||||
LWIP_DHCP=0
|
||||
LWIP_IPV6=1
|
||||
# end of Net features configuration
|
||||
# end of Net Modules Configuration
|
||||
|
||||
#
|
||||
# Utility Modules Configuration
|
||||
#
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"parts": {
|
||||
"product_rtos_demo": {
|
||||
"module_list": [
|
||||
"//vendor/alientek/rtos_demo:rtos_demo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"subsystem": "product_rtos_demo"
|
||||
}
|
||||
@@ -4,3 +4,11 @@ build/lite:
|
||||
- vendor/alientek/patches/0001-build-lite-uniproton.patch
|
||||
device/soc/st:
|
||||
- vendor/alientek/patches/0001-device-soc-st-stm32f407zg.patch
|
||||
base/startup/bootstrap_lite:
|
||||
- vendor/alientek/patches/0001-base-startup-bootstrap_lite.patch
|
||||
base/startup/syspara_lite:
|
||||
- vendor/alientek/patches/0001-base-startup-syspara_lite.patch
|
||||
foundation/systemabilitymgr/samgr_lite:
|
||||
- vendor/alientek/patches/0001-foundation-systemabilitymgr-samgr_lite.patch
|
||||
test/xts/acts:
|
||||
- vendor/alientek/patches/0001-test-xts-acts.patch
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other materials
|
||||
# provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
# to endorse or promote products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
group("rtos_demo_xts") {
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"product_name": "rtos_demo_xts",
|
||||
"ohos_version": "OpenHarmony 3.0",
|
||||
"type":"mini",
|
||||
"version": "3.0",
|
||||
"device_company": "soc",
|
||||
"board": "st/stm32f407zg",
|
||||
"kernel_type": "uniproton",
|
||||
"kernel_version": "3.0.0",
|
||||
"bin_list": [
|
||||
{
|
||||
"force_link_libs": [
|
||||
"hctest",
|
||||
"module_ActsBootstrapTest",
|
||||
"module_ActsUtilsFileTest",
|
||||
"module_ActsLwipTest"
|
||||
]
|
||||
}
|
||||
],
|
||||
"subsystems": [
|
||||
{
|
||||
"subsystem": "kernel",
|
||||
"components": [
|
||||
{ "component": "uniproton", "features":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "startup",
|
||||
"components": [
|
||||
{ "component": "bootstrap_lite", "features": [] },
|
||||
{
|
||||
"component": "syspara_lite",
|
||||
"features": [
|
||||
"enable_ohos_startup_init_lite_use_posix_file_api = false"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "systemabilitymgr",
|
||||
"components": [
|
||||
{
|
||||
"component": "samgr_lite",
|
||||
"features": [
|
||||
"config_ohos_systemabilitymgr_samgr_lite_shared_task_size = 4096"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "commonlibrary",
|
||||
"components": [
|
||||
{ "component": "file", "features":[] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"subsystem": "xts",
|
||||
"components": [
|
||||
{
|
||||
"component": "xts_acts",
|
||||
"features": [
|
||||
"build_xts=true",
|
||||
"enable_ohos_test_xts_acts_use_thirdparty_lwip = false"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"third_party_dir": "",
|
||||
"product_adapter_dir": "//vendor/alientek/rtos_demo/hals"
|
||||
}
|
||||
@@ -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/syspara_lite/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}\"",
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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_DEVICE_TYPE[] = {"****"};
|
||||
static const char OHOS_DISPLAY_VERSION[] = {"OpenHarmony 1.0.1"};
|
||||
static const char OHOS_MANUFACTURE[] = {"****"};
|
||||
static const char OHOS_BRAND[] = {"****"};
|
||||
static const char OHOS_MARKET_NAME[] = {"****"};
|
||||
static const char OHOS_PRODUCT_SERIES[] = {"****"};
|
||||
static const char OHOS_PRODUCT_MODEL[] = {"****"};
|
||||
static const char OHOS_SOFTWARE_MODEL[] = {"****"};
|
||||
static const char OHOS_HARDWARE_MODEL[] = {"****"};
|
||||
static const char OHOS_HARDWARE_PROFILE[] = {"aout:true,display:true"};
|
||||
static const char OHOS_BOOTLOADER_VERSION[] = {"bootloader"};
|
||||
static const char OHOS_ABI_LIST[] = {"****"};
|
||||
static const char OHOS_SERIAL[] = {"1234567890"}; // provided by OEM.
|
||||
static const int OHOS_FIRST_API_VERSION = 1;
|
||||
|
||||
const char* HalGetDeviceType(void)
|
||||
{
|
||||
return OHOS_DEVICE_TYPE;
|
||||
}
|
||||
|
||||
const char* HalGetManufacture(void)
|
||||
{
|
||||
return OHOS_MANUFACTURE;
|
||||
}
|
||||
|
||||
const char* HalGetBrand(void)
|
||||
{
|
||||
return OHOS_BRAND;
|
||||
}
|
||||
|
||||
const char* HalGetMarketName(void)
|
||||
{
|
||||
return OHOS_MARKET_NAME;
|
||||
}
|
||||
|
||||
const char* HalGetProductSeries(void)
|
||||
{
|
||||
return OHOS_PRODUCT_SERIES;
|
||||
}
|
||||
|
||||
const char* HalGetProductModel(void)
|
||||
{
|
||||
return OHOS_PRODUCT_MODEL;
|
||||
}
|
||||
|
||||
const char* HalGetSoftwareModel(void)
|
||||
{
|
||||
return OHOS_SOFTWARE_MODEL;
|
||||
}
|
||||
|
||||
const char* HalGetHardwareModel(void)
|
||||
{
|
||||
return OHOS_HARDWARE_MODEL;
|
||||
}
|
||||
|
||||
const char* HalGetHardwareProfile(void)
|
||||
{
|
||||
return OHOS_HARDWARE_PROFILE;
|
||||
}
|
||||
|
||||
const char* HalGetSerial(void)
|
||||
{
|
||||
return OHOS_SERIAL;
|
||||
}
|
||||
|
||||
const char* HalGetBootloaderVersion(void)
|
||||
{
|
||||
return OHOS_BOOTLOADER_VERSION;
|
||||
}
|
||||
|
||||
const char* HalGetAbiList(void)
|
||||
{
|
||||
return OHOS_ABI_LIST;
|
||||
}
|
||||
|
||||
const char* HalGetDisplayVersion(void)
|
||||
{
|
||||
return OHOS_DISPLAY_VERSION;
|
||||
}
|
||||
|
||||
const char* HalGetIncrementalVersion(void)
|
||||
{
|
||||
return INCREMENTAL_VERSION;
|
||||
}
|
||||
|
||||
const char* HalGetBuildType(void)
|
||||
{
|
||||
return BUILD_TYPE;
|
||||
}
|
||||
|
||||
const char* HalGetBuildUser(void)
|
||||
{
|
||||
return BUILD_USER;
|
||||
}
|
||||
|
||||
const char* HalGetBuildHost(void)
|
||||
{
|
||||
return BUILD_HOST;
|
||||
}
|
||||
|
||||
const char* HalGetBuildTime(void)
|
||||
{
|
||||
return BUILD_TIME;
|
||||
}
|
||||
|
||||
int HalGetFirstApiVersion(void)
|
||||
{
|
||||
return OHOS_FIRST_API_VERSION;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
# 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.
|
||||
|
||||
const.build.characteristics=****
|
||||
|
||||
const.product.manufacturer=****
|
||||
|
||||
const.product.brand=****
|
||||
|
||||
const.product.name=****
|
||||
|
||||
const.build.product=****
|
||||
|
||||
const.product.model=****
|
||||
|
||||
const.software.model=****
|
||||
|
||||
const.product.hardwareversion=****
|
||||
|
||||
const.product.hardwareprofile="aout:true,display:true"
|
||||
|
||||
const.ohos.serial=1234567890
|
||||
|
||||
const.product.bootloader.version=bootloader
|
||||
|
||||
const.product.cpu.abilist=****
|
||||
|
||||
const.product.software.version="OpenHarmony 1.0.1"
|
||||
|
||||
const.product.firstapiversion=1
|
||||
@@ -0,0 +1,22 @@
|
||||
# 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_token") {
|
||||
sources = [ "hal_token.c" ]
|
||||
|
||||
include_dirs = [
|
||||
"//base/startup/init_lite/interfaces/hals",
|
||||
"//utils/native/lite/include",
|
||||
]
|
||||
deps = []
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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_token.h"
|
||||
#include "ohos_errno.h"
|
||||
#include "ohos_types.h"
|
||||
|
||||
static int OEMReadToken(char *token, unsigned int len)
|
||||
{
|
||||
// OEM need add here, read token from device
|
||||
(void)(token);
|
||||
(void)(len);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
static int OEMWriteToken(const char *token, unsigned int len)
|
||||
{
|
||||
// OEM need add here, write token to device
|
||||
(void)(token);
|
||||
(void)(len);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
static int OEMGetAcKey(char *acKey, unsigned int len)
|
||||
{
|
||||
// OEM need add here, get AcKey
|
||||
(void)(acKey);
|
||||
(void)(len);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
static int OEMGetProdId(char *productId, unsigned int len)
|
||||
{
|
||||
// OEM need add here, get ProdId
|
||||
(void)(productId);
|
||||
(void)(len);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
static int OEMGetProdKey(char *productKey, unsigned int len)
|
||||
{
|
||||
// OEM need add here, get ProdKey
|
||||
(void)(productKey);
|
||||
(void)(len);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int HalReadToken(char *token, unsigned int len)
|
||||
{
|
||||
if (token == NULL) {
|
||||
return EC_FAILURE;
|
||||
}
|
||||
|
||||
return OEMReadToken(token, len);
|
||||
}
|
||||
|
||||
int HalWriteToken(const char *token, unsigned int len)
|
||||
{
|
||||
if (token == NULL) {
|
||||
return EC_FAILURE;
|
||||
}
|
||||
|
||||
return OEMWriteToken(token, len);
|
||||
}
|
||||
|
||||
int HalGetAcKey(char *acKey, unsigned int len)
|
||||
{
|
||||
if (acKey == NULL) {
|
||||
return EC_FAILURE;
|
||||
}
|
||||
|
||||
return OEMGetAcKey(acKey, len);
|
||||
}
|
||||
|
||||
int HalGetProdId(char *productId, unsigned int len)
|
||||
{
|
||||
if (productId == NULL) {
|
||||
return EC_FAILURE;
|
||||
}
|
||||
|
||||
return OEMGetProdId(productId, len);
|
||||
}
|
||||
|
||||
int HalGetProdKey(char *productKey, unsigned int len)
|
||||
{
|
||||
if (productKey == NULL) {
|
||||
return EC_FAILURE;
|
||||
}
|
||||
|
||||
return OEMGetProdKey(productKey, len);
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
|
||||
#
|
||||
# Arch Modules Configuration
|
||||
#
|
||||
OS_ARCH_ARMV7_M=y
|
||||
|
||||
#
|
||||
# ARM7-M Sepecfic Configuration
|
||||
#
|
||||
INTERNAL_OS_CORTEX_M4=y
|
||||
INTERNAL_OS_PLATFORM_M4=y
|
||||
|
||||
#
|
||||
# M4 Sepecfic Configuration
|
||||
#
|
||||
# end of ARM7-M Sepecfic Configuration
|
||||
|
||||
#
|
||||
# Generic Configuration
|
||||
#
|
||||
OS_HARDWARE_PLATFORM="OS_CORTEX_M4"
|
||||
OS_CPU_TYPE="OS_STM32F407"
|
||||
OS_MAX_CORE_NUM=1
|
||||
INTERNAL_OS_BYTE_ORDER_LE=y
|
||||
OS_BYTE_ORDER="OS_LITTLE_ENDIAN"
|
||||
# end of Generic Configuration
|
||||
# end of Arch Modules Configuration
|
||||
|
||||
#
|
||||
# Core Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# IPC Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Event feature configuration
|
||||
#
|
||||
OS_OPTION_EVENT=y
|
||||
# end of Event feature configuration
|
||||
|
||||
OS_OPTION_QUEUE=y
|
||||
|
||||
#
|
||||
# Semaphore feature configuration
|
||||
#
|
||||
# end of IPC Modules Configuration
|
||||
|
||||
#
|
||||
# Kernel Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# IRQ Modules Configuration
|
||||
#
|
||||
OS_OPTION_HWI_COMBINE=y
|
||||
OS_OPTION_HWI_PRIORITY=y
|
||||
OS_OPTION_HWI_ATTRIBUTE=y
|
||||
OS_OPTION_HWI_MAX_NUM_CONFIG=y
|
||||
# end of IRQ Modules Configuration
|
||||
|
||||
#
|
||||
# Exc Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Task module Configuration
|
||||
#
|
||||
OS_OPTION_TASK=y
|
||||
|
||||
#
|
||||
# TASK features configuration
|
||||
#
|
||||
OS_OPTION_TASK_DELETE=y
|
||||
OS_OPTION_TASK_SUSPEND=y
|
||||
OS_OPTION_TASK_INFO=y
|
||||
OS_OPTION_TASK_YIELD=y
|
||||
# end of TASK features configuration
|
||||
|
||||
OS_TSK_PRIORITY_HIGHEST=0
|
||||
OS_TSK_PRIORITY_LOWEST=31
|
||||
OS_TSK_NUM_OF_PRIORITIES=32
|
||||
OS_TSK_CORE_BYTES_IN_PID=3
|
||||
# end of Task module Configuration
|
||||
|
||||
#
|
||||
# Timer Modules Configuration
|
||||
#
|
||||
INTERNAL_OS_SWTMR=y
|
||||
# end of Timer Modules Configuration
|
||||
# end of Kernel Modules Configuration
|
||||
# end of Core Modules Configuration
|
||||
|
||||
#
|
||||
# MM Modules Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# OM Modules Configuration
|
||||
#
|
||||
OS_OPTION_CPUP=y
|
||||
|
||||
#
|
||||
# CPUP features configuration
|
||||
#
|
||||
INTERNAL_OS_CPUP_THREAD=y
|
||||
OS_OPTION_CPUP_WARN=y
|
||||
# end of CPUP features configuration
|
||||
|
||||
#
|
||||
# Error Report Module Configuration
|
||||
#
|
||||
|
||||
#
|
||||
# Hook feature configuration
|
||||
#
|
||||
# end of OM Modules Configuration
|
||||
|
||||
#
|
||||
# security Modules Configuration
|
||||
#
|
||||
OS_OPTION_RND=y
|
||||
# end of security Modules Configuration
|
||||
|
||||
#
|
||||
# Fs Modules Configuration
|
||||
#
|
||||
OS_SUPPORT_FS=y
|
||||
|
||||
#
|
||||
# Fs features configuration
|
||||
#
|
||||
OS_SUPPORT_LITTLEFS=1
|
||||
OS_LFS_MAX_OPEN_FILES=32
|
||||
OS_LFS_MAX_MOUNT_SIZE=3
|
||||
# end of Fs features configuration
|
||||
# end of Fs Modules Configuration
|
||||
|
||||
#
|
||||
# Net Modules Configuration
|
||||
#
|
||||
OS_SUPPORT_NET=y
|
||||
|
||||
#
|
||||
# Net features configuration
|
||||
#
|
||||
LWIP_DHCP=0
|
||||
LWIP_IPV6=1
|
||||
# end of Net features configuration
|
||||
# end of Net Modules Configuration
|
||||
|
||||
#
|
||||
# Utility Modules Configuration
|
||||
#
|
||||
Reference in New Issue
Block a user