Skip to content
Snippets Groups Projects
Commit 31a5c04d authored by Robert Drab's avatar Robert Drab Committed by Zbigniew Bodek
Browse files

OHOS build environment setup proposal


Draft of ADR concerning OHOS build environment setup

Signed-off-by: default avatarRobert Drab <robert.drab@huawei.com>
parent 5ccc789a
No related branches found
No related tags found
No related merge requests found
OHOS environment setup for different kernels
============================================
Given that OHOS will run on multiple different kernels we need
a straight-forward way of setting up build environment.
There are many possible solutions, so we need to pick a sensible one
that'll suit our needs.
## Configuration / adaptation layers for kernels withing meta-openharmony
One option is to make configuration / adaptaion layer per kernel which
will contain all necessary bitbake configs (e.g. local.conf.sample,
bblayers.conf.sample, etc.) that can be used together with oe-init-build-env
script:
TEMPLATECONF=meta-openharmony/meta-ohos-zephyr/conf . oe-init-build-env
This will create a build/conf directory based on the contents of meta-ohos-zephyr/conf
where all required layers and configs can be defined. The same applise for other
kernels, like FreeRTOS, Liteos or any other Linux-based distro.
Below is a sequence diagram of how this could look like for Zephyr:
![ohos-zephyr-build-sequence-diagram](../diagrams/0001-meta-openharmony-zephyr-build-sequence-diagram.svg)
@startuml 0001-meta-openharmony-zephyr-build-sequence-diagram
!includeurl https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/C4_Container.puml
LAYOUT_AS_SKETCH()
Person(dev, "Developer", "Anyone willing to build the OHOS based image")
System_Boundary(meta_openharmonyn, "meta-openharmony") {
Container(meta_ohos_zephyr, "meta-ohos-zephyr", "meta-layer", "OHOS configuration / adaptation layer for Zephyr")
Container(meta_ohos_poky, "meta-ohos-poky", "meta-layer", "OHOS configuration / adaptation layer for Poky")
Container(meta_ohos_init, "meta-ohos-init", "meta-layer", "OHOS initialisation services for application devices")
Container(meta_ohos_init_lite, "meta-ohos-init-lite", "meta-layer", "OHOS initialisation services for uC-based devices")
Container(meta_ohos_softbus, "meta-ohos-softbus", "meta-layer", "OHOS softbus service for application devices")
Container(meta_ohos_softbus_lite, "meta-ohos-softbus-lite", "meta-layer", "OHOS softbus service for uC-based devices")
}
Container(meta_zephyr, "meta-zephyr", "meta-layer", "ZephyrOS meta-layer")
System_Ext(yocto, "yocto-poky", "distro scaffolding: predefined meta-data, bitbake build system")
Rel(dev, meta_ohos_zephyr, "1. selects OHOS Zephyr distribution", "environment shell script")
Rel(meta_ohos_zephyr, yocto, "2. sets up bitbake environment for OHOS Zephyr", "local.conf.sample, bblayers.conf.sample")
Rel(dev, yocto, "3. initiates the build", "bitbake")
Rel(yocto, meta_ohos_init_lite, "4. incorporates Zephyr-compatible OHOS layers")
Rel(yocto, meta_ohos_softbus_lite, "4. incorporates Zephyr-compatible OHOS layers")
Rel(yocto, meta_zephyr, "4. incorporates")
Lay_D(dev, yocto)
Lay_D(dev, meta_openharmonyn)
Lay_D(meta_ohos_zephyr, meta_ohos_init_lite)
Lay_D(meta_ohos_init_lite, meta_ohos_softbus_lite)
Lay_D(meta_zephyr, yocto)
@enduml
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment