未验证 提交 0dd7f1b2 编写于 作者: O openharmony_ci 提交者: Gitee

!9644 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】update...

!9644 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】update zh-cn/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md.
Merge pull request !9644 from 吴家栋/N/A
......@@ -195,74 +195,74 @@ vendor
cmd = "if [ -f $product_path/hdf_config/BUILD.gn ]; then echo true; else echo false; fi"
HAVE_PRODUCT_CONFIG =
exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
group("liteos_a") {
deps = [
deps = [
"board",
"drivers",
]
if (HAVE_PRODUCT_CONFIG) {
]
if (HAVE_PRODUCT_CONFIG) {
deps += [ "$product_path/hdf_config" ]
} else {
} else {
deps += [ "hdf_config" ]
}
}
}
config("public") {
configs = [
configs = [
"board:public",
"drivers:public",
]
]
}
```
2. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/board中新建BUILD.gn,添加代码如下。将os_adapt.c内核启动相关代码编译进系统。
```
import("//kernel/liteos_a/liteos.gni")
module_name = "bsp_config"
kernel_module(module_name) {
sources = []
if (defined(LOSCFG_PLATFORM_ADAPT)) {
sources = []
if (defined(LOSCFG_PLATFORM_ADAPT)) {
sources += [ "os_adapt/os_adapt.c" ]
}
}
}
config("public") {
include_dirs = [ "." ]
include_dirs += [ "include" ]
include_dirs += [ "$LITEOSTOPDIR/drivers/block/disk/include" ]
include_dirs +=
[ "$LITEOSTOPDIR/../../drivers/adapter/khdf/liteos/osal/include" ]
include_dirs = [ "." ]
include_dirs += [ "include" ]
include_dirs += [ "$LITEOSTOPDIR/drivers/block/disk/include" ]
include_dirs +=
[ "$LITEOSTOPDIR/../../drivers/adapter/khdf/liteos/osal/include" ]
}
```
3. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/drivers中新建BUILD.gn,添加代码如下,将device/soc/st/common/platform路径下的HDF驱动编译进系统。
```
import("//drivers/adapter/khdf/liteos/hdf.gni")
group("drivers") {
public_deps = [ "//device/soc/st/common/platform:drivers" ]
public_deps = [ "//device/soc/st/common/platform:drivers" ]
}
config("public") {
configs = [ "//device/soc/st/common/platform:public" ]
configs = [ "//device/soc/st/common/platform:public" ]
}
```
4. 在//vendor/bearpi/bearpi_hm_micro/hdf_config中新建BUILD.gn,添加代码如下,将HCS配置文件编译进系统。
```
module_switch = defined(LOSCFG_DRIVERS_HDF) && !defined(LOSCFG_DRIVERS_HDF_TEST)
module_name = "libhdf_config"
hdf_driver(module_name) {
hcs_sources = [ "hdf.hcs" ]
hcs_sources = [ "hdf.hcs" ]
}
group("hdf_config") {
public_deps = [ ":$module_name" ]
deps = [
public_deps = [ ":$module_name" ]
deps = [
"hdf_test",
"hdf_test/hcs_macro_test",
]
]
}
```
### 内核启动适配
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册