Skip to content
Snippets Groups Projects
Commit 7ea26398 authored by Oniro Core Project Bot's avatar Oniro Core Project Bot
Browse files

Slow CI needs workarounds


Signed-off-by: default avatarOniro Core Project Bot <onirocore-bot@eclipse.org>
parent ff925b47
Branches main
No related tags found
No related merge requests found
Showing
with 301 additions and 29 deletions
......@@ -70,13 +70,15 @@ daily life.
:caption: Supported Technologies
:maxdepth: 2
meta-openharmony/supported-technologies/openharmony
oniro/supported-technologies/openthread
.. toctree::
:caption: Troubleshoot
:maxdepth: 2
oniro/fallback-devices-support
oniro/fallback-devices-support
oniro/debug-mode
.. toctree::
:caption: Contribute
......
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. |main_project_name| replace:: Oniro Project
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ../definitions.rst
OpenHarmony Image
#################
Oniro Project can include OpenHarmony compatibility in the predefined images by
enabling `openharmony` distro feature and adding it to the images.
See :ref:`Building with OpenHarmony compatibility <Building with OpenHarmony>` in
Quick Build instructions for details on how to do this.
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. _OpenHarmony SDK:
OpenHarmony SDK
###############
Oniro Project provides support for building an alternative open-source toolchain
for use with the OpenHarmony reference implementation. This allows using an
updated Clang/LLVM compiler built from the meta-clang Yocto layer instead of the
default prebuilt Clang/LLVM compiler provided by OpenHarmony project.
There are two different Yocto recipes providing prebuilt SDK images for the
OpenHarmony build system.
``oniro-openharmony-toolchain``
The `oniro-openharmony-toolchain` recipe builds an image containing the Oniro
Clang version and a musl libc version. The musl libc version is same upstream
version as currently used in OpenHarmony, and is patched to exhibit the same
runtime behavior to the musl libc version included in OpenHarmony build
system.
``oniro-openharmony-bundle``
The `oniro-openharmony-bundle` recipe is a superset of
`oniro-openharmony-toolchain`, adding third-party components on top using
Oniro (Yocto) recipes, replacing the corresponding third-party components
included in OpenHarmony repository.
Using one of these images replaces then OpenHarmony versions of the included
OpenSource toolchain and third-party components with newer Oniro versions.
Building
********
To build `oniro-openharmony-bundle` for OpenHarmony 3.0.1, the `bitbake` command
is simply::
DISTRO=oniro-openharmony-linux MACHINE=qemuarma7 bitbake oniro-openharmony-bundle
In order to build for OpenHarmony 3.1.1 instead, you need to add the following
line to the `build/conf/local.conf` file::
OPENHARMONY_VERSION = "3.1"
And then use the same command as shown above for 3.0.1.
To build `oniro-openharmony-toolchain` instead, simply use::
DISTRO=oniro-openharmony-linux MACHINE=qemuarma7 bitbake oniro-openharmony-toolchain
Usage
*****
To use one of the images produced with these recipes, you need to install it to
an OpenHarmony source repository.
Warning! It is recommended to only install OpenHarmony prebuilts to clean
upstream OpenHarmony source repsitories, as the installation will remove files
and entire git repositories!
To install the `oniro-openharmony-bundle` to a clean OpenHarmony 3.0.1
repository, you should do something like this::
tar xfz $DOWNLOADS/code-v3.0.1-LTS.tar.gz
cd code-v3.0.1-LTS/OpenHarmony
$DOWNLOADS/oniro-openharmony-bundle-3.0-cortexa7-neon-vfpv4-1.99.99.sh -y -d oniro
./oniro/setup.sh
After this, you can use normal OpenHarmony build system procedures to build as
usual. To build image for HiSilicon Hi3516DV300 (taurus) board::
./build.sh --product-name Hi3516DV300
Use inside BitBake
******************
**meta-openharmony** is a bitbake layer, containing recipes for building
OpenHarmony software components.
The meta-openharmony layer enables building of prebuilts for use with the
OpenHarmony build system. A toolchain-only image, making it possible to use the
Oniro Clang version instead of the default Clang version included, and a bundle
image which contains both the Oniro Clang compiler and Oniro versions of various
third-party components, replacing the corresponding default third-party
versions.
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ../definitions.rst
OpenHarmony
###########
OpenHarmony is an open-source project incubated and operated by the OpenAtom
Foundation. It is an open-source operating system with a framework and platform
applicable to smart devices in all scenarios of a fully-connected world. It aims
to promote the development of the Internet of Everything (IoE).
OpenHarmony project provides a number of resources, including a Platform
Compatibility Specification (PCS), a test suite (XTS) for verification of
products and distributions following the PCS, and a complete reference
implementation with support for several development boards.
For more details on OpenHarmony project, `Click <https://gitee.com/openharmony>`__.
|main_project_name| provides a number of different Yocto recipes related to
OpenHarmony.
``openharmony-standard``
builds OpenHarmony components from the OpenHarmony projects reference
implementation, for use in Oniro and other Yocto based projects.
``oniro-openharmony-toolchain``
builds an LLVM toolchain for use with the OpenHarmony reference implementation
as a replacement for the default prebuilt toolchain.
``oniro-openharmony-bundle``
is similar to the toolchain built with ``oniro-openharmony-toolchain``, but
with the addition of selected open-source 3rd party components, which replaces
the default versions of those same components provided in the OpenHarmony
reference implementation.
``openharmony-standard-image``
builds a demo image, integrating the ``openharmony-standard`` output into a
bootable demo.
.. toctree::
:maxdepth: 1
openharmony-image
openharmony-sdk
......@@ -47,7 +47,7 @@ After successful bootup, you will be dropped into a login shell:
qemux86-64 login:
Default login is *root* without a password.
The default login name is **oniro** with **oniro** as a password.
After login you will see the shell prompt:
......
......@@ -6,10 +6,12 @@
.build-zephyr-image
===================
The ``.build-zephyr-image`` job extends the :doc:`build-image` job to collect only
The ``.build-zephyr-image`` job extends the :doc:`build-image` job to collect, by default
the `*.bin` and `*.elf` files and remove all the other files that would
normally be collected by the artifact system. It is recommended for Zephyr
builds which produce bin and elf images.
normally be collected by the artifact system. The file types of the artifacts can be overridden.
This sets by default ``CI_ONIRO_BUILD_FLAVOUR`` to ``zephyr`` and ``CI_ONIRO_RECIPE_NAME``
to ``zephyr-philosophers``, the latter can be overridden to change the recipe builded by bitbake.
It is used by all Zephyr builds.
Usage Guide
===========
......
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
=============
.build-zephyr
=============
The ``.build-zephyr`` job extends the :doc:`bitbake-workspace` job. It sets
``CI_ONIRO_BUILD_FLAVOUR`` to ``zephyr`` and builds the bitbake targets (e.g.
images) as defined by ``CI_ONIRO_BITBAKE_TARGETS`` (defaults included).
Usage Guide
===========
This job is not intended for direct use. Instead it serves as a base for all
the Zephyr-specific :doc:`../machines-and-flavours`.
......@@ -18,7 +18,6 @@ implementation details.
bitbake-workspace
build-linux
build-linux-matrix
build-zephyr
build-freertos
build-recipe
build-image
......@@ -30,3 +29,4 @@ implementation details.
lava-report
aggregate-docs
publish-rauc-bundle-to-hawkbit
oe-selftest
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
============
.oe-selftest
============
The ``.oe-selftest`` job extends the :doc:`bitbake-workspace` job to configure
OpenEmbedded Self test environment. The job does not run any tests by itself,
actual tests should be run in the downstream test jobs.
Job Variables
=============
Oe-selftest is based on Python unitest. Tests are organized by module, class
and method. The ``.oe-selftest`` job defines two variables as a way to
customize what tests to run.
CI_ONIRO_OE_SELFTESTS
---------------------
The specific tests to run. The default value is empty. The order the tests are
running is alphabetical.
CI_ONIRO_OE_SEFLTEST_SKIPS
--------------------------
The specific tests to skip. The default value is empty.
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: definitions.rst
.. _DebugMode:
Debug Mode
##########
In some situations, you may want to compile an image with some additional tools
and features for easier debugging. For this reason, |main_project_name|
offers the debug mode.
Images built with the `debug mode` enabled contain additional tools and allow
to log in as root (which is disabled in the default images).
To enable the `debug mode`, edit your ``local.conf`` and add:
.. code-block:: console
INHERIT += "oniro-debug-linux"
For convenience, the section is already present commented-out in the template
and you may uncoment it.
When done, rebuild your image as usual. To go back to the production mode,
comment the line out again and rebuild your image.
.. Note::
Debug mode images are unsupported by the project and do not take part
of the release. They are provided for convenience only.
......@@ -74,6 +74,12 @@ sample application, *blinky*. In order to do so issue the following:
3. After the build completes, the ``zephyr-philosophers.bin`` and the ``zephyr-blinky.bin``
file can be found in ``build-oniro-zephyr/tmp-newlib/deploy/images/arduino-nano-33-ble/``.
.. note::
By default, both zephyr-blinky and zephyr-philosophers applications will start once the board
is powered on without waiting for a serial console connection.
To start an application only when serial console is connected, specify ONIRO_ENABLE_ACM0 = "1".
This option may be useful in automated testing environment.
Flashing an Application
=======================
......
......@@ -84,7 +84,7 @@ Linux image
can be found in
``build-oniro-linux-raspberrypi4-64/tmp/deploy/images/$MACHINE/``.
The key file which is needed to flash into the SD card is
``oniro-image-base-raspberrypi4-64.wic.bz2``.
``oniro-image-base-raspberrypi4-64.wic.gz``.
Flashing |main_project_name| Linux image
****************************************
......@@ -104,7 +104,7 @@ describes booting the board with an SD card option.
.. code-block:: console
$ cd tmp/deploy/images/raspberrypi4-64
$ bmaptool copy oniro-image-base-raspberrypi4-64.wic.bz2 $DEVNODE
$ bmaptool copy oniro-image-base-raspberrypi4-64.wic.gz $DEVNODE
2. Put the card to the board and turn it on.
......
......@@ -86,7 +86,7 @@ steps:
.. code-block:: console
$ cd tmp/deploy/images/seco-intel-b68
$ bmaptool copy oniro-image-base-seco-intel-b68.wic.bz2 $DEVNODE
$ bmaptool copy oniro-image-base-seco-intel-b68.wic.gz $DEVNODE
3. Put the card to the board and turn it on.
......
......@@ -40,4 +40,5 @@ Build System Guide
:caption: Troubleshoot
:maxdepth: 2
fallback-devices-support
fallback-devices-support
debug-mode
......@@ -55,6 +55,8 @@ Initialize a repo workspace and clone all required repositories:
$ repo init -u https://gitlab.eclipse.org/eclipse/oniro-core/oniro.git -b kirkstone
$ repo sync --no-clone-bundle
.. _Building an Oniro image:
Building an Oniro image
***********************
......@@ -70,13 +72,50 @@ cloned using the repo tool. See above.
could use around 100GB of disk space for downloads, temporary files, and
build artifacts combined.
Initialize the build directory and run a build:
Initialize the build directory:
.. code-block:: console
$ TEMPLATECONF=../oniro/flavours/linux . ./oe-core/oe-init-build-env build-oniro-linux
Now that the build is initialized, you have the choice of building a standard
Oniro image or an OpenHarmony compatible one.
A. Standard Oniro image
-----------------------
All that is left is to run the build:
.. code-block:: console
$ MACHINE=qemux86-64 bitbake oniro-image-base
.. _Building with OpenHarmony:
B. Building with OpenHarmony compatibility
------------------------------------------
To enable OpenHarmony compatibility features, you need to tweak the
`local.conf` file before running the build process. You will find this
configuration in `build-oniro-linux/conf/local.conf` where you'll need to add
the following:
.. code-block:: sh
TOOLCHAIN="clang"
RUNTIME="llvm"
DISTRO_FEATURES:append = " openharmony"
IMAGE_INSTALL:append = " openharmony-standard"
This will enable OpenHarmony features and add OpenHarmony Standard System
features to the `oniro-image-base` image.
All that is left is to run the build:
.. code-block:: console
$ MACHINE=qemuarm bitbake oniro-image-base
Booting a Qemu X86-64 Target with a |main_project_name| image
*************************************************************
......@@ -88,3 +127,5 @@ Once the image is built, you can run a Qemu X86-64 instance using the provided s
If the host has a VT-capable CPU, you can pass the ``kvm`` argument for better
performance. Check ``runqemu``'s help message for all available arguments.
The default user name is **oniro** with **oniro** as a password.
......@@ -4,7 +4,7 @@
.. include:: definitions.rst
Supported images
Supported Images
################
To create a custom Linux distribution to match the product requirements,
......
......@@ -44,6 +44,24 @@ able to choose from Java, Extensible Markup Language (XML), C/C++, JavaScript
(JS), Cascading Style Sheets (CSS), and HarmonyOS Markup Language (HML) to
develop applications for |main_project_name|.
OpenHarmony Compatibility
-------------------------
|main_project_name| will be OpenHarmony compatible. It will include the services
and frameworks required by OpenHarmony specification, and provide the APIs
required by OpenHarmony specification, so that you can develop products that can
interoperate with other OpenHarmony products and be certified as OpenHarmony
compatible.
OpenHarmony compatibility will enable required OpenHarmony features in the
kernel layer, system services layer and framework layer, allowing the addition
of OpenHarmony compatible applications.
Due to the inherent modularity of the Oniro build system (OpenEmbedded),
individual projects will be able to pick and choose from the OpenHarmony
compatibility features, allowing to build products with just the parts that are
needed.
Technical Architecture
----------------------
......
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