microPlatform update 33

Posted on Nov 8, 2018

7 min read

Summary

Zephyr microPlatform changes for 33

The push towards v1.14 continues; MCUboot supports nRF52840 Dongle.

Linux microPlatform changes for 33

LMP Unified Linux Kernel updated to the 4.18.16 stable release. Core layer updates based on the latest OE/Yocto master/thud changes. Initial support for the 96Boards HiKey960 board.

Zephyr microPlatform

Highlights

  • Zephyr v1.14 development snapshot
  • MCUboot with support for the nRF52840 PCA10059 Dongle
  • Sample applications get some binary size reduction

Components

MCUboot

Features

nRF52840 PCA10059 Dongle support

Support for the nRF52840 PCA10059 Dongle was added which allows users to update their devices w/o the use of a SEGGER J-Link.

Bugs

Zephyr build fix due to upstream changes

Due to a change in upstream Zephyr a missing declaration for sys_clock_disable was added.

Zephyr

Features

Segger RTT support arrives for Logger and new shell subsystem

Previously supported with SYS_LOG, we now have Segger RTT support as a backend for Logger as well as the new shell subsystem. There are a few CONFIG knobs worth researching if you plan on using this feature:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/logging/Kconfig#L297

Logger migration continues

The Bluetooth subsystem and related samples/tests were notably missing from the last update with regard to Logger changes. That has been remedied. Also migrated were the qdex_nrfx sensor, ms5837 sample, and the net subsystem removed the last of the SYS_LOG usage.

Sockets migration for CoAP

A POSIX socket friendly implementation of the CoAP library was introduced. This new implementation uses fixed size "flat buffers" instead of the net_pkt / net_buf structures. It simplifies the code and makes it easier to maintain in the future. Also added were socket-based samples for coap_client and coap_server along with related tests. CONFIG_COAP_SOCK is the enabler config for this new implementation.

"Getting Started" documentation overhaul

The getting started documentation at https://docs.zephyrproject.org/latest/getting_started/getting_started.html saw an overhaul to fix the following issues and clean the language.

  • Reader needed to jump forward and backward in the documents depending on what their system already has installed.
  • Several sections such as operating setup guides and toolchain setup instructions had duplicated content.
  • Linux documentation across several distros was incomplete.
  • The requirements for building the documentation was not clearly separated from the requirements to build Zephyr.
  • The toolchain setup documenation is confusing, incomplete and scattered.
More MISRA C compliance work

Continuing the push towards meeting MISRA (Motor Industry Software Reliability Association) C compliance, several kernel areas received changes including kernel device, queue, alert, mutex and include/dlist.h areas.

New reel_board Bluetooth Mesh sample

At the ELC-Europe Zephyr Hackathon, a mesh badge sample was demonstrated on the reel_board (nRF52840-based HW) showing off some of the badge's capabilities along with Bluetooth Mesh. The source lives under samples/boards/reel_board/mesh_badge.

nRF5 entropy driver rework

This update sees some significant rework of the nRF5 entropy driver. The changes include:

  • Move to HAL functions for register access vs. accessing the HW registers directly as the HAL includes barriers where needed to ensure changes are reflected immediately.
  • A HW access race condition was addressed.
  • Function names were cleaned up to be more accurate.
  • Random number pool implementation was replaced to improve efficiency and eliminate race conditions.
  • Implemented several optimizations to elminiate excessive dereferences.
FRDM-KW41Z BLE low energy development kit enabled as a "shield"

NXP added a shield configuration to support the FRDM- KW41Z BLE low energy development kit which can be stacked onto other boards via Arduino compatible headers. Support can be enabled via the CONFIG_SHIELD_FRDM_KW41Z=y config.

Other board enablement news
  • disco_l475_iot1 now supports the es-WiFi module
  • Added a new ST board: nucleo_f746zg

Bugs

USBD regression fixed

USBD rework for nRF52 SoCs introduced a TX timeout bug which is now fixed. This affected such samples as bluetooth/hci_usb and net/wpanusb.

Handful of Bluetooth subsystem fixes

The bluetooth subsystem saw a few fixes involving out-of-scope pointer usage, an integer overflow and uninitialized scalar variables in the shell.

nrf52_bsim avoids a NULL pointer issue

The nrf52_bsim board fixed a possible NULL pointer dereference.

Logger out-of-bounds write issue

Logger had an out-of-bounds write in log_strdup which was fixed.

Various fixes to the shell subsystem

Shell subsystem saw various fixes to the history feature, assert in wildcard plugin, TXDONE signal not being cleared and some typos.

Network subsystem discards various kinds of "bad" packets

The network subsystem saw several patches to weed out various kinds of packets under certain circumstances. Examples are:

  • IPv4: drop packet if source address is broadcast one
  • IPv6: interface scope multicast destination address packet
  • IPv6: zero scope multicast packet
  • IPv6: site scope multicast destination address packet
  • IPv6: organisation scope multicast destination address packet
  • ICMPv6: verify checksum before accepting packet

hawkBit and MQTT sample application

Features

Not addressed in this update

Bugs

Binary size reduction

With the changes to Logger upstream, the binary size of the Hawkbit-MQTT sample had grown quite shockingly. We've toned down that growth via the CONFIG_LOG_DEFAULT_LEVEL=0 setting.

LWM2M sample application

Features

Added a script to perform automated reboot testing via Leshan

Example to setup reboot testing for 6 devices connected to a Leshan server running on 192.168.0.1 port 8081: python3 zephyr-fota-samples/dm-lwm2m/scripts/reset_targets.py -l 50 -t 6 -host 192.168.0.1 -port 8081

See "python3 zephyr-fota-samples/dm-lwm2m/scripts/reset_targets.py --help" for more information.

Bugs

Binary size reduction

With the changes to Logger upstream, the binary size of the LwM2M sample had grown quite shockingly. We've toned down that growth via the CONFIG_LOG_DEFAULT_LEVEL=0 setting.

Leshan script cleanup

To avoid copy/paste errors in the future, several differences in the reset_targets script were applied to the Leshan script:

  • Call the interrupt handler setup in main()
  • Check for 200 and 201 response.status consistently
  • Use sys.exit() instead of exit()
  • Use response.json() instead of json.loads(response.content)
  • In "put" method use json parameter instead of data=json.dumps(data)
Re-enabled the Modem shell

In our last update the modem shell driver was in the process of being converted to the new subsystem. That's now been merged and the modem shell is re-enabled for the dm-lwm2m sample.

Linux microPlatform

Highlights

  • LMP Unified Linux Kernel updated to 4.18.16.
  • Core layer series now compatible with the OE/Yocto thud release.
  • OE-Core build security flags are now enabled by default in LMP.
  • Initial support for the HiKey960 board.

Components

Meta Freescale

Features

Layer Update

Linux-fslc updated to 4.18. NXP BSP updated to L4.9.123-2.3.0_8mm_ga. New machine definition for for imx8mmevk. Qoriq BSP updated to LSK v18.09. U-boot-fslc updated to the 2018.09-based fork.

Bugs

Not addressed in this update

Meta Virtualization

Features

Layer Update

LXC updated to 3.0.2.

Bugs

Not addressed in this update

Meta RISC-V

Features

Layer Update

Initial u-boot support for qemuriscv64.

Bugs

Not addressed in this update

Meta Yocto

Features

Layer Update

Linux-yocto updated to 4.18.

Bugs

Not addressed in this update

OpenEmbedded-Core Layer

Features

Layer Update

Bash updated to 4.4.23. Go 1.10 recipes removed in favor of 1.11.1. Glibc updated to the 2.8-044c96f0d5 revision. Valgrind updated to 3.14.0.

Bugs

elfutils

Multiple issues.

libsndfile1

Stack-based buffer overflow in psf_memset in common.c in libsndfile 1.0.28.

qemu

Multiple issues.

binutils

Multiple issues.

Meta OpenEmbedded Layer

Features

Layer Update

Dracut updated to 049. Hwdata updated to 0.316. Udisks2 updated to 2.7.8. Wireshark updated to 2.6.4.

Bugs

python3-requests

The Requests package before 2.20.0 for Python sends an HTTP Authorization header to an http URI upon receiving a same-hostname https-to-http redirect, which makes it easier for remote attackers to discover credentials by sniffing the network.

Meta Updater Layer

Features

Layer Update

Added support for setting custom OSTree commit subject and body. Aktualizr updated to the 39acfec48d revision. Otaimg image renamed to ota-ext4 in order to simplify the image build process.

Bugs

Not addressed in this update

Meta LMP Layer

Features

Layer Update

Added initial support for the HiKey960 board. LMP Unified Linux Kernel updated to 4.18.16. OE-Core security flags are now enabled by default in LMP.

Bugs

Not addressed in this update

Related posts