diff --git a/README.md b/README.md index 3dde8d25c375271f514014520a69421033790040..45c5e1bdd2e90fb924e9a902bb1f41a3752690d0 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,13 @@ You can run these commands to do this: repo init -u https://gitlab.eclipse.org/eclipse/oniro-core/meta-openharmony.git -b kirkstone repo sync --no-clone-bundle +## QEMU example image + +The meta-openharmony provides an example image recipe which can be used for +quickly building and running OpenHarmony code in QEMU ARM simulator. + +See [recipes-openharmony/images/README.md](recipes-openharmony/images/README.md) +for more information. ## OpenHarmony prebuilts diff --git a/recipes-openharmony/images/README.md b/recipes-openharmony/images/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1ebe50671d3ae8ecf28b4a462abc1910151fb310 --- /dev/null +++ b/recipes-openharmony/images/README.md @@ -0,0 +1,22 @@ +<!-- +SPDX-FileCopyrightText: Huawei Inc. + +SPDX-License-Identifier: CC-BY-4.0 +--> + +# QEMU example image + +The `openharmony-standard-image` recipe provides an easy way to build and run +OpenHarmony components. You can build the image for QEMU and run it using the +following in your `build/conf/local.conf` file: + + DISTRO = "oniro-openharmony-linux" + MACHINE = "qemuarma7" + +To build the image, run: + + bitbake openharmony-standard-image + +To run it, run the this commands after successfully completing the above build command: + + runqemu serialstdio nographic diff --git a/recipes-openharmony/images/openharmony-standard-image.bb b/recipes-openharmony/images/openharmony-standard-image.bb new file mode 100644 index 0000000000000000000000000000000000000000..9bd4498c9dc6f16410e7e4707c98513e9fab2957 --- /dev/null +++ b/recipes-openharmony/images/openharmony-standard-image.bb @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +SUMMARY = "A console-only image with OpenHarmony first party components" + +IMAGE_FEATURES += "splash" + +LICENSE = "Apache-2.0" + +inherit core-image + +QEMU_USE_SLIRP = "1" + +# debug-tweaks provides password-less root account required by testimage +EXTRA_IMAGE_FEATURES += "debug-tweaks" + +# ptest requires ptest-runner and sshd to be present in the image +IMAGE_INSTALL += "sshd" + +# install OpenHarmony components and ptests +IMAGE_INSTALL += "openharmony-standard-exes"