aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.gitlab-ci.yml118
-rw-r--r--README.txt27
-rw-r--r--ci/96b-avenger96.yml6
-rw-r--r--ci/96b-nitrogen.yml20
-rw-r--r--ci/arduino-nano-33-ble.yml21
-rw-r--r--ci/base.yml39
-rwxr-xr-xci/check-machine-coverage26
-rwxr-xr-xci/check-warnings19
-rw-r--r--ci/intel-x86-64.yml6
-rwxr-xr-xci/jobs-to-kas26
-rw-r--r--ci/logging.yml13
-rw-r--r--ci/meta-openembedded.yml11
-rw-r--r--ci/nrf52840-mdk-usb-dongle.yml6
-rw-r--r--ci/nrf52840dk-nrf52840.yml20
-rw-r--r--ci/qemu-cortex-a53.yml10
-rw-r--r--ci/qemu-cortex-m0.yml6
-rw-r--r--ci/qemu-cortex-m3.yml6
-rw-r--r--ci/qemu-cortex-r5.yml10
-rw-r--r--ci/qemu-nios2.yml10
-rw-r--r--ci/qemu-x86.yml10
-rw-r--r--ci/stm32mp157c-dk2.yml13
-rw-r--r--ci/testimage.yml9
-rwxr-xr-xci/update-repos40
-rw-r--r--ci/zephyr-toolchain.yml11
-rw-r--r--meta-zephyr-bsp/README.txt1
-rw-r--r--meta-zephyr-bsp/conf/machine/include/nrf52.inc4
-rw-r--r--meta-zephyr-bsp/conf/machine/include/stm32mp1-cortex-m4.inc4
-rw-r--r--meta-zephyr-bsp/conf/machine/include/tune-cortexm0.inc31
-rw-r--r--meta-zephyr-bsp/conf/machine/include/tune-cortexm3.inc21
-rw-r--r--meta-zephyr-bsp/conf/machine/include/tune-cortexm4.inc19
-rw-r--r--meta-zephyr-bsp/conf/machine/nrf52840-mdk-usb-dongle.conf7
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-cortex-a53.conf20
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf24
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-cortex-m3.conf5
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-cortex-r5.conf22
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-nios2.conf2
-rw-r--r--meta-zephyr-bsp/conf/machine/qemu-x86.conf2
-rw-r--r--meta-zephyr-core/README.txt120
-rw-r--r--meta-zephyr-core/classes/zephyr.bbclass38
-rw-r--r--meta-zephyr-core/classes/zephyrtest.bbclass2
-rw-r--r--meta-zephyr-core/conf/distro/zephyr.conf2
-rw-r--r--meta-zephyr-core/recipes-devtools/west/west_0.12.99.bb22
-rw-r--r--meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb35
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-cmake-add-yocto-toolchain.patch (renamed from meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch)0
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-x86-fix-efi-binary-generation-issue-in-cross-compila.patch (renamed from meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch)0
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-cmake-add-yocto-toolchain.patch63
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch80
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb6
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc3
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc19
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc65
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.3.inc196
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.0.0.inc70
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc223
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc50
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb4
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb2
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb7
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc1
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb8
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-yocto.inc16
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-zephyr.inc15
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb2
-rwxr-xr-xmeta-zephyr-core/scripts/generate-version.py73
-rw-r--r--meta-zephyr-core/scripts/zephyr-kernel-src.inc.jinja35
78 files changed, 1348 insertions, 479 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bee8a64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+__pycache__
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..c185477
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,118 @@
+image: ghcr.io/siemens/kas/kas:latest-release
+
+stages:
+ - prep
+ - build
+
+# Common job fragment to get a worker ready
+.setup:
+ stage: build
+ interruptible: true
+ variables:
+ KAS_WORK_DIR: $CI_PROJECT_DIR/work
+ KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos
+ SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
+ DL_DIR: $CI_BUILDS_DIR/persist/downloads
+ BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
+ before_script:
+ - echo KAS_WORK_DIR = $KAS_WORK_DIR
+ - echo SSTATE_DIR = $SSTATE_DIR
+ - echo DL_DIR = $DL_DIR
+ - rm -rf $KAS_WORK_DIR
+ - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR
+
+# Generalised fragment to do a Kas build
+.build:
+ extends: .setup
+ script:
+ - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
+ - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
+ - kas build $KASFILES
+ - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+ artifacts:
+ name: "logs"
+ when: on_failure
+ paths:
+ - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
+
+#
+# Prep stage, update repositories once
+#
+update-repos:
+ extends: .setup
+ stage: prep
+ script:
+ - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
+
+
+#
+# Bootstrap stage, machine coverage
+#
+
+# What percentage of machines in the layer do we build
+machine-coverage:
+ stage: prep
+ interruptible: true
+ script:
+ - ./ci/check-machine-coverage
+ coverage: '/Coverage: \d+/'
+
+
+#
+# Build stage, the actual build jobs
+#
+
+96b-avenger96:
+ extends: .build
+
+96b-nitrogen:
+ extends: .build
+
+arduino-nano-33-ble:
+ extends: .build
+
+intel-x86-64:
+ extends: .build
+
+nrf52840-mdk-usb-dongle:
+ extends: .build
+
+nrf52840dk-nrf52840:
+ extends: .build
+
+qemu-cortex-a53:
+ extends: .build
+ parallel:
+ matrix:
+ - TOOLCHAIN: [default, zephyr-toolchain]
+ TESTING: testimage
+
+qemu-cortex-m0:
+ extends: .build
+ parallel:
+ matrix:
+ - TOOLCHAIN: [default, zephyr-toolchain]
+ TESTING: testimage
+
+qemu-cortex-m3:
+ extends: .build
+ parallel:
+ matrix:
+ - TOOLCHAIN: [default, zephyr-toolchain]
+ TESTING: testimage
+
+qemu-cortex-r5:
+ extends: .build
+
+qemu-nios2:
+ extends: .build
+
+qemu-x86:
+ extends: .build
+ parallel:
+ matrix:
+ - TOOLCHAIN: [default, zephyr-toolchain]
+ TESTING: testimage
+
+stm32mp157c-dk2:
+ extends: .build
diff --git a/README.txt b/README.txt
index ec860fd..ea129ba 100644
--- a/README.txt
+++ b/README.txt
@@ -14,9 +14,6 @@ This layer depends on:
Python layer (meta-openembedded/meta-python)
git://git.openembedded.org/meta-openembedded
-Modify local conf by adding:
- DISTRO="zephyr"
-
Add "meta-openembedded/meta-oe" to BBLAYERS
Add "meta-openembedded/meta-python" to BBLAYERS
Add "meta-zephyr-core" and "meta-zephyr-bsp" to BBLAYERS
@@ -25,6 +22,13 @@ Building and Running Zephyr Samples
===================================
You can build Zephyr samples. There are several sample recipes.
+
+To use the Yocto toolchain, modify local conf by adding:
+ DISTRO="zephyr"
+
+To use the Zephyr pre-built toolchain, modify local conf by adding:
+ ZEPHYR_TOOLCHAIN_VARIANT = "zephyr"
+
For example, to build the Zephyr "philosophers" sample:
$ MACHINE=qemu-x86 bitbake zephyr-philosophers
@@ -121,6 +125,23 @@ you will need to run the above, copy the conf files from the deploy dir to the
machine conf directory and then run your build. This shouldn't need to happen
often.
+Generating new Zephyr recipe versions
+=====================================
+The script meta-zephyr-core/scripts/generate-version.py is used to generate
+Yocto configuration for a Zephyr version from the West configuration in the
+Zephyr repository. It requires the west and jinja2 Python packages to be
+installed on the host. Run it as follows:
+
+ $ ./meta-zephyr-core/scripts/generate-version.py x.x.x
+
+where x.x.x is the Zephyr version.
+
+The patch files added to SRC_URI in the generated file should be validated and
+modified if required.
+
+The new version should be committed and submitted to the mailing list as
+described in "Contributing".
+
Contributing
============
diff --git a/ci/96b-avenger96.yml b/ci/96b-avenger96.yml
new file mode 100644
index 0000000..bcdccf3
--- /dev/null
+++ b/ci/96b-avenger96.yml
@@ -0,0 +1,6 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: 96b-avenger96
diff --git a/ci/96b-nitrogen.yml b/ci/96b-nitrogen.yml
new file mode 100644
index 0000000..9b685fe
--- /dev/null
+++ b/ci/96b-nitrogen.yml
@@ -0,0 +1,20 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: 96b-nitrogen
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-hci-uart
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-mqtt-publisher
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/arduino-nano-33-ble.yml b/ci/arduino-nano-33-ble.yml
new file mode 100644
index 0000000..1035118
--- /dev/null
+++ b/ci/arduino-nano-33-ble.yml
@@ -0,0 +1,21 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: arduino-nano-33-ble
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-mqtt-publisher
+ - zephyr-openthread-echo-client
+ - zephyr-openthread-rcp
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/base.yml b/ci/base.yml
new file mode 100644
index 0000000..70adac1
--- /dev/null
+++ b/ci/base.yml
@@ -0,0 +1,39 @@
+header:
+ version: 11
+ includes:
+ - ci/meta-openembedded.yml
+
+distro: zephyr
+
+defaults:
+ repos:
+ refspec: master
+
+repos:
+ meta-zephyr:
+ layers:
+ meta-zephyr-core:
+ meta-zephyr-bsp:
+
+ poky:
+ url: https://git.yoctoproject.org/git/poky
+ layers:
+ meta:
+ meta-poky:
+
+env:
+ BB_LOGCONFIG: ""
+
+local_conf_header:
+ base: |
+ BB_SERVER_TIMEOUT = "60"
+ CONF_VERSION = "2"
+ INHERIT += "rm_work"
+
+machine: unset
+
+target:
+ - zephyr-helloworld
+ - zephyr-kernel-test-all
+ - zephyr-philosophers
+ - zephyr-synchronization
diff --git a/ci/check-machine-coverage b/ci/check-machine-coverage
new file mode 100755
index 0000000..19f9571
--- /dev/null
+++ b/ci/check-machine-coverage
@@ -0,0 +1,26 @@
+#! /usr/bin/env python3
+
+from pathlib import Path
+import sys
+
+metazephyr = Path.cwd()
+
+if metazephyr.name != "meta-zephyr":
+ print("Not running inside meta-zephyr")
+ sys.exit(1)
+
+# All machine configurations
+machines = metazephyr.glob("meta-zephyr-bsp/conf/machine/*.conf")
+machines = set(p.stem for p in machines)
+
+# All kas files
+kas = metazephyr.glob("ci/*.yml")
+kas = set(p.stem for p in kas)
+
+missing = machines - kas
+print(f"The following machines are missing: {', '.join(sorted(missing))}.")
+
+covered = len(machines) - len(missing)
+total = len(machines)
+percent = int(covered / total * 100)
+print(f"Coverage: {percent}%")
diff --git a/ci/check-warnings b/ci/check-warnings
new file mode 100755
index 0000000..9d08010
--- /dev/null
+++ b/ci/check-warnings
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+# Expects the path to a log file as $1, and if this file has any content
+# then display the contents and exit with an error code.
+
+set -e -u
+
+LOGFILE=$1
+
+LINES=$(grep --invert-match "relocations in \.text" $LOGFILE | wc -l)
+if test "$LINES" -ne 0; then
+ echo ==============================
+ echo The build had warnings/errors:
+ echo ==============================
+ cat $LOGFILE
+ exit 1
+fi
+
+exit 0
diff --git a/ci/intel-x86-64.yml b/ci/intel-x86-64.yml
new file mode 100644
index 0000000..23e711c
--- /dev/null
+++ b/ci/intel-x86-64.yml
@@ -0,0 +1,6 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: intel-x86-64
diff --git a/ci/jobs-to-kas b/ci/jobs-to-kas
new file mode 100755
index 0000000..296bb0d
--- /dev/null
+++ b/ci/jobs-to-kas
@@ -0,0 +1,26 @@
+#! /bin/bash
+
+# This script is expecting an input of machine name, optionally followed by a
+# colon and a list of one or more parameters separated by commas between
+# brackets. For example, the following are acceptable:
+# qemu-x86
+# qemu-cortex-m3: [testimage]
+# qemu-cortex-a53: [zephyr-toolchain, testimage]
+#
+# Turn this list into a series of yml files separated by colons to pass to kas
+
+set -e -u
+
+FILES="ci/$(echo $1 | cut -d ':' -f 1).yml"
+
+for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
+ # Given that there is no yml file for default, we can simply ignore those
+ # parameters. They are necessary to pass in so that matrix can correctly
+ # setup all of the permutations of each individual run.
+ if [[ $i == 'default' ]]; then
+ continue
+ fi
+ FILES+=":ci/$i.yml"
+done
+
+echo $FILES
diff --git a/ci/logging.yml b/ci/logging.yml
new file mode 100644
index 0000000..3af1029
--- /dev/null
+++ b/ci/logging.yml
@@ -0,0 +1,13 @@
+# Python logging configuration to write all warnings to a separate file
+version: 1
+
+handlers:
+ warnings:
+ class: logging.FileHandler
+ level: WARNING
+ filename: warnings.log
+ formatter: BitBake.logfileFormatter
+
+loggers:
+ BitBake:
+ handlers: [warnings]
diff --git a/ci/meta-openembedded.yml b/ci/meta-openembedded.yml
new file mode 100644
index 0000000..bed338d
--- /dev/null
+++ b/ci/meta-openembedded.yml
@@ -0,0 +1,11 @@
+header:
+ version: 11
+
+repos:
+ meta-openembedded:
+ url: https://git.openembedded.org/meta-openembedded
+ layers:
+ meta-filesystems:
+ meta-networking:
+ meta-oe:
+ meta-python:
diff --git a/ci/nrf52840-mdk-usb-dongle.yml b/ci/nrf52840-mdk-usb-dongle.yml
new file mode 100644
index 0000000..0dc3433
--- /dev/null
+++ b/ci/nrf52840-mdk-usb-dongle.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: nrf52840-mdk-usb-dongle
diff --git a/ci/nrf52840dk-nrf52840.yml b/ci/nrf52840dk-nrf52840.yml
new file mode 100644
index 0000000..a0c1587
--- /dev/null
+++ b/ci/nrf52840dk-nrf52840.yml
@@ -0,0 +1,20 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: nrf52840dk-nrf52840
+
+target:
+ - zephyr-blinky
+ - zephyr-coap-client
+ - zephyr-coap-server
+ - zephyr-echo-client
+ - zephyr-helloworld
+ - zephyr-http-client
+ - zephyr-kernel-test-all
+ - zephyr-lvgl
+ - zephyr-mqtt-publisher
+ - zephyr-peripheral-esp
+ - zephyr-peripheral-hr
+ - zephyr-philosophers
diff --git a/ci/qemu-cortex-a53.yml b/ci/qemu-cortex-a53.yml
new file mode 100644
index 0000000..ca8b649
--- /dev/null
+++ b/ci/qemu-cortex-a53.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "interrupt"
+
+machine: qemu-cortex-a53
diff --git a/ci/qemu-cortex-m0.yml b/ci/qemu-cortex-m0.yml
new file mode 100644
index 0000000..759253d
--- /dev/null
+++ b/ci/qemu-cortex-m0.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-m0
diff --git a/ci/qemu-cortex-m3.yml b/ci/qemu-cortex-m3.yml
new file mode 100644
index 0000000..46fd551
--- /dev/null
+++ b/ci/qemu-cortex-m3.yml
@@ -0,0 +1,6 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+machine: qemu-cortex-m3
diff --git a/ci/qemu-cortex-r5.yml b/ci/qemu-cortex-r5.yml
new file mode 100644
index 0000000..e595bce
--- /dev/null
+++ b/ci/qemu-cortex-r5.yml
@@ -0,0 +1,10 @@
+header:
+ version: 11
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ nonbuilding_tests: |
+ ZEPHYRTESTS:remove = "common poll sleep queue device"
+
+machine: qemu-cortex-r5
diff --git a/ci/qemu-nios2.yml b/ci/qemu-nios2.yml
new file mode 100644
index 0000000..b818371
--- /dev/null
+++ b/ci/qemu-nios2.yml
@@ -0,0 +1,10 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ nonbuilding_tests: |
+ ZEPHYRTESTS:remove = "interrupt"
+
+machine: qemu-nios2
diff --git a/ci/qemu-x86.yml b/ci/qemu-x86.yml
new file mode 100644
index 0000000..df744a1
--- /dev/null
+++ b/ci/qemu-x86.yml
@@ -0,0 +1,10 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+local_conf_header:
+ failing_tests: |
+ ZEPHYRTESTS:remove = "pending"
+
+machine: qemu-x86
diff --git a/ci/stm32mp157c-dk2.yml b/ci/stm32mp157c-dk2.yml
new file mode 100644
index 0000000..3dc04a5
--- /dev/null
+++ b/ci/stm32mp157c-dk2.yml
@@ -0,0 +1,13 @@
+header:
+ version: 9
+ includes:
+ - ci/base.yml
+
+machine: stm32mp157c-dk2
+
+target:
+ - zephyr-blinky
+ - zephyr-helloworld
+ - zephyr-kernel-test-all
+ - zephyr-philosophers
+ - zephyr-openamp-rsc-table
diff --git a/ci/testimage.yml b/ci/testimage.yml
new file mode 100644
index 0000000..83e17a7
--- /dev/null
+++ b/ci/testimage.yml
@@ -0,0 +1,9 @@
+header:
+ version: 11
+
+local_conf_header:
+ testimage: |
+ IMAGE_CLASSES += "testimage"
+ TEST_TARGET = "QemuTargetZephyr"
+ TEST_SUITES = "zephyr"
+ TESTIMAGE_AUTO = "1"
diff --git a/ci/update-repos b/ci/update-repos
new file mode 100755
index 0000000..fa638aa
--- /dev/null
+++ b/ci/update-repos
@@ -0,0 +1,40 @@
+#! /usr/bin/env python3
+
+# Update clones of the repositories we need in KAS_REPO_REF_DIR to speed up fetches
+
+import sys
+import os
+import subprocess
+import pathlib
+
+def repo_shortname(url):
+ # Taken from Kas (Repo.__getattr__) to ensure the logic is right
+ from urllib.parse import urlparse
+ url = urlparse(url)
+ return ('{url.netloc}{url.path}'
+ .format(url=url)
+ .replace('@', '.')
+ .replace(':', '.')
+ .replace('/', '.')
+ .replace('*', '.'))
+
+repositories = (
+ "https://git.yoctoproject.org/git/poky",
+ "https://git.openembedded.org/meta-openembedded",
+)
+
+if __name__ == "__main__":
+ if "KAS_REPO_REF_DIR" not in os.environ:
+ print("KAS_REPO_REF_DIR needs to be set")
+ sys.exit(1)
+
+ base_repodir = pathlib.Path(os.environ["KAS_REPO_REF_DIR"])
+
+ for repo in repositories:
+ repodir = base_repodir / repo_shortname(repo)
+ if repodir.exists():
+ print("Updating %s..." % repo)
+ subprocess.run(["git", "-C", repodir, "fetch"], check=True)
+ else:
+ print("Cloning %s..." % repo)
+ subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
diff --git a/ci/zephyr-toolchain.yml b/ci/zephyr-toolchain.yml
new file mode 100644
index 0000000..ab8baa3
--- /dev/null
+++ b/ci/zephyr-toolchain.yml
@@ -0,0 +1,11 @@
+header:
+ version: 11
+
+# The Zephyr toolchain is standalone and does not depend on TCMODE or TCLIB, so
+# validate that it is possible to build Zephyr applications alongside a
+# poky-based Linux distro
+distro: poky
+
+local_conf_header:
+ zephyr-toolchain: |
+ ZEPHYR_TOOLCHAIN_VARIANT = "zephyr"
diff --git a/meta-zephyr-bsp/README.txt b/meta-zephyr-bsp/README.txt
new file mode 100644
index 0000000..2644ed0
--- /dev/null
+++ b/meta-zephyr-bsp/README.txt
@@ -0,0 +1 @@
+See ../README.txt
diff --git a/meta-zephyr-bsp/conf/machine/include/nrf52.inc b/meta-zephyr-bsp/conf/machine/include/nrf52.inc
index 4162d3e..bd72195 100644
--- a/meta-zephyr-bsp/conf/machine/include/nrf52.inc
+++ b/meta-zephyr-bsp/conf/machine/include/nrf52.inc
@@ -3,9 +3,9 @@
#@DESCRIPTION: Machine configuration for Nordic Semiconductor nRF52xxx (Cortex-M4) SoC.
-require conf/machine/include/tune-cortexm4.inc
+require conf/machine/include/arm/armv7m/tune-cortexm4.inc
-TUNE_FEATURES = "armv7m cortexm4"
+TUNE_FEATURES = "armv7em cortexm4"
# Target type for this machine used by Pyocd
PYOCD_TARGET = "nrf52"
diff --git a/meta-zephyr-bsp/conf/machine/include/stm32mp1-cortex-m4.inc b/meta-zephyr-bsp/conf/machine/include/stm32mp1-cortex-m4.inc
index 0d46620..94b2e05 100644
--- a/meta-zephyr-bsp/conf/machine/include/stm32mp1-cortex-m4.inc
+++ b/meta-zephyr-bsp/conf/machine/include/stm32mp1-cortex-m4.inc
@@ -3,6 +3,6 @@
#@DESCRIPTION: Machine configuration for Cortex-M4 core of STMicroelectronics STM32MP1 SoC.
-require conf/machine/include/tune-cortexm4.inc
+require conf/machine/include/arm/armv7m/tune-cortexm4.inc
-TUNE_FEATURES = "armv7m cortexm4"
+TUNE_FEATURES = "armv7em cortexm4"
diff --git a/meta-zephyr-bsp/conf/machine/include/tune-cortexm0.inc b/meta-zephyr-bsp/conf/machine/include/tune-cortexm0.inc
deleted file mode 100644
index 5067eb2..0000000
--- a/meta-zephyr-bsp/conf/machine/include/tune-cortexm0.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-DEFAULTTUNE ?= "cortexm0"
-
-require conf/machine/include/arm/arch-armv6.inc
-
-TUNEVALID[cortexm0] = "Enable Cortex-M0 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm0', ' -mcpu=cortex-m0', '', d)}"
-AVAILTUNES += "cortexm0"
-
-TUNEVALID[no-thumb-interwork] = "Enable thumb mode"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', '', d)}"
-AVAILTUNES += "no-thumb-interwork"
-
-TUNEVALID[no-ffast-math] = "Enable thumb mode"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-ffast-math', ' -fno-fast-math', '', d)}"
-AVAILTUNES += "no-ffast-math"
-
-TUNEVALID[soft] = "Enable thumb mode"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'soft', ' -mfloat-abi=soft', '', d)}"
-AVAILTUNES += "soft"
-
-TUNEVALID[armv6m] = "Enable Cortex-M0 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', ' -march=armv6-m', '', d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6m', 'armv6m:', '' ,d)}"
-
-ARMPKGARCH:tune-cortexm0 = "cortexm0"
-TUNE_FEATURES:tune-cortexm0 = "${TUNE_FEATURES:tune-armv6} cortexm0"
-
-PACKAGE_EXTRA_ARCHS:tune-cortexm0 = "${PACKAGE_EXTRA_ARCHS:tune-armv6m} cortexm0-vfp"
-
-TUNE_FEATURES:tune-cortexm0 = "armv6m vfp cortexm0 thumb no-thumb-interwork soft"
-
diff --git a/meta-zephyr-bsp/conf/machine/include/tune-cortexm3.inc b/meta-zephyr-bsp/conf/machine/include/tune-cortexm3.inc
deleted file mode 100644
index 404e2b7..0000000
--- a/meta-zephyr-bsp/conf/machine/include/tune-cortexm3.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-DEFAULTTUNE ?= "cortexm3"
-
-require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' -mcpu=cortex-m3', '', d)}"
-AVAILTUNES += "cortexm3"
-
-TUNEVALID[armv7m] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7-m', '', d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '' ,d)}"
-
-TUNE_PKGARCH:tune-cortexm3 = "cortexm3"
-
-ARMPKGARCH:tune-cortexm3 = "armv7m"
-PACKAGE_EXTRA_ARCHS:tune-cortexm3 ="cortexm3"
-
-TUNE_FEATURES:tune-cortexm3 = "armv7m vfp cortexm3"
-PACKAGE_EXTRA_ARCHS:tune-cortexm3 = "${PACKAGE_EXTRA_ARCHS:tune-armv7at} armv7m-vfp"
-
-TUNE_CCARGS_MFLOAT = "soft"
diff --git a/meta-zephyr-bsp/conf/machine/include/tune-cortexm4.inc b/meta-zephyr-bsp/conf/machine/include/tune-cortexm4.inc
deleted file mode 100644
index b3092d8..0000000
--- a/meta-zephyr-bsp/conf/machine/include/tune-cortexm4.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-DEFAULTTUNE ?= "cortexm4"
-
-require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexm4] = "Enable Cortex-M4 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm4', ' -mcpu=cortex-m4', '', d)}"
-AVAILTUNES += "cortexm4"
-
-TUNEVALID[armv7m] = "Enable Cortex-M4 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', ' -march=armv7e-m', '', d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 'armv7m:', '' ,d)}"
-
-TUNE_PKGARCH:tune-cortexm4 = "cortexm4"
-
-ARMPKGARCH:tune-cortexm4 = "armv7m"
-PACKAGE_EXTRA_ARCHS:tune-cortexm4 ="cortexm4"
-
-TUNE_FEATURES:tune-cortexm4 = "armv7m vfp cortexm4"
-PACKAGE_EXTRA_ARCHS:tune-cortexm4 = "${PACKAGE_EXTRA_ARCHS:tune-armv7at} armv7m-vfp armv7m"
diff --git a/meta-zephyr-bsp/conf/machine/nrf52840-mdk-usb-dongle.conf b/meta-zephyr-bsp/conf/machine/nrf52840-mdk-usb-dongle.conf
new file mode 100644
index 0000000..67e407a
--- /dev/null
+++ b/meta-zephyr-bsp/conf/machine/nrf52840-mdk-usb-dongle.conf
@@ -0,0 +1,7 @@
+#@TYPE: Machine
+#@NAME: nrf52840-mdk-usb-dongle
+
+#@DESCRIPTION: Machine configuration for makerdiary's nrf52840-mdk-usb-dongle
+
+require conf/machine/include/nrf52.inc
+ARCH:nrf52840-mdk-usb-dongle = "arm"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-cortex-a53.conf b/meta-zephyr-bsp/conf/machine/qemu-cortex-a53.conf
new file mode 100644
index 0000000..e21f3da
--- /dev/null
+++ b/meta-zephyr-bsp/conf/machine/qemu-cortex-a53.conf
@@ -0,0 +1,20 @@
+#@TYPE: Machine
+#@NAME: qemu-cortex-a53
+#@DESCRIPTION: Machine for Zephyr BOARD qemu_cortex_a53
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/arm/armv8a/tune-cortexa53.inc
+
+TCLIBC = "newlib"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-aarch64"
+QB_MACHINE = "-machine virt,secure=on,gic-version=3"
+QB_CPU = "-cpu cortex-a53"
+QB_GRAPHICS = "-nographic -vga none"
+QB_OPT_APPEND = "-icount shift=4,align=off,sleep=on -rtc clock=vm"
+
+# Zephyr RTOS settings
+ZEPHYR_BOARD = "qemu_cortex_a53"
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+ARCH:qemu-cortex-a53 = "aarch64"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf b/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf
new file mode 100644
index 0000000..736579e
--- /dev/null
+++ b/meta-zephyr-bsp/conf/machine/qemu-cortex-m0.conf
@@ -0,0 +1,24 @@
+#@TYPE: Machine
+#@NAME: qemu-cortex-m0
+#@DESCRIPTION: Machine for BBC Microbit v1, Zephyr BOARD qemu_cortex_m0
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/arm/armv6m/tune-cortexm0.inc
+
+MACHINEOVERRIDES =. "nordic:"
+
+# GLIBC will not work with Cortex-M.
+TCLIBC = "newlib"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine microbit"
+QB_CPU = "-cpu cortex-m0"
+QB_GRAPHICS = "-nographic -vga none"
+QB_RNG = ""
+QB_OPT_APPEND = "-icount shift=6,align=off,sleep=off -rtc clock=vm"
+
+# Zephyr RTOS settings
+ZEPHYR_BOARD = "qemu_cortex_m0"
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+ARCH:qemu-cortex-m0 = "arm"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-cortex-m3.conf b/meta-zephyr-bsp/conf/machine/qemu-cortex-m3.conf
index 835a775..904a79b 100644
--- a/meta-zephyr-bsp/conf/machine/qemu-cortex-m3.conf
+++ b/meta-zephyr-bsp/conf/machine/qemu-cortex-m3.conf
@@ -3,15 +3,16 @@
#@DESCRIPTION: Machine for Zephyr BOARD qemu_cortex_m3
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-cortexm3.inc
+require conf/machine/include/arm/armv7m/tune-cortexm3.inc
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine lm3s6965evb"
-QB_OPT_APPEND = "-nographic -vga none"
+QB_GRAPHICS = "-nographic -vga none"
QB_CPU = "-cpu cortex-m3"
QB_RNG = ""
+QB_OPT_APPEND = "-icount shift=6,align=off,sleep=off -rtc clock=vm"
ARCH:qemu-cortex-m3 = "arm"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-cortex-r5.conf b/meta-zephyr-bsp/conf/machine/qemu-cortex-r5.conf
new file mode 100644
index 0000000..5a0ea69
--- /dev/null
+++ b/meta-zephyr-bsp/conf/machine/qemu-cortex-r5.conf
@@ -0,0 +1,22 @@
+#@TYPE: Machine
+#@NAME: qemu_cortex_r5
+#@DESCRIPTION: Machine for Zephyr BOARD qemu_cortex_r5
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/arm/armv7r/tune-cortexr5.inc
+
+# GLIBC will not work with Cortex-R.
+TCLIBC = "newlib"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-aarch64"
+QB_MACHINE = "-machine xlnx-zcu102"
+QB_CPU = "-cpu cortex-r5"
+QB_MEM = "-m 64k"
+QB_GRAPHICS = "-nographic -vga none"
+QB_RNG = ""
+
+# Zephyr RTOS settings
+ZEPHYR_BOARD = "qemu_cortex_r5"
+ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
+ARCH:qemu-cortex-r5 = "arm"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-nios2.conf b/meta-zephyr-bsp/conf/machine/qemu-nios2.conf
index de20320..c41f505 100644
--- a/meta-zephyr-bsp/conf/machine/qemu-nios2.conf
+++ b/meta-zephyr-bsp/conf/machine/qemu-nios2.conf
@@ -14,3 +14,5 @@ QB_OPT_APPEND = "-nographic"
QB_CPU = "-cpu nios2"
ARCH:qemu-nios2 = "nios2"
+
+TCLIBC = "glibc"
diff --git a/meta-zephyr-bsp/conf/machine/qemu-x86.conf b/meta-zephyr-bsp/conf/machine/qemu-x86.conf
index ae7716c..0333d7c 100644
--- a/meta-zephyr-bsp/conf/machine/qemu-x86.conf
+++ b/meta-zephyr-bsp/conf/machine/qemu-x86.conf
@@ -10,7 +10,7 @@ ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-i386"
QB_MACHINE = "-machine type=pc-q35-2.10"
-QB_OPT_APPEND = "-nographic -no-acpi"
+QB_GRAPHICS = "-nographic -no-acpi"
QB_CPU:x86 = "-cpu qemu32,+nx,+pae"
QB_CPU_KVM:x86 = "-cpu kvm32"
diff --git a/meta-zephyr-core/README.txt b/meta-zephyr-core/README.txt
index 5a0ccc7..2644ed0 100644
--- a/meta-zephyr-core/README.txt
+++ b/meta-zephyr-core/README.txt
@@ -1,119 +1 @@
-Building Zephyr Images via bitbake recipes
-==========================================
-
-More detailed and up-to-date information can be found here:
-
-https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages
-
-Prerequisites:
-==============
-
-This layer depends on:
- Yocto distro (master)
- git://git.yoctoproject.org/poky
- Python layer (meta-openembedded/meta-python)
- git://git.openembedded.org/meta-openembedded
-
-Modify local conf by adding:
- DISTRO="zephyr"
-
-Add "meta-openembedded/meta-oe" to BBLAYERS
-Add "meta-openembedded/meta-python" to BBLAYERS
-Add "meta-zephyr" to BBLAYERS
-
-Building and Running Zephyr Samples
-===================================
-
-You can build Zephyr samples. There are several sample recipes.
-For example, to build the Zephyr "philosophers" sample:
-
- $ MACHINE=qemu-x86 bitbake zephyr-philosophers
-
-You can then run the created "philosophers" image in qemu:
-
- $ runqemu qemu-x86
-
-The same sample, for ARM image:
-
- $ MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers
- $ runqemu qemu-cortex-m3
-
-The same sample, for Nios2 image:
-
- $ MACHINE=qemu-nios2 bitbake zephyr-philosophers
- $ runqemu qemu-nios2
-
-Flashing
-=================================
-
-You can flash Zephyr samples to boards. Currently, the following MACHINEs
-are supported:
- * DFU:
- - arduino-101-sss
- - arduino-101
- - arduino-101-ble
- * pyocd:
- - 96b-nitrogen
-
-To flash the example you built with command e.g.
-
- $ MACHINE=96b-nitrogen bitbake zephyr-philosophers
-
-call similar command with explicit flash_usb command:
-
- $ MACHINE=96b-nitrogen bitbake zephyr-philosophers -c flash_usb
-
-dfu-util and/or pyocd need to be installed in your system. If you observe
-permission errors or the flashing process seem to hang, follow those instructions:
-https://github.com/pyocd/pyOCD/tree/master/udev
-
-By default, pyocd tries to flash all the attached probes. This behaviour can be
-customised by defining the PYOCD_FLASH_IDS variable as a space-separated list
-of IDs. Once that is set, the tool will only try to program these IDs. You can
-query for the IDs by running `pyocd list` on your host while having the probes
-attached. Besides setting this variable through the build's configuration or
-metadata, you can also inject its value from command line with something like:
-
- $ PYOCD_FLASH_IDS='<ID1> <ID2> <ID3>' BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" bitbake <TARGET> -c flash_usb
-
-Building and Running Zephyr Tests
-=================================
-Presently only toolchains for ARM, x86, IAMCU and Nios2 are supported.
-(For ARM we use CortexM3 toolchain)
-
-To run Zephyr Test using Yocto Image Tests, ensure following in local.conf:
-
- INHERIT += "testimage"
-
-You can build and test an individual existing Zephyr test.
-This is done by appending the actual test name to the "zephyr-kernel-test",
-for example:
-
- $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-sleep
- $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-sleep -c testimage
-
-You can also build and run all Zephyr existing tests (as listed in the file
-zephyr-kernel-test.inc). For example:
-
- $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all
- $ MACHINE=qemu-x86 bitbake zephyr-kernel-test-all -c testimage
-or
- $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all
- $ MACHINE=qemu-cortex-m3 bitbake zephyr-kernel-test-all -c testimage
-or
- $ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all
- $ MACHINE=qemu-nios2 bitbake zephyr-kernel-test-all -c testimage
-
-
-Contributing
-============
-
-Patches for meta-zephyr should be sent to the yocto@lists.yoctoproject.org
-mailing list. See https://lists.yoctoproject.org/g/yocto for subscription
-details and the list archive. Please add [meta-zephyr] to the subject so
-the patches are identifable.
-
-Git can be configured to send mails appropriately when using git send-email:
-
-$ git config --local sendemail.to yocto@lists.yoctoproject.org
-$ git config --local format.subjectPrefix meta-zephyr][PATCH
+See ../README.txt
diff --git a/meta-zephyr-core/classes/zephyr.bbclass b/meta-zephyr-core/classes/zephyr.bbclass
index f3d16b7..5b71bda 100644
--- a/meta-zephyr-core/classes/zephyr.bbclass
+++ b/meta-zephyr-core/classes/zephyr.bbclass
@@ -2,6 +2,7 @@ inherit terminal
inherit python3native
PYTHONPATH="${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR}/site-packages"
+DEPENDS += "python3-pyelftools-native python3-pyyaml-native python3-pykwalify-native"
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
@@ -24,45 +25,8 @@ python () {
d.setVar('BOARD',board)
}
-do_get_zmods() {
-
- export PYTHONPATH="${RECIPE_SYSROOT_NATIVE}/${libdir}/${PYTHON_DIR}/site-packages:${RECIPE_SYSROOT_NATIVE}/${libdir}/${PYTHON_DIR}"
- cd ${S}
-
- # I really dislike how tied in this is to west, but without reimplementing their script, this seems to be the
- # easiest way to do this
- rm -rf .west; mkdir .west
- cat << EOF >> ${S}/.west/config
-[manifest]
-path = .
-file = west.yml
-EOF
-
- # Because of how we structure things, we need to either structure this more like a west workspace or just tweak
- # the manifest in order to get access to the west extentions like build and whatnot. Tweaking the manifest is the
- # easier path here and minimizes the amount of breakage that might occur.
-
- sed -i 's/path: zephyr/path: ./' west.yml
-
- # Get all available modules and add them to ZEPHYR_MODULES
- for i in $(west list|awk 'NR>1 {print $2}'); do
- ZEPHYR_MODULES="${S}/$i\;${ZEPHYR_MODULES}"
- done
- export ZEPHYR_MODULES
-}
-
-do_get_zmods[nostamp] = "1"
-do_get_zmods[dirs] = "${B}"
-
EXTRA_OECMAKE:append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
-addtask get_zmods after do_patch before do_configure
-do_get_zmods[depends] += "west-native:do_populate_sysroot"
-do_get_zmods[depends] += "python3-pyyaml-native:do_populate_sysroot"
-do_get_zmods[depends] += "python3-pykwalify-native:do_populate_sysroot"
-do_get_zmods[depends] += "python3-colorama-native:do_populate_sysroot"
-do_get_zmods[depends] += "python3-pyelftools-native:do_populate_sysroot"
-
python do_menuconfig() {
os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
configdir = d.getVar('ZEPHYR_SRC_DIR', True) + '/outdir/' + d.getVar('BOARD', True)
diff --git a/meta-zephyr-core/classes/zephyrtest.bbclass b/meta-zephyr-core/classes/zephyrtest.bbclass
index 248fd15..aa48e6c 100644
--- a/meta-zephyr-core/classes/zephyrtest.bbclass
+++ b/meta-zephyr-core/classes/zephyrtest.bbclass
@@ -50,4 +50,4 @@ python testdata_clean() {
os.remove(fname)
}
-addtask do_testdata_write before do_build after do_deploy
+addtask do_testdata_write before do_testimage after do_deploy
diff --git a/meta-zephyr-core/conf/distro/zephyr.conf b/meta-zephyr-core/conf/distro/zephyr.conf
index 6ecd421..bdf1821 100644
--- a/meta-zephyr-core/conf/distro/zephyr.conf
+++ b/meta-zephyr-core/conf/distro/zephyr.conf
@@ -4,7 +4,7 @@ DISTRO_VERSION = "1.0"
TARGET_VENDOR = "-yocto"
-TCLIBC = "newlib"
+TCLIBC ?= "newlib"
TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
diff --git a/meta-zephyr-core/recipes-devtools/west/west_0.12.99.bb b/meta-zephyr-core/recipes-devtools/west/west_0.12.99.bb
deleted file mode 100644
index 6a9f8bc..0000000
--- a/meta-zephyr-core/recipes-devtools/west/west_0.12.99.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-# SPDX-FileCopyrightText: Huawei Inc.
-# SPDX-License-Identifier: Apache-2.0
-
-SUMMARY = "Zephyr RTOS Project meta-tool"
-HOMEPAGE = "https://github.com/zephyrproject-rtos/west"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
-
-SRC_URI = "git://github.com/zephyrproject-rtos/west;protocol=https;branch=main"
-
-PV = "0.12.99"
-SRCREV = "38e656b05ea8f4c8d80b953f6d88b1ed604d11f8"
-PROVIDES = "virtual/west"
-
-S = "${WORKDIR}/git"
-
-inherit setuptools3 python3native
-
-DEPENDS_${PN} += "python3-pyyaml python3-core python3-packaging python3-colorama python3-pyparsing"
-RDEPENDS_${PN} += "python3-pyyaml python3-core python3-packaging python3-colorama python3-pyparsing"
-BBCLASSEXTEND = "native nativesdk"
-TOOLCHAIN_HOST_TASK:append = " nativesdk-west"
diff --git a/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb b/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb
new file mode 100644
index 0000000..c893652
--- /dev/null
+++ b/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Zephyr SDK Bundle"
+DESCRIPTION = "Official SDK built using crosstool-ng, distributed by the \
+Zephyr project"
+COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+INHIBIT_DEFAULT_DEPS = "1"
+# CMake is required by the setup script
+DEPENDS += "cmake"
+
+SDK_ARCHIVE = "zephyr-sdk-${PV}_linux-${BUILD_ARCH}.tar.gz"
+SDK_NAME = "${BUILD_ARCH}"
+SRC_URI = "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${PV}/${SDK_ARCHIVE};subdir=${S};name=${SDK_NAME}"
+
+SRC_URI[x86_64.sha256sum] = "2ff0e4d79bffe1468247a3e1958aa9183a0252225ab721cf1c37188bd4b649a2"
+SRC_URI[aarch64.sha256sum] = "cbb616a50e940388ea737788d48dcea3624a85bb3ee04d9aae105496a21ae75e"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+ZEPHYR_SDK_DIR = "${prefix}/zephyr-sdk"
+
+do_install() {
+ install -d ${D}${prefix}
+ cp -r ${S}/zephyr-sdk-${PV} ${D}${ZEPHYR_SDK_DIR}
+
+ # Install host tools
+ ${D}${ZEPHYR_SDK_DIR}/setup.sh -h
+}
+
+SYSROOT_DIRS += "${ZEPHYR_SDK_DIR}"
+INHIBIT_SYSROOT_STRIP = "1"
+BBCLASSEXTEND = "native"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-cmake-add-yocto-toolchain.patch
index 563af7d..563af7d 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-cmake-add-yocto-toolchain.patch
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
index fd6fc6b..fd6fc6b 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-2.7-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-cmake-add-yocto-toolchain.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-cmake-add-yocto-toolchain.patch
new file mode 100644
index 0000000..a16eabf
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-cmake-add-yocto-toolchain.patch
@@ -0,0 +1,63 @@
+From 39f1dd116d00b6c2135c4ccd216341dcd2f2917e Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini@intel.com>
+Date: Tue, 26 Jul 2022 14:12:18 +0200
+Subject: [PATCH] cmake: add yocto toolchain
+
+Upstream status: inappropriate [OE specific]
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+---
+ cmake/compiler/gcc/target.cmake | 7 -------
+ cmake/toolchain/yocto/generic.cmake | 13 +++++++++++++
+ cmake/toolchain/yocto/target.cmake | 1 +
+ 3 files changed, 14 insertions(+), 7 deletions(-)
+ create mode 100644 cmake/toolchain/yocto/generic.cmake
+ create mode 100644 cmake/toolchain/yocto/target.cmake
+
+diff --git a/cmake/compiler/gcc/target.cmake b/cmake/compiler/gcc/target.cmake
+index 014447e67e..b510f47d59 100644
+--- a/cmake/compiler/gcc/target.cmake
++++ b/cmake/compiler/gcc/target.cmake
+@@ -94,13 +94,6 @@ execute_process(
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+-assert_exists(LIBGCC_FILE_NAME)
+-
+-get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
+-
+-assert_exists(LIBGCC_DIR)
+-
+-LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
+ LIST(APPEND TOOLCHAIN_LIBS gcc)
+
+ # For CMake to be able to test if a compiler flag is supported by the
+diff --git a/cmake/toolchain/yocto/generic.cmake b/cmake/toolchain/yocto/generic.cmake
+new file mode 100644
+index 0000000000..45e5777e2a
+--- /dev/null
++++ b/cmake/toolchain/yocto/generic.cmake
+@@ -0,0 +1,13 @@
++set(COMPILER gcc)
++set(LINKER ld)
++set(BINTOOLS gnu)
++
++set(ZEPHYR_SYSROOT ${ZEPHYR_SYSROOT})
++set(SYSROOT_DIR ${ZEPHYR_SYSROOT})
++set(LIBC_LIBRARY_DIR "\"${SYSROOT_DIR}\"/")
++set(LIBC_INCLUDE_DIR ${SYSROOT_DIR}/include)
++LIST(APPEND TOOLCHAIN_LIBS gcc)
++
++LIST(APPEND LIB_INCLUDE_DIR "-L\"${STAGING_LIBDIR}\"")
++
++set(TOOLCHAIN_LIBS gcc)
+diff --git a/cmake/toolchain/yocto/target.cmake b/cmake/toolchain/yocto/target.cmake
+new file mode 100644
+index 0000000000..9881313609
+--- /dev/null
++++ b/cmake/toolchain/yocto/target.cmake
+@@ -0,0 +1 @@
++# SPDX-License-Identifier: Apache-2.0
+--
+2.34.1
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
new file mode 100644
index 0000000..315ed35
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
@@ -0,0 +1,80 @@
+From bad26e63d47b638fc1c0b268faf5cee9738efc35 Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini@intel.com>
+Date: Thu, 28 Jul 2022 14:15:11 +0800
+Subject: [PATCH] x86: fix efi binary generation issue in cross compilation env
+
+Set root directory for headers.
+
+Upstream-Status: Inappropriate [Cross-compilation specific]
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+---
+ arch/x86/zefi/zefi.py | 5 ++++-
+ boards/x86/ehl_crb/CMakeLists.txt | 1 +
+ boards/x86/qemu_x86/CMakeLists.txt | 1 +
+ boards/x86/up_squared/CMakeLists.txt | 1 +
+ 4 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/arch/x86/zefi/zefi.py b/arch/x86/zefi/zefi.py
+index 1e95958bff..b356198aa6 100755
+--- a/arch/x86/zefi/zefi.py
++++ b/arch/x86/zefi/zefi.py
+@@ -109,8 +109,10 @@ def build_elf(elf_file, include_dirs):
+ includes = []
+ for include_dir in include_dirs:
+ includes.extend(["-I", include_dir])
++ # Pass --sysroot path for cross compilation
++ sysrootarg = "--sysroot=" + args.sysroot
+ cmd = ([args.compiler, "-shared", "-Wall", "-Werror", "-I."] + includes +
+- ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar",
++ ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar", sysrootarg,
+ "-Wl,-nostdlib", "-T", ldscript, "-o", "zefi.elf", cfile])
+ verbose(" ".join(cmd))
+ subprocess.run(cmd, check = True)
+@@ -150,6 +152,7 @@ def parse_args():
+ parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
+ parser.add_argument("-i", "--includes", required=True, nargs="+",
+ help="Zephyr base include directories")
++ parser.add_argument("-s", "--sysroot", required=True, help="Cross compilation --sysroot=path")
+
+ return parser.parse_args()
+
+diff --git a/boards/x86/ehl_crb/CMakeLists.txt b/boards/x86/ehl_crb/CMakeLists.txt
+index cdf8c9e097..6ea94b54e1 100644
+--- a/boards/x86/ehl_crb/CMakeLists.txt
++++ b/boards/x86/ehl_crb/CMakeLists.txt
+@@ -7,6 +7,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ -i ${ZEPHYR_BASE}/include
+ $<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+diff --git a/boards/x86/qemu_x86/CMakeLists.txt b/boards/x86/qemu_x86/CMakeLists.txt
+index 8d227f8b26..a5d6480bc3 100644
+--- a/boards/x86/qemu_x86/CMakeLists.txt
++++ b/boards/x86/qemu_x86/CMakeLists.txt
+@@ -6,6 +6,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ $<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
+ -o ${CMAKE_OBJCOPY}
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+diff --git a/boards/x86/up_squared/CMakeLists.txt b/boards/x86/up_squared/CMakeLists.txt
+index b867282d60..43cd081b21 100644
+--- a/boards/x86/up_squared/CMakeLists.txt
++++ b/boards/x86/up_squared/CMakeLists.txt
+@@ -7,6 +7,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ -i ${ZEPHYR_BASE}/include
+ $<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+--
+2.25.1
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch
index f23a438..971995b 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch
@@ -1,4 +1,4 @@
-Upstream-Status: Submitted [https://github.com/zephyrproject-rtos/zephyr/pull/40364]
+Upstream-Status: Backport [https://github.com/zephyrproject-rtos/zephyr/commit/a4da64033dac55108215857659831b7d027513de]
Signed-off-by: Ross Burton <ross.burton@arm.com>
From deb6e9b29d77f0d86eb188fb3c5fc6f470277d3d Mon Sep 17 00:00:00 2001
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb
index bd5ce4f..c2a1e55 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/basic/blinky"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/basic/blinky"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb
index d7ea837..7796f6b 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/coap_client"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_client"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb
index dece67d..5e345d4 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/coap_server"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_server"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb
index 53d1ef3..73187cf 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/echo_client"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
index c66c7ec..ebc6dc3 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb
@@ -1,5 +1,5 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/hci_uart"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/hci_uart"
COMPATIBLE_MACHINE = "(96b-nitrogen)"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
index ac5ce62..68b42aa 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb
@@ -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"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/hello_world"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb
index bf99bbd..8bff2be 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb
@@ -1,4 +1,4 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/http_client"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/http_client"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
index 2d4c6ff..f4c9db1 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc
@@ -3,8 +3,7 @@ inherit testimage
QEMU_BIN_PATH = "${STAGING_BINDIR_NATIVE}"
-ZEPHYR_BASE = "${S}"
-OECMAKE_SOURCEPATH = "${S}/${ZEPHYR_SRC_DIR}"
+OECMAKE_SOURCEPATH = "${ZEPHYR_BASE}/${ZEPHYR_SRC_DIR}"
addtask deploy after do_compile
do_install[noexec] = "1"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index e69ba3c..5c9d9e5 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -7,22 +7,18 @@ inherit ${ZEPHYR_INHERIT_CLASSES}
# filesystem.
IMAGE_NO_MANIFEST = "1"
-ZEPHYR_GCC_VARIANT="yocto"
-ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
+ZEPHYR_TOOLCHAIN_VARIANT ?= "yocto"
+require zephyr-toolchain-${ZEPHYR_TOOLCHAIN_VARIANT}.inc
ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin"
ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi"
EXTRA_OECMAKE = "\
- -DZEPHYR_BASE=${S} \
- -DZEPHYR_GCC_VARIANT=yocto \
+ -DZEPHYR_BASE=${ZEPHYR_BASE} \
-DBOARD=${BOARD} \
-DARCH=${ARCH} \
- -DCROSS_COMPILE=${CROSS_COMPILE} \
- -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} \
- -DZEPHYR_TOOLCHAIN_VARIANT=yocto \
- -DEXTRA_CPPFLAGS=${CPPFLAGS} \
+ -DZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT} \
-DZEPHYR_MODULES=${ZEPHYR_MODULES} \
"
@@ -30,12 +26,10 @@ ZEPHYR_EXTRA_MODULES = ""
EXTRA_OECMAKE:append = " -DZEPHYR_EXTRA_MODULES=${ZEPHYR_EXTRA_MODULES}"
-export ZEPHYR_BASE="${S}"
+export ZEPHYR_BASE="${S}/zephyr"
DEPENDS += "gperf-native"
-CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
-
DEPENDS:append:qemuall = " qemu-native qemu-helper-native"
# The makefiles are explicit about the flags they want, so don't unset
@@ -49,12 +43,9 @@ python () {
d.delVar('LDFLAGS')
}
-OE_TERMINAL_EXPORTS += "CROSS_COMPILE"
OE_TERMINAL_EXPORTS += "BOARD"
OE_TERMINAL_EXPORTS += "ZEPHYR_SRC_DIR"
OE_TERMINAL_EXPORTS += "ZEPHYR_BASE"
-OE_TERMINAL_EXPORTS += "ZEPHYR_SYSROOT"
-OE_TERMINAL_EXPORTS += "ZEPHYR_GCC_VARIANT"
IMAGE_FSTYPES = "elf bin"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc
deleted file mode 100644
index a2c100c..0000000
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-SRCREV_FORMAT = "default_cmsis"
-
-# These repositories are specific to post-2.6 branches
-
-SRC_URI += " \
- git://github.com/zephyrproject-rtos/mcumgr.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/mcumgr;name=mcumgr \
- git://github.com/zephyrproject-rtos/TraceRecorderSource.git;protocol=https;nobranch=1;destsuffix=git/modules/debug/TraceRecorder;name=TraceRecorder \
- git://github.com/zephyrproject-rtos/trusted-firmware-m.git;protocol=https;nobranch=1;destsuffix=git/modules/tee/tfm;name=tfm \
-"
-
-#
-# Generated from:
-# west forall -c 'x=$(filename `pwd`); rev=$(git rev-parse HEAD); \
-# echo SRCREV_$x = \"$rev\"'
-#
-
-SRCREV_default = "e4da3e528088a34a9989f5a50e7ed3149d57de92"
-SRCREV_canopennode = "f167efe85c8c7de886f1bc47f9173cfb8a346bb5"
-SRCREV_civetweb = "094aeb41bb93e9199d24d665ee43e9e05d6d7b1c"
-SRCREV_cmsis = "b0612c97c1401feeb4160add6462c3627fe90fc7"
-SRCREV_edtt = "31badfbbd04f2948e3df6ebf329f930317550961"
-SRCREV_fatfs = "94fcd6bfb3801ac0a5e12ea2f52187e0a688b90e"
-SRCREV_altera = "23c1c1dd7a0c1cc9a399509d1819375847c95b97"
-SRCREV_atmel = "9f78f520f6cbb997e5b44fe8ab17dd5bf2448095"
-SRCREV_cypress = "81a059f21435bc7e315bccd720da5a9b615bbb50"
-SRCREV_espressif = "3400257534944d3a6a4194d1dbf8f0cd1670d64e"
-SRCREV_infineon = "f1fa8241f8786198ba41155413243de36ed878a5"
-SRCREV_microchip = "870d05e6a64ea9548da6b907058b03c8c9420826"
-SRCREV_nordic = "a6e5299041f152da5ae0ab17b2e44e088bb96d6d"
-SRCREV_nuvoton = "b4d31f33238713a568e23618845702fadd67386f"
-SRCREV_nxp = "78efc4ba7c1057c1cf2bf06e3e27ed7cc33e1da7"
-SRCREV_openisa = "40d049f69c50b58ea20473bee14cf93f518bf262"
-SRCREV_quicklogic = "b3a66fe6d04d87fd1533a5c8de51d0599fcd08d0"
-SRCREV_silabs = "be39d4eebeddac6e18e9c0c3ba1b31ad1e82eaed"
-SRCREV_st = "575de9d461aa6f430cf62c58a053675377e700f3"
-SRCREV_stm32 = "5c8275071ec1cf160bfe8c18bbd9330a7d714dc8"
-SRCREV_telink = "ffcfd6282aa213f1dc0848dbca6279b098f6b143"
-SRCREV_ti = "1992a4c536554c4f409c36896eda6abdc414d277"
-SRCREV_xtensa = "6e1cf3c483e87df4888e87c5396b4534570f01af"
-SRCREV_libmetal = "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb"
-SRCREV_littlefs = "9e4498d1c73009acd84bb36036ee5e2869112a6c"
-SRCREV_loramac-node = "12019623bbad9eb54fe51066847a7cbd4b4eac57"
-SRCREV_lvgl = "783c1f78c8e39751fe89d0883c8bce7336f55e94"
-SRCREV_lz4 = "8e303c264fc21c2116dc612658003a22e933124d"
-SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7"
-SRCREV_mcuboot = "70bfbd21cdf5f6d1402bc8d0031e197222ed2ec0"
-SRCREV_mcumgr = "9ffebd5e92d9d069667b9af2a3a028f4a033cfd3"
-SRCREV_mipi-sys-t = "75e671550ac1acb502f315fe4952514dc73f7bfb"
-SRCREV_nanopb = "d148bd26718e4c10414f07a7eb1bd24c62e56c5d"
-SRCREV_net-tools = "f49bd1354616fae4093bf36e5eaee43c51a55127"
-SRCREV_nrf_hw_models = "a47e326ca772ddd14cc3b9d4ca30a9ab44ecca16"
-SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef"
-SRCREV_openthread = "5d706547ebcb0a85e11412bcd88e80e2af98c74d"
-SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
-SRCREV_sof = "76feb11d1b8f425021b5691668af2250fee444ac"
-SRCREV_tflite-micro = "9156d050927012da87079064db59d07f03b8baf6"
-SRCREV_tinycbor = "40daca97b478989884bffb5226e9ab73ca54b8c4"
-SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
-SRCREV_TraceRecorder = "36c577727642457b0db7274298a4b96558374832"
-SRCREV_tfm = "c74be3890c9d975976fde1b1a3b2f5742bec34c0"
-
-ZEPHYR_BRANCH = "v2.7-branch"
-PV = "2.7.1+git${SRCPV}"
-
-SRC_URI:append = " file://dtc.patch"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.3.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.3.inc
new file mode 100644
index 0000000..2d20888
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.3.inc
@@ -0,0 +1,196 @@
+# Auto-generated from zephyr-kernel-src.inc.jinja
+
+SRCREV_FORMAT = "default"
+
+SRCREV_default = "003de78ce0dd213a1c7b3d159b967fb19a12aa45"
+SRCREV_canopennode = "f167efe85c8c7de886f1bc47f9173cfb8a346bb5"
+SRCREV_civetweb = "094aeb41bb93e9199d24d665ee43e9e05d6d7b1c"
+SRCREV_cmsis = "b0612c97c1401feeb4160add6462c3627fe90fc7"
+SRCREV_edtt = "31badfbbd04f2948e3df6ebf329f930317550961"
+SRCREV_fatfs = "94fcd6bfb3801ac0a5e12ea2f52187e0a688b90e"
+SRCREV_hal_altera = "23c1c1dd7a0c1cc9a399509d1819375847c95b97"
+SRCREV_hal_atmel = "9f78f520f6cbb997e5b44fe8ab17dd5bf2448095"
+SRCREV_hal_cypress = "81a059f21435bc7e315bccd720da5a9b615bbb50"
+SRCREV_hal_espressif = "3400257534944d3a6a4194d1dbf8f0cd1670d64e"
+SRCREV_hal_infineon = "f1fa8241f8786198ba41155413243de36ed878a5"
+SRCREV_hal_microchip = "870d05e6a64ea9548da6b907058b03c8c9420826"
+SRCREV_hal_nordic = "a6e5299041f152da5ae0ab17b2e44e088bb96d6d"
+SRCREV_hal_nuvoton = "b4d31f33238713a568e23618845702fadd67386f"
+SRCREV_hal_nxp = "78efc4ba7c1057c1cf2bf06e3e27ed7cc33e1da7"
+SRCREV_hal_openisa = "40d049f69c50b58ea20473bee14cf93f518bf262"
+SRCREV_hal_quicklogic = "b3a66fe6d04d87fd1533a5c8de51d0599fcd08d0"
+SRCREV_hal_silabs = "be39d4eebeddac6e18e9c0c3ba1b31ad1e82eaed"
+SRCREV_hal_st = "575de9d461aa6f430cf62c58a053675377e700f3"
+SRCREV_hal_stm32 = "5c8275071ec1cf160bfe8c18bbd9330a7d714dc8"
+SRCREV_hal_telink = "ffcfd6282aa213f1dc0848dbca6279b098f6b143"
+SRCREV_hal_ti = "1992a4c536554c4f409c36896eda6abdc414d277"
+SRCREV_hal_xtensa = "6e1cf3c483e87df4888e87c5396b4534570f01af"
+SRCREV_libmetal = "39d049d4ae68e6f6d595fce7de1dcfc1024fb4eb"
+SRCREV_littlefs = "9e4498d1c73009acd84bb36036ee5e2869112a6c"
+SRCREV_loramac-node = "12019623bbad9eb54fe51066847a7cbd4b4eac57"
+SRCREV_lvgl = "783c1f78c8e39751fe89d0883c8bce7336f55e94"
+SRCREV_lz4 = "8e303c264fc21c2116dc612658003a22e933124d"
+SRCREV_mbedtls = "5765cb7f75a9973ae9232d438e361a9d7bbc49e7"
+SRCREV_mcuboot = "70bfbd21cdf5f6d1402bc8d0031e197222ed2ec0"
+SRCREV_mcumgr = "9ffebd5e92d9d069667b9af2a3a028f4a033cfd3"
+SRCREV_mipi-sys-t = "75e671550ac1acb502f315fe4952514dc73f7bfb"
+SRCREV_nanopb = "d148bd26718e4c10414f07a7eb1bd24c62e56c5d"
+SRCREV_net-tools = "f49bd1354616fae4093bf36e5eaee43c51a55127"
+SRCREV_nrf_hw_models = "a47e326ca772ddd14cc3b9d4ca30a9ab44ecca16"
+SRCREV_open-amp = "6010f0523cbc75f551d9256cf782f173177acdef"
+SRCREV_openthread = "5d706547ebcb0a85e11412bcd88e80e2af98c74d"
+SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
+SRCREV_sof = "76feb11d1b8f425021b5691668af2250fee444ac"
+SRCREV_tflite-micro = "9156d050927012da87079064db59d07f03b8baf6"
+SRCREV_tinycbor = "40daca97b478989884bffb5226e9ab73ca54b8c4"
+SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
+SRCREV_TraceRecorderSource = "36c577727642457b0db7274298a4b96558374832"
+SRCREV_trusted-firmware-m = "c74be3890c9d975976fde1b1a3b2f5742bec34c0"
+
+SRC_URI_ZEPHYR ?= "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https"
+SRC_URI_CANOPENNODE ?= "git://github.com/zephyrproject-rtos/canopennode;protocol=https"
+SRC_URI_CIVETWEB ?= "git://github.com/zephyrproject-rtos/civetweb;protocol=https"
+SRC_URI_CMSIS ?= "git://github.com/zephyrproject-rtos/cmsis;protocol=https"
+SRC_URI_EDTT ?= "git://github.com/zephyrproject-rtos/edtt;protocol=https"
+SRC_URI_FATFS ?= "git://github.com/zephyrproject-rtos/fatfs;protocol=https"
+SRC_URI_HAL_ALTERA ?= "git://github.com/zephyrproject-rtos/hal_altera;protocol=https"
+SRC_URI_HAL_ATMEL ?= "git://github.com/zephyrproject-rtos/hal_atmel;protocol=https"
+SRC_URI_HAL_CYPRESS ?= "git://github.com/zephyrproject-rtos/hal_cypress;protocol=https"
+SRC_URI_HAL_ESPRESSIF ?= "git://github.com/zephyrproject-rtos/hal_espressif;protocol=https"
+SRC_URI_HAL_INFINEON ?= "git://github.com/zephyrproject-rtos/hal_infineon;protocol=https"
+SRC_URI_HAL_MICROCHIP ?= "git://github.com/zephyrproject-rtos/hal_microchip;protocol=https"
+SRC_URI_HAL_NORDIC ?= "git://github.com/zephyrproject-rtos/hal_nordic;protocol=https"
+SRC_URI_HAL_NUVOTON ?= "git://github.com/zephyrproject-rtos/hal_nuvoton;protocol=https"
+SRC_URI_HAL_NXP ?= "git://github.com/zephyrproject-rtos/hal_nxp;protocol=https"
+SRC_URI_HAL_OPENISA ?= "git://github.com/zephyrproject-rtos/hal_openisa;protocol=https"
+SRC_URI_HAL_QUICKLOGIC ?= "git://github.com/zephyrproject-rtos/hal_quicklogic;protocol=https"
+SRC_URI_HAL_SILABS ?= "git://github.com/zephyrproject-rtos/hal_silabs;protocol=https"
+SRC_URI_HAL_ST ?= "git://github.com/zephyrproject-rtos/hal_st;protocol=https"
+SRC_URI_HAL_STM32 ?= "git://github.com/zephyrproject-rtos/hal_stm32;protocol=https"
+SRC_URI_HAL_TELINK ?= "git://github.com/zephyrproject-rtos/hal_telink;protocol=https"
+SRC_URI_HAL_TI ?= "git://github.com/zephyrproject-rtos/hal_ti;protocol=https"
+SRC_URI_HAL_XTENSA ?= "git://github.com/zephyrproject-rtos/hal_xtensa;protocol=https"
+SRC_URI_LIBMETAL ?= "git://github.com/zephyrproject-rtos/libmetal;protocol=https"
+SRC_URI_LITTLEFS ?= "git://github.com/zephyrproject-rtos/littlefs;protocol=https"
+SRC_URI_LORAMAC_NODE ?= "git://github.com/zephyrproject-rtos/loramac-node;protocol=https"
+SRC_URI_LVGL ?= "git://github.com/zephyrproject-rtos/lvgl;protocol=https"
+SRC_URI_LZ4 ?= "git://github.com/zephyrproject-rtos/lz4;protocol=https"
+SRC_URI_MBEDTLS ?= "git://github.com/zephyrproject-rtos/mbedtls;protocol=https"
+SRC_URI_MCUBOOT ?= "git://github.com/zephyrproject-rtos/mcuboot;protocol=https"
+SRC_URI_MCUMGR ?= "git://github.com/zephyrproject-rtos/mcumgr;protocol=https"
+SRC_URI_MIPI_SYS_T ?= "git://github.com/zephyrproject-rtos/mipi-sys-t;protocol=https"
+SRC_URI_NANOPB ?= "git://github.com/zephyrproject-rtos/nanopb;protocol=https"
+SRC_URI_NET_TOOLS ?= "git://github.com/zephyrproject-rtos/net-tools;protocol=https"
+SRC_URI_NRF_HW_MODELS ?= "git://github.com/zephyrproject-rtos/nrf_hw_models;protocol=https"
+SRC_URI_OPEN_AMP ?= "git://github.com/zephyrproject-rtos/open-amp;protocol=https"
+SRC_URI_OPENTHREAD ?= "git://github.com/zephyrproject-rtos/openthread;protocol=https"
+SRC_URI_SEGGER ?= "git://github.com/zephyrproject-rtos/segger;protocol=https"
+SRC_URI_SOF ?= "git://github.com/zephyrproject-rtos/sof;protocol=https"
+SRC_URI_TFLITE_MICRO ?= "git://github.com/zephyrproject-rtos/tflite-micro;protocol=https"
+SRC_URI_TINYCBOR ?= "git://github.com/zephyrproject-rtos/tinycbor;protocol=https"
+SRC_URI_TINYCRYPT ?= "git://github.com/zephyrproject-rtos/tinycrypt;protocol=https"
+SRC_URI_TRACERECORDERSOURCE ?= "git://github.com/zephyrproject-rtos/TraceRecorderSource;protocol=https"
+SRC_URI_TRUSTED_FIRMWARE_M ?= "git://github.com/zephyrproject-rtos/trusted-firmware-m;protocol=https"
+
+SRC_URI_PATCHES ?= "\
+ file://dtc.patch;patchdir=zephyr \
+ file://0001-2.7-cmake-add-yocto-toolchain.patch;patchdir=zephyr \
+ file://0001-2.7-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \
+"
+
+SRC_URI = "\
+ ${SRC_URI_ZEPHYR};branch=${ZEPHYR_BRANCH};name=default;destsuffix=git/zephyr \
+ ${SRC_URI_CANOPENNODE};name=canopennode;nobranch=1;destsuffix=git/modules/lib/canopennode \
+ ${SRC_URI_CIVETWEB};name=civetweb;nobranch=1;destsuffix=git/modules/lib/civetweb \
+ ${SRC_URI_CMSIS};name=cmsis;nobranch=1;destsuffix=git/modules/hal/cmsis \
+ ${SRC_URI_EDTT};name=edtt;nobranch=1;destsuffix=git/tools/edtt \
+ ${SRC_URI_FATFS};name=fatfs;nobranch=1;destsuffix=git/modules/fs/fatfs \
+ ${SRC_URI_HAL_ALTERA};name=hal_altera;nobranch=1;destsuffix=git/modules/hal/altera \
+ ${SRC_URI_HAL_ATMEL};name=hal_atmel;nobranch=1;destsuffix=git/modules/hal/atmel \
+ ${SRC_URI_HAL_CYPRESS};name=hal_cypress;nobranch=1;destsuffix=git/modules/hal/cypress \
+ ${SRC_URI_HAL_ESPRESSIF};name=hal_espressif;nobranch=1;destsuffix=git/modules/hal/espressif \
+ ${SRC_URI_HAL_INFINEON};name=hal_infineon;nobranch=1;destsuffix=git/modules/hal/infineon \
+ ${SRC_URI_HAL_MICROCHIP};name=hal_microchip;nobranch=1;destsuffix=git/modules/hal/microchip \
+ ${SRC_URI_HAL_NORDIC};name=hal_nordic;nobranch=1;destsuffix=git/modules/hal/nordic \
+ ${SRC_URI_HAL_NUVOTON};name=hal_nuvoton;nobranch=1;destsuffix=git/modules/hal/nuvoton \
+ ${SRC_URI_HAL_NXP};name=hal_nxp;nobranch=1;destsuffix=git/modules/hal/nxp \
+ ${SRC_URI_HAL_OPENISA};name=hal_openisa;nobranch=1;destsuffix=git/modules/hal/openisa \
+ ${SRC_URI_HAL_QUICKLOGIC};name=hal_quicklogic;nobranch=1;destsuffix=git/modules/hal/quicklogic \
+ ${SRC_URI_HAL_SILABS};name=hal_silabs;nobranch=1;destsuffix=git/modules/hal/silabs \
+ ${SRC_URI_HAL_ST};name=hal_st;nobranch=1;destsuffix=git/modules/hal/st \
+ ${SRC_URI_HAL_STM32};name=hal_stm32;nobranch=1;destsuffix=git/modules/hal/stm32 \
+ ${SRC_URI_HAL_TELINK};name=hal_telink;nobranch=1;destsuffix=git/modules/hal/telink \
+ ${SRC_URI_HAL_TI};name=hal_ti;nobranch=1;destsuffix=git/modules/hal/ti \
+ ${SRC_URI_HAL_XTENSA};name=hal_xtensa;nobranch=1;destsuffix=git/modules/hal/xtensa \
+ ${SRC_URI_LIBMETAL};name=libmetal;nobranch=1;destsuffix=git/modules/hal/libmetal \
+ ${SRC_URI_LITTLEFS};name=littlefs;nobranch=1;destsuffix=git/modules/fs/littlefs \
+ ${SRC_URI_LORAMAC_NODE};name=loramac-node;nobranch=1;destsuffix=git/modules/lib/loramac-node \
+ ${SRC_URI_LVGL};name=lvgl;nobranch=1;destsuffix=git/modules/lib/gui/lvgl \
+ ${SRC_URI_LZ4};name=lz4;nobranch=1;destsuffix=git/modules/lib/lz4 \
+ ${SRC_URI_MBEDTLS};name=mbedtls;nobranch=1;destsuffix=git/modules/crypto/mbedtls \
+ ${SRC_URI_MCUBOOT};name=mcuboot;nobranch=1;destsuffix=git/bootloader/mcuboot \
+ ${SRC_URI_MCUMGR};name=mcumgr;nobranch=1;destsuffix=git/modules/lib/mcumgr \
+ ${SRC_URI_MIPI_SYS_T};name=mipi-sys-t;nobranch=1;destsuffix=git/modules/debug/mipi-sys-t \
+ ${SRC_URI_NANOPB};name=nanopb;nobranch=1;destsuffix=git/modules/lib/nanopb \
+ ${SRC_URI_NET_TOOLS};name=net-tools;nobranch=1;destsuffix=git/tools/net-tools \
+ ${SRC_URI_NRF_HW_MODELS};name=nrf_hw_models;nobranch=1;destsuffix=git/modules/bsim_hw_models/nrf_hw_models \
+ ${SRC_URI_OPEN_AMP};name=open-amp;nobranch=1;destsuffix=git/modules/lib/open-amp \
+ ${SRC_URI_OPENTHREAD};name=openthread;nobranch=1;destsuffix=git/modules/lib/openthread \
+ ${SRC_URI_SEGGER};name=segger;nobranch=1;destsuffix=git/modules/debug/segger \
+ ${SRC_URI_SOF};name=sof;nobranch=1;destsuffix=git/modules/audio/sof \
+ ${SRC_URI_TFLITE_MICRO};name=tflite-micro;nobranch=1;destsuffix=git/modules/lib/tflite-micro \
+ ${SRC_URI_TINYCBOR};name=tinycbor;nobranch=1;destsuffix=git/modules/lib/tinycbor \
+ ${SRC_URI_TINYCRYPT};name=tinycrypt;nobranch=1;destsuffix=git/modules/crypto/tinycrypt \
+ ${SRC_URI_TRACERECORDERSOURCE};name=TraceRecorderSource;nobranch=1;destsuffix=git/modules/debug/TraceRecorder \
+ ${SRC_URI_TRUSTED_FIRMWARE_M};name=trusted-firmware-m;nobranch=1;destsuffix=git/modules/tee/tfm \
+ ${SRC_URI_PATCHES} \
+"
+
+ZEPHYR_MODULES = "\
+${S}/modules/lib/canopennode\;\
+${S}/modules/lib/civetweb\;\
+${S}/modules/hal/cmsis\;\
+${S}/tools/edtt\;\
+${S}/modules/fs/fatfs\;\
+${S}/modules/hal/altera\;\
+${S}/modules/hal/atmel\;\
+${S}/modules/hal/cypress\;\
+${S}/modules/hal/espressif\;\
+${S}/modules/hal/infineon\;\
+${S}/modules/hal/microchip\;\
+${S}/modules/hal/nordic\;\
+${S}/modules/hal/nuvoton\;\
+${S}/modules/hal/nxp\;\
+${S}/modules/hal/openisa\;\
+${S}/modules/hal/quicklogic\;\
+${S}/modules/hal/silabs\;\
+${S}/modules/hal/st\;\
+${S}/modules/hal/stm32\;\
+${S}/modules/hal/telink\;\
+${S}/modules/hal/ti\;\
+${S}/modules/hal/xtensa\;\
+${S}/modules/hal/libmetal\;\
+${S}/modules/fs/littlefs\;\
+${S}/modules/lib/loramac-node\;\
+${S}/modules/lib/gui/lvgl\;\
+${S}/modules/lib/lz4\;\
+${S}/modules/crypto/mbedtls\;\
+${S}/bootloader/mcuboot\;\
+${S}/modules/lib/mcumgr\;\
+${S}/modules/debug/mipi-sys-t\;\
+${S}/modules/lib/nanopb\;\
+${S}/tools/net-tools\;\
+${S}/modules/bsim_hw_models/nrf_hw_models\;\
+${S}/modules/lib/open-amp\;\
+${S}/modules/lib/openthread\;\
+${S}/modules/debug/segger\;\
+${S}/modules/audio/sof\;\
+${S}/modules/lib/tflite-micro\;\
+${S}/modules/lib/tinycbor\;\
+${S}/modules/crypto/tinycrypt\;\
+${S}/modules/debug/TraceRecorder\;\
+${S}/modules/tee/tfm\;\
+"
+
+ZEPHYR_BRANCH = "v2.7-branch"
+PV = "2.7.3+git${SRCPV}"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.0.0.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.0.0.inc
deleted file mode 100644
index 64594a0..0000000
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.0.0.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-SRCREV_FORMAT = "default_cmsis"
-
-#
-# Generated with:
-#
-# #!/usr/bin/python3
-#
-# import yaml
-# import sys
-#
-# if __name__ == "__main__":
-# with open(sys.argv[1], "r") as fd:
-# data = yaml.safe_load(fd)
-#
-# for project in data["manifest"]["projects"]:
-# print("SRCREV_{} = \"{}\"".format(project["name"], project["revision"]))
-#
-
-SRCREV_default = "4f8d78ceeb436e82f528511998515f6fc137c6cd"
-SRCREV_canopennode = "1052dae561497bef901f931ef75e117c9224aecd"
-SRCREV_civetweb = "094aeb41bb93e9199d24d665ee43e9e05d6d7b1c"
-SRCREV_cmsis = "b0612c97c1401feeb4160add6462c3627fe90fc7"
-SRCREV_edtt = "1fc2e6f7d2a01a01074456f2ef2ccf1f3df7fac1"
-SRCREV_fatfs = "09a9d913c61dccbb8ff92d8943b452c614ac5292"
-SRCREV_fff = "6ce5ba26486e93d5b7696a3e23f0585932c14b16"
-SRCREV_altera = "23c1c1dd7a0c1cc9a399509d1819375847c95b97"
-SRCREV_atmel = "9f78f520f6cbb997e5b44fe8ab17dd5bf2448095"
-SRCREV_cypress = "81a059f21435bc7e315bccd720da5a9b615bbb50"
-SRCREV_espressif = "bcd7565ffa390d5774dc2fbe71a002faa9a7d082"
-SRCREV_gigadevice = "242a7f4be7a3136606c7a65169775f7ef85ad444"
-SRCREV_infineon = "f1fa8241f8786198ba41155413243de36ed878a5"
-SRCREV_microchip = "870d05e6a64ea9548da6b907058b03c8c9420826"
-SRCREV_nordic = "a42b016d7c7610489f5f8c79773fedc05ba352ee"
-SRCREV_nuvoton = "b4d31f33238713a568e23618845702fadd67386f"
-SRCREV_nxp = "9629f15fd80169cc9669e3fbb1260467c3aeb175"
-SRCREV_openisa = "40d049f69c50b58ea20473bee14cf93f518bf262"
-SRCREV_quicklogic = "b3a66fe6d04d87fd1533a5c8de51d0599fcd08d0"
-SRCREV_rpi_pico = "191f5ba46fda49523cdaaef27583d1c875ba2c36"
-SRCREV_silabs = "be39d4eebeddac6e18e9c0c3ba1b31ad1e82eaed"
-SRCREV_st = "575de9d461aa6f430cf62c58a053675377e700f3"
-SRCREV_stm32 = "300109f80730cb2477bfcc706a6602b9870336b3"
-SRCREV_telink = "ffcfd6282aa213f1dc0848dbca6279b098f6b143"
-SRCREV_ti = "1992a4c536554c4f409c36896eda6abdc414d277"
-SRCREV_xtensa = "0e577021bb66e644afd067cd9f7c71ab11b62b3d"
-SRCREV_libmetal = "f237c9d420a51cc43bc37d744e41191ad613f348"
-SRCREV_littlefs = "33509ed9c3d369cdb9d909cd40c5eea8f64a902c"
-SRCREV_loramac-node = "12019623bbad9eb54fe51066847a7cbd4b4eac57"
-SRCREV_lvgl = "783c1f78c8e39751fe89d0883c8bce7336f55e94"
-SRCREV_lz4 = "8e303c264fc21c2116dc612658003a22e933124d"
-SRCREV_mbedtls = "3e3e58a92de76069730c63e0d524f40fea948a61"
-SRCREV_mcuboot = "89936c338e46f43cb177a8b928cd80b90f3ace8f"
-SRCREV_mipi-sys-t = "d9da086b11cda494d85f4d8a9829f505c2d5e380"
-SRCREV_nanopb = "d148bd26718e4c10414f07a7eb1bd24c62e56c5d"
-SRCREV_net-tools = "f49bd1354616fae4093bf36e5eaee43c51a55127"
-SRCREV_nrf_hw_models = "b8cea37dbdc8fc58cc14b4e19fa850877a9da520"
-SRCREV_open-amp = "cfd050ff38a9d028dc211690b2ec35971128e45e"
-SRCREV_openthread = "b7aa7686d3f4e326bd25abc234b209159977c26d"
-SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
-SRCREV_sof = "500d77e0ac84ac2c969e0d4b2142cca192e893bc"
-SRCREV_tflite-micro = "9156d050927012da87079064db59d07f03b8baf6"
-SRCREV_tinycbor = "40daca97b478989884bffb5226e9ab73ca54b8c4"
-SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
-SRCREV_TraceRecorderSource = "e8ca3b6a83d19b2fc4738a0d9607190436e5e452"
-SRCREV_trusted-firmware-m = "5d32c3e64b3d589548e881eeeeb37d84944c90af"
-SRCREV_tf-m-tests = "52814181f0fde6d1422fac204d42cde30c62e40e"
-SRCREV_psa-arch-tests = "0aab24602cbef30f6422e7ef1066a8473073e586"
-SRCREV_zscilib = "12bfe3f0a9fcbfe3edab7eabc9678b6c62875d34"
-
-ZEPHYR_BRANCH = "v3.0-branch"
-PV = "3.0.0+git${SRCPV}"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc
new file mode 100644
index 0000000..68016e4
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc
@@ -0,0 +1,223 @@
+# Auto-generated from zephyr-kernel-src.inc.jinja
+
+SRCREV_FORMAT = "default"
+
+SRCREV_default = "2ddd73feafd3316af2c547c34d6969bea637d5c6"
+SRCREV_canopennode = "53d3415c14d60f8f4bfca54bfbc5d5a667d7e724"
+SRCREV_chre = "0edfe2c2ec656afb910cfab8ed59a5ffd59b87c8"
+SRCREV_civetweb = "094aeb41bb93e9199d24d665ee43e9e05d6d7b1c"
+SRCREV_cmsis = "5f86244bad4ad5a590e084f0e72ba7a1416c2edf"
+SRCREV_edtt = "1ea61a390d2bfcf3b2ecdba8f8b0b98dfdffbd11"
+SRCREV_fatfs = "a30531af3a95a9a3ea7d771ea8a578ebfed45514"
+SRCREV_fff = "6ce5ba26486e93d5b7696a3e23f0585932c14b16"
+SRCREV_hal_altera = "0d225ddd314379b32355a00fb669eacf911e750d"
+SRCREV_hal_atmel = "78c5567c05b6b434dd7d98f49156319df4217bac"
+SRCREV_hal_espressif = "df85671c5d0405c0747c2939c8dfe808b7e4cf38"
+SRCREV_hal_gigadevice = "63a72ca90b7e0d7257211ddc5c79e8c0b940371b"
+SRCREV_hal_infineon = "4af06965f57ba1e7d170e6a97d24c33785543a8c"
+SRCREV_hal_microchip = "5d079f1683a00b801373bbbbf5d181d4e33b30d5"
+SRCREV_hal_nordic = "a85bb3676d61d1ae202088e0d3fec556056b2c9e"
+SRCREV_hal_nuvoton = "b4d31f33238713a568e23618845702fadd67386f"
+SRCREV_hal_nxp = "2302a1e94f5bc00ce59db4e249b688ad2e959f58"
+SRCREV_hal_openisa = "40d049f69c50b58ea20473bee14cf93f518bf262"
+SRCREV_hal_quicklogic = "b3a66fe6d04d87fd1533a5c8de51d0599fcd08d0"
+SRCREV_hal_rpi_pico = "191f5ba46fda49523cdaaef27583d1c875ba2c36"
+SRCREV_hal_silabs = "be39d4eebeddac6e18e9c0c3ba1b31ad1e82eaed"
+SRCREV_hal_st = "52a522ca4a8a9ec1e9bb5bb514e1ab6f102863fe"
+SRCREV_hal_stm32 = "51b373cd3455b8c2b9babbf6ff41918116a442ac"
+SRCREV_hal_telink = "ffcfd6282aa213f1dc0848dbca6279b098f6b143"
+SRCREV_hal_ti = "905a5d4134899630071f9383aadaaf266e8f8cd2"
+SRCREV_hal_xtensa = "0e577021bb66e644afd067cd9f7c71ab11b62b3d"
+SRCREV_libmetal = "850a3c3fd5bc655987021dc9106d8e8cd0f7e061"
+SRCREV_liblc3codec = "3951cf1b71ff3be086c9b9b595e473e12301337c"
+SRCREV_littlefs = "652f2c5646e79b881e6f3099686ad3b7af9e216c"
+SRCREV_loramac-node = "12019623bbad9eb54fe51066847a7cbd4b4eac57"
+SRCREV_lvgl = "df717ac87a9fd80246cc8df24554475e59bda21f"
+SRCREV_lz4 = "8e303c264fc21c2116dc612658003a22e933124d"
+SRCREV_mbedtls = "7fed49c9b9f983ad6416986661ef637459723bcb"
+SRCREV_mcuboot = "e58ea98aec6e5539c5f872a98059e461d0155bbb"
+SRCREV_mipi-sys-t = "a5163c1800a5243f8b05d84c942da008df4cb666"
+SRCREV_nanopb = "d148bd26718e4c10414f07a7eb1bd24c62e56c5d"
+SRCREV_net-tools = "f49bd1354616fae4093bf36e5eaee43c51a55127"
+SRCREV_nrf_hw_models = "b8cea37dbdc8fc58cc14b4e19fa850877a9da520"
+SRCREV_open-amp = "8d53544871e1f300c478224faca6be8384ab0d04"
+SRCREV_openthread = "e2a765599aa0379d0f72f0149a9cbafec070c12d"
+SRCREV_segger = "3a52ab222133193802d3c3b4d21730b9b1f1d2f6"
+SRCREV_sof = "2efc3ea41c0074c6dab5f376fafaa26f52c25c75"
+SRCREV_tflite-micro = "9156d050927012da87079064db59d07f03b8baf6"
+SRCREV_tinycbor = "9e1f34bc08123aaad7666d3652aaa839e8178b3b"
+SRCREV_tinycrypt = "3e9a49d2672ec01435ffbf0d788db6d95ef28de0"
+SRCREV_TraceRecorderSource = "e8ca3b6a83d19b2fc4738a0d9607190436e5e452"
+SRCREV_trusted-firmware-m = "7c53a6e76130a85303f83b15d868a92fdcd5f5be"
+SRCREV_tf-m-tests = "c99a86b295c4887520da9d8402566d7f225c974e"
+SRCREV_psa-arch-tests = "a81f9da287569f169d60026916952641b233faa8"
+SRCREV_zcbor = "882c489a7d9fdfff31d27666914a78a9eb6976d7"
+SRCREV_zscilib = "fc979a8dcb74169c69b02835927bff8f070d6325"
+
+SRC_URI_ZEPHYR ?= "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https"
+SRC_URI_CANOPENNODE ?= "git://github.com/zephyrproject-rtos/canopennode;protocol=https"
+SRC_URI_CHRE ?= "git://github.com/zephyrproject-rtos/chre;protocol=https"
+SRC_URI_CIVETWEB ?= "git://github.com/zephyrproject-rtos/civetweb;protocol=https"
+SRC_URI_CMSIS ?= "git://github.com/zephyrproject-rtos/cmsis;protocol=https"
+SRC_URI_EDTT ?= "git://github.com/zephyrproject-rtos/edtt;protocol=https"
+SRC_URI_FATFS ?= "git://github.com/zephyrproject-rtos/fatfs;protocol=https"
+SRC_URI_FFF ?= "git://github.com/zephyrproject-rtos/fff;protocol=https"
+SRC_URI_HAL_ALTERA ?= "git://github.com/zephyrproject-rtos/hal_altera;protocol=https"
+SRC_URI_HAL_ATMEL ?= "git://github.com/zephyrproject-rtos/hal_atmel;protocol=https"
+SRC_URI_HAL_ESPRESSIF ?= "git://github.com/zephyrproject-rtos/hal_espressif;protocol=https"
+SRC_URI_HAL_GIGADEVICE ?= "git://github.com/zephyrproject-rtos/hal_gigadevice;protocol=https"
+SRC_URI_HAL_INFINEON ?= "git://github.com/zephyrproject-rtos/hal_infineon;protocol=https"
+SRC_URI_HAL_MICROCHIP ?= "git://github.com/zephyrproject-rtos/hal_microchip;protocol=https"
+SRC_URI_HAL_NORDIC ?= "git://github.com/zephyrproject-rtos/hal_nordic;protocol=https"
+SRC_URI_HAL_NUVOTON ?= "git://github.com/zephyrproject-rtos/hal_nuvoton;protocol=https"
+SRC_URI_HAL_NXP ?= "git://github.com/zephyrproject-rtos/hal_nxp;protocol=https"
+SRC_URI_HAL_OPENISA ?= "git://github.com/zephyrproject-rtos/hal_openisa;protocol=https"
+SRC_URI_HAL_QUICKLOGIC ?= "git://github.com/zephyrproject-rtos/hal_quicklogic;protocol=https"
+SRC_URI_HAL_RPI_PICO ?= "git://github.com/zephyrproject-rtos/hal_rpi_pico;protocol=https"
+SRC_URI_HAL_SILABS ?= "git://github.com/zephyrproject-rtos/hal_silabs;protocol=https"
+SRC_URI_HAL_ST ?= "git://github.com/zephyrproject-rtos/hal_st;protocol=https"
+SRC_URI_HAL_STM32 ?= "git://github.com/zephyrproject-rtos/hal_stm32;protocol=https"
+SRC_URI_HAL_TELINK ?= "git://github.com/zephyrproject-rtos/hal_telink;protocol=https"
+SRC_URI_HAL_TI ?= "git://github.com/zephyrproject-rtos/hal_ti;protocol=https"
+SRC_URI_HAL_XTENSA ?= "git://github.com/zephyrproject-rtos/hal_xtensa;protocol=https"
+SRC_URI_LIBMETAL ?= "git://github.com/zephyrproject-rtos/libmetal;protocol=https"
+SRC_URI_LIBLC3CODEC ?= "git://github.com/zephyrproject-rtos/liblc3codec;protocol=https"
+SRC_URI_LITTLEFS ?= "git://github.com/zephyrproject-rtos/littlefs;protocol=https"
+SRC_URI_LORAMAC_NODE ?= "git://github.com/zephyrproject-rtos/loramac-node;protocol=https"
+SRC_URI_LVGL ?= "git://github.com/zephyrproject-rtos/lvgl;protocol=https"
+SRC_URI_LZ4 ?= "git://github.com/zephyrproject-rtos/lz4;protocol=https"
+SRC_URI_MBEDTLS ?= "git://github.com/zephyrproject-rtos/mbedtls;protocol=https"
+SRC_URI_MCUBOOT ?= "git://github.com/zephyrproject-rtos/mcuboot;protocol=https"
+SRC_URI_MIPI_SYS_T ?= "git://github.com/zephyrproject-rtos/mipi-sys-t;protocol=https"
+SRC_URI_NANOPB ?= "git://github.com/zephyrproject-rtos/nanopb;protocol=https"
+SRC_URI_NET_TOOLS ?= "git://github.com/zephyrproject-rtos/net-tools;protocol=https"
+SRC_URI_NRF_HW_MODELS ?= "git://github.com/zephyrproject-rtos/nrf_hw_models;protocol=https"
+SRC_URI_OPEN_AMP ?= "git://github.com/zephyrproject-rtos/open-amp;protocol=https"
+SRC_URI_OPENTHREAD ?= "git://github.com/zephyrproject-rtos/openthread;protocol=https"
+SRC_URI_SEGGER ?= "git://github.com/zephyrproject-rtos/segger;protocol=https"
+SRC_URI_SOF ?= "git://github.com/zephyrproject-rtos/sof;protocol=https"
+SRC_URI_TFLITE_MICRO ?= "git://github.com/zephyrproject-rtos/tflite-micro;protocol=https"
+SRC_URI_TINYCBOR ?= "git://github.com/zephyrproject-rtos/tinycbor;protocol=https"
+SRC_URI_TINYCRYPT ?= "git://github.com/zephyrproject-rtos/tinycrypt;protocol=https"
+SRC_URI_TRACERECORDERSOURCE ?= "git://github.com/zephyrproject-rtos/TraceRecorderSource;protocol=https"
+SRC_URI_TRUSTED_FIRMWARE_M ?= "git://github.com/zephyrproject-rtos/trusted-firmware-m;protocol=https"
+SRC_URI_TF_M_TESTS ?= "git://github.com/zephyrproject-rtos/tf-m-tests;protocol=https"
+SRC_URI_PSA_ARCH_TESTS ?= "git://github.com/zephyrproject-rtos/psa-arch-tests;protocol=https"
+SRC_URI_ZCBOR ?= "git://github.com/zephyrproject-rtos/zcbor;protocol=https"
+SRC_URI_ZSCILIB ?= "git://github.com/zephyrproject-rtos/zscilib;protocol=https"
+
+SRC_URI_PATCHES ?= "\
+ file://0001-3.1-cmake-add-yocto-toolchain.patch;patchdir=zephyr \
+ file://0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \
+"
+
+SRC_URI = "\
+ ${SRC_URI_ZEPHYR};branch=${ZEPHYR_BRANCH};name=default;destsuffix=git/zephyr \
+ ${SRC_URI_CANOPENNODE};name=canopennode;nobranch=1;destsuffix=git/modules/lib/canopennode \
+ ${SRC_URI_CHRE};name=chre;nobranch=1;destsuffix=git/modules/lib/chre \
+ ${SRC_URI_CIVETWEB};name=civetweb;nobranch=1;destsuffix=git/modules/lib/civetweb \
+ ${SRC_URI_CMSIS};name=cmsis;nobranch=1;destsuffix=git/modules/hal/cmsis \
+ ${SRC_URI_EDTT};name=edtt;nobranch=1;destsuffix=git/tools/edtt \
+ ${SRC_URI_FATFS};name=fatfs;nobranch=1;destsuffix=git/modules/fs/fatfs \
+ ${SRC_URI_FFF};name=fff;nobranch=1;destsuffix=git/modules/lib/fff \
+ ${SRC_URI_HAL_ALTERA};name=hal_altera;nobranch=1;destsuffix=git/modules/hal/altera \
+ ${SRC_URI_HAL_ATMEL};name=hal_atmel;nobranch=1;destsuffix=git/modules/hal/atmel \
+ ${SRC_URI_HAL_ESPRESSIF};name=hal_espressif;nobranch=1;destsuffix=git/modules/hal/espressif \
+ ${SRC_URI_HAL_GIGADEVICE};name=hal_gigadevice;nobranch=1;destsuffix=git/modules/hal/gigadevice \
+ ${SRC_URI_HAL_INFINEON};name=hal_infineon;nobranch=1;destsuffix=git/modules/hal/infineon \
+ ${SRC_URI_HAL_MICROCHIP};name=hal_microchip;nobranch=1;destsuffix=git/modules/hal/microchip \
+ ${SRC_URI_HAL_NORDIC};name=hal_nordic;nobranch=1;destsuffix=git/modules/hal/nordic \
+ ${SRC_URI_HAL_NUVOTON};name=hal_nuvoton;nobranch=1;destsuffix=git/modules/hal/nuvoton \
+ ${SRC_URI_HAL_NXP};name=hal_nxp;nobranch=1;destsuffix=git/modules/hal/nxp \
+ ${SRC_URI_HAL_OPENISA};name=hal_openisa;nobranch=1;destsuffix=git/modules/hal/openisa \
+ ${SRC_URI_HAL_QUICKLOGIC};name=hal_quicklogic;nobranch=1;destsuffix=git/modules/hal/quicklogic \
+ ${SRC_URI_HAL_RPI_PICO};name=hal_rpi_pico;nobranch=1;destsuffix=git/modules/hal/rpi_pico \
+ ${SRC_URI_HAL_SILABS};name=hal_silabs;nobranch=1;destsuffix=git/modules/hal/silabs \
+ ${SRC_URI_HAL_ST};name=hal_st;nobranch=1;destsuffix=git/modules/hal/st \
+ ${SRC_URI_HAL_STM32};name=hal_stm32;nobranch=1;destsuffix=git/modules/hal/stm32 \
+ ${SRC_URI_HAL_TELINK};name=hal_telink;nobranch=1;destsuffix=git/modules/hal/telink \
+ ${SRC_URI_HAL_TI};name=hal_ti;nobranch=1;destsuffix=git/modules/hal/ti \
+ ${SRC_URI_HAL_XTENSA};name=hal_xtensa;nobranch=1;destsuffix=git/modules/hal/xtensa \
+ ${SRC_URI_LIBMETAL};name=libmetal;nobranch=1;destsuffix=git/modules/hal/libmetal \
+ ${SRC_URI_LIBLC3CODEC};name=liblc3codec;nobranch=1;destsuffix=git/modules/lib/liblc3codec \
+ ${SRC_URI_LITTLEFS};name=littlefs;nobranch=1;destsuffix=git/modules/fs/littlefs \
+ ${SRC_URI_LORAMAC_NODE};name=loramac-node;nobranch=1;destsuffix=git/modules/lib/loramac-node \
+ ${SRC_URI_LVGL};name=lvgl;nobranch=1;destsuffix=git/modules/lib/gui/lvgl \
+ ${SRC_URI_LZ4};name=lz4;nobranch=1;destsuffix=git/modules/lib/lz4 \
+ ${SRC_URI_MBEDTLS};name=mbedtls;nobranch=1;destsuffix=git/modules/crypto/mbedtls \
+ ${SRC_URI_MCUBOOT};name=mcuboot;nobranch=1;destsuffix=git/bootloader/mcuboot \
+ ${SRC_URI_MIPI_SYS_T};name=mipi-sys-t;nobranch=1;destsuffix=git/modules/debug/mipi-sys-t \
+ ${SRC_URI_NANOPB};name=nanopb;nobranch=1;destsuffix=git/modules/lib/nanopb \
+ ${SRC_URI_NET_TOOLS};name=net-tools;nobranch=1;destsuffix=git/tools/net-tools \
+ ${SRC_URI_NRF_HW_MODELS};name=nrf_hw_models;nobranch=1;destsuffix=git/modules/bsim_hw_models/nrf_hw_models \
+ ${SRC_URI_OPEN_AMP};name=open-amp;nobranch=1;destsuffix=git/modules/lib/open-amp \
+ ${SRC_URI_OPENTHREAD};name=openthread;nobranch=1;destsuffix=git/modules/lib/openthread \
+ ${SRC_URI_SEGGER};name=segger;nobranch=1;destsuffix=git/modules/debug/segger \
+ ${SRC_URI_SOF};name=sof;nobranch=1;destsuffix=git/modules/audio/sof \
+ ${SRC_URI_TFLITE_MICRO};name=tflite-micro;nobranch=1;destsuffix=git/modules/lib/tflite-micro \
+ ${SRC_URI_TINYCBOR};name=tinycbor;nobranch=1;destsuffix=git/modules/lib/tinycbor \
+ ${SRC_URI_TINYCRYPT};name=tinycrypt;nobranch=1;destsuffix=git/modules/crypto/tinycrypt \
+ ${SRC_URI_TRACERECORDERSOURCE};name=TraceRecorderSource;nobranch=1;destsuffix=git/modules/debug/TraceRecorder \
+ ${SRC_URI_TRUSTED_FIRMWARE_M};name=trusted-firmware-m;nobranch=1;destsuffix=git/modules/tee/tf-m/trusted-firmware-m \
+ ${SRC_URI_TF_M_TESTS};name=tf-m-tests;nobranch=1;destsuffix=git/modules/tee/tf-m/tf-m-tests \
+ ${SRC_URI_PSA_ARCH_TESTS};name=psa-arch-tests;nobranch=1;destsuffix=git/modules/tee/tf-m/psa-arch-tests \
+ ${SRC_URI_ZCBOR};name=zcbor;nobranch=1;destsuffix=git/modules/lib/zcbor \
+ ${SRC_URI_ZSCILIB};name=zscilib;nobranch=1;destsuffix=git/modules/lib/zscilib \
+ ${SRC_URI_PATCHES} \
+"
+
+ZEPHYR_MODULES = "\
+${S}/modules/lib/canopennode\;\
+${S}/modules/lib/chre\;\
+${S}/modules/lib/civetweb\;\
+${S}/modules/hal/cmsis\;\
+${S}/tools/edtt\;\
+${S}/modules/fs/fatfs\;\
+${S}/modules/lib/fff\;\
+${S}/modules/hal/altera\;\
+${S}/modules/hal/atmel\;\
+${S}/modules/hal/espressif\;\
+${S}/modules/hal/gigadevice\;\
+${S}/modules/hal/infineon\;\
+${S}/modules/hal/microchip\;\
+${S}/modules/hal/nordic\;\
+${S}/modules/hal/nuvoton\;\
+${S}/modules/hal/nxp\;\
+${S}/modules/hal/openisa\;\
+${S}/modules/hal/quicklogic\;\
+${S}/modules/hal/rpi_pico\;\
+${S}/modules/hal/silabs\;\
+${S}/modules/hal/st\;\
+${S}/modules/hal/stm32\;\
+${S}/modules/hal/telink\;\
+${S}/modules/hal/ti\;\
+${S}/modules/hal/xtensa\;\
+${S}/modules/hal/libmetal\;\
+${S}/modules/lib/liblc3codec\;\
+${S}/modules/fs/littlefs\;\
+${S}/modules/lib/loramac-node\;\
+${S}/modules/lib/gui/lvgl\;\
+${S}/modules/lib/lz4\;\
+${S}/modules/crypto/mbedtls\;\
+${S}/bootloader/mcuboot\;\
+${S}/modules/debug/mipi-sys-t\;\
+${S}/modules/lib/nanopb\;\
+${S}/tools/net-tools\;\
+${S}/modules/bsim_hw_models/nrf_hw_models\;\
+${S}/modules/lib/open-amp\;\
+${S}/modules/lib/openthread\;\
+${S}/modules/debug/segger\;\
+${S}/modules/audio/sof\;\
+${S}/modules/lib/tflite-micro\;\
+${S}/modules/lib/tinycbor\;\
+${S}/modules/crypto/tinycrypt\;\
+${S}/modules/debug/TraceRecorder\;\
+${S}/modules/tee/tf-m/trusted-firmware-m\;\
+${S}/modules/tee/tf-m/tf-m-tests\;\
+${S}/modules/tee/tf-m/psa-arch-tests\;\
+${S}/modules/lib/zcbor\;\
+${S}/modules/lib/zscilib\;\
+"
+
+ZEPHYR_BRANCH = "v3.1-branch"
+PV = "3.1.0+git${SRCPV}"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc
index bf9ceaf..f28d1d4 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc
@@ -1,5 +1,5 @@
LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+LIC_FILES_CHKSUM = "file://zephyr/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
CVE_PRODUCT = "zephyr"
@@ -9,54 +9,8 @@ inherit cmake
# having an explicit path to the patches directory, will make bitbake fail to
# find the patch(es) in SRC_URI.
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-
-SRC_URI = "\
- git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=${ZEPHYR_BRANCH};name=default \
- git://github.com/zephyrproject-rtos/canopennode.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/canopennode;name=canopennode \
- git://github.com/zephyrproject-rtos/civetweb.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/civetweb;name=civetweb \
- git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/cmsis;name=cmsis \
- git://github.com/zephyrproject-rtos/edtt.git;protocol=https;nobranch=1;destsuffix=git/tools/edtt;name=edtt \
- git://github.com/zephyrproject-rtos/fatfs.git;protocol=https;nobranch=1;destsuffix=git/modules/fs/fatfs;name=fatfs \
- git://github.com/zephyrproject-rtos/hal_altera.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/altera;name=altera \
- git://github.com/zephyrproject-rtos/hal_atmel.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/atmel;name=atmel \
- git://github.com/zephyrproject-rtos/hal_cypress.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/cypress;name=cypress \
- git://github.com/zephyrproject-rtos/hal_espressif.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/espressif;name=espressif \
- git://github.com/zephyrproject-rtos/hal_infineon.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/infineon;name=infineon \
- git://github.com/zephyrproject-rtos/hal_microchip.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/microchip;name=microchip \
- git://github.com/zephyrproject-rtos/hal_nordic.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/nordic;name=nordic \
- git://github.com/zephyrproject-rtos/hal_nuvoton.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/nuvoton;name=nuvoton \
- git://github.com/zephyrproject-rtos/hal_nxp.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/nxp;name=nxp \
- git://github.com/zephyrproject-rtos/hal_openisa.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/openisa;name=openisa \
- git://github.com/zephyrproject-rtos/hal_quicklogic.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/quicklogic;name=quicklogic \
- git://github.com/zephyrproject-rtos/hal_silabs.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/silabs;name=silabs \
- git://github.com/zephyrproject-rtos/hal_st.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/st;name=st \
- git://github.com/zephyrproject-rtos/hal_stm32.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/stm32;name=stm32 \
- git://github.com/zephyrproject-rtos/hal_ti.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/ti;name=ti \
- git://github.com/zephyrproject-rtos/hal_xtensa.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/xtensa;name=xtensa \
- git://github.com/zephyrproject-rtos/libmetal.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/libmetal;name=libmetal \
- git://github.com/zephyrproject-rtos/littlefs.git;protocol=https;nobranch=1;destsuffix=git/modules/fs/littlefs;name=littlefs \
- git://github.com/zephyrproject-rtos/loramac-node.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/loramac-node;name=loramac-node \
- git://github.com/zephyrproject-rtos/lvgl.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/gui/lvgl;name=lvgl \
- git://github.com/zephyrproject-rtos/mbedtls.git;protocol=https;nobranch=1;destsuffix=git/modules/crypto/mbedtls;name=mbedtls \
- git://github.com/zephyrproject-rtos/mcuboot.git;protocol=https;nobranch=1;destsuffix=git/bootloader/mcuboot;name=mcuboot \
- git://github.com/zephyrproject-rtos/mipi-sys-t.git;protocol=https;nobranch=1;destsuffix=git/modules/debug/mipi-sys-t;name=mipi-sys-t \
- git://github.com/zephyrproject-rtos/nanopb.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/nanopb;name=nanopb \
- git://github.com/zephyrproject-rtos/net-tools.git;protocol=https;nobranch=1;destsuffix=git/tools/net-tools;name=net-tools \
- git://github.com/zephyrproject-rtos/nrf_hw_models.git;protocol=https;nobranch=1;destsuffix=git/modules/bsim_hw_models/nrf_hw_models;name=nrf_hw_models \
- git://github.com/zephyrproject-rtos/open-amp.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/open-amp;name=open-amp \
- git://github.com/zephyrproject-rtos/openthread.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/openthread;name=openthread \
- git://github.com/zephyrproject-rtos/segger.git;protocol=https;nobranch=1;destsuffix=git/modules/debug/segger;name=segger \
- git://github.com/zephyrproject-rtos/sof.git;protocol=https;nobranch=1;destsuffix=git/modules/audio/sof;name=sof \
- git://github.com/zephyrproject-rtos/tinycbor.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/tinycbor;name=tinycbor \
- git://github.com/zephyrproject-rtos/tinycrypt.git;protocol=https;nobranch=1;destsuffix=git/modules/crypto/tinycrypt;name=tinycrypt \
- git://github.com/zephyrproject-rtos/hal_telink.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/telink;name=telink \
- git://github.com/zephyrproject-rtos/lz4.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/lz4;name=lz4 \
- git://github.com/zephyrproject-rtos/tflite-micro.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/tflite-micro;name=tflite-micro \
- file://0001-cmake-add-yocto-toolchain.patch \
- file://0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch \
-"
S = "${WORKDIR}/git"
# Default to a stable version
-PREFERRED_VERSION_zephyr-kernel ??= "3.0.0"
+PREFERRED_VERSION_zephyr-kernel ??= "3.1.0"
include zephyr-kernel-src-${PREFERRED_VERSION_zephyr-kernel}.inc
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb
index efe2154..a635da2 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb
@@ -1,6 +1,6 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/subsys/display/lvgl"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/display/lvgl"
# TODO Once more machines and displays are supported, add a PACKAGECONFIG.
EXTRA_OECMAKE:append =" -DSHIELD=adafruit_2_8_tft_touch_v2"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb
index c679798..f314841 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/mqtt_publisher"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/mqtt_publisher"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb
index 3eec58a..5e51c23 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb
@@ -5,6 +5,6 @@ ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf"
ZEPHYR_MAKE_BIN_OUTPUT = "zephyr_openamp_rsc_table.bin"
ZEPHYR_MAKE_EFI_OUTPUT = "zephyr_openamp_rsc_table.efi"
-ZEPHYR_SRC_DIR = "${S}/samples/subsys/ipc/openamp_rsc_table"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/ipc/openamp_rsc_table"
COMPATIBLE_MACHINE = "(stm32mp157c-dk2)"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb
index b83c6b3..e2b3efd 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb
@@ -1,6 +1,6 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/echo_client"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client"
EXTRA_OECMAKE += "-DOVERLAY_CONFIG=overlay-ot.conf"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb
index 6d3f860..1b19122 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb
@@ -1,10 +1,10 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/openthread/coprocessor"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/openthread/coprocessor"
EXTRA_OECMAKE += "-DCONF_FILE="prj.conf overlay-rcp.conf overlay-usb-nrf-br.conf" -DDTC_OVERLAY_FILE="usb.overlay" -DCONFIG_OPENTHREAD_THREAD_VERSION_1_2=y"
# The overlay config and OpenThread itself imposes some specific requirements
# towards the boards (e.g. flash layout and ieee802154 radio) so we need to
# limit to known working machines here.
-COMPATIBLE_MACHINE = "(arduino-nano-33-ble)"
+COMPATIBLE_MACHINE = "(arduino-nano-33-ble|nrf52840dk-nrf52840)"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
index 14655e5..0aac7f6 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_esp"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_esp"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb
index 53fc771..80e3505 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_hr"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_hr"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
index a2afb57..2b4fca3 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb
@@ -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"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/philosophers"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc
index 77fa5ad..10c25c5 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc
@@ -2,7 +2,6 @@ require zephyr-kernel-src.inc
require zephyr-kernel-common.inc
inherit deploy
-ZEPHYR_BASE = "${S}"
OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}"
do_install[noexec] = "1"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb
new file mode 100644
index 0000000..a55736b
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb
@@ -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 = "${ZEPHYR_BASE}/samples/synchronization"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-yocto.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-yocto.inc
new file mode 100644
index 0000000..b167695
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-yocto.inc
@@ -0,0 +1,16 @@
+# Additional definitions to use the Yocto toolchain
+
+ZEPHYR_GCC_VARIANT="yocto"
+ZEPHYR_SYSROOT="${STAGING_DIR_TARGET}"
+CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
+
+EXTRA_OECMAKE:append = " \
+ -DZEPHYR_GCC_VARIANT=${ZEPHYR_GCC_VARIANT} \
+ -DCROSS_COMPILE=${CROSS_COMPILE} \
+ -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} \
+ -DEXTRA_CPPFLAGS=${CPPFLAGS} \
+ "
+
+OE_TERMINAL_EXPORTS += "CROSS_COMPILE"
+OE_TERMINAL_EXPORTS += "ZEPHYR_SYSROOT"
+OE_TERMINAL_EXPORTS += "ZEPHYR_GCC_VARIANT"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-zephyr.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-zephyr.inc
new file mode 100644
index 0000000..9987e3c
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-toolchain-zephyr.inc
@@ -0,0 +1,15 @@
+# Additional definitions to use the Zephyr SDK
+
+# Configure usage of the Zephyr SDK
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "zephyr-sdk-native"
+export ZEPHYR_SDK_INSTALL_DIR="${STAGING_DIR_NATIVE}${prefix}/zephyr-sdk"
+OE_TERMINAL_EXPORTS += "ZEPHYR_SDK_INSTALL_DIR"
+
+# The Zephyr SDK does not require a CMake toolchain file
+EXTRA_OECMAKE:append = " -DCMAKE_TOOLCHAIN_FILE="
+deltask generate_toolchain_file
+
+# Provide a suitable location to store the toolchain capabilites cache
+ZEPHYR_USER_CACHE_DIR = "${B}/.cache"
+EXTRA_OECMAKE:append = " -DUSER_CACHE_DIR=${ZEPHYR_USER_CACHE_DIR}"
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb
index c2c47d0..b92e986 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb
@@ -1,3 +1,3 @@
include zephyr-sample.inc
-ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/websocket_client"
+ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/websocket_client"
diff --git a/meta-zephyr-core/scripts/generate-version.py b/meta-zephyr-core/scripts/generate-version.py
new file mode 100755
index 0000000..550f8df
--- /dev/null
+++ b/meta-zephyr-core/scripts/generate-version.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python3
+
+import json
+import pathlib
+import re
+import sys
+import urllib.parse
+import urllib.request
+
+# These non-standard modules must be installed on the host
+import jinja2
+import west.manifest
+
+# This script takes one argument - the Zephyr version in the form x.y.z
+version = sys.argv[1]
+if not re.match(r'\d+.\d+.\d+', version):
+ raise ValueError("Please provide a valid Zephyr version")
+
+# Convert the version (x.y.z) into the Git commit SHA using the Github API
+# This is a two-step process - first obtain the tag SHA
+ref_url = f'https://api.github.com/repos/zephyrproject-rtos/zephyr/git/refs/tags/v{version}'
+with urllib.request.urlopen(ref_url) as f:
+ ref_data = json.load(f)
+ ref_sha = ref_data['object']['sha']
+
+# Secondly, obtain the commit SHA of the tag SHA
+tag_url = f'https://api.github.com/repos/zephyrproject-rtos/zephyr/git/tags/{ref_sha}'
+with urllib.request.urlopen(tag_url) as f:
+ tag_data = json.load(f)
+ tag_sha = tag_data['object']['sha']
+
+# Obtain the West manifest and decode using west as a library
+manifest_url = f'https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/v{version}/west.yml'
+with urllib.request.urlopen(manifest_url) as f:
+ source_data = f.read().decode()
+ manifest = west.manifest.Manifest(source_data=source_data,
+ import_flags=west.manifest.ImportFlag.IGNORE)
+ projects = manifest.get_projects([])
+
+# projects contains a 'manifest' project for 'self' which we don't want to use
+projects = list(filter(lambda project: project.name != 'manifest', projects))
+template_params = dict(version=version, tag_sha=tag_sha, projects=projects)
+
+def git_url_to_bitbake(url):
+ """
+ A template helper function which converts an URL for a Git repository into
+ a Bitbake-style URL with a 'protocol' suffix
+ """
+ parts = urllib.parse.urlparse(url)
+ original_sceme = parts.scheme
+ parts = parts._replace(scheme='git')
+ return parts.geturl() + ';protocol=' + original_sceme
+
+def bitbake_var(name):
+ """
+ Returns a string suitable for use in a Bitbake variable name
+ """
+ return name.upper().replace('-', '_')
+
+# Set up the Jinja environment
+template_dir = pathlib.Path(__file__).parent
+env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
+env.filters['git_url_to_bitbake'] = git_url_to_bitbake
+env.filters['bitbake_var'] = bitbake_var
+template = env.get_template('zephyr-kernel-src.inc.jinja')
+
+# Output directly to the zephyr-kernel directory
+dest_path = pathlib.Path(__file__).parents[1] / 'recipes-kernel' /\
+ 'zephyr-kernel' / f'zephyr-kernel-src-{version}.inc'
+
+# Generate the Bitbake include file
+with open(dest_path, 'w') as f:
+ f.write(template.render(**template_params))
diff --git a/meta-zephyr-core/scripts/zephyr-kernel-src.inc.jinja b/meta-zephyr-core/scripts/zephyr-kernel-src.inc.jinja
new file mode 100644
index 0000000..e7981ed
--- /dev/null
+++ b/meta-zephyr-core/scripts/zephyr-kernel-src.inc.jinja
@@ -0,0 +1,35 @@
+# Auto-generated from zephyr-kernel-src.inc.jinja
+{%- set short_version = '.'.join(version.split('.')[0:2]) %}
+
+SRCREV_FORMAT = "default"
+
+SRCREV_default = "{{ tag_sha }}"
+{% for project in projects -%}
+SRCREV_{{ project.name }} = "{{ project.revision }}"
+{% endfor %}
+SRC_URI_ZEPHYR ?= "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https"
+{%- for project in projects %}
+SRC_URI_{{ project.name | bitbake_var }} ?= "{{ project.url | git_url_to_bitbake }}"
+{%- endfor %}
+
+SRC_URI_PATCHES ?= "\
+ file://0001-{{ short_version }}-cmake-add-yocto-toolchain.patch;patchdir=zephyr \
+ file://0001-{{ short_version }}-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \
+"
+
+SRC_URI = "\
+ ${SRC_URI_ZEPHYR};branch=${ZEPHYR_BRANCH};name=default;destsuffix=git/zephyr \
+{%- for project in projects %}
+ ${SRC_URI_{{ project.name | bitbake_var }}};name={{ project.name }};nobranch=1;destsuffix=git/{{ project.path }} \
+{%- endfor %}
+ ${SRC_URI_PATCHES} \
+"
+
+ZEPHYR_MODULES = "\{% for project in projects %}
+${S}/{{ project.path }}\;\
+{%- endfor %}
+"
+
+ZEPHYR_BRANCH = "v{{ short_version }}-branch"
+PV = "{{ version }}+git${SRCPV}"
+