mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-01-29 21:58:41 +01:00
meta-zephyr-core/bsp: Restructure into sublayers
This commit restructures meta-zephyr into meta-zephyr-core and meta-zephyr-bsp. It moves machine definitions into meta-zephyr-bsp in preparation for adding the autogenerated zephyr machines. Signed-off-by: Eilís Ní Fhlannagáin <elizabeth.flanagan@huawei.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
This commit is contained in:
committed by
Naveen Saini
parent
34576b0fd2
commit
dde88ba40b
@@ -19,7 +19,7 @@ Modify local conf by adding:
|
|||||||
|
|
||||||
Add "meta-openembedded/meta-oe" to BBLAYERS
|
Add "meta-openembedded/meta-oe" to BBLAYERS
|
||||||
Add "meta-openembedded/meta-python" to BBLAYERS
|
Add "meta-openembedded/meta-python" to BBLAYERS
|
||||||
Add "meta-zephyr" to BBLAYERS
|
Add "meta-zephyr-core" and "meta-zephyr-bsp" to BBLAYERS
|
||||||
|
|
||||||
Building and Running Zephyr Samples
|
Building and Running Zephyr Samples
|
||||||
===================================
|
===================================
|
||||||
|
|||||||
20
meta-zephyr-bsp/conf/layer.conf
Normal file
20
meta-zephyr-bsp/conf/layer.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# We have a conf and classes directory, add to BBPATH
|
||||||
|
BBPATH .= ":${LAYERDIR}"
|
||||||
|
|
||||||
|
# We have recipes-* directories, add to BBFILES
|
||||||
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||||
|
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||||
|
|
||||||
|
BBFILE_COLLECTIONS += "zephyrbsp"
|
||||||
|
BBFILE_PATTERN_zephyrbsp = "^${LAYERDIR}/"
|
||||||
|
BBFILE_PRIORITY_zephyrbsp = "6"
|
||||||
|
|
||||||
|
# This should only be incremented on significant changes that will
|
||||||
|
# cause compatibility issues with other layers
|
||||||
|
LAYERVERSION_zephyrbsp = "1"
|
||||||
|
|
||||||
|
LAYERDEPENDS_zephyrbsp = "zephyrcore core meta-python"
|
||||||
|
|
||||||
|
LAYERSERIES_COMPAT_zephyrbsp = "dunfell gatesgarth hardknott honister"
|
||||||
|
|
||||||
|
X86_TUNE_DIR = "${@bb.utils.contains('LAYERSERIES_CORENAMES', 'honister', 'include/x86', 'include', d)}"
|
||||||
119
meta-zephyr-core/README.txt
Normal file
119
meta-zephyr-core/README.txt
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
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
|
||||||
@@ -5,16 +5,16 @@ BBPATH .= ":${LAYERDIR}"
|
|||||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "zephyr"
|
BBFILE_COLLECTIONS += "zephyrcore"
|
||||||
BBFILE_PATTERN_zephyr = "^${LAYERDIR}/"
|
BBFILE_PATTERN_zephyrcore = "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_zephyr = "6"
|
BBFILE_PRIORITY_zephyrcore = "6"
|
||||||
|
|
||||||
# This should only be incremented on significant changes that will
|
# This should only be incremented on significant changes that will
|
||||||
# cause compatibility issues with other layers
|
# cause compatibility issues with other layers
|
||||||
LAYERVERSION_zephyr = "1"
|
LAYERVERSION_zephyrcore = "1"
|
||||||
|
|
||||||
LAYERDEPENDS_zephyr = "core meta-python"
|
LAYERDEPENDS_zephyrcore = "core meta-python"
|
||||||
|
|
||||||
LAYERSERIES_COMPAT_zephyr = "dunfell gatesgarth hardknott honister"
|
LAYERSERIES_COMPAT_zephyrcore = "dunfell gatesgarth hardknott honister"
|
||||||
|
|
||||||
X86_TUNE_DIR = "${@bb.utils.contains('LAYERSERIES_CORENAMES', 'honister', 'include/x86', 'include', d)}"
|
X86_TUNE_DIR = "${@bb.utils.contains('LAYERSERIES_CORENAMES', 'honister', 'include/x86', 'include', d)}"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# SPDX-FileCopyrightText: Huawei Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
SUMMARY = "Python colorama"
|
||||||
|
HOMEPAGE = "https://pypi.org/project/colorama"
|
||||||
|
DESCRIPTION = "Makes ANSI escape character sequences (for producing colored \
|
||||||
|
terminal text and cursor positioning) work under MS Windows."
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b4936429a56a652b84c5c01280dcaa26"
|
||||||
|
|
||||||
|
inherit pypi setuptools3
|
||||||
|
|
||||||
|
PYPI_PACKAGE = "colorama"
|
||||||
|
SRC_URI[md5sum] = "57b22f2597f63df051b69906fbf310cc"
|
||||||
|
SRC_URI[sha256sum] = "5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"
|
||||||
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# SPDX-FileCopyrightText: Huawei Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
SUMMARY = "Python library for Intel HEX files manipulations"
|
||||||
|
LICENSE = "BSD-3-Clause"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4eba844696655c3eae07aca8e3a94772"
|
||||||
|
|
||||||
|
SRC_URI[sha256sum] = "892b7361a719f4945237da8ccf754e9513db32f5628852785aea108dcd250093"
|
||||||
|
|
||||||
|
inherit pypi setuptools3
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# SPDX-FileCopyrightText: Huawei Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
SUMMARY = "Python lpc_checksum"
|
||||||
|
HOMEPAGE = "https://pypi.org/project/lpc_checksum"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=85c86965b0249c221935f585c0313d60"
|
||||||
|
|
||||||
|
inherit pypi setuptools3
|
||||||
|
|
||||||
|
PYPI_PACKAGE = "lpc_checksum"
|
||||||
|
SRC_URI[md5sum] = "eef81888414a111e1fd5992b8614b6cb"
|
||||||
|
SRC_URI[sha256sum] = "1f2fb198483cc718141f1aa0ed4717fd188e29874d7db0409d1ed04358b64185"
|
||||||
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
Reference in New Issue
Block a user