Skip to contentSkip to conversation

zephyr-kernel: Add synchronization sample recipe

PATCH New Peter Hoyes 1 participant 3 messages Aug 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 zephyr-kernel: Add synchronization sample recipe

From: Peter Hoyes <[email protected]>

The Zephyr documentation [1] lists 3 "classic samples" that "can be run on any of the supported platforms": Hello World, Synchronization and Dining Philosophers. meta-zephyr already includes the first two but not synchronization so add a recipe for it.

[1] https://docs.zephyrproject.org/3.1.0/samples/classic.html

---
 .../zephyr-kernel/zephyr-synchronization.bb               | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb
meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb new file +8 -0
new file mode 100644
index 0000000..4cb207d
@@ -0,0 +1,8 @@
+SUMMARY = "Synchronization Zephyr Sample"
+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
+
+ZEPHYR_SRC_DIR = "${S}/samples/synchronization"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 zephyr-kernel: Add SUMMARY and DESCRIPTION for classic sample apps

From: Peter Hoyes <[email protected]>

Hello World and Philosophers do not have a SUMMARY or DESCRIPTION, so add these to both recipes.

---
 .../recipes-kernel/zephyr-kernel/zephyr-helloworld.bb        | 4 ++++
 .../recipes-kernel/zephyr-kernel/zephyr-philosophers.bb      | 5 +++++
 2 files changed, 9 insertions(+)
meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb +4 -0
index ac5ce62..20d1700 100644
@@ -1,3 +1,7 @@
+SUMMARY = "Hello World Zephyr Sample"
+DESCRIPTION = "A simple Zephyr application that prints 'Hello World' on the \
+console"
+
 include zephyr-sample.inc
 
 ZEPHYR_SRC_DIR = "${S}/samples/hello_world"
meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb +5 -0
index a2afb57..5a2ac70 100644
@@ -1,3 +1,8 @@
+SUMMARY = "Philosophers Zephyr Sample"
+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
 
 ZEPHYR_SRC_DIR = "${S}/samples/philosophers"
Signature · 1 line
2.25.1