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>
This commit is contained in:
Sandeep Gundlupet Raju
2025-08-14 21:54:47 -06:00
committed by Lee Chee Yang
parent a0e2e4e094
commit bbeeb12eb8
20 changed files with 28 additions and 21 deletions

View 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

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/basic/blinky"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_client"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_server"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/hci_uart"

View File

@@ -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"

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/http_client"

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/display/lvgl"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/mqtt_publisher"

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_MAKE_OUTPUT ?= " \

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"

View File

@@ -1,4 +1,4 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/openthread/coprocessor"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_esp"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_hr"

View File

@@ -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"

View File

@@ -1 +0,0 @@
require zephyr-image.inc

View File

@@ -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"

View File

@@ -1,3 +1,3 @@
include zephyr-sample.inc
inherit zephyr-sample
ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/websocket_client"