
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源 去关联
@toc
L2(3.0) 设备开发调试时,想修改文档内容。往往需要windows上修改好,然后再通过hdc_std.exe发送到开发板中去,类似的命令缺失很多。最主要是L2不完善,基本命令不丰富。
该文档以添加vi命令为例,利用别人交叉编译好的busybox来给系统添加vi命令。
编译,实际上是创建vi到busybox的链接,交叉编译好的busybox见附件。
test\example\partB\busybox\BUILD.gn
import("//build/ohos.gni")
ohos_prebuilt_executable("busybox.exe") {
source = "./busybox"
symlink_target_name = [
"vi"
]
install_enable = true
subsystem_name = "sub_example"
part_name = "partB"
}
group("busybox") {
deps = [
":busybox.exe"
]
}
test\example\ohos.build
{
"subsystem": "sub_example",
"parts": {
"partB": {
"module_list": [
"//test/example/partB/module:module_lib",
"//test/example/partB/busybox:busybox"
],
"inner_kits": [
{
"type": "so",
"name": "//test/example/partB/module:module_lib",
"header": {
"header_files": [
"module.h"
],
"header_base": "//test/example/partB/module/include"
}
}
],
"system_kits": [],
"test_list": []
},
"partA": {
"module_list": [
"//test/example/partA/feature1:libhelloworl1_lib",
"//test/example/partA/feature2:helloworld2_bin"
],
"inner_kits": [],
"system_kits": [],
"test_list": []
}
}
}
这里的编译配置是在【Openharmony 设备开发之helloworld】基础上添加的。也可以在其他子系统中添加。
./build.sh --product-name Hi3516DV300 --ccache
进入系统终端,执行:vi --help
vi命令已经有了,可以使用了。
使用别人编译好的闭源动态库参考:【如何使用的闭源库】