OpenHarmony 界面应用开发配置(L1) 原创

碼磚民工
发布于 2023-9-28 09:51
浏览
0收藏

@toc

1. 简介

本文介绍 OpenHarmony3.2 beta3, liteos-a:hispark_taurus 使用/foundation/graphic,开发界面应用。

2. 源码

源码见附件,签名参考签名
源码中带有做好的签名文件:myapp\myliteosapp\helloworldapp\cert\app-profile-20-sys.p7b
源码在OpenHarmony根目录中的路径:myapp\myliteosapp

3. 配置

3.1 配置子系统

文件build\subsystem_config.json添加

  "myapp": {
    "path":"myapp",
    "name": "myapp"
  }

3.2 设备配置

文件vendor\hisilicon\hispark_taurus\config.json添加

      {
        "subsystem": "myapp",
        "components": [
          { "component": "myliteos_app", "features":[ "" ] }
        ]
      }

3.2 编译烧录

编译烧录参考3516应用调用到驱动尝试,参考其步骤和本文的一些配置进行编译烧录。
使用docker编译,镜像的版本:

sudo docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0

3.2.1 烧录配置文件:Hi3516DV300-emmc.xml

内容如下,自己可以根据实际情况调整,二进制文件路径根据自己实际的二进制文件路径进行修改。

<?xml version="1.0" encoding="GB2312" ?>
<Partition_Info>
<Part Sel="1" PartitionName="fastboot" FlashType="emmc" FileSystem="none" Start="0"      Length="1M"   SelectFile="D:\harmony_tool\hispark_taurus\u-boot-hi3516dv300.bin"/>
<Part Sel="1" PartitionName="kernel"    FlashType="emmc"  FileSystem="none" Start="1M"  Length="9M"   SelectFile="D:\harmony_tool\hispark_taurus\OHOS_Image.bin"/>
<Part Sel="1" PartitionName="rootfs"    FlashType="emmc"  FileSystem="none" Start="10M" Length="50M" SelectFile="D:\harmony_tool\hispark_taurus\rootfs_vfat.img"/>
<Part Sel="1" PartitionName="userfs"    FlashType="emmc"  FileSystem="none" Start="60M" Length="100M" SelectFile="D:\harmony_tool\hispark_taurus\userfs_vfat.img"/>
</Partition_Info>

3.2.2 u-boot-hi3516dv300.bin

文件目录:/device/board/hisilicon/hispark_taurus/uboot/out/boot/u-boot-hi3516dv300.bin

3.2.3 编译成功

编译成功,会生成app的动态库,重新烧录系统即可。
OpenHarmony 界面应用开发配置(L1)-鸿蒙开发者社区

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
myapp_liteos-a.rar 113.34K 14次下载
已于2023-9-28 09:51:10修改
1
收藏
回复
举报
回复
    相关推荐