Skip to content
Snippets Groups Projects
Commit 1cd96672 authored by ARUL DEVARAJAN's avatar ARUL DEVARAJAN Committed by Arul Kumaran
Browse files

Quick-Start: DITA Implementation

* Open Harmony building image- Structure and content refinement.
* Signed off by: Arul Kumaran <arulkumaran.devarajan@huawei.com>
parent 3917d8ab
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ Welcome to |main_project_name| documentation! ...@@ -10,7 +10,7 @@ Welcome to |main_project_name| documentation!
:maxdepth: 1 :maxdepth: 1
overview/README overview/README
quick-start/build-open-harmony quick-start/README
supported-boards/README supported-boards/README
readme/README readme/README
term/glossary term/glossary
.. include:: ../definitions.rst
Getting Started Guide
#####################
|main_project_name| is a distributed OS that is designed to run on top of a variety of OS kernels ranging from Linux to RTOSs. To start with, you can build an |main_project_name| image using your preferred OS flavour using the supported boards. Currently, |main_project_name| supports Linux, Zephyr, and FreeRTOS kernels. The supported boards are listed in :ref:`supported-boards`. The configuration is set with certain default values which can be customized as per your preference.
.. toctree::
:maxdepth: 2
downloading-tools-and-sourcecode
build-open-harmony
linux-flavour
zephyr-flavour
freeRTOS-flavour
...@@ -2,13 +2,10 @@ ...@@ -2,13 +2,10 @@
.. include:: ../definitions.rst .. include:: ../definitions.rst
Getting Started Building and Running |main_project_name| image
############### ##############################################
|main_project_name| is a distributed OS that is designed to run on top of a variety of OS kernels ranging from Linux to RTOSs. To start with, you can build an |main_project_name| image using your preferred OS flavour using the supported boards. Currently, |main_project_name| supports Linux, Zephyr, and FreeRTOS kernels. The supported boards are listed in the following sections. The configuration is set with certain default values which can be customized as per your preference.
This topic provides an overview of meta-ohos architecture, tools, and source code required to build your |main_project_name| image. The meta-ohos is an umbrella meta-layer containing all layers required to build This topic provides an overview of meta-ohos architecture, tools, and source code required to build your |main_project_name| image. The meta-ohos is an umbrella meta-layer containing all layers required to build |main_project_name| Image on existing kernel meta-layers.
|main_project_name| Image on existing kernel meta-layers.
.. contents:: .. contents::
:depth: 3 :depth: 3
...@@ -19,7 +16,7 @@ This topic provides an overview of meta-ohos architecture, tools, and source cod ...@@ -19,7 +16,7 @@ This topic provides an overview of meta-ohos architecture, tools, and source cod
:align: center :align: center
:alt: meta-ohos overview :alt: meta-ohos overview
.. _downloading-tools: .. _prerequisites:
Prerequisites Prerequisites
************* *************
...@@ -31,91 +28,10 @@ Prerequisites ...@@ -31,91 +28,10 @@ Prerequisites
* Install Python latest version * Install Python latest version
* Install **Ubuntu 20.04 LTS** version * Install **Ubuntu 20.04 LTS** version
Downloading Tools
*****************
To start with, you need to install git-repo by executing the following command. Git-repo helps you to manage repositories, revision control systems, and automate parts of the development workflow.
.. code-block:: console
$ sudo add-apt-repository ppa:zyga/oh-tools
$ sudo apt-get update
$ sudo apt-get install git-repo
.. _downloading-source-code:
Downloading Source Code
***********************
Once git-repo has been installed, you can clone the necessary repositories.
**For OHOS User**
If you are a user and wants to build your product on top of OHOS, then clone the ‘stable’ branch by executing the following commands:
.. code-block:: console
$ mkdir ohos; cd ohos
$ repo init -u https://git.ostc-eu.org/OSTC/manifest.git -b stable
$ repo sync --no-clone-bundle
**For OHOS Developer**
If you are a developer and wants to contribute to OHOS, then clone the ‘develop’ branch by executing the following commands:
.. code-block:: console
$ mkdir ohos; cd ohos
$ repo init -u https://git.ostc-eu.org/OSTC/manifest.git -b develop -m develop.xml
$ repo sync
The preceding commands creates the following directory structure (layers):
.. code-block:: console
./ohos/
└─ sources
├── meta-freertos
├── meta-ohos
├── meta-openembedded
├── meta-zephyr
├── <various yocto layers>
└── poky
To verify the created directory structure (layers), run the following command:
.. code-block:: console
$ cd sources && ls -l
Navigate to *ohos* directory by running the following command:
.. code-block:: console
$ cd ..
.. list-table:: meta-ohos
:widths: auto
:header-rows: 1
* - Placeholder Name
- Description
* - meta-freertos
- FreeRTOS distro layer compatible with OpenEmbedded.
* - meta-ohos
- A set of meta-layers for building Open Harmony OS.
* - meta-openembedded
- Layers, recipes, packages, and source material for developing a image.
* - meta-zephyr
- Layers required for building Zephyr images.
* - <various yocto layers>
- Layers required to build yacto images.
* - poky
- Layers required to build customised embedded device images.
.. _building-image: .. _building-image:
Building and Running |main_project_name| image Procedure
********************************************** ***********
|main_project_name| can be hosted on top of a variety of kernels. Currently supported kernels (a.k.a. OHOS flavours) are Linux, Zephyr, and FreeRTOS (experimental). |main_project_name| can be hosted on top of a variety of kernels. Currently supported kernels (a.k.a. OHOS flavours) are Linux, Zephyr, and FreeRTOS (experimental).
...@@ -136,200 +52,10 @@ You can use the following syntax to build the OHOS flavour of your choice. ...@@ -136,200 +52,10 @@ You can use the following syntax to build the OHOS flavour of your choice.
$ MACHINE=<target_machine> bitbake <image-name> $ MACHINE=<target_machine> bitbake <image-name>
.. _linux_flavour:
OHOS Linux flavour
==================
OHOS Linux flavour is based on `poky` distribution. Current version supports the following images and machines:
**Supported images:**
.. list-table:: Supported images
:widths: auto
:header-rows: 1
* - Image Name
- Size
- Description
* - openharmony-image-base
- Approximate 100-200 MB
- OpenHarmony image including the base OS software stack
* - openharmony-image-extra
- Approximate 100-200 MB
- OpenHarmony Wayland image including the base OS software stack
**Supported machines:**
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemux86-64 (default)
- Emulator
* - qemux86
- Emulator
* - qemuarm
- Emulator
* - qemuarm64
- Emulator
* - seco-intel-b68 (SECO SBC-B68)
- `Details <https://www.seco.com/en/products/sbc-b68-enuc>`_
* - stm32mp1-av96 (96Boards Avenger96)
- `Details <https://www.96boards.org/product/avenger96/>`_
* - seco-imx8mm-c61 (SECO SBC-C61)
- `Details <https://www.seco.com/en/products/sbc-c61>`_
**Step1:** You can select the preferred image and machine to build your image. For example, for **qemux86-64** machine and **openharmony-image-base** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/linux . ./sources/poky/oe-init-build-env build-ohos-linux-qemux86-64
$ bitbake openharmony-image-base
**Step2:** Test the image built by executing the following test command considering **qemux86-64** machine as an example:
.. code-block:: console
$ runqemu qemux86-64 qemuparams="-nographic"
**Result:** After successful bootup, you should see the following:
.. code-block:: console
$ qemux86-64 login:
The default login as root without a password. After login you should see the following prompt:
.. code-block:: console
$ root@qemux86-64:~#
To exit qemu, you can either shut down the system:
.. code-block:: console
$ root@qemux86:~# poweroff -f
or close qemu using key combination:
**Ctrl-A** followed by 'x'
.. _zephyr_flavour:
OHOS Zephyr flavour
===================
OHOS Zephyr flavour is based on zephyr distribution and supports the following images or machines:
**Supported images:**
* Zephyr comes with multiple sample applications, for more details on available recipes, see `sources/meta-zephyr/recipes-kernel/zephyr-kernel/`. You can add your own recipes to use sample applications provided with Zephyr. For more details, `Click <https://github.com/zephyrproject-rtos/zephyr/tree/master/samples>`_.
**Supported machines:**
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemu-x86 (default)
- Emulator
* - qemu-cortex-m3
- Emulator
* - 96b-nitrogen (96Boards Nitrogen)
- `Details <https://www.96boards.org/product/nitrogen/>`_
* - 96b-avenger96 (96Boards Avenger96)
- `Details <https://www.96boards.org/product/avenger96/>`_
**Step1:** You can select the preferred image and machine to build your image. For example, for **qemu-x86* machine and **zephyr-philosophers** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/zephyr . ./sources/poky/oe-init-build-env build-ohos-zephyr-qemu-x86
$ bitbake zephyr-philosophers
**Step2:** Test the image built by executing the following test command considering **qemu-x86** machine as an example:
.. code-block:: console
$ runqemu qemu-x86
**Result:** After successful bootup, you should see the following:
.. code-block:: console
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0 ***
Philosopher 0 [P: 3] THINKING [ 300 ms ]
Philosopher 1 [P: 2] EATING [ 575 ms ]
Philosopher 2 [P: 1] STARVING
Philosopher 3 [P: 0] EATING [ 525 ms ]
Philosopher 4 [C: -1] THINKING [ 475 ms ]
To exit qemu, use key combination:
**Ctrl-A** followed by 'x'
.. _freertos_flavour:
OHOS FreeRTOS flavour
=====================
OHOS FreeRTOS flavour is based on `freertos` distribution and supports the following images and smachines:
**Supported images:**
* freertos-demo
**Supported machines:**
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemuarmv5
- Emulator
**Step1:** You can select the preferred image and machine to build your image. For example, for **qemuarmv5** machine and **freertos-demo** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/freertos . ./sources/poky/oe-init-build-env build-ohos-freertos-qemuarmv5
$ bitbake freertos-demo
**Step2:** Test the image built by executing the following test command considering qemuarmv5 machine as an example:
.. code-block:: console
$ runqemu qemuarmv5
**Result:** After successful bootup, you should see the following:
.. code-block:: console
###### - FreeRTOS sample application - ######
A text may be entered using a keyboard.
It will be displayed when 'Enter' is pressed.
Periodic task 10 secs Currently, |main_project_name| supports Linux, Zephyr, and FreeRTOS kernels. For more information on buidling an image with different OHOS flavours, see the following topics:
Waiting For Notification - Blocked...
Task1
Task1
You entered: "HelloFreeRTOS"
Unblocked
Notification Received
Waiting For Notification - Blocked...
To exit qemu, use key combination: * :ref:`FreeRTOS flavour <freertos_flavour>`
* :ref:`Zephyr flavour <zephyr_flavour>`
* :ref:`Linux flavour <linux_flavour>`
**Ctrl-A** followed by 'x'
.. include:: ../definitions.rst
Downloading Tools and Source Code
#################################
.. _downloading-tools:
Downloading Tools
*****************
To start with, you need to install git-repo by executing the following command. Git-repo helps you to manage repositories, revision control systems, and automate parts of the development workflow.
.. code-block:: console
$ sudo add-apt-repository ppa:zyga/oh-tools
$ sudo apt-get update
$ sudo apt-get install git-repo
.. _downloading-source-code:
Downloading Source Code
***********************
Once git-repo has been installed, you can clone the necessary repositories.
**For OHOS User**
If you are a user and wants to build your product on top of OHOS, then clone the ‘stable’ branch by executing the following commands:
.. code-block:: console
$ mkdir ohos; cd ohos
$ repo init -u https://git.ostc-eu.org/OSTC/manifest.git -b stable
$ repo sync --no-clone-bundle
**For OHOS Developer**
If you are a developer and wants to contribute to OHOS, then clone the ‘develop’ branch by executing the following commands:
.. code-block:: console
$ mkdir ohos; cd ohos
$ repo init -u https://git.ostc-eu.org/OSTC/manifest.git -b develop -m develop.xml
$ repo sync --no-clone-bundle
The preceding commands creates the following directory structure (layers):
.. code-block:: console
./ohos/
└─ sources
├── meta-freertos
├── meta-ohos
├── meta-openembedded
├── meta-zephyr
├── <various yocto layers>
└── poky
To verify the created directory structure (layers), run the following command:
.. code-block:: console
$ cd sources && ls -l
Navigate to *ohos* directory by running the following command:
.. code-block:: console
$ cd ..
.. list-table:: meta-ohos
:widths: auto
:header-rows: 1
* - Placeholder Name
- Description
* - meta-freertos
- FreeRTOS distro layer compatible with OpenEmbedded.
* - meta-ohos
- A set of meta-layers for building Open Harmony OS.
* - meta-openembedded
- Layers, recipes, packages, and source material for developing a image.
* - meta-zephyr
- Layers required for building Zephyr images.
* - <various yocto layers>
- Layers required to build yacto images.
* - poky
- Layers required to build customised embedded device images.
.. _freertos_flavour:
.. include:: ../definitions.rst
FreeRTOS flavour
################
OHOS FreeRTOS flavour is designed to be simple and easy to use. It is based on `freertos` distribution.
For getting started with |main_project_name|, *Downloading Tools* and *Source Code* perform the procedure in :ref:`Getting Started <BuildOpenharmony>`.
OHOS FreeRTOS flavour supports the following images and machines:
Supported images
****************
* freertos-demo
Supported machines
******************
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemuarmv5
- Emulator
Prerequisites
*************
* All the bitbake commands must be executed in your localhost as a normal user instead of a root user.
* Install the following build dependencies packages for bitbake:
* chrpath
* gawk
* Install Python latest version
* Install **Ubuntu 20.04 LTS** version
Procedure
*********
Perform the following steps to build the image on the supported machine:
1. Select the preferred image and machine to build your image. For example, for **qemuarmv5** machine and **freertos-demo** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/freertos . ./sources/poky/oe-init-build-env build-ohos-freertos-qemuarmv5
$ bitbake freertos-demo
2. Test the image built by executing the following test command considering qemuarmv5 machine as an example:
.. code-block:: console
$ runqemu qemuarmv5
Result
******
After successful bootup, you should see the following:
.. code-block:: console
###### - FreeRTOS sample application - ######
A text may be entered using a keyboard.
It will be displayed when 'Enter' is pressed.
Periodic task 10 secs
Waiting For Notification - Blocked...
Task1
Task1
You entered: "HelloFreeRTOS"
Unblocked
Notification Received
Waiting For Notification - Blocked...
To exit qemu, use key combination: **Ctrl-A** followed by 'x'.
.. _linux_flavour:
.. include:: ../definitions.rst
Linux flavour
#############
OHOS Linux flavour is based on `poky` distribution.
For getting started with |main_project_name|, *Downloading Tools* and *Source Code* perform the procedure in :ref:`Getting Started <BuildOpenharmony>`.
OHOS Linux flavour supports the following images and machines:
Supported images
****************
.. list-table:: Supported images
:widths: auto
:header-rows: 1
* - Image Name
- Size
- Description
* - openharmony-image-base
- Approximate 100-200 MB
- OpenHarmony image including the base OS software stack
* - openharmony-image-extra
- Approximate 100-200 MB
- OpenHarmony Wayland image including the base OS software stack
Supported machines
******************
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemux86-64 (default)
- Emulator
* - qemux86
- Emulator
* - qemuarm
- Emulator
* - qemuarm64
- Emulator
* - seco-intel-b68 (SECO SBC-B68)
- `Details <https://www.seco.com/en/products/sbc-b68-enuc>`_
* - stm32mp1-av96 (96Boards Avenger96)
- `Details <https://www.96boards.org/product/avenger96/>`_
* - seco-imx8mm-c61 (SECO SBC-C61)
- `Details <https://www.seco.com/en/products/sbc-c61>`_
Prerequisites
*************
* All the bitbake commands must be executed in your localhost as a normal user instead of a root user.
* Install the following build dependencies packages for bitbake:
* chrpath
* gawk
* Install Python latest version
* Install **Ubuntu 20.04 LTS** version
Procedure
*********
1. You can select the preferred image and machine to build your image. For example, for **qemux86-64** machine and **openharmony-image-base** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/linux . ./sources/poky/oe-init-build-env build-ohos-linux-qemux86-64
$ bitbake openharmony-image-base
2. Test the image built by executing the following test command considering **qemux86-64** machine as an example:
.. code-block:: console
$ runqemu qemux86-64 qemuparams="-nographic"
Result
******
* After successful bootup, you should see the following:
.. code-block:: console
$ qemux86-64 login:
* The default login as root without a password. After login you should see the following prompt:
.. code-block:: console
$ root@qemux86-64:~#
* To exit qemu, you can either shut down the system using the following command or
.. code-block:: console
$ root@qemux86:~# poweroff -f
or close qemu using key combination: **Ctrl-A** followed by 'x'.
.. _zephyr_flavour:
.. include:: ../definitions.rst
Zephyr flavour
##############
OHOS Zephyr flavour is based on zephyr distribution.
For getting started with |main_project_name|, *Downloading Tools* and *Source Code* perform the procedure in :ref:`Getting Started <BuildOpenharmony>`.
OHOS Zephyr flavour supports the following images or machines:
Supported images
****************
* Zephyr comes with multiple sample applications, for more details on available recipes, see `sources/meta-zephyr/recipes-kernel/zephyr-kernel/`. You can add your own recipes to use sample applications provided with Zephyr. For more details, `Click <https://github.com/zephyrproject-rtos/zephyr/tree/master/samples>`_.
Supported machines
******************
.. list-table:: Supported machines
:widths: auto
:header-rows: 1
* - Machine Name
- Details
* - qemu-x86 (default)
- Emulator
* - qemu-cortex-m3
- Emulator
* - 96b-nitrogen (96Boards Nitrogen)
- `Details <https://www.96boards.org/product/nitrogen/>`_
* - 96b-avenger96 (96Boards Avenger96)
- `Details <https://www.96boards.org/product/avenger96/>`_
Prerequisites
*************
* All the bitbake commands must be executed in your localhost as a normal user instead of a root user.
* Install the following build dependencies packages for bitbake:
* chrpath
* gawk
* Install Python latest version
* Install **Ubuntu 20.04 LTS** version
Procedure
*********
Perform the following steps to build the image on the supported machine:
1. You can select the preferred image and machine to build your image. For example, for **qemu-x86* machine and **zephyr-philosophers** image, execute:
.. code-block:: console
$ TEMPLATECONF=../sources/meta-ohos/flavours/zephyr . ./sources/poky/oe-init-build-env build-ohos-zephyr-qemu-x86
$ bitbake zephyr-philosophers
2. Test the image built by executing the following test command considering **qemu-x86** machine as an example:
.. code-block:: console
$ runqemu qemu-x86
Result
******
After successful bootup, you should see the following:
.. code-block:: console
Booting from ROM..*** Booting Zephyr OS build zephyr-v2.4.0 ***
Philosopher 0 [P: 3] THINKING [ 300 ms ]
Philosopher 1 [P: 2] EATING [ 575 ms ]
Philosopher 2 [P: 1] STARVING
Philosopher 3 [P: 0] EATING [ 525 ms ]
Philosopher 4 [C: -1] THINKING [ 475 ms ]
To exit qemu, use key combination: **Ctrl-A** followed by 'x'.
...@@ -15,12 +15,6 @@ Supported Boards ...@@ -15,12 +15,6 @@ Supported Boards
seco-intel-b68 seco-intel-b68
seco-imx8mm-c61 seco-imx8mm-c61
|main_project_name| is a distributed OS that is designed to run on top of a variety of OS kernels ranging from Linux to RTOSs. |main_project_name| uses notion of kernel specific flavours with predefined IMAGES and MACHINES:
* :ref:`linux_flavour`
* :ref:`zephyr_flavour`
* :ref:`freertos_flavour`
For more detailed information of kernel specific flavours, see :ref:`Getting Started <BuildOpenharmony>`. For more detailed information of kernel specific flavours, see :ref:`Getting Started <BuildOpenharmony>`.
.. note:: .. note::
......
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