From 6c89f9e3ddb3d4623a09b2234ed8d46e609f231a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?=
 <bernhard.rosenkraenzer.ext@huawei.com>
Date: Thu, 4 Nov 2021 16:08:03 +0100
Subject: [PATCH] meta-oniro-blueprints: Add doorlock blueprint targets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add the zephyr-blueprint-doorlock and
zephyr-blueprint-doorlock-factoryreset targets

Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>
---
 .../oniro-zephyr-blueprint-doorlock.conf      | 17 ++++++++++++
 .../zephyr-blueprint-doorlock-factoryreset.bb | 26 +++++++++++++++++++
 .../zephyr-blueprint-doorlock.bb              | 26 +++++++++++++++++++
 3 files changed, 69 insertions(+)
 create mode 100644 meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-doorlock.conf
 create mode 100644 meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock-factoryreset.bb
 create mode 100644 meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock.bb

diff --git a/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-doorlock.conf b/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-doorlock.conf
new file mode 100644
index 00000000..70f0330a
--- /dev/null
+++ b/meta-oniro-blueprints/conf/distro/oniro-zephyr-blueprint-doorlock.conf
@@ -0,0 +1,17 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Distro configuration for the dashboard blueprint
+
+require conf/distro/oniro-zephyr.conf
+
+DISTRO = "oniro-zephyr-blueprint-doorlock"
+DISTRO_NAME = "Oniro Project Doorlock Blueprint Zephyr Distro"
+
+# With our layer setup we would add any bbappend found from our
+# layers.conf. This means blueprint-specific appends would leak
+# into the package in our main distribution. To avoid this we
+# mask out the blueprint layers in the main distro and unmask
+# them only the blueprint distributions.
+BBMASK = ""
diff --git a/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock-factoryreset.bb b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock-factoryreset.bb
new file mode 100644
index 00000000..c5c1babe
--- /dev/null
+++ b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock-factoryreset.bb
@@ -0,0 +1,26 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+require recipes-kernel/zephyr-kernel/zephyr-sample.inc
+
+SUMMARY = "Doorlock factory reset image"
+DESCRIPTION = "Zephyr based image for doing a factory reset on the doorlock blueprint"
+LICENSE = "Apache-2.0"
+
+SRC_OPT_PROTO = "protocol=https"
+SRC_OPT_DEST = "destsuffix=git/apps/doorlock-factoryreset"
+SRC_OPT_NAME = "name=doorlock-factoryreset"
+SRC_OPT_BRANCH = "branch=main"
+
+SRC_OPTIONS = "${SRC_OPT_PROTO};${SRC_OPT_DEST};${SRC_OPT_NAME};${SRC_OPT_BRANCH}"
+SRC_URI += "git://booting.oniroproject.org/distro/blueprints/doorlock/doorlock-factoryreset.git;${SRC_OPTIONS}"
+
+SRCREV_doorlock-factoryreset = "375df8948aff9aca79c6e766f070b82e6ca087f7"
+
+ZEPHYR_SRC_DIR = "${S}/apps/doorlock-factoryreset"
+
+# For the moment, other boards don't have the devicetree
+# overlays describing how the locks, keypad etc. are
+# supposed to be connected.
+COMPATIBLE_MACHINE = "(arduino-nano-33-ble)"
diff --git a/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock.bb b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock.bb
new file mode 100644
index 00000000..a14c4a80
--- /dev/null
+++ b/meta-oniro-blueprints/recipes-kernel/zephyr-kernel/zephyr-blueprint-doorlock.bb
@@ -0,0 +1,26 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+require recipes-kernel/zephyr-kernel/zephyr-sample.inc
+
+SUMMARY = "Doorlock blueprint image"
+DESCRIPTION = "Zephyr based image for handling door locks"
+LICENSE = "Apache-2.0"
+
+SRC_OPT_PROTO = "protocol=https"
+SRC_OPT_DEST = "destsuffix=git/apps/doorlock"
+SRC_OPT_NAME = "name=doorlock"
+SRC_OPT_BRANCH = "branch=main"
+
+SRC_OPTIONS = "${SRC_OPT_PROTO};${SRC_OPT_DEST};${SRC_OPT_NAME};${SRC_OPT_BRANCH}"
+SRC_URI += "git://booting.oniroproject.org/distro/blueprints/doorlock/doorlock-zephyr.git;${SRC_OPTIONS}"
+
+SRCREV_doorlock = "7d7f093c5a1285027bea3d070760b48e25ba8ced"
+
+ZEPHYR_SRC_DIR = "${S}/apps/doorlock"
+
+# For the moment, other boards don't have the devicetree
+# overlays describing how the locks, keypad etc. are
+# supposed to be connected.
+COMPATIBLE_MACHINE = "(arduino-nano-33-ble)"
-- 
GitLab