mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-12 00:49:30 +02:00
classes-recipe: Convert zephyr-sample inc file to bbclass
Convert recipes-kernel/zephyr-kernel/zephyr-sample.inc file to classes-recipe/zephyr-sample.bbclass. Using this bbclass user can inherit this bbclass from any layer to build custom or out-of-tree zephyr applications. Also update the recipes to inherit zephyr-sample bbclass. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
This commit is contained in:
committed by
Lee Chee Yang
parent
835f0fc0ba
commit
bb40a1860c
@@ -2,12 +2,10 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
ZEPHYR_INHERIT_CLASSES += "zephyr cmake"
|
||||
ZEPHYR_INHERIT_CLASSES += "zephyr cmake zephyr-sample"
|
||||
|
||||
inherit ${ZEPHYR_INHERIT_CLASSES}
|
||||
|
||||
require recipes-kernel/zephyr-kernel/zephyr-sample.inc
|
||||
|
||||
SRC_URI:append = " file://0001-zephyr-Export-an-OpenEmbedded-machine-config.patch"
|
||||
|
||||
ZEPHYR_SRC_DIR = "${S}/samples/hello_world"
|
||||
|
||||
10
meta-zephyr-core/classes-recipe/zephyr-sample.bbclass
Normal file
10
meta-zephyr-core/classes-recipe/zephyr-sample.bbclass
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
# This bbclass is inherity by all the zephyr-kernel/zephyr-<apps>.bb recipes
|
||||
# to build zephyr applications. User can also inherit this bbclass from any
|
||||
# layer for custom or out-of-tree zephyr applications.
|
||||
|
||||
require recipes-kernel/zephyr-kernel/zephyr-image.inc
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/basic/blinky"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_client"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_server"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/hci_uart"
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ SUMMARY = "Hello World Zephyr Sample"
|
||||
DESCRIPTION = "A simple Zephyr application that prints 'Hello World' on the \
|
||||
console"
|
||||
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/hello_world"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/http_client"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/display/lvgl"
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/mqtt_publisher"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
|
||||
ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/openthread/coprocessor"
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_esp"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_hr"
|
||||
|
||||
@@ -3,6 +3,6 @@ DESCRIPTION = "A simple Zephyr application that demonstrates basic sanity of \
|
||||
the kernel. It demonstrates that kernel scheduling, communication and timing \
|
||||
operate correctly by printing a greeting to the console from two threads."
|
||||
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/philosophers"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require zephyr-image.inc
|
||||
@@ -3,6 +3,6 @@ DESCRIPTION = "A simple Zephyr application that demonstrates basic sanity of \
|
||||
the kernel. It demonstrates that kernel scheduling, communication and timing \
|
||||
operate correctly by printing a greeting to the console from two threads."
|
||||
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/synchronization"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
include zephyr-sample.inc
|
||||
inherit zephyr-sample
|
||||
|
||||
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/websocket_client"
|
||||
|
||||
Reference in New Issue
Block a user