Naveen Saini 50fd22800f zephyr-kernel/2.6.0: update to include latest commits
Switched to v2.6-branch. It included x86 EFI binary fix.

It requried rebasing of yocto toolchain patch.

Commits included:
837ab4a915 ARC: save/restore accumulator registers on all ARCv2 HS CPUs by default
0943608550 riscv: openisa_rv32m1: Fix booting of rv32m1_vega
3c56e0df0b cmake: ld: Disable manual linking of libgcc components for host
b0cb7412b9 cmake: host-gcc: Remove libgcc library path resolution
80e1b785dc cmake: host-gcc: Detect libgcc for all archs
e72a327107 cmake: gcc: Remove no_libgcc exclusion for libgcc detection
1cf1d75d3f Bluetooth: Controller: Fix Data Length Update node Rx reservations
e43afd10f7 Bluetooth: Controller: Fix free rx buffer MFIFO enqueue
6d9b318dca Bluetooth: Controller: Minor change to use IS_ENABLED
d4d362d081 doc: api: fix devicetree modification version
d0dca15734 arch/x86/zefi: Fix entry-nop hack for EFI entry
218e438f3e drivers: bluetooth: hci driver for stm32wb includes clock control
f66d0cea06 Tracing: TraceRecorder CMake update
d5a1a22b1a python-devicetree: tox: fix mypy
c77f8fae83 doc/guides/dts: bindings: Fix code snippet for 'signal-gpios'
3ec1caa504 dts/arm: st: g0: closes parenthesis for soc
a221f358eb drivers: flash_stm32_v1: fix a potential unaligned access
f5a6110b4a tests: cpp: libcxx: Test with full and nano variants of newlib
1d6106fd5e tests: cpp: libcxx: Use full version of newlib for testing
4b87e90167 cpp: Fix C++ exception handling newlib dependency
1d4d16b748 linker: cpp: Fix C++ exception handling info section linking
4a564cdef0 version: add EXTRAVERSION to VERSION file

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-07-08 15:33:47 +08:00
2017-01-04 11:10:46 -08:00

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
Description
No description provided
Readme 604 KiB
Languages
PHP 46.1%
BitBake 30.8%
Python 19%
Shell 1.4%
Jinja 1.3%
Other 1.4%