1 Star 0 Fork 92

zhangg05283106 / update_ota_lite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.18 KB
一键复制 编辑 原始数据 按行查看 历史
熊磊 提交于 2021-03-16 20:35 . Description: add readme url

OTA

Introduction

Over the Air (OTA) provides the remote device update capability. Your devices will be able to support OTA update after secondary development based on the provided APIs. By providing unified update APIs externally, the update subsystem shields the differences of underlying chips.

Directory Structure

/base/update/ota_lite
├── frameworks        # OTA update implementation, including update package parsing, verification, writing, and updating
│   └── test          # Self-test code
│   └── unittest      # Unit test code
│   └── source        # updater module source code
│       └── updater   # updater module code
│       └── verify    # Verification algorithm code
├── interfaces
│   └── kits          # External APIs for OTA update
├── hals              # Chip adaptation code, for example, HiSilicon chip adaptation code is located at device\hisilicon\hardware\update

Constraints

The update subsystem is compiled using the C language. Currently, only the Hi3518EV300, Hi3516DV300, and Hi3861 development boards are supported. If you want to support devices that use other chips, you can implement the OpenHarmony integration APIs in the vendor directory. Currently, only the full-package update is supported.

Usage

Add the dependency on the update subsystem. The following uses the Hi3516D V300 development board as an example.

  • Add update to the subsystem_list field in the vendor\hisilicon\ipcamera_hi3516dv300_liteos\config.json file, and add the following code under subsystem_list:

    {
            "subsystem": "update",
            "components": [
              { "component": "hota", "features": [] }
            ]
     },
  • Add the update.json file to the build\lite\components directory.

    "components": [
        {
          "component": "hota",
          "description": "",
          "optional": "false",
          "dirs": [
            "base/update/ota_lite/frameworks",
            "base/update/ota_lite/interfaces/kits"
          ],
          "targets": [
            "//base/update/ota_lite/frameworks:ota_lite"
          ],
    ...
  • Add test code. For example, add subsystem_test to the base\update\ota_lite\frameworks\BUILD.gn file.

  • Run the following commands to compile the system. You can experience the OTA update function after flashing the system to the Hi3516 chip.

    hb set
    hb build

Repositories Involved

Update subsystem

update_ota_lite

device_hisilicon_hardware

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangg05283106/update_ota_lite.git
git@gitee.com:zhangg05283106/update_ota_lite.git
zhangg05283106
update_ota_lite
update_ota_lite
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891