366 Commits

Author SHA1 Message Date
Amit Kucheria
c1622d9548 zephyr-coap-client: Add recipe for CoAP client
This sample application provides an example coap-client using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-23 11:03:47 +08:00
Amit Kucheria
f92b08d05e zephyr-coap-server: Add recipe for CoAP server
This sample application provides an example coap-server using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-23 11:03:47 +08:00
Stefan Schmidt
c904d23d71 zephyr-kernel: Add OpenThread add module to build
OpenThread support in Zephyr is realised as an external module. Make
sure we pull it in and have it available for applications to use it.

Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:29:01 +08:00
Davide Ricci
00d8b2fbf3 zephyr-blinky: add sample app recipe
Blinky is the most referenced sample in Zephyr's documentation and
recall Arduino's first sketch example. This .bb file allows to build
such example.

Signed-off-by: Davide Ricci <davide.ricci@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:18:31 +08:00
Nagesh Shamnur
5660376db7 zephyr-flash-bossac.bbclass: Enable board flashing via bossac
Currently only dfu and pyocd flashing are supported. Some boards
such as Arduino Nano 33 BLE can be flashed via bossac which is
released by Arduino repo. Find the installed Arudino version of
bossac and flash using that tool.

Signed-off-by: Nagesh Shamnur <nagesh.shamnur@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:14:34 +08:00
Nagesh Shamnur
6e155307b8 arduino-nano-33-ble.conf: Add Arduino Nano 33 BLE and BLE Sense support
Signed-off-by: Nagesh Shamnur <nagesh.shamnur@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:14:34 +08:00
Nagesh Shamnur
098501ca0e zephyr-kernel: install .bin image if available
Some boards (e.g. Arduino Nano 33 BLE) require image in bin format
for flashing with `-c flash_usb`. Provide that image along with ELF
image on do_deploy step.

Signed-off-by: Nagesh Shamnur <nagesh.shamnur@huawei.com>
Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:14:34 +08:00
Nagesh shamnur
fce191d5c7 zephyr-kernel-test: fix Cortex-M tests failure with 2.6.0 kernel
Edit the test recipe removing obj_tracing tests that have
been removed from Zephyr 2.6.0 release.

Signed-off-by: Nagesh Shamnur <nagesh.shamnur@huawei.com>
Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-15 14:14:34 +08:00
Naveen Saini
cf5dde0416 zephyr-kernel-src: drop 2.4.0 support
v2.6.0 is available now.

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Naveen Saini
8e1781058d zephyr-kernel-src-2.4.0.inc: add srcrev for mbedtls module
Ref: https://github.com/zephyrproject-rtos/zephyr/blob/zephyr-v2.4.0/west.yml#L93

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Naveen Saini
dab78807cb zephyr-kernel-src-2.6.0.inc: add srcrev for mbedtls module
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Wojciech Zmuda
530e0a46c5 zephyr-kernel-src set default preferred version to 2.6.0
Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com>
2021-06-10 11:34:21 +08:00
Wojciech Zmuda
426c7d9db3 zephyr-kernel-src: add 2.6.0 release
Zephyr 2.6.0 release notes:
  https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.6.0

Update the following submodules to most recent revisions:
- hal_nordic:
    nrfx_dppi: Fix variable used in logging function
- hal_stm32:
    dts/st: use a pull-down for SPI SCK pin
- openamp:
    lib: update open-amp lib to release v2021.04.0
- libmetal:
    lib: update libmetal to release v2021.04.0 + VERSION path fix

Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Amit Kucheria
a55ccd8097 zephyr-mqtt-publisher: Add recipe for mqtt publisher
This sample application provides an example of using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Amit Kucheria
f9fcc08ec4 zephyr-websocket-client: Add recipe for websocket client
This sample application provides an example of using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Amit Kucheria
61cc9c3a98 zephyr-http-client: Add recipe for http client
This sample application provides an example of using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Amit Kucheria
df7b83f4e9 zephyr-echo-client: Add recipe for echo client
This sample application provides an example of using the the MBEDTLS library.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Amit Kucheria
20e58fedfe zephyr-kernel: Clone mbedtls
MBed TLS is a library that implements cryptographic primitives and
SSL/TLS and DTLS protocols that are needed in secure network
communications.

Add it to the kernel include files to build and link against
applications that need mbedtls.

Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-06-10 11:34:21 +08:00
Naveen Saini
630783f77c zephyrtargetcontrol.py: fix testimage 'testimage_dump_monitor' argument issue
Error log:
Exception: TypeError: __init__() got an unexpected keyword argument 'testimage_dump_monitor'

Ref:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=3acbec85b00d693d2d731bc2b09cc40be1cc68e9

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-27 17:59:59 +08:00
Naveen Saini
3ef4794c14 qemu-x86: set new -machine value for QEMU
-machine type=pc-1.3 is deprecated with QEMU 5.1.0

Error:
machine runqemu - ERROR - Failed
to run qemu: qemu-system-i386: unsupported machine type

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-24 10:40:19 +08:00
Jon Mason
48c5116712 qemuzephyrrunner.py: use existing qemu conf file
Read the generated QEMU conf file, instead of using hard coded values.
This allows for machines not conforming to the hard coded values to work
with testimage.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-21 09:41:26 +08:00
Naveen Saini
99a97250cc acrn.conf: drop acrn machine configuration
zephyr can be build for 'acrn' with following configuration:

MACHINE = "intel-x86-64"
ZEPHYR_BOARD = "acrn"

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-21 09:01:50 +08:00
Naveen Saini
98663003d7 intel-x86-32.conf: add common MACHINE for x86 (32-bit) BOARDS
User need to specify board value to ZEPHYR_BOARD in local.conf
ZEPHYR_BOARD = "minnowboard"

By default it set to MinnowBoard Max 'minnowboard'

Currently 32-bit supported boards:
* up_squared_32
* minnowboard

Ref:
https://docs.zephyrproject.org/latest/boards/x86/index.html

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-21 09:01:41 +08:00
Naveen Saini
4ac860b668 intel-x86-64.conf: add common MACHINE for x86 (64-bit) BOARDS
User need to specify board value to ZEPHYR_BOARD in local.conf
ZEPHYR_BOARD = "ehl_crb"

By default it set to Elkhart Lake CRB 'ehl_crb'

Currently 64-bit supported boards:
* up_squared
* ehl_crb_sbl
* ehl_crb
* acrn
* acrn_ehl_crb

Ref:
https://docs.zephyrproject.org/latest/boards/x86/index.html

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-21 09:01:35 +08:00
Naveen Saini
d0fbbf564e zephyr-kernel-src: fix efi generation failure for x86 boards
With zephyr v2.5.0, EFI binary support has been added for x86 board (64-bit mode).

To achieve this, an python tool[1] has been added to convert zephyr ELF file
into an EFI appliable. But currently this does not work with Yocto
cross-compilation env.
This patch fix this issue and allow to build zephyr.efi

Ref:
[1]928d31125f

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-21 09:01:28 +08:00
Wojciech Zmuda
344aef067a nrf52840dk-nrf52840.conf: Add nRF52840 DK support
Add support for Nordic Semiconductor nRF52840 Development
Kit board.

This is a generic MACHINE over nRF52 SoC family config
plus PyOCD flashing ability.

Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-20 16:43:32 +08:00
Wojciech Zmuda
f0124603c5 nrf52832.inc: Rename to nrf52.inc
The file is so generic anyway it can be targeted for
the nRF52 family without any harm.

Signed-off-by: Wojciech Zmuda <wojciech.zmuda@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-20 16:43:32 +08:00
Andrei Gherzan
5e4e7a1939 zephyr-qemuboot.bbclass: Remove dependency on qemu-system-native
runqemu only really needs the sysroot for qemu-helper-native. Pulling
other qemu dependency would get into a racing issue with rm_work. That
can also be fixed by tweaking the do_addto_recipe_sysroot order in
oe-core for qemu-system-native but that is just not needed for this
specific dependency requirement.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-18 12:01:11 +08:00
Andrei Gherzan
5461dda2ce zephyr-qemuboot.bbclass: Don't overwrite the entire elf dictionary key
The nios2_machdata_setfunc was overwriting the elf key in matchdata for
arc done in arc_machdata_setfunc which in turn was overwriting the one
from oe-core. This is making qemu-x86 builds (as an example)
unbuildable:

Exception: KeyError: 'i586'

This patch makes sure that the changes complement the machdata
dictionary as opposed to overwriting the entire "elf" key.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-18 12:01:11 +08:00
Naveen Saini
df6d40ed40 zephyr-kernel-src: switch from master branch to main
* branch was renamed in upstream repo

It fixes do_fetch failure

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-17 19:14:27 +08:00
Andrei Gherzan
981871dddf zephyr-qemuboot.bbclass: Fix runqemu dependency on qemu native sysroot
The runqemu script depends on having the native sysroot populated for
the qemu recipes. Add the required dependency to the mix.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-05-12 21:06:09 +08:00
Jon Mason
678600bee6 qemuzephyrrunner.py: add tmpfsdir support
OE-Core rev: fd1c26ab426c3699ffd8082b83d65a84c8eb8bff added an
additional parameter, tmpfsdir, to the API.  This caused testimage to no
longer work in meta-zephyr.  Add that parameter and everything is happy
now.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-04-27 10:46:58 +08:00
Zbigniew Bodek
15c5eea4ca zephyr-flash-pyocd.bbclass: Fix problems with flashing particular boards
By default, pyocd uses generic target type called "cortex_m" which
should be able to connect and debug but not flash the memory.
Normally pyocd would warn us of using default target instead
of proper one but this message wasn't displayed.

Despite not providing target type, flashing process succeeded
but results were undefined. On Nitrogen, sometimes it worked
(especially for small images) and sometimes the programmed
device crashed miserably.

Fix flashing operation by providing pyocd target type acquired from
the conditional PYOCD_TARGET variable declared for each machine
(chip family).

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-04-15 08:05:02 +08:00
Andrei Gherzan
d52c30f411 zephyr-kernel-src.inc: Support samples from external layers
The inc file references patch(es) local to the inc file. Including this
file from another recipe as part of an external layer, will make bitbake
fail finding the files referenced in zephyr-kernel-src.inc's SRC_URI.

By including an explicit path to the files directory in FILESEXTRAPATHS,
we make sure that any recipe including this inc file will inherit the
needed path.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-03-31 13:17:09 +08:00
Jon Mason
dcad4183b0 layer.conf: add hardknott compatibility
Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-03-23 15:45:35 +08:00
Naveen Saini
8f26958025 zephyr-kernel-src.inc: set default preferred version to 2.5.0
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-22 08:24:39 +08:00
Naveen Saini
e641398c0b zephyr: upgrade 2.5.0-rc4 -> 2.5.0
Release notes:
https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.5.0

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-22 08:24:39 +08:00
Andrei Gherzan
be40637075 README.txt: Fix small typo in email subject prefix
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
7f0a291ee7 zephyr-kernel-src: Upgrade 2.5.0-rc3 to rc4
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
8d54c98cc2 zephyr-flash-pyocd.bbclass: Implement configurable probe IDs to program
Implement logic to configure what probes to program based on the
PYOCD_FLASH_IDS variable:
1. by default program all attached probes
2. change default behaviour by listing the probe IDs to flash

CONNECT_TIMEOUT_SECONDS was also renamed to maintain consistency with
the PYOCD_FLASH_IDS variable.

One can query the IDs using `pyocd list`.

The value of PYOCD_FLASH_IDS can also be injected into the datastore
using BB_ENV_EXTRAWHITE.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
7dcb47371b zephyr-flash-pyocd.bbclass: Handle import error for pyocd modules
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
bdbe1a04c1 zephyr-flash-pyocd.bbclass: Flash the first probe found with a timeout
Currently the code flashes the firmware in a blocking way. If the host
is not configured accordingly (for example in terms of permissions),
this would hang undefinitely. This can easily confuse users and in order
to avoid this, the patch changes to unblocking session creation and
opening call, wrapping the tries in some relevant logging. The timeout
can be defined with `CONNECT_TIMEOUT_SECONDS` which defaults to 30
seconds.

Also, by default, when multiple probes are attached, the session call
will return a selection choice. This would obviously break under bitbake
with an exception:
    Exception: EOFError: EOF when reading a line
Avoid this by selecting the first found probe.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
281d492b50 zephyr-peripheral-hr: Add recipe for BT HR sample
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
c990a39b3a Use an include file for the common parts of the sample recipes
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:02 +08:00
Andrei Gherzan
146e16bafb zephyr-kernel.inc: Remove include file
This file has little advantage and can be easily replaced by just
directly including the src include file.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00
Andrei Gherzan
081024fd56 zephyr-kernel-common.inc: Reformat EXTRA_OECMAKE
This will improve diffs readability in the future.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00
Andrei Gherzan
e59eee66b0 zephyr-kernel-common.inc: Fix configuration CPPFLAGS warning
Configure warns when CPPFLAGS is provided as environment variable and
expects its value to be passed to cmake. This patch does that to
surpress the warning.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00
Andrei Gherzan
dc0daf2d3d zephyr-kernel-src-2.5.0-rc3.inc: Add support for zephyr kernel version 2.5.0-rc3
This version can be selected defining
PREFERRED_VERSION_zephyr-kernel ??= "2.5.0-rc3"

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00
Andrei Gherzan
d81e72c050 zephyr-kernel-src: Restructure recipe
* Restructure recipe to use include files as opposed to a bbclass. The
  latter is unnatural when defining versions, sources etc.
* Make the zephyr-kernel-src follow the version as defined by
  PREFERRED_VERSION_zephyr-kernel.
* Make the setup of the zephyr-kernel-src.inc extensible for multiple
  versions.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00
Andrei Gherzan
1ebcb8a34b Cleanup superflous new lines
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2021-02-17 11:51:01 +08:00