From 16ea49acd751ad6e1294905b8c1055c1b9a2e1b5 Mon Sep 17 00:00:00 2001
From: Robert Drab <robert.drab@huawei.com>
Date: Fri, 8 Jan 2021 16:29:45 +0100
Subject: [PATCH] Add OHOS zephyr-flavour templateconf

Copy of Poky sample files with default distro set
to zephyr and following meta-layer in bblayers.conf.sample:
- poky/meta
- meta-openembedded/meta-oe
- meta-openembedded/meta-python
- meta-zephyr
- meta-ohos/meta-ohos-foundation

Signed-off-by: Robert Drab <robert.drab@huawei.com>
---
 flavours/zephyr/bblayers.conf.sample | 14 ++++++++
 flavours/zephyr/conf-notes.txt       | 18 +++++++++++
 flavours/zephyr/local.conf.sample    | 48 ++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 flavours/zephyr/bblayers.conf.sample
 create mode 100644 flavours/zephyr/conf-notes.txt
 create mode 100644 flavours/zephyr/local.conf.sample

diff --git a/flavours/zephyr/bblayers.conf.sample b/flavours/zephyr/bblayers.conf.sample
new file mode 100644
index 00000000..46182288
--- /dev/null
+++ b/flavours/zephyr/bblayers.conf.sample
@@ -0,0 +1,14 @@
+# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+POKY_BBLAYERS_CONF_VERSION = "2"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/../meta-openembedded/meta-oe \
+  ##OEROOT##/../meta-openembedded/meta-python \
+  ##OEROOT##/../meta-zephyr \
+  ##OEROOT##/../meta-ohos/meta-ohos-foundation \
+  "
diff --git a/flavours/zephyr/conf-notes.txt b/flavours/zephyr/conf-notes.txt
new file mode 100644
index 00000000..96210cdb
--- /dev/null
+++ b/flavours/zephyr/conf-notes.txt
@@ -0,0 +1,18 @@
+
+### Shell environment set up for builds. ###
+
+You can now run 'bitbake zephyr-philosophers'
+
+Supported machines:
+- qemu-cortex-m3
+- qemu-x86 (default)
+
+MACHINE variable can be set up in conf/local.conf file under build directory
+or via command line, e.g.:
+
+    $ MACHINE=<supported_machine> bitbake <target>
+
+You can also run generated qemu images with a command:
+
+    $ DEPLOY_DIR_IMAGE=tmp-newlib/deploy/images/qemu-x86 runqemu qemux86
+
diff --git a/flavours/zephyr/local.conf.sample b/flavours/zephyr/local.conf.sample
new file mode 100644
index 00000000..b05f4d77
--- /dev/null
+++ b/flavours/zephyr/local.conf.sample
@@ -0,0 +1,48 @@
+#
+# This file is your local configuration file and is where all local user settings
+# are placed. The comments in this file give some guide to the options a new user
+# to the system might want to change but pretty much any configuration option can
+# be set in this file. More adventurous users can look at local.conf.extended
+# which contains other examples of configuration which can be placed in this file
+# but new users likely won't need any of them initially.
+#
+# Lines starting with the '#' character are commented out and in some cases the
+# default values are provided as comments to show people example syntax. Enabling
+# the option is a question of removing the # character and making any change to the
+# variable as required.
+
+#
+# Machine Selection
+#
+# You need to select a specific machine to target the build with. There are a selection
+# of emulated machines available which can boot and run in the QEMU emulator:
+#
+#MACHINE ?= "qemu-cortex-m3"
+#MACHINE ?= "qemu-x86"
+#
+# This sets the default machine to be qemu-x86 if no other machine is selected:
+MACHINE ??= "qemu-x86"
+
+#
+# Default policy config
+#
+DISTRO = "zephyr"
+
+#
+# Package Management configuration
+#
+# This variable lists which packaging formats to enable. Multiple package backends
+# can be enabled at once and the first item listed in the variable will be used
+# to generate the root filesystems.
+# Options are:
+#  - 'package_deb' for debian style deb files
+#  - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
+#  - 'package_rpm' for rpm style packages
+# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
+# We default to rpm:
+PACKAGE_CLASSES ?= "package_rpm"
+
+# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
+# track the version of this file when it was generated. This can safely be ignored if
+# this doesn't mean anything to you.
+CONF_VERSION = "1"
-- 
GitLab