Quantcast
Channel: Boundary Devices
Viewing all 391 articles
Browse latest View live

Remote access to Nitrogen8 boards with ShellHub

$
0
0

Boundary Devices is excited to release this blog post in partnership with O.S.Systems to show how to remotely access your Nitrogen devices using ShellHub!

This article will help those who want to start, create, or prototype an IoT or embedded project and reviews considerations like: security, agility, and remote access. We know sometimes people get lost facing all the different options the market offers, leaving behind features that could add real value to their products.

Do you want to know how to get through all the options quickly & easily focusing on your goals?

If so, please check the tips & suggestions we have prepared for you below.

Remote accessing a device

In this article, we’ll show you how to add a safe and agile remote access service for ShellHub to the Nitrogen8M Mini SBC.

ShellHub is a recent tool released by O.S.Systems that provides remote connections through SSH in a friendly way.

Besides making remote access easy, ShellHub offers various features that allow group users to access a set of devices using namespaces, manage firewall rules, record and playback sessions, use public keys to access devices, and much more.

Note: we used a Nitrogen8M Mini here, but the instructions are compatible with any Boundary Devices platform.

1. First step: creating a Shellhub account

First of all, it’s necessary to create an account on the ShellHub server, also called by ShellHub Cloud. You’ll need an account to get the TENANT_ID used to identify the ShellHub agent and register it in ShellHub Cloud.

The ShellHub agent is the application installed in devices responsible for connecting them to the ShellHub Cloud. There are three ways to install it. Here we’ll use the easiest one: using Docker.

When you log in, a help screen will indicate the following steps to add devices, as shown in the image below:

If you already use Docker, just skip the next section.

2. Installing Docker

To install and set up Docker, you can run the following steps in Ubuntu Focal or Debian Buster, and in both, the Shellhub will work correctly.

Note: In case you are running the Debian Buster image, pay attention to the 2.1.1 section below

First, check if the operating system is updated:

$ sudo apt update

To install Docker and curl command run this line:

$ sudo apt install docker.io curl

Initialize the Docker:

$ sudo systemctl start docker

Add the user permission for your user:

$ sudo usermod -aG docker ${USER}
$ su - ${USER}

2.1. Debian Buster specific: setting iptables as default firewall tool

An error may occur due to the incompatibility of Docker and Debian with network settings.

Docker uses the iptables, and Debian Buster may use iptables and nftables, but the default is nftables.

So, to fix it, run the commands below to change the setting:

$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
$ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

These commands change the subsystem type used. Then reboot the board.

3. Adding devices

With Docker installed, log on ShellHub and just copy the command line available in the help screen or access Add device button:

You also may take the TENANT_ID in the top-right button on the Dashboard and type the command below:

$ sudo curl -sSf "https://cloud.shellhub.io/install.sh?tenant_id=TENANT_ID" | sh

3.1 Accepting devices in the Cloud

After adding the ShellHub agent on board, the device will be available in the Devices section (see it below), and you’ll be able to accept or reject the device.

All your allowed devices will be available in the Devices section to access them quickly whenever you need them. Easy, right?

4. Accessing devices

Many Linux users prefer using the Linux terminal to access remote machines and devices.

ShellHub allows access to devices from both the ShellHub Cloud terminal and your local terminal. So you can choose the best option.

4.1. By Cloud terminal

To access your devices using the ShellHub Cloud terminal, just click on Devices in the sidebar, choose the device you want to access, and click on the terminal icon.

4.2. By local terminal

If you prefer to access your devices using your local terminal, open it up and run the SSH command with the ShellHub device identity, the TENANT_ID, running:

$ ssh <device user name>@SSHID

Take a look below:

With a few steps, you have a great and innovative project ready to grow. With Shellhub installed and set up on Boundary Devices powerful boards, you’re ready to access and manage your devices from anywhere and create unique and modern products.

We invite you to read about Boundary Devices portfolio of products and take a look at the Shellhub site to know more about the great things you can do.

But if you’re interested in other ways to innovate using Boundary Devices and ShellHub, take a look at this article to learn how to set up the ShellHub agent support in a Yocto Project image. You’re going to love it!

If you have any issues, please email contato@ossystems.com.br!

The post Remote access to Nitrogen8 boards with ShellHub appeared first on Boundary Devices.


Buildroot 2021.05 release for i.MX platforms

$
0
0

Buildroot 2021.05 has been published and we’re excited to share new images!Buildroot

For the impatient

You can download pre-built Buildroot 2021.05 images from here:

In order to flash those images you can follow our video on this topic:

Or for those fluent in command lines, you can simply use zcat:

~$ zcat 2021*br2021.05-nitrogen*.img.gz | sudo dd of=/dev/sdX bs=1M

What’s new?

Buildroot 2021.05 release

It would be too long of a list to enumerate all the changes Buildroot went through since the last release.

For recent changes, we invite you to check the last release announcement:

We’ll focus on the i.MX changes for this release in the next sections.

Boundary Devices layer

As usual, we provide our own Boundary Devices external layer:

This includes the following custom configurations

i.MX 8M Plus

This release marks the first version to support our i.MX 8M Plus based Nitrogen8M Plus SOM!

Not everything is supported yet but the main components are:

  • 2D & 3D GPU
  • VPU for decoding
  • ISP for camera (Basler daA3840)

The components that aren’t supported at this stage are:

  • VPU encoding
  • NPU (AI/ML)

We hope to add those features in our next releases.

New features

Buildroot 2021.05 includes the following versions of packages:

  • BlueZ5 5.58
  • GStreamer 1.18.4
  • GStreamer-imx v0.13.0 for i.MX6
  • GStreamer-imx v2.0 for i.MX8M
    • Now supporting G2D transform!
  • imx-codec 4.3.5
  • imx-gpu-viv 6.4.3.p1.2
  • imx-vpu-hantro 1.21.0 for i.MX8M
  • imx-vpu-hantro-vc 1.3.0 for i.MX8MP
  • imx-vpu 5.4.39.1 for i.MX6
  • Linux kernel 5.4.x_2.3.0
  • qcacld-2.0 LEA-2.0 Wi-Fi driver
  • Qt5 5.15.0
  • Wayland 1.18.0
  • Weston 9.0.0

There are a few differences between Yocto and Buildroot releases at this stage:

  • Buildroot images use standard packages without NXP modifications
    • This applies to GStreamer, Weston, libdrm, wayland etc…
    • The main drawback is that Weston can’t be used with G2D
    • The (big) advantage is that it makes the codebase much easier to maintain, being able to use all the latest packages without having to be stuck at an earlier version chosen by NXP
  • Open-source gstreamer-imx plugin is used instead of NXP forks
    • This allows us to have imx-related changes for GStreamer in 1 package only

Build procedure

Just like our Yocto image, we now use a Docker file to build our images on our Jenkins server so that everyone can use the exact same environment. This ensures reproducible builds without having to think about missing dependencies.

If interested in using this approach, we invite you to read the following blog post using the following docker file:

Otherwise you can follow Buildroot documentation to know the host requirements:

Once your development environment is setup properly, you can

  1.  Download the source code. To ease the repo cloning process, we decided to create a manifest to match what is done for Yocto/Android:
~$ sudo apt-get install repo
~$ mkdir ~/br2021.05 && cd br2021.05
~/br2021.05$ repo init -u https://github.com/boundarydevices/buildroot-manifest -b 2021.05.x
~/br2021.05$ repo sync
  1. Create an output folder for your configuration:
~/br2021.05$ make BR2_EXTERNAL=$PWD/buildroot-external-boundary/ 
  -C $PWD/buildroot/ O=$PWD/output nitrogen8mm_qt5_gst1_defconfig
~/br2021.05$ cd output
  1. Build the image
~/br2021.05/output$ make
  1. Your image is now ready!
~/br2021.05/output$ ls -l images/sdcard.img
~/br2021.05/output$ sudo dd if=images/sdcard.img of=/dev/sdX bs=1M

Testing the image

As usual, the login for this image is root with no password.

The external repository README details many commands that can be tested on the image.

  • Once booted up, the Weston desktop should appear automatically, from there you can start a 3D test to ensure GPU acceleration
# cd /usr/share/examples/viv_samples/vdk/
# ./tutorial7 -h 720

  • Then you can start the Qt5 Cinematic Demo which is a known GPU stress-test as it includes many effects
# CinematicExperience-demo -platform wayland
    • Here you might need to adapt the demo resolution, here are the commands used for our 1280×800 MIPI display
# sed -i 's/1920/1280/' /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience.qml
# sed -i 's/1080/720/' /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience.qml

  • You can also check the GStreamer VPU acceleration by decoding the well known Big Buck Bunny video
# wget http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi -P /root/
# gst-launch-1.0 filesrc location=/root/trailer_1080p_h264_mp3.avi ! 
  decodebin ! waylandsink

  • If you have our OV5640 5MP MIPI camera, you can check the GStreamer video capture
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! 
  waylandsink

  • As for Wi-Fi connectivity, the image embeds the minimum to get you started
# wpa_passphrase MYSSID MYPASSWORD >> /etc/wpa_supplicant.conf
# /etc/init.d/S50wpa-supplicant stop
# sleep 1
# /etc/init.d/S50wpa-supplicant start

# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
SSID: MYSSID
freq: 5660
RX: 47685 bytes (747 packets)
TX: 2054 bytes (0 packets)
signal: -58 dBm
tx bitrate: 150.0 MBit/s MCS 7 40MHz short GI
# udhcpc -i wlan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.1.46
udhcpc: lease of 192.168.1.46 obtained, lease time 86400
deleting routers
adding dns 192.168.1.1
# ping google.com -I wlan0
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=116 time=6.971 ms
64 bytes from 216.58.198.206: seq=1 ttl=116 time=13.145 ms
...
  • Finally, if you want to use Bluetooth connectivity, the procedure goes as follows
# echo 0 > /sys/class/rfkill/rfkill0/state
# sleep 1
# echo 1 > /sys/class/rfkill/rfkill0/state
# hciattach /dev/ttymxc0 qca 2000000 -t30 flow
Current Product ID: 0x00000008
Current Patch Version: 0x0111
Current ROM Build Version: 0x0302
Current SOC Version: 0x00000023
qca_soc_init: Rome Version (0x03020023)
====================================================
TLV Type               : 0x1
Length                 : 48668 bytes
Total Length           : 48412 bytes
Patch Data Length      : 48388 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x03e8
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Change Vendor Baud from 0x0e to 0x0d
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
# echo 1 > /sys/class/rfkill/rfkill2/state
# hciconfig hci0 up
# hcitool scan
Scanning ...
48:C1:AC:00:D7:DCVoyager PRO+

The post Buildroot 2021.05 release for i.MX platforms appeared first on Boundary Devices.

Ubuntu Focal 20.04 unified image for Nitrogen8 boards

$
0
0

 

Ubuntu 20.04 LTS Weston Compositor
Ubuntu 20.04 LTS Weston/Wayland Compositor

Boundary Devices is proud to release our new Ubuntu Focal image for all our Nitrogen8 boards!

This image uses Weston which is the reference Wayland compositor.

This image boots up the Weston compositor at start. This can be changed by disabling the service autostart, as described later in this post.

This system contains NXP licensed content, so you will need to register on our website and log in before you can accept the license agreement and download the Ubuntu Focal images for Nitrogen8 from here:

For Nitrogen8M, Nitrogen8M SOM, Nitrogen8M Mini, Nitrogen8M Mini SOM, Nitrogen8M NanoNitrogen8M Nano SOM, Nitrogen8M Plus SOM

This is a unified image for the aforementioned boards, there is no need for board specific images anymore. At the first start it will detect the board type run a configuration script. Finally, it will set all board specific parameters and apt repositories.

Important!

Before installing this image please check your U-Boot version, as it requires U-Boot version 2020.10  to be used.

Make sure to visit our wiki if you need to upgrade:

You can find the bootscript in the /boot sub-directory now, its named boot.scr. The partition labels are set if you use dd or Balena Etcher to flash the image.

If you use your own method please check the boot partition labels because the fstab boots by label (LABEL=sys-15h for example) now.  You can use e2label to modify partition label.

Programming the image

As usual, we recommend using the Balena Etcher tool to flash your SD Card / eMMC:

The uncompressed image size is slightly bigger than 5GB, you’ll need at least 8GB eMMC storage to install it.

Please watch this video for the detailed instructions:


Usernames and passwords

We predefined two users for use on the system: ubuntu and root. The password for each is Boundary (capital B). The user ubuntu has administrator rights, but you don’t need to enter password at sudo command.

We wanted to make your life easier at the cost of some security, but if you want to change that please type:

ubuntu@focal-dev64:~$ sudo visudo

Then comment out or delete the last line with “ubuntu” and “NOPASSWD:”

An ssh server is running on the system, though it does not allow password-based authentication for user root.

User ubuntu has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so :

ubuntu@focal-dev64:~$ sudo mkdir /root/.ssh
ubuntu@focal-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@focal-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported?

Since the images above include our stable 5.4.x kernel, essentially everything is supported, including:

  • Vivante GPU accelerations for Wayland
  • The Hantro Video Processing Unit supports the following decoders:
    • video/x-h265
    • video/x-vp9
    • video/x-h264
    • video/x-vp8
    • video/x-vp6-flash
    • video/mpeg
    • video/x-h263
    • video/x-flash-video
    • video/x-divx
    • video/x-xvid
    • video/x-cavs
    • video/x-wmv
    • video/x-pn-realvideo
    • video/x-raw
  • BD-SDMAC WiFi/BT modules support
  • All kind of storage devices , eMMC, SATA hdd (via USB3-SATA adapter), USB3.0/2.0 pen drives, mini PCIe devices, cell modems
  • All of our supported touch panels

The packaging (including kernel) is done in the normal ubuntu way, so apt-get update/dist-upgrade will keep your image up and running as the latest as patches come out.

What’s new in this release?

The Linux kernel was upgraded to 5.4.x_2.3.0 branch ( meta-package name: linux-boundary-18f ).
GPU driver was upgraded to Vivante 6.4.3p1.0 ( meta-package name: imx-gpu-viv-f18-… ).
The built-in galcore module has been removed (CONFIG_MXC_GPU_VIV) and we use an external galcore kernel module. This change makes the graphics system modular and more upgradeable, at the price of longer kernel upgrading time. Upgrading kernel takes about 3-4 minutes now, instead of 30 seconds, because every kernel upgrade rebuilds the galcore driver from sources, as it’s a DKMS module.
The NXP/Vivante GPU SDK was upgraded to imx-gpu-sdk 5.7.0 . You can get the source with the usual apt-get source command. The SDK has many new demos, for example OpenCL, OpenVG, and for OpenVX and Vulkan.
The distribution is Focal 20.04 LTS . Here are some main component versions of these Ubuntu Focal images for Nitrogen8:

  • Xorg server 1.20.8-2ubuntu2.7
  • gstreamer1.0 1.16.2
  • bluez 5.53-1ubuntu3
  • Qt 5.12.8
  • apt 2.0.4
  • dpkg 1.19.7ubuntu3.1
  • gcc/g++ 9.3.0-17ubuntu1~20.04
  • libwayland 1.18.0
  • weston 9.0.0-2
  • the image supports the Silex WiFi / Bluetooth module

CPU-specific package selection

This is our first unified image for the entire i.MX 8M family of processors. Since each CPU has its own specific features the OS must adapt to each platform.

That is why, during the first boot, a new selecthw service has been created to take care of selecting the proper packages needed for your platform.

For instance, for the Nitrogen8MP platform, the OS makes sure VPU encode/decode is enabled, NPU packages are added as well as the ISP service to manage the Basler daA3840 camera.

After that setup, the platform will need to reboot for those changes to be taken into account.

Thankfully, you can see the progress of that process on the display as shown below:


Network Manager

This Ubuntu Focal image comes with Network Manager by default in order to ease the Wi-Fi setup.

ubuntu@focal-dev64mp:~$ nmcli radio wifi on
ubuntu@focal-dev64mp:~$ nmcli d wifi list
IN-USE  BSSID              SSID             MODE   CHAN  RATE        SIGNAL  BA>
        A4:3E:51:08:54:F5  Jabu             Infra  1     130 Mbit/s  62      ▂▄>
        A4:3E:51:08:54:F6  Jabu_5GHz        Infra  36    405 Mbit/s  57      ▂▄>

ubuntu@focal-dev64mp:~$ sudo nmcli d wifi connect Jabu_5GHz password XXXXXX
Device 'wlan0' successfully activated with '4ed596ea-9f8c-48ea-8e0e-5e190e2fecc9'.
ubuntu@focal-dev64mp:~$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.61  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2ae4:f7d2:3cc1:486d  prefixlen 64  scopeid 0x20
        inet6 2a01:cb00:f55:7f00:3122:4891:67c4:faa7  prefixlen 64  scopeid 0x0
        inet6 2a01:cb00:f55:7f00:6c92:60ad:c2ad:68cc  prefixlen 64  scopeid 0x0
        ether 08:3a:88:20:78:cc  txqueuelen 3000  (Ethernet)
        RX packets 67  bytes 7854 (7.8 KB)
        RX errors 0  dropped 9  overruns 0  frame 0
        TX packets 69  bytes 7666 (7.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This allows you to use Wi-Fi right out of the box without any extra setup required.

i.MX 8M Plus support

This is the first Ubuntu Focal image to officially support the i.MX 8M Plus CPU and therefore our Nitrogen8MP SOM.

The support includes:

  • VPU decode/encode
  • GPU 3D & 2D support
  • NPU integration (TFLite & ARMNN)
  • ISP + Basler daA3840 support


Nitrogen 8M Mini board GPU SDK demo.

Nitrogen8M Plus board runs Vulkan Gears 3D demo

Nitrogen8M Mini board is streaming a video from YouTube

As I mentioned before, the system boots to Weston compositor.

If you don’t want to start Weston at boot automatically, you have to disable the service, you have to type the following:

ubuntu@focal-dev64:~$ sudo systemctl disable weston.service
ubuntu@focal-dev64:~$ sudo systemctl mask weston.service 

If you want to enable the autostart again you need to type:

ubuntu@focal-dev64:~$ sudo systemctl unmask weston.service
ubuntu@focal-dev64:~$ sudo systemctl enable weston.service

You can find the weston.ini file in the /etc/xdg/weston directory. Please type:

ubuntu@focal-dev64:~$ man weston.ini

Check the options and feel free to modify it to suit your needs.


Weston keyboard bindings

The Weston desktop shell has a number of keyboard shortcuts. They are listed here.

Almost all keyboard shortcuts for Weston include a specified modifier mod key which is determined in the file weston.ini (5):
[shell] binding-modifier={none | ctrl | alt | super}

The mod key is the same as the super key by default.

The super key is in between <Left Ctrl> and <Left Alt>, usually a <Windows> key.

mod + Shift + F
Make active window fullscreen

mod + K
Kill active window

mod + Shift + M
Maximize active window

mod + PageUp, mod + PageDown
Zoom desktop in (or out)

mod + Tab
Switch active window

mod + Up, mod + Down
Increment/decrement active workspace number, if there are multiple

mod + Shift + Up, mod + Shift + Down
Move active window to the succeeding/preceding workspace, if possible

mod + F1/F2/F3/F4/F5/F6
Jump to the numbered workspace, if it exists

Ctrl + Alt + Backspace
If supported, terminate Weston. (Note this combination often is used to hard restart Xorg.)

Ctrl + Alt + F
Toggle if Weston is fullscreen; only works when nested under a Wayland compositor

Ctrl + Alt + S
Share output screen, if possible

Ctrl + Alt + F1/F2/F3/F4/F5/F6/F7/F8
Switch virtual terminal, if possible

super + S
Make a screenshot of the desktop

super + R
Start or stop recording video of the desktop

Weston touch / mouse bindings

There are also a number of bindings involving a mouse:

<Touch>, <Left button>, <Right button>
Activate clicked window

super + Alt + <Vertical scroll>
Change the opacity of a window

mod + <Vertical scroll>
Zoom/magnify the visible desktop

mod + <Left button>
Click and drag to move a window

mod + Shift + <Left button>,  mod + <Right button>,  mod + <Touch>
Click and drag to resize a window

mod + <Middle button>
Rotate the window (if supported)


As always, please share your feedback and let us know how things work for you.

The post Ubuntu Focal 20.04 unified image for Nitrogen8 boards appeared first on Boundary Devices.

QNX 7.0 BSP release for Nitrogen8M Mini

$
0
0

We are excited to announce DirectInsight release of QNX 7.0 BSP for the Nitrogen8M Mini SBC.

For the impatient

You can download either prebuilt binaries or the QNX BSP source code from DirectInsight:

Along with the BSP comes a BSP Quick Start Guide as well as a Test Plan.

We also strongly recommend reading our QNX Getting Started Guide article to learn about building/debugging QNX.

QNX 7.0 features

QNX 7.0 Software Development Platform (SDP) provides a comprehensive, multi-level, policy-driven security model incorporating best-in-class security technologies from BlackBerry.

Here is a short list of new features:

  • High performance: Full 64-bit and 32-bit support for ARMv7, ARMv8.
  • Complete hardware optimization: NXP i.MX platforms.
  • Standards-based tools: Eclipse-based IDE with C++14 support.
  • Safety certified pedigree: ISO 26262 ASIL D for automotive, IEC 61508 SIL3 for industrial and IEC 62304 for medical.

Another noticeable change is the use of the QNX Software Center which is now necessary to install the QNX base OS. It will also allow easy installation of OS updates and new components.

Here is a full list of features from this OS update:

Also, the online documentation is as usual very well-written and detail-oriented:

For instance, there’s a migrating guide that can be useful for your existing applications:

Nitrogen8M Mini BSP features

The Nitrogen8M Mini BSP supports the following peripherals:

  • I2C
  • SPI
  • Serial
  • RTC
  • Watchdog
  • Ethernet
  • SD/MMC
  • Audio
  • USB Host

As for the bootloader, you can either use QNX IPL (without TF-A) or U-Boot (with TF-A).

Display support isn’t available at this stage but is currently in the works so stay tuned for an update on that front.

Note that this release can be built and debugged using QNX Momentics IDE:

QNX Nitrogen8MM Build
QNX Nitrogen8MM Perf Analysis

As usual, feel free to contact us for more information!

The post QNX 7.0 BSP release for Nitrogen8M Mini appeared first on Boundary Devices.

Temperature Monitoring on i.MX platforms

$
0
0

We have received many requests about temperature monitoring on our NXP i.MX based Nitrogen platforms.

This blog post aims to answer the most common questions and help you get the most out of your Nitrogen device.

Temperature Monitoring principle

All the i.MX processors come with an integrated IP capable of providing the internal temperature of the SoC.

i.MX 8M Plus block diagram

That temperature monitoring IP is not the same across all i.MX CPUs. The older i.MX 6 & 7 used to rely on the TEMPMON IP whereas the newer i.MX 8M (Quad, Mini, Nano & Plus) use the TMU.

How do you read the temperature?

The good news is that no matter which platform you use, the way to read the temperature is always the same:

# cat /sys/devices/virtual/thermal/thermal_zone0/temp
37000

The above means my platform temperature is currently 37 degrees Celsius as the unit is millidegree as described in the kernel documentation:

Behind the scenes, as the IP differs between CPUs, different kernel drivers can be in use:

How accurate is the measurement?

Some of you have tried to compare a case temperature measurement against the one read by the IP which isn’t a fair comparison.

First, the internal temperature monitor measures die temp (also called junction temp), with an accuracy of +5C.

Second, the difference between junction and case temperature is linear to the wattage of your platform, so it increases the more power you draw.

In other words the die temperature is what should be used to avoid damaging your platform.

Is there a safety mechanism?

The first question often is: “how do I make sure not to damage my platform in case it gets hot?”

The safety mechanism for that defines 2 thresholds:

  • Passive trip point: when reached, the CPU/GPU/VPU throttles to try to reduce the temperature
  • Active trip point: when reached, the board reboots immediately to avoid damaging the SoC

Those thresholds are usually 10C apart, like the default values on our 8MP SOM like this:

# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
85000
95000

How to modify the thresholds?

Depending on the exact version of the CPU you are using, you might need to change the default thresholds.

This is not necessary for i.MX 6 & 7 as the driver checks the temperature grade and adapts temperatures automatically:

For the other processors, like an industrial version of the i.MX 8M Mini CPU that can go from -40C to 105C, you need to update the trip points as follows:

# echo 105000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_1_temp 
# echo 95000 > /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
# cat /sys/devices/virtual/thermal/thermal_zone0/trip_point_*temp
95000
105000

Note that setting those thresholds this way is not persistent across reboot, so you have 2 solutions:

  1. Modify the device tree directly to have your own values
  2. Create an init script for your OS to do that at bootup

The post Temperature Monitoring on i.MX platforms appeared first on Boundary Devices.

Esper.io solution on i.MX Nitrogen platforms

$
0
0

We are pleased to present the esper.io solution on our i.MX-based Nitrogen platforms to provision and manage your fleet of devices!

What is esper.io?

In the past, many customers asked us for a turn-key solution for them to control their fleet with requirements like:

  • We need to have only one application accessible to the user
  • We have to be able to update our application easily
  • We’d like to know the state of our fleet in real-time

It is with those questions in mind that we discovered esper.io and we are happy to say it solves them perfectly.

Esper’s solution includes the following features (among others):

  • Device Management
    • Dashboard UI via esper.io website
    • Events, Monitoring, Logs
    • Remote Control
    • System OTA Updates
  • App Management
    • App update scheduling possible
  • Device Groups
    • Managing devices per-site / per-IP / per-country etc…
  • Kiosk Mode
    • Allowing only 1 app to run
  • AOSP & GMS devices
    • Seamless provisioning

What about an example?

As a demo is worth a thousand words, we decided to go ahead and try it on our own.

Template creation

Once you have an esper.io account, the first step is to create your template.

It will include all the parameters you want for your specific devices.

After choosing the name for your template, you will have to set the Compliance Policy which includes many options like whether or not the screen is lockable or if the Notificaiton bar should be present.

Next is the Apps step which allows you to upload one or several applications you want included in your system. You can also select whether or not you want the device in Kiosk Mode (1 app only).

During the Settings step, you will select the connectivity you want enabled (WiFi/BT/GPS) as well as branding or any other options normally set in the Settings application.

Finally, you can create and/or assign a Group of devices to that template.

That’s it, your template should be complete. Know that you can also update it later via the esper dashboard.

Device Provisioning

There are several methods to provision your devices. This section will cover the usage of the esper provisioning tool:

This is available on all OSes (Windows, MAC OS, Linux).

The first step is to provide your esper.io login for the tool to retrieve your templates.

The next steps are simply for you to select the application to download and select the device(s) to provision.

Then the installation 1st step will happen on the device.

Once this step is complete, you should reboot the platform for the 2nd step of provisioning to kick in automatically:

Next, your application, which in our case is KioskApp which is a very simple full screen, which should be started in Kiosk mode:

At this point, your device is fully provisioned and can be managed through the esper website.

Another option is seamless provisioning which requires integrating esper applications into the AOSP build tree. For that approach, you should contact the esper team directly.

Device Management

Here is what the Dashboard should look like:

From there you have access to a lot of information:

  • Memory usage
  • Storage usage
  • Battery info
  • Temperature
  • Firmware details (fingerprint)
  • App details
  • Retrieving logs

As explained in the introduction, esper.io is a very complete solution and this blog post didn’t even scratch the surface of all the possibilities. We hope that this gives you a good overview and we highly recommend giving it a try to better manage your production devices.

The post Esper.io solution on i.MX Nitrogen platforms appeared first on Boundary Devices.

Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms

$
0
0

We are excited to announce the EC25 modem is now fully supported in our Android 10 BSP for all our Nitrogen8 family of platforms.

EC25 modem details

The Quectel EC25 mPCIe Modem is a series of LTE category 4 modules adopting standard PCIe Mini Card form factor.

It is optimized for M2M and IoT applications, and delivers 150 Mbps downlink and 50 Mbps uplink data rates.

Here is the full datasheet:

This modem has several possible configurations depending on region of use (EMEA, Americas, Asia).

Boundary Devices has been offering this modem as an accessory since it was fully supported in Linux:

Android support

RIL integration

Luckily for us, Quectel provides great support to integrate their solution in Android.

Their package is now part of our default BSP tree in order to ease our customers life.

The integration was done for our upcoming i.MX 8M Mini-based Tablet design which incorporates the modem. Here is what it looks like when running the Android OS:

LTE Web Browsing
Settings SIM Status

Note that the Access Point Names (APN) xml file was taken from Google AOSP repository:

However, in case one of the settings is not correct or up-to-date, you can change the APN from the Settings application:

APN Settings

Build instructions

As the previous section mentions, this integration already exists for our Nitrogen8MM Tablet target.

If you’re new to Android on our platform, we strongly recommend reading our latest release post:

Once you are setup, you can try these commands:

$ source build/envsetup.sh
$ lunch nitrogen8mm_tab-userdebug
$ ./imx-make.sh -j10

Or if you want to integrate the modem to another platform, we recommend looking here for inspiration:

In case you have troubles integrating those patches for another Nitrogen platform, feel free to contact us.

When everything goes according to plan, you should see the following on your console

nitrogen8mm_tab:/ # getprop | grep -iE 'gsm|ril'
[gsm.current.phone-type]: [1]
[gsm.defaultpdpcontext.active]: [true]
[gsm.network.type]: [LTE]
[gsm.operator.alpha]: [F-Bouygues Telecom Bouygues Telecom]
[gsm.operator.iso-country]: [fr]
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: [20820]
[gsm.sim.operator.alpha]: [Bouygues Telecom]
[gsm.sim.operator.iso-country]: [fr]
[gsm.sim.operator.numeric]: [20820]
[gsm.sim.state]: [LOADED]
[gsm.version.baseband]: [EC25EUGAR06A03M4G]
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.2.2]
[init.svc.ril-daemon]: [running]
[ro.boottime.ril-daemon]: [8981753125]
[ro.ril.wake_lock_timeout]: [300]

 That’s it! You should now be able to fully use the modem under Android!

The post Quectel EC25 Modem Android Support for i.MX 8 based Nitrogen Platforms appeared first on Boundary Devices.

Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display

$
0
0

Check out our newest demo video!

 This video shows the i.MX8M Nano based Nitrogen8M Nano SBC running Ubuntu Focal 20.04 on a 7″ Display. The Nano CPU only supports MIPI DSI output so we have a daughter board that converts MIPI DSI to LVDS to drive the 7″ 1280×800 LVDS display. The i.MX8M Nano SBC has dual Ethernet, WiFi+BT, Audio, Can bus, and a host of other features that allow for use in industrial environments. Contact us for specific questions or concerns.

The post Nitrogen8M Nano SBC with Ubuntu Focal 20.04 + our 7″ MIPI Display appeared first on Boundary Devices.


Remote access to Nitrogen8 boards with ShellHub

$
0
0

Boundary Devices is excited to release this blog post in partnership with O.S.Systems to show how to remotely access your Nitrogen devices using ShellHub!

This article will help those who want to start, create, or prototype an IoT or embedded project and reviews considerations like: security, agility, and remote access. We know sometimes people get lost facing all the different options the market offers, leaving behind features that could add real value to their products.

Do you want to know how to get through all the options quickly & easily focusing on your goals?

If so, please check the tips & suggestions we have prepared for you below.

Remote accessing a device

In this article, we’ll show you how to add a safe and agile remote access service for ShellHub to the Nitrogen8M Mini SBC.

ShellHub is a recent tool released by O.S.Systems that provides remote connections through SSH in a friendly way.

Besides making remote access easy, ShellHub offers various features that allow group users to access a set of devices using namespaces, manage firewall rules, record and playback sessions, use public keys to access devices, and much more.

Note: we used a Nitrogen8M Mini here, but the instructions are compatible with any Boundary Devices platform.

1. First step: creating a Shellhub account

First of all, it’s necessary to create an account on the ShellHub server, also called by ShellHub Cloud. You’ll need an account to get the TENANT_ID used to identify the ShellHub agent and register it in ShellHub Cloud.

The ShellHub agent is the application installed in devices responsible for connecting them to the ShellHub Cloud. There are three ways to install it. Here we’ll use the easiest one: using Docker.

When you log in, a help screen will indicate the following steps to add devices, as shown in the image below:

If you already use Docker, just skip the next section.

2. Installing Docker

To install and set up Docker, you can run the following steps in Ubuntu Focal or Debian Buster, and in both, the Shellhub will work correctly.

Note: In case you are running the Debian Buster image, pay attention to the 2.1.1 section below

First, check if the operating system is updated:

$ sudo apt update

To install Docker and curl command run this line:

$ sudo apt install docker.io curl

Initialize the Docker:

$ sudo systemctl start docker

Add the user permission for your user:

$ sudo usermod -aG docker ${USER}
$ su - ${USER}

2.1. Debian Buster specific: setting iptables as default firewall tool

An error may occur due to the incompatibility of Docker and Debian with network settings.

Docker uses the iptables, and Debian Buster may use iptables and nftables, but the default is nftables.

So, to fix it, run the commands below to change the setting:

$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
$ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

These commands change the subsystem type used. Then reboot the board.

3. Adding devices

With Docker installed, log on ShellHub and just copy the command line available in the help screen or access Add device button:

You also may take the TENANT_ID in the top-right button on the Dashboard and type the command below:

$ sudo curl -sSf "https://cloud.shellhub.io/install.sh?tenant_id=TENANT_ID" | sh

3.1 Accepting devices in the Cloud

After adding the ShellHub agent on board, the device will be available in the Devices section (see it below), and you’ll be able to accept or reject the device.

All your allowed devices will be available in the Devices section to access them quickly whenever you need them. Easy, right?

4. Accessing devices

Many Linux users prefer using the Linux terminal to access remote machines and devices.

ShellHub allows access to devices from both the ShellHub Cloud terminal and your local terminal. So you can choose the best option.

4.1. By Cloud terminal

To access your devices using the ShellHub Cloud terminal, just click on Devices in the sidebar, choose the device you want to access, and click on the terminal icon.

4.2. By local terminal

If you prefer to access your devices using your local terminal, open it up and run the SSH command with the ShellHub device identity, the TENANT_ID, running:

$ ssh <device user name>@SSHID

Take a look below:

With a few steps, you have a great and innovative project ready to grow. With Shellhub installed and set up on Boundary Devices powerful boards, you’re ready to access and manage your devices from anywhere and create unique and modern products.

We invite you to read about Boundary Devices portfolio of products and take a look at the Shellhub site to know more about the great things you can do.

But if you’re interested in other ways to innovate using Boundary Devices and ShellHub, take a look at this article to learn how to set up the ShellHub agent support in a Yocto Project image. You’re going to love it!

If you have any issues, please email contato@ossystems.com.br!

The post Remote access to Nitrogen8 boards with ShellHub appeared first on Boundary Devices.

4 Benefits of Made in America Electronics Manufacturing with Boundary Devices

$
0
0

Electronics manufacturing is a key part of Boundary Devices value proposition.  We have always manufactured our products in America.  Historically, we worked with 2 key contract manufacturing (“CM”) partners – one in Arizona and one in Southern California.  As of Q2 2020, we invested in the necessary equipment and people to manufacture boards in-house which gives us further control over the manufacturing process. There are 4 benefits to Made in America Electronics Manufacturing.

  • Quality and Traceability
  • Local Hardware and Software Support
  • Improved Lead times
  • Robustness in the midst of crisis

#1: Quality and Traceability

Quality and traceability are 2 of the most important requirements from a manufacturing process.  If the products do not have high quality and good traceability, then all other metrics are irrelevant.  By having local and in-house manufacturing with ISO9001 or better certification, Boundary Devices is able to create dedicated/customized quality processes to ensure the highest level of quality.  In addition, having control over the component procurement process enables us to have complete traceability of every component.  Every board is functionally tested with full history of test results.  Quality and traceability are not exclusive to Made in America manufacturing.  There are high quality manufacturers all over the globe which provide full traceability.  But having it all under local control with design and software allows for a unique combination.

#2 Local Hardware and Software Support

Electronics-based products have firmware elements that are constantly evolving over the life of a product.  During the product development process, having a local (America-based) engineering team to quickly accelerate time-to-market is critical.  Significant cost savings due to faster time-to-market typically far outweigh potential cost savings by manufacturing off-shore.  Once the product has been released, there are always field failures of varying degrees.  Quick responses and timely problem solving could be the difference between keeping and losing a key customer.

#3 Improved Lead Times

Boundary Devices sources all components from franchised distributors which are all based in the US. With our sophisticated and proprietary supply chain setup, we are able to have our distributors stock components for us to be shipped at moments notice and delivered in under 3 days’ time. This provides tremendous flexibility in the procurement process and allows reduced lead times because we are not waiting for components to arrive from overseas. In addition, costly shipping delays are eliminated because finished goods are assembled in America. Boat shipments traditionally take 3-4 weeks (and now up to 3 months due to COVID pandemic) which is significant. If customers air ship from overseas, much of the cost savings from overseas manufacturing is wiped out. The extended lead times cause customers to build and stock additional inventory.

#4 Robustness in midst of crisis

The last 18 months has been a constant flow of crisis from COVID to global electronics shortage. By having an America design and manufacturing partner, most of our customers have been spared of any significant disruptions to their supply chain. For many companies, this is the difference between survival and bankruptcy. Shipping delays? Product stuck in customs? Can’t get parts due to electronics shortage? We are able to better withstand these types of global crisis because we control every part of the process – from design to parts procurement to manufacturing. This vertical integration allows us to quickly design out a part that is not available or expedite the manufacturing of certain products because of the internal flexibility. These global events require a robust supply chain and having a manufacturer with design, procurement, and manufacturing all under one company is invaluable.

We will continue to invest in our own manufacturing capabilities and identify other ways to continue to bring value to our customers.  We are now a complete turnkey electronics manufacturing company starting from electrical design and software development to component sourcing and board manufacturing followed by quality and testing.

The post 4 Benefits of Made in America Electronics Manufacturing with Boundary Devices appeared first on Boundary Devices.

Boot2Qt Embedded Qt6 Image and Toolchain Hardknott Release

$
0
0

We are pleased to announce a new Boot2Qt Embedded Qt6 image and toolchain using Yocto 3.3, Hardknott.

Below you will find the download links for the images as well as detailed instructions for the build.

You can view a demo of the image running on our Nitrogen8M Plus SOM here.

For the Impatient

You can download the Boot2Qt Yocto images from here:

You can download the Boot2Qt Linux toolchains from here (refer below for instructions on building the Windows toolchain):

Instructions on how to use the QBSP toolchain in your Qt application development can be found here.

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher

Build procedure

This image uses the 6.2 branch of the meta-boot2qt repo, which uses Qt version 6.2.0.

This image uses the hardknott branch of our boundary-bsp-platform repository.

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/b2qt6_hardknott && cd b2qt6_hardknott
~/b2qt6_hardknott$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b hardknott -m b2qt.xml
~/b2qt6_hardknott$ repo sync

Next, setup the environment for building. For this image we will be building the b2qt distro for the target machine

~/hardknott$ MACHINE=<MACHINE> DISTRO=b2qt . setup-environment build

Finally, build the Boundary Boot2Qt Embedded Qt6 Image and Linux Toolchain (boundary-b2qt-embedded-qt6-image and meta-toolchain-b2qt-embedded-qt6-sdk), which is equivalent to meta-b2qt-embedded-qbsp with Boundary-specific packages added such as BD-SDMAC support.

~/b2qt$ bitbake boundary-meta-b2qt-embedded-qbsp

Note: You can just build the Qt6 image by running “bitbake boundary-b2qt-embedded-qt6-image”

 

To build a toolchain for Windows platforms add the following line to local.conf:

SDKMACHINE = "i686-mingw32"

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/b2qt-embedded-qt6-image-{MACHINE}.wic.gz.

The Linux toolchain will deploy to tmp/deploy/qbsp/meta-b2qt-embedded-qbsp-x86_64-{MACHINE}-6.2.0.qbsp.

The Windows toolchain will deploy to tmp/deploy/sdk/b2qt-i686-mingw32-meta-toolchain-b2qt-embedded-qt6-sdk-{MACHINE}.7z.

Display support

Please make sure your platform includes the latest U-Boot:

This version of U-Boot supports the display configuration, allowing to use any of the following displays:

Note that we’ve noticed that the NXP HDMI driver is picky when it comes to custom display timings (sometimes refuses to set the clock).

So if you are experiencing any issue with HDMI, please try entering the following commands in U-Boot in order to force the use of standard timings:

=> setenv cmd_custom 'setenv bootargs $bootargs drm_kms_helper.edid_firmware=HDMI-A-1:edid/1280x720.bin'
=> saveenv

If you have any issues, please email support@boundarydevices.com

The post Boot2Qt Embedded Qt6 Image and Toolchain Hardknott Release appeared first on Boundary Devices.

Yocto Hardknott Release for i.MX6 Platforms

$
0
0

We are pleased to announce a new Yocto release Hardknott for our Nitrogen6 family of SBCs and SOMs based on i.MX6 processors. This release includes our latest 5.10 kernel. Below you will find download links for the images as well as detailed instructions for building including a features set.

For the Impatient

You can download the Yocto images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher

Build procedure

This image uses the hardknott branch of our boundary-bsp-platform repository.

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/hardknott && cd hardknott
~/hardknott$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b hardknott
~/hardknott$ repo sync

Next, setup the environment for building. For this image we will be building our boundary-xwayland distro for the target machine

~/hardknott$ MACHINE=<MACHINE> DISTRO=boundary-xwayland . setup-environment build

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/hardknott/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • Linux kernel 5.10.x_2.0.0
  • U-Boot 2020.10
  • Weston 9.0.0 for i.MX
  • GStreamer1.0 1.18.4
  • GPU Vivante libraries 6.4.3p1.4
  • VPU libraries 5.4.39.3
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.56 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

GPU acceleration

As usual, in order to test the GPU you can use the example apps provided by Vivante:

root@<MACHINE>:~# /opt/imx-gpu-sdk/GLES2/Blur/GLES2.Blur_Wayland -d

Camera input

Camera MIPI-CSI input can be checked using our OV5640_5MP_MIPI with GStreamer:

root@<MACHINE>:~# gst-launch-1.0 imxv4l2videosrc device=/dev/video1 ! autovideosink;

nitrogen8m-camera

VPU decoding

Here is an example using GPlay tool:

root@<MACHINE>:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov
root@<MACHINE>:~# gst-launch-1.0 playbin uri=file:///home/root/Hobbit-1080p.mov video-sink=imxipuvideosink

VPU encoding

Here is an example using gstreamer:

root@<MACHINE>:~# gst-launch-1.0 imxv4l2videosrc device=/dev/video1 ! imxvpuenc_h264 bitrate=10000 ! filesink location=test.mp4

Ethernet

Once the eth0 interface is up, you can use iperf3 to check Ethernet performances:

root@<MACHINE>:~# iperf3 -c 192.168.1.60                                                                                                                         
Connecting to host 192.168.1.60, port 5201
[  5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  1.09 GBytes   932 Mbits/sec                  receiver

Wi-Fi

Same goes for the Wi-Fi that can be tested just as easily:

root@<MACHINE>:~# nmcli d wifi connect <network_name> password <password>
root@<MACHINE>:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@<MACHINE>:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

For products with a Silex bluetooth module, you’ll be able to connect using our handy silex-uart script with the following commands:

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found
root@<MACHINE>:~# hciconfig hci0 up
root@<MACHINE>:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device

CAN

CAN is supported on Nitrogen6 MAX. You’ll be able to bring up the interface using these commands:

root@<MACHINE>:~# ip link set can0 up type can bitrate 500000

From this point, you can use commands such as cansend and candump to send or display messages on the bus respectively.

 

If you have any issues, please email support@boundarydevices.com

The post Yocto Hardknott Release for i.MX6 Platforms appeared first on Boundary Devices.

Yocto Hardknott Release for i.MX8 Platforms

$
0
0

We are pleased to announce a new Yocto release Hardknott for our Nitrogen8 family of SBCs and SOMs based on i.MX8 processors. This release includes our latest 5.10 kernel. Below you will find download links for the images as well as detailed instructions for building including a features set.

For the Impatient

You can download the Yocto images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher

Build procedure

This image uses the hardknott branch of our boundary-bsp-platform repository.

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/hardknott && cd hardknott
~/hardknott$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b hardknott
~/hardknott$ repo sync

Next, setup the environment for building. For this image we will be building our boundary-xwayland distro for the target machine

~/hardknott$ MACHINE=<MACHINE> DISTRO=boundary-xwayland . setup-environment build

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/hardknott/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • Linux kernel 5.10.x_2.0.0
  • U-Boot 2020.10
  • Weston 9.0.0 for i.MX
  • GStreamer 1.16.2 for i.MX
  • GPU Vivante libraries 6.4.3p1.4
  • VPU Hantro libraries v1.20.0
  • ISP VVCAM v4.2.2.11
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.56 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

Display support

Please make sure your platform includes the latest U-Boot:

This version of U-Boot supports the display configuration, allowing to use any of the following displays:

Note that we’ve noticed that the NXP HDMI driver is picky when it comes to custom display timings (sometimes refuses to set the clock).

So if you are experiencing any issue with HDMI, please try entering the following commands in U-Boot in order to force the use of standard timings:

=> setenv cmd_custom 'setenv bootargs $bootargs drm_kms_helper.edid_firmware=HDMI-A-1:edid/1280x720.bin'
=> saveenv

GPU acceleration

As usual, in order to test the GPU you can use the example apps provided by Vivante:

root@<MACHINE>:~# /opt/imx-gpu-sdk/GLES2/Blur/GLES2.Blur_Wayland -d

Camera input

Camera MIPI-CSI input can be checked using our OV5640 MIPI with GStreamer:

root@<MACHINE>:~# gst-launch-1.0 v4l2src device=/dev/video0 ! \
    video/x-raw,width=1280,height=720 ! waylandsink

nitrogen8m-camera

Basler camera input

This build fully supports the Basler daA3840 8MP camera from Basler when using our Nitrogen 8M Plus which is part of our Evaluation Kit:

The isp-vvcam driver and imx8-isp service are loaded automatically when the camera is detected.

From there a simple GStreamer pipeline will allow you to see the stream:

root@nitrogen8mp:~# gst-launch-1.0 -v v4l2src device=/dev/video0 ! waylandsink
...
[  352.348796] wdr3 res: 1920 1080 
[  352.352471] enter isp_mi_start
[  357.581179] ###### 62.42 fps ######
[  362.771924] ###### 62.42 fps ######

Ethernet

Once the eth0 interface is up, you can use iperf3 to check Ethernet performances:

root@<MACHINE>:~# iperf3 -c 192.168.1.60                                                                                                                         
Connecting to host 192.168.1.60, port 5201
[  5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  1.09 GBytes   932 Mbits/sec                  receiver

Wi-Fi

Wi-Fi can be tested with nmcli as shown below:

root@<MACHINE>:~# nmcli d wifi connect <network_name> password <password>
root@<MACHINE>:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@<MACHINE>:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

For products with a Silex bluetooth module, you’ll be able to connect using our handy silex-uart script with the following commands:

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found
root@<MACHINE>:~# hciconfig hci0 up
root@<MACHINE>:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device

VPU decoding

If your platform supports VPU decoding, here is an example on how to test it using the gplay tool:

root@<MACHINE>:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov
root@<MACHINE>:~# gst-launch-1.0 playbin uri=file:///home/root/Hobbit-1080p.mov video-sink=autovideosink

VPU encoding

Here is a simple example that shows how to encode a video stream from the camera into H.264 using the VPU encoder:

root@<MACHINE>:~# gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! 'video/x-raw,width=1920,height=1080' \
                    ! vpuenc_h264 ! filesink location=test.h264
^C
root@<MACHINE>:~# gst-launch-1.0 filesrc location=test.h264 typefind=true ! 'video/x-h264' ! \
                    h264parse ! vpudec ! waylandsink

CAN

For platforms with CAN, you’ll be able to bring up the interface(s) using this following command:

root@<MACHINE>:~# ip link set can0 up type can bitrate 500000

From this point, you can use commands such as cansend and candump to send or display messages on the bus respectively.

 

NPU support

NPU support is fully integrated into this build when using our Nitrogen 8M Plus with TensorFlowLite and ARMNN support of the NPU.

Various example demos can be found here:

IMX-MACHINE-LEARNING-UG.pdf

 

If you have any issues, please email support@boundarydevices.com

The post Yocto Hardknott Release for i.MX8 Platforms appeared first on Boundary Devices.

Android for your Embedded Project Webinar

$
0
0

Android for your Embedded Project Webinar

Check out our newest webinar with Kynetics, on Android for your embedded project.  This is an hour-long webinar with a Q&A at the end.  Original webinar aired September 15th, 2021.

Agenda:

  • AOSP Architecture Introduction
  • Embedded Android Pros & Cons
  • Android BD Solutions
  • Getting Further with Kynetics
  • Q&A

Check out our YouTube channel for past webinars and demo videos:

https://www.youtube.com/channel/UC2xJu9hZ9551FkS5xivVIoQ

View our website: https://boundarydevices.com/

 

The post Android for your Embedded Project Webinar appeared first on Boundary Devices.

Debian 11 Bullseye unified image for Nitrogen8 boards

$
0
0

Debian Bullseye 11 Weston Compositor

Debian 11 Bullseye Weston/Wayland Compositor

Boundary Devices is proud to release our new Debian Bullseye image for all our Nitrogen8 boards!

This image uses Weston which is the reference Wayland compositor.

This image boots up the Weston compositor at start. This can be changed by disabling the service autostart, as described later in this post.

This system contains NXP licensed content, so you will need to register on our website and log in before you can accept the license agreement and download the following Debian Bullseye images for Nitrogen8:

For Nitrogen8M, Nitrogen8M SOM, Nitrogen8M Mini, Nitrogen8M Mini SOM, Nitrogen8M NanoNitrogen8M Nano SOM, Nitrogen8M Plus SOM

This is a unified image for the aforementioned boards; there is no further need for board specific images. At the start, it will detect the board type and run a configuration script.  Then, it will set all board specific parameters and apt repositories.

Important!

Before installing this image, please check your U-Boot version, as it requires U-Boot version 2020.10 to be used.

Make sure to visit our wiki if you need to upgrade:

You can find the bootscript in the /boot sub-directory now, it’s named boot.scr. The partition labels are set if you use dd or Balena Etcher to flash the image.

If you use your own method, please check the boot partition labels because the fstab boots by label (LABEL=sys-18h for example) now.  You can use e2label to modify partition label.

Programming the image

As usual, we recommend using the Balena Etcher tool to flash your SD Card / eMMC:

The uncompressed image size is slightly bigger than 5GB, you’ll need at least 8GB eMMC storage to install it.

Please watch this video for the detailed instructions:


Usernames and passwords

We predefined two users for use on the system: debian and root. The password for each is Boundary (capital B). The user debian has administrator rights, but you don’t need to enter a password at sudo command.

We wanted to make your life easier at the cost of some security, but if you want to change that please type:

debian@bullseye-dev64:~$ sudo visudo

Then comment out or delete the last line with “debian” and “NOPASSWD:”

An ssh server is running on the system, though it does not allow password-based authentication for user root.

User debian has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so :

debian@bullseye-dev64:~$ sudo mkdir /root/.ssh
debian@bullseye-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
debian@bullseye-dev64:~$ sudo chmod 600 /root/.ssh/auth*
debian@bullseye-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported?

Since the images above include our stable 5.10.x kernel, essentially everything is supported, including:

  • Vivante GPU accelerations for Wayland
  • The Hantro Video Processing Unit supports the following decoders:
    • video/x-h265
    • video/x-vp9
    • video/x-h264
    • video/x-vp8
    • video/x-vp6-flash
    • video/mpeg
    • video/x-h263
    • video/x-flash-video
    • video/x-divx
    • video/x-xvid
    • video/x-cavs
    • video/x-wmv
    • video/x-pn-realvideo
    • video/x-raw
  • BD-SDMAC WiFi/BT modules support
  • All kind of storage devices , eMMC, SATA hdd (via USB3-SATA adapter), USB3.0/2.0 pen drives, mini PCIe devices, cell modems
  • All of our supported touch panels

The packaging (including kernel) is done in the normal debian way, so apt-get update/dist-upgrade will keep your image up and running as the latest as patches come out.

What’s new in this release?

The Linux kernel was upgraded to 5.10.x_2.0.0 branch ( meta-package name: linux-boundary-19b ).
GPU driver was upgraded to Vivante 6.4.3p2.0 ( meta-package name: imx-gpu-viv-b19-… ).
The built-in galcore module has been removed (CONFIG_MXC_GPU_VIV) and we use an external galcore kernel module. This change makes the graphics system modular and more upgradeable, at the price of longer kernel upgrading time. Upgrading kernel takes about 3-4 minutes, instead of 30 seconds, because every kernel upgrade rebuilds the galcore driver from sources, as it’s a DKMS module.
The NXP/Vivante GPU SDK was upgraded to imx-gpu-sdk 5.7.1 . You can get the source with the usual apt-get source command. The SDK has many new demos, for example OpenCL, OpenVG, and for OpenVX and Vulkan.
The distribution is Debian Bullseye 11. Here are some main component versions of these Debian Bullseye images for Nitrogen8:

  • Xorg server 1.20.10-3
  • gstreamer1.0 1.18.0
  • bluez 5.55-3.1
  • Qt 5.15.2+dfsg-9.1
  • apt 2.2.4
  • dpkg 1.20.9-1
  • gcc/g++ 10.2.1-6
  • libwayland 1.18.0-2~exp1.2
  • weston 9.0.0-2.4
  • the image supports the QCA9377 and QCA6174 Silex WiFi / Bluetooth modules

CPU-specific package selection

This is our first unified image for the entire i.MX 8M family of processors. Since each CPU has its own specific features the OS must adapt to each platform.

That is why, during the first boot, a new selecthw service has been created to take care of selecting the proper packages needed for your platform.

For instance, for the Nitrogen8MP platform, the OS makes sure VPU encode/decode is enabled, NPU packages are added as well as the ISP service to manage the Basler daA3840 camera.

After that setup, the platform will need to reboot for those changes to be applied.

Fortunately, you can see the progress of that process on the display as shown below:


Network Manager

This Debian Bullseye image comes with Network Manager by default in order to ease the Wi-Fi setup.

debian@bullseye-dev64mp:~$ nmcli radio wifi on
debian@bullseye-dev64mp:~$ nmcli d wifi list
IN-USE  BSSID              SSID             MODE   CHAN  RATE        SIGNAL  BA>
        A4:3E:51:08:54:F5  Jabu             Infra  1     130 Mbit/s  62      ▂▄>
        A4:3E:51:08:54:F6  Jabu_5GHz        Infra  36    405 Mbit/s  57      ▂▄>

debian@bullseye-dev64mp:~$ sudo nmcli d wifi connect Jabu_5GHz password XXXXXX
Device 'wlan0' successfully activated with '4ed596ea-9f8c-48ea-8e0e-5e190e2fecc9'.
debian@bullseye-dev64mp:~$ ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.61  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2ae4:f7d2:3cc1:486d  prefixlen 64  scopeid 0x20
        inet6 2a01:cb00:f55:7f00:3122:4891:67c4:faa7  prefixlen 64  scopeid 0x0
        inet6 2a01:cb00:f55:7f00:6c92:60ad:c2ad:68cc  prefixlen 64  scopeid 0x0
        ether 08:3a:88:20:78:cc  txqueuelen 3000  (Ethernet)
        RX packets 67  bytes 7854 (7.8 KB)
        RX errors 0  dropped 9  overruns 0  frame 0
        TX packets 69  bytes 7666 (7.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This allows you to use Wi-Fi right out of the box, without any extra setup required.

i.MX 8M Plus support

This is the first Debian Bullseye image to officially support the i.MX 8M Plus CPU and therefore our Nitrogen8MP SOM.

The support includes:

  • VPU decode/encode
  • GPU 3D & 2D support
  • NPU integration (TFLite & ARMNN)
  • ISP + Basler daA3840 support


GPU SDK Bloom demo.
GPU SDK Bloom demo.

Vulkan Texture Arrays Demo
Vulkan Texture Arrays Demo

Witcher Trailer video streaming from Youtube
Witcher Trailer video streaming from Youtube

As I mentioned before, the system boots to Weston compositor.

If you don’t want to start Weston at boot automatically, you have to disable the service, you have to type the following:

debian@bullseye-dev64:~$ sudo systemctl disable weston.service
debian@bullseye-dev64:~$ sudo systemctl mask weston.service

If you want to enable the autostart again you need to type:

debian@bullseye-dev64:~$ sudo systemctl unmask weston.service
debian@bullseye-dev64:~$ sudo systemctl enable weston.service

You can find the weston.ini file in the /etc/xdg/weston directory. Please type:

debian@bullseye-dev64:~$ man weston.ini

Check the options and feel free to modify it to suit your needs.


Weston keyboard bindings

The Weston desktop shell has a number of keyboard shortcuts. They are listed here.

Almost all keyboard shortcuts for Weston include a specified modifier mod key which is determined in the file weston.ini (5):
[shell] binding-modifier={none | ctrl | alt | super}

The mod key is the same as the super key by default.

The super key is in between <Left Ctrl> and <Left Alt>, usually a <Windows> key.

mod + Shift + F
Make active window fullscreen

mod + K
Kill active window

mod + Shift + M
Maximize active window

mod + PageUp, mod + PageDown
Zoom desktop in (or out)

mod + Tab
Switch active window

mod + Up, mod + Down
Increment/decrement active workspace number, if there are multiple

mod + Shift + Up, mod + Shift + Down
Move active window to the succeeding/preceding workspace, if possible

mod + F1/F2/F3/F4/F5/F6
Jump to the numbered workspace, if it exists

Ctrl + Alt + Backspace
If supported, terminate Weston. (Note this combination often is used to hard restart Xorg.)

Ctrl + Alt + F
Toggle if Weston is fullscreen; only works when nested under a Wayland compositor

Ctrl + Alt + S
Share output screen, if possible

Ctrl + Alt + F1/F2/F3/F4/F5/F6/F7/F8
Switch virtual terminal, if possible

super + S
Make a screenshot of the desktop

super + R
Start or stop recording video of the desktop

Weston touch / mouse bindings

There are also a number of bindings involving a mouse:

<Touch>, <Left button>, <Right button>
Activate clicked window

super + Alt + <Vertical scroll>
Change the opacity of a window

mod + <Vertical scroll>
Zoom/magnify the visible desktop

mod + <Left button>
Click and drag to move a window

mod + Shift + <Left button>,  mod + <Right button>,  mod + <Touch>
Click and drag to resize a window

mod + <Middle button>
Rotate the window (if supported)


As always, please share your feedback and let us know how things work for you.

The post Debian 11 Bullseye unified image for Nitrogen8 boards appeared first on Boundary Devices.


Android 11 release for Nitrogen8 family

$
0
0

We are glad to deliver the latest Android 11 2.2.0 release for all our i.MX 8M-based Nitrogen platforms:
Android 11


For the impatient

You can download the Android 11 images from here:

Flashing using fastboot

The .zip archives include all the files to be flashed using fastboot.

Note that fastboot will only flash to your eMMC device, for SD card, please check next section.

First you need to enter fastboot mode from U-Boot prompt:

=> fastboot 0

Once the platform is in fastboot mode, you simply need to call the flashing script:

~/$ unzip s11*nitrogen8*.zip -d s11-nitrogen8
~/$ cd s11-nitrogen8
~/s11-nitrogen8$ ./device/boundary/scripts/flash_fastboot.sh

Since our i.MX 8 platforms might come with different eMMC sizes, you can select which size you want to use at flashing time.

If you don’t provide that argument, the “default” size of 8GB will be flashed.

But, if you have a recent board, it will most likely include 16GB of eMMC; here is the command to use its full size:

~/s11-nitrogen8$ ./device/boundary/scripts/flash_fastboot.sh -s 16

Note that you can also use fastboot from a Windows Host PC, see following blog post to learn how:

C:\s11-nitrogen8> device\boundary\scripts\flash_fastboot.bat nitrogen8m

Flashing using Etcher / dd

If you cannot use the fastboot tool, you can still flash the 16GB prebuilt image file for your platform (.img.gz).

For Linux users you can simply use the following command:

~$ zcat s11*nitrogen8*.img.gz | sudo dd of=/dev/sdX bs=1M

For Windows and Linux users who would rather use a UI, we recommend using Balena Etcher tool:

NB: the first boot from SD card can be quite long as it creates and formats missing userdata partition. Please be patient, all subsequent boots will be faster.

Updating U-Boot

We recommend updating U-Boot once the image is flashed:

=> run upgradeu

What’s new?

This section will only describe the changes / features made since last release.

Android 11 OS updates

Google provides a list of notable changes for developers:

  • Code based upon android-11.0.0_r36 (May 2021)

SELinux

As usual, this release comes with SELinux enabled and enforced.

If you are using the userdebug build, you can switch to permissive mode by setting 1 variable in U-Boot:

=> setenv selinux permissive
=> saveenv

Note that this feature only works on userdebug builds, user builds are enforced at all time.

AVB2.0

Same as our previous release, this one supports Android Verified Boot 2.0!

So I can’t make any modification now? No, there’s a way to disable verity for userdebug builds:

$ adb root
$ adb disable-verity
$ adb reboot

At this point you will be able to modify every partition (you can even use adb sync)

However, it goes without saying that this disablement isn’t possible on user builds.

non-A/B OTA updates

This release uses a non-A/B partitioning which allows to save some space and keep the most space for your applications.

Also, it uses the exact partitioning as previous releases to simplify the update from Android 10.

In order to build an OTA package, you can simply enter this make command (once the env is setup properly):

$ make otapackage

Then, you can setup ota.conf to reflect your server settings if you plan on hosting your own updates.

Moreover this release allows you to push an update using ADB and then kick the OTA app to do the necessary checks and reboot the platform as needed:

$ adb push $OUT/nitrogen8m-ota-*.zip /sdcard/update.zip
$ adb shell 'am start -n com.fsl.android.ota/.OtaAppActivity --es OTA file:///sdcard/update.zip'

You will eventually see your platform reboot into recovery partition and apply the update.

NXP changes

NXP updated a few things in this release, some of them are worth noting:

  • Now using the external camera framework
    • Library now located under vendor/nxp-opensource/imx/camera
  • Update manifest & kernel matrix target level to 5
    • Better compatibility with future releases
    • Might require changes to your custom code to match this version
  • New CameraXBasic to showcase ISP features
    • Only available for 8MP platforms

Linux Kernel 5.10.x

This Android release is based on a 5.10.x kernel. It therefore benefits from all our latest drivers/fixes as well as newest Vivante graphics libraries (v6.4.3.p2).

U-Boot 2020.10

This release uses U-Boot 2020.10 like the previous version:

  • A board can reboot to fastboot from fastboot (useful during flashing process):
$ fastboot reboot bootloader
  • Also you can now flash U-Boot over fastboot as well:
$ fastboot flash bootloader flash.bin

Boundary Devices additions

Just like our previous releases, this one includes unique features that only Boundary Devices provides:

  • Dynamic display support
    • Our U-Boot version still detects the connected displays automatically (MIPI-DSI + HDMI)
    • You can see our list of supported MIPI-DSI displays from our website here
  • Optimized Camera HAL version
    • This releases offers continuous autofocus support for our cameras
  • Support for our 802.11b/g/n/ac + BT5.0 Silex Module
  • Display rotation setting from U-Boot
=> setenv hwrotation 270
=> saveenv
=> reset
  • Variety of accessories
    • All our accessories like OV5640 cameras are all supported
    • 8M Plus platform also supports Basler daA3840 camera
  • SD card support as external storage
  • Camera settings flexibility
    • Our release allows changing the camera configuration by setting a property
    • Example with Basler + OV5640 setup for 8MP:
      adb shell setprop persist.vendor.camera.config imx8mp-basler-ov5640
  • Up to date kernel stable release
    • While NXP kernel is based upon 5.10.35 kernel, we provide latest updates up to 5.10.72
    • This includes many bug/CVE fixes that makes your device much more secure

android11Source code access

For the newcomers, please make sure to read our “Android Getting Started Guide” since it contains all the information you need to download, build and flash an Android image.

Since AOSP requirement is still to use Ubuntu Xenial (16.04) to build the OS, many might find it useful to use Docker, we provide a dockerfile if needed:

Otherwise, for those already familiar with our releases, here is a condensed version to get the Android 11 source code:

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git 
       -b boundary-android-11.0.0_2.2.0
~/myandroid$ repo sync
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose nitrogen8m / nitrogen8mm / nitrogen8mn / nitrogen8mp from the list of boards 
~/myandroid$ ./imx-make.sh -j12

As you can see, we use a special make script instead of the regular make command.

The reason is that in order to have as few AOSP changes as possible, NXP created a separate script in order to build dependencies that are the kernel, dtbo, u-boot images.

One could also use the following approach to only build the dependencies with that script and then use standard Android build:

~/myandroid$ ./imx-make.sh kernel bootloader -j12
~/myandroid$ make -j12

 

As always, let us know your experiences (both good and bad) when you test out this image.

The post Android 11 release for Nitrogen8 family appeared first on Boundary Devices.

Buildroot 2021.11 release for i.MX platforms

$
0
0

Buildroot 2021.11 has been published and we’re excited to share new images!Buildroot

For the impatient

You can download pre-built Buildroot 2021.11 images from here:

In order to flash those images you can follow our video on this topic:

Or for those fluent in command lines, you can simply use zcat:

~$ zcat 2021*br2021.11-nitrogen*.img.gz | sudo dd of=/dev/sdX bs=1M

What’s new?

Buildroot 2021.11 release

It would be too long of a list to enumerate all the changes Buildroot went through since the last release.

For recent changes, we invite you to check the last release announcement:

We’ll focus on the i.MX changes for this release in the next sections.

Boundary Devices layer

As usual, we provide our own Boundary Devices external layer:

This includes the following custom configurations

New features

Buildroot 2021.05 includes the following versions of packages:

  • BlueZ5 5.62
  • GStreamer 1.18.5
  • GStreamer-imx v0.13.1 for i.MX6
  • GStreamer-imx v2.0 for i.MX8M
  • imx-codec 4.3.5
  • imx-gpu-viv 6.4.3.p2.0
  • imx-vpu-hantro 1.22.0 for i.MX8M
  • imx-vpu-hantro-vc 1.4.0 for i.MX8MP
  • imx-vpu 5.4.39.3 for i.MX6
  • Linux kernel 5.10.x_2.0.0
  • qcacld-2.0 LEA-3.1 Wi-Fi driver
  • Qt5 5.15.2
  • Wayland 1.19.0
  • Weston 9.0.0

There are a few differences between Yocto and Buildroot releases at this stage:

  • Buildroot images use standard packages without NXP modifications
    • This applies to GStreamer, Weston, libdrm, wayland etc…
    • The main drawback is that Weston can’t be used with G2D
    • The (big) advantage is that it makes the codebase much easier to maintain, being able to use all the latest packages without having to be stuck at an earlier version chosen by NXP
  • Open-source gstreamer-imx plugin is used instead of NXP forks
    • This allows us to have imx-related changes for GStreamer in 1 package only

Build procedure

Just like our Yocto image, we now use a Docker file to build our images on our Jenkins server so that everyone can use the exact same environment. This ensures reproducible builds without having to think about missing dependencies.

If interested in using this approach, we invite you to read the following blog post using the following docker file:

Otherwise you can follow Buildroot documentation to know the host requirements:

Once your development environment is setup properly, you can

  1.  Download the source code. To ease the repo cloning process, we decided to create a manifest to match what is done for Yocto/Android:
~$ sudo apt-get install repo
~$ mkdir ~/br2021.11 && cd br2021.11
~/br2021.11$ repo init -u https://github.com/boundarydevices/buildroot-manifest -b 2021.11.x
~/br2021.11$ repo sync
  1. Create an output folder for your configuration:
~/br2021.11$ make BR2_EXTERNAL=$PWD/buildroot-external-boundary/ 
  -C $PWD/buildroot/ O=$PWD/output nitrogen8mm_qt5_gst1_defconfig
~/br2021.11$ cd output
  1. Build the image
~/br2021.11/output$ make
  1. Your image is now ready!
~/br2021.11/output$ ls -l images/sdcard.img
~/br2021.11/output$ sudo dd if=images/sdcard.img of=/dev/sdX bs=1M

Testing the image

As usual, the login for this image is root with no password.

The external repository README details many commands that can be tested on the image.

  • Once booted up, the Weston desktop should appear automatically, from there you can start a 3D test to ensure GPU acceleration
# cd /usr/share/examples/viv_samples/vdk/
# ./tutorial7 -h 720

  • Then you can start the Qt5 Cinematic Demo which is a known GPU stress-test as it includes many effects
# CinematicExperience-demo -platform wayland
    • Here you might need to adapt the demo resolution, here are the commands used for our 1280×800 MIPI display
# sed -i 's/1920/1280/' /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience.qml
# sed -i 's/1080/720/' /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience.qml

  • You can also check the GStreamer VPU acceleration by decoding the well known Big Buck Bunny video
# wget http://linode.boundarydevices.com/videos/trailer_1080p_h264_mp3.avi -P /root/
# gst-launch-1.0 filesrc location=/root/trailer_1080p_h264_mp3.avi ! 
  decodebin ! waylandsink

  • If you have our OV5640 5MP MIPI camera, you can check the GStreamer video capture
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! 
  waylandsink

  • This build fully supports the Basler daA3840 8MP camera from Basler when using our Nitrogen 8M Plus
# gst-launch-1.0 -v v4l2src device=/dev/video0 ! waylandsink
...
[ 352.348796] wdr3 res: 1920 1080
[ 352.352471] enter isp_mi_start
[ 357.581179] ###### 62.42 fps ######
[ 362.771924] ###### 62.42 fps ######

 

  • As for Wi-Fi connectivity, the image embeds the minimum to get you started
# wpa_passphrase MYSSID MYPASSWORD >> /etc/wpa_supplicant.conf
# /etc/init.d/S50wpa-supplicant stop
# sleep 1
# /etc/init.d/S50wpa-supplicant start

# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
SSID: MYSSID
freq: 5660
RX: 47685 bytes (747 packets)
TX: 2054 bytes (0 packets)
signal: -58 dBm
tx bitrate: 150.0 MBit/s MCS 7 40MHz short GI
# udhcpc -i wlan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.1.46
udhcpc: lease of 192.168.1.46 obtained, lease time 86400
deleting routers
adding dns 192.168.1.1
# ping google.com -I wlan0
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=116 time=6.971 ms
64 bytes from 216.58.198.206: seq=1 ttl=116 time=13.145 ms
...
  • Finally, if you want to use Bluetooth connectivity, the procedure goes as follows
# echo 0 > /sys/class/rfkill/rfkill0/state
# sleep 1
# echo 1 > /sys/class/rfkill/rfkill0/state
# hciattach /dev/ttymxc0 qca 2000000 -t30 flow
Current Product ID: 0x00000008
Current Patch Version: 0x0111
Current ROM Build Version: 0x0302
Current SOC Version: 0x00000023
qca_soc_init: Rome Version (0x03020023)
====================================================
TLV Type               : 0x1
Length                 : 48668 bytes
Total Length           : 48412 bytes
Patch Data Length      : 48388 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x03e8
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Change Vendor Baud from 0x0e to 0x0d
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
# echo 1 > /sys/class/rfkill/rfkill2/state
# hciconfig hci0 up
# hcitool scan
Scanning ...
48:C1:AC:00:D7:DCVoyager PRO+

The post Buildroot 2021.11 release for i.MX platforms appeared first on Boundary Devices.

How to add Single/Dual Ethernet to our i.MX8 Boards

$
0
0

In this post, we would like to show how to add Single/Dual Ethernet to our i.MX8 Boards using the innodisk EMPL-G103/G203 module. which can connect to any of our i.MX8 platforms with a mPCIe connector.

This peripheral module allows for LAN/ethernet expansion beyond the native LAN/ethernet port on the i.MX8. The EMPL-G103 allows for one extra ethernet port, while the EMPL-G203 allows for two.

Lets demonstrate the EMPL-G203 connected to our Nitrogen8M Plus SOM + ENC Carrier Board, while using our latest Yocto Hardknott image.

Hardware Installation

The module connects via PCIe. The connection to the Nitrogen8MP + ENC Carrier is shown below:

Software Installation

This module can run on any of our OS Images, but the testing was done with our latest Yocto Hardknott image.

Validating the module works

After connecting the module via the PCIe slot on the Carrier (in this case we are connecting the EMPL-G203 for dual LAN ports, but the same applies for the EMPL-G103 single LAN port) and flashing the yocto image on the SOM, we can now boot up and validate that the module is detected and additional LAN(s) show up as network interfaces.

First, let’s use lspci to validate the module is detected

root@nitrogen8mp:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 PCI bridge: Pericom Semiconductor Device 2303 (rev 05)
02:01.0 PCI bridge: Pericom Semiconductor Device 2303 (rev 05)
02:02.0 PCI bridge: Pericom Semiconductor Device 2303 (rev 05)
03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
04:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

As we can see, lspci lists both interfaces.

Now lets see if the additional LAN(s) show up as network interfaces. You test this with the ifconfig command:

root@nitrogen8mp:~# ifconfig enp3s0
enp3s0 Link encap:Ethernet HWaddr F8:02:78:20:FE:F6 
inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31939 errors:0 dropped:0 overruns:0 frame:0
TX packets:293678 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:2117387 (2.0 MiB) TX bytes:443811010 (423.2 MiB)
Memory:18100000-181fffff 

root@nitrogen8mp:~# ifconfig enp4s0
enp4s0 Link encap:Ethernet HWaddr F8:02:78:20:FE:F7 
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:18400000-184fffff 

As we can see, ifconfig shows both interfaces, enp3s0 and enp4s0. Note that for testing (next section), we assigned a static address to enp3s0.

Testing the Performance

To test the performance, we will connect the enp3s0 interface directly to another Gibabit interface, which in this case is an Ubuntu 20.04 PC. Then we will use the iperf3 utility to test the performance, where the Ubuntu PC is the server and the Nitrogen8MP board is the client:

root@nitrogen8mp:~# iperf3 -c 10.0.0.1
Connecting to host 10.0.0.1, port 5201
[ 5] local 10.0.0.2 port 55390 connected to 10.0.0.1 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 954 Mbits/sec 0 380 KBytes 
[ 5] 1.00-2.00 sec 113 MBytes 947 Mbits/sec 0 399 KBytes 
[ 5] 2.00-3.00 sec 112 MBytes 942 Mbits/sec 0 399 KBytes 
[ 5] 3.00-4.00 sec 112 MBytes 938 Mbits/sec 0 399 KBytes 
[ 5] 4.00-5.00 sec 112 MBytes 937 Mbits/sec 0 444 KBytes 
^C[ 5] 5.00-5.42 sec 46.6 MBytes 939 Mbits/sec 0 444 KBytes 
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-5.42 sec 609 MBytes 943 Mbits/sec 0 sender
[ 5] 0.00-5.42 sec 0.00 Bytes 0.00 bits/sec receiver
iperf3: interrupt - the client has terminated

As you can see, the performance is exceptional and on par with Gigabit ethernet.

There you have it, a plug and play solution for expanding LAN/ethernet ports using the innodisk EMPL-G103/G203 module on our Nitrogen8M Plus SOM.

The innodisk solution can also be used with our Nitrogen8M & 8M Mini SBCs.

If you have any issues, please email support@boundarydevices.com

The post How to add Single/Dual Ethernet to our i.MX8 Boards appeared first on Boundary Devices.

FreeRTOS SDK v2.11 release for i.MX 8M platforms

$
0
0

One of the many advantages of developing with NXP’s i.MX 8M Family of application processors is the ability to utilize both the Cortex-A53 as well as the Cortex-M core. This blog post will first present the architecture of the i.MX 8M heterogeneous processors as a starting point for the discussion, and then explain how to build and run the FreeRTOS SDK v2.11 on its MCU.

The i.MX 8MQ and i.MX 8M Mini processors are coupling a Cortex-A53 cluster (4 cores) alongside a Cortex-M4 whereas the i.MX 8M Nano and i.MX 8M Plus are using a Cortex-M7.

For the impatient

You can download any of our currently available OS images for our i.MX 8M platforms:

Note that you can find pre-built binaries of the examples here for each CPU variant:

There are 3 examples for each variant:

  • hello_world.bin
    • simple application printing “hello world” on the M-core serial port
  • rpmsg_lite_pingpong_rtos_linux_remote.bin
    • ping pong examples between both CPU clusters using RPMSG
  • rpmsg_lite_str_echo_rtos.bin
    • TTY example showing serial communication between CPU clusters using RPMSG

You can then start your first Hello World application on the Cortex-M manually (after copying one of the binary above to your storage):

=> load mmc 0 $m4loadaddr hello_world.bin
=> bootaux $m4loadaddr

Note that all the U-Boot variables are named ‘m4x‘ for legacy reasons, but those still apply for platforms with an M7 core.

On the second serial port (UART4 for 8M Mini/Nano/Plus, UART2 for 8M Quad), you should see the following output:

Hello World!

What’s new?

As usual, it’s best to look into the source code to see the differences. However we note the following changes:

  • FreeRTOS kernel updated to its version 10.4.3-LTS-Patch-2
  • Addition of flexcan driver for the i.MX 8M Plus

Also, this is more of a kernel update but we will explain it here, the Cortex-M can now be managed from Linux starting with our 5.10+ kernels.

Meaning that it can be started, stopped and reloaded from user-space thanks to the remoteproc API!

That is why our pre-built folders now also include .elf files needed for user-space management.

Here is how to use that new API (using our i.MX 8M Mini platform for this example):

    1. Place your Cortex-M firmware (in elf format) under /lib/firmware/
# wget http://linode.boundarydevices.com/mcore/sdk_2.11/imx8mm/hello_world.elf \
  -o /lib/firmware/
    1. Tell the remoteproc device what is the name of your firmware
# echo hello_world.elf > /sys/class/remoteproc/remoteproc0/firmware
    1. Start the Cortex-M processor
# echo start > /sys/class/remoteproc/remoteproc0/state

At this stage, if you use the RPMSG sub-system, you can probe the module.

If you want to load another application (or another version), you only need to stop the current execution as shown below. Then you can re-iterate the above step to (re)load your app.

# echo stop > /sys/class/remoteproc/remoteproc0/state

Architecture

As an introduction, here is the definition of terms that will be used throughout the post:

  • MCU: Microcontroller Unit such as the ARM Cortex-M series, here referring to the Cortex-M4 or M7
  • MPU: Microprocessor Unit such as the ARM Cortex-A series, here referring to the Cortex-A53
  • RTOS: Real-Time Operating System such as FreeRTOS or MQX

The i.MX 8M processors are Heterogeneous Multicore Processors as they offer an MCU and a MPU in the same chip.

How it works?

The first thing to know is that one of the cores is the “master”, meaning that it is in charge to boot the other core which otherwise will stay in reset.

The BootROM will always boot the Cortex-A core first. In this article, the assumption is that U-Boot is your system bootloader. The reason is that U-Boot provides a bootaux command which allows the Cortex-M to start.

Once started, both CPU clusters are on their own, executing different instructions at different speeds.

Where is the code running from?

It actually depends on the application linker script used. When GCC is linking your application into an ELF executable file, it needs to know the code location in memory.

There are several options in both processors, code can be located in one of the following:

  • TCM (Tightly Coupled Memory): 128kB available
  • DDR: up to 1MB available (can be increased, set in the device tree)

External memories, such as the DDR, offer more space but are also much slower to access.

In this article, every application runs from the TCM as it is the option offering the best performance.

When is the MCU useful?

The MCU is perfect for all the real-time tasks whereas the MPU can provide a great UI experience with non real-time OS such as GNU/Linux.

It is understood that the  Linux kernel is not real-time, not deterministic whereas FreeRTOS on Cortex-M is.

Also, since its firmware is pretty small and fast to load, the MCU can be fully operating within a few hundred milliseconds whereas it usually takes Linux OS much longer to be operational.

Examples of applications where the MCU has proven to be useful:

  • Motor control: DC motors only perform well in a real-time environment since feedback response time is crucial
  • Automotive: the MCU can handle CAN messages and be operational at a very early stage

Resource Domain Controller (RDC)

Since both cores can access the same peripherals, a mechanism has been created to avoid concurrent access, ensuring a program’s behavior on one core does not depend on what is executed/accessed on the other core.

This mechanism is the RDC which grants peripheral and memory access permissions to each core.

The examples and demo applications in the FreeRTOS BSP use RDC to allocate peripheral access permission. When running the ARM Cortex-A application with the FreeRTOS BSP example/demo, it is important to respect the reserved peripheral.

The FreeRTOS BSP application has reserved peripherals that are used only by ARM Cortex-M, and any access from ARM Cortex-A core on those peripherals may cause the program to hang.

The default RDC settings are:

  • The ARM Cortex-M core is assigned to RDC domain 1, and ARM Cortex-A core and other bus masters use the default assignment (RDC domain 0).
  • Every example/demo has its specific RDC setting in its board.c (see BOARD_RdcInit() function).

The user of this package can remove or change the RDC settings in the example/demo or in his application. We recommend limiting the access of a peripheral to the only core using it when possible.

Also, in order for a peripheral not to show up as available in Linux, it is mandatory to disable it in the device, which is why it is required to use a specific device tree when using the MCU.

The device tree also declares different memory sections and reserves them for FreeRTOS communication/shared memory.

Remote Processor Messaging (RPMsg)

The Remote Processor Messaging (RPMsg) is a virtio-based messaging bus that allows Inter Processor Communications (IPC) between independent software contexts running on homogeneous or heterogeneous cores present in an Asymmetric Multi Processing (AMP) system.

The RPMsg API is compliant with the RPMsg bus infrastructure present in upstream Linux 3.4.x kernel onward.

This API offers the following advantages:

  • No data processing in the interrupt context
  • Blocking receive API
  • Zero-copy send and receive API
  • Receive with timeout provided by RTOS

Note that RPMsg uses the DDR by default to exchange messages between cores.

Where can I find more documentation?

The BSP comes with some documentation which we recommend reading in order to know more on the subject:

Build instructions

Development environment setup

In order to build the FreeRTOS BSP, you first need to download and install a toolchain for ARM Cortex-M processors.

~$ cd && mkdir toolchains && cd toolchains
~/toolchains$ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
~/toolchains$ tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
~/toolchains$ rm gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2

FreeRTOS relies on cmake to build, so you also need to make sure the following packages are installed on your machine:

~$ sudo apt-get install make cmake

Download the BSP

The FreeRTOS SDK v2.11 is available from our GitHub freertos-boundary repository.

~$ git clone https://github.com/boundarydevices/freertos-boundary.git freertos
~$ cd freertos
~/freertos$ git checkout <branch_name>

You need to use the proper branch_name for your platform:

Finally, you need to export the ARMGCC_DIR variable so FreeRTOS knows your toolchain location.

~/freertos$ export ARMGCC_DIR=~/toolchains/gcc-arm-none-eabi-7-2017-q4-major
~/freertos$ export PATH=$PATH:~/toolchains/gcc-arm-none-eabi-7-2017-q4-major/bin

Build the FreeRTOS apps

All the applications are located under the boards/ folder:

~/freertos$ tree boards/evk*/ -L 1
boards/evk*/
├── cmsis_driver_examples
├── demo_apps
├── driver_examples
├── multicore_examples
├── project_template
└── rtos_examples

As an example, we will build the helloworld application:

~/freertos$ cd boards/evk*/demo_apps/hello_world/armgcc/
~/freertos/boards/evk*/demo_apps/hello_world/armgcc$ ./build_release.sh
~/freertos/boards/evk*/demo_apps/hello_world/armgcc$ ls release/
hello_world.bin  hello_world.elf

You can then copy that hello_world.bin firmware to the root of the eMMC or any other storage you use.

Run the demo apps

Basic setup

By default, U-Boot loads the firmware from eMMC to TCM.

Before going any further, make sure to hook up the second serial port to your machine as it will display data coming from the MCU.

This blog post only considers the firmware file is named m4_fw.bin, if you wish to use another name, you need to set the m4image variable:

=> setenv m4image hello_world.bin
=> saveenv

If you want to load the MCU fimware manually from eMMC, here is the procedure:

=> load mmc 0 $m4loadaddr $m4image
=> bootaux $m4loadaddr

If you want to load the MCU fimware from TFTP:

=> dhcp $m4loadaddr 192.168.1.60:$m4image
=> bootaux $m4loadaddr

In order to start the MCU automatically at boot up, we need to set a variable that will tell the boot.scr to load the firmware.

To do so, make sure to save this variable.

=> setenv m4enabled 1
=> saveenv

Note that this section keeps on using the previous way of loading apps (from U-Boot) but you can now use the remoteproc approach if you want.

Hello World app

The Hello World project is a simple demonstration program that uses the BSP software. It prints the “Hello World” message to the ARM Cortex-M terminal using the BSP UART drivers.

The purpose of this demo is to show how to use the UART and to provide a simple project for debugging and further development.

In U-Boot, type the following:

=> setenv m4image hello_world.bin
=> load mmc 0 $m4loadaddr $m4image
=> bootaux $m4loadaddr

On the second serial port, you should see the following output:

Hello World!

You can then type anything in that terminal, it will be echoed back to the serial port as you can see in the source code.

RPMsg TTY demo

This demo application demonstrates the RPMsg remote peer stack. It works with Linux RPMsg master peer to transfer string content back and forth. The Linux driver creates a tty node to which you can write to. The MCU displays the data and echoes back the same message as an acknowledgement. The tty reader on ARM Cortex-A core can get the message, and start another transaction. The demo demonstrates RPMsg’s ability to send arbitrary content back and forth.

In U-Boot, type the following in order to boot the OS automatically while loading the M core:

=> setenv m4image rpmsg_lite_str_echo_rtos.bin
=> setenv m4enabled 1
=> boot

On the second serial port, you should see the following output:

RPMSG String Echo FreeRTOS RTOS API Demo...

Once Linux has booted up, you need to load the RPMsg module so the communication between the two cores can start.

# modprobe imx_rpmsg_tty
# echo "this is a test" > /dev/ttyRPMSG30

The last command above writes into the tty node, which means that the Cortex-M received data:

Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]
Get Message From Master Side : "this is a test" [len : 14]
Get New Line From Master Side

RPMsg Ping Pong demo

Same as previous demo, this one demonstrates the RPMsg communication. After the communication channels creation, Linux OS transfers the first integer to FreeRTOS OS. The receiving peer adds 1 to the integer and transfers it back, a hundred times and then stops.

In U-Boot, type the following:

=> setenv m4image rpmsg_lite_pingpong_rtos_linux_remote.bin
=> setenv m4enabled 1
=> boot

On the second serial port, you should see the following output:

RPMSG Ping-Pong FreeRTOS RTOS API Demo...

Once Linux has booted up, you need to load the RPMsg module so the communication between the two cores can start.

# modprobe imx_rpmsg_pingpong
[   30.501148] get 1 (src: 0x1e)
[   30.506527] get 3 (src: 0x1e)
...
[   30.730958] get 101 (src: 0x1e)
[   30.734104] imx_rpmsg_pingpong virtio0.rpmsg-openamp-demo-channel.-1.30: goodbye!

While you can send the received data from the MCU on the main serial port, you can also see the data received from the MPU on the secondary serial port.

RPMSG Share Base Addr is 0xb8000000
Link is up!
Nameservice announce sent.
Waiting for ping...
Sending pong...
...
Waiting for ping...
Sending pong...
Ping pong done, deinitializing...
Looping forever...

 

That’s it, you should now be able to build, modify, run and debug!

The post FreeRTOS SDK v2.11 release for i.MX 8M platforms appeared first on Boundary Devices.

Yocto Honister Release for i.MX 8 Platforms

$
0
0

We are pleased to announce a new Yocto release Honister for our Nitrogen8 family of SBCs and SOMs based on i.MX 8 processors. This release includes our latest 5.10 kernel. Below you will find download links for the images as well as detailed instructions for building including a features set.

For the Impatient

You can download the Yocto images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains NXP content.

How to Burn

You can program the SW to eMMC using the instructions below:

programming-emmc-on-i-mx-platforms

You can also program the SW to SD Card or USB Stick via zcat and dd under Linux:

~$ zcat *boundary-image*.wic.gz | sudo dd of=/dev/sdX bs=1M

In addition, you can use the balenaEtcher utility to flash the eMMC, SD Card or USB stick via Windows or Linux:

balenaEtcher

Build procedure

This image uses the honister branch of our boundary-bsp-platform repository.

To build the image, we recommend using a Docker Container so that you can build with a reproducible and stable build environment. Otherwise, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Then create your build directory and initialize everything.

~$ mkdir ~/honister && cd honister
~/honister$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b honister
~/honister$ repo sync

Next, setup the environment for building. For this image we will be building the fslc-xwayland distro for the target machine

~/honister$ MACHINE=<MACHINE> DISTRO=fslc-xwayland . setup-environment build

Now bitbake boundary-image-multimedia-full which is equivalent to fsl-image-multimedia-full with Boundary-specific packages added such as BD-SDMAC support.

~/honister/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above, with the layers being at commits as per the time when repo sync was executed. If you are interested in each project revision at the time of the build, you can find a frozen manifest for those images here.

The image file will deploy to tmp/deploy/images/{MACHINE}/boundary-image-multimedia-full-{MACHINE}.wic.gz.

Features list

The image built above contains the following components:

  • Linux kernel 5.10.x_2.0.0
  • U-Boot 2020.10
  • Weston 9.0.0 for i.MX
  • GStreamer 1.18.0 for i.MX
  • GPU Vivante libraries 6.4.3p2.2
  • VPU Hantro libraries v1.24.0
  • ISP VVCAM v4.2.2.15
  • qcacld-lea-3.1 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.61 with support for BD-SDMAC

The next sub-sections will describe how to test most features.

Display support

Please make sure your platform includes the latest U-Boot:

This version of U-Boot supports the display configuration, allowing to use any of the following displays:

Note that we’ve noticed that the NXP HDMI driver is picky when it comes to custom display timings (sometimes refuses to set the clock).

So if you are experiencing any issue with HDMI, please try entering the following commands in U-Boot in order to force the use of standard timings:

=> setenv cmd_custom 'setenv bootargs $bootargs drm_kms_helper.edid_firmware=HDMI-A-1:edid/1280x720.bin'
=> saveenv

GPU acceleration

As usual, in order to test the GPU you can use the example apps provided by Vivante:

root@<MACHINE>:~# /opt/imx-gpu-sdk/GLES2/Blur/GLES2.Blur_Wayland -d

Camera input

Camera MIPI-CSI input can be checked using our OV5640 MIPI with GStreamer:

root@<MACHINE>:~# gst-launch-1.0 v4l2src device=/dev/video0 ! \
    video/x-raw,width=1280,height=720 ! waylandsink

Basler camera input

This build fully supports the Basler daA3840 8MP camera from Basler when using our Nitrogen 8M Plus which is part of our Evaluation Kit:

The isp-vvcam driver and imx8-isp service are loaded automatically when the camera is detected.

From there a simple GStreamer pipeline will allow you to see the stream:

root@nitrogen8mp:~# gst-launch-1.0 -v v4l2src device=/dev/video0 ! waylandsink
...
[  352.348796] wdr3 res: 1920 1080 
[  352.352471] enter isp_mi_start
[  357.581179] ###### 62.42 fps ######
[  362.771924] ###### 62.42 fps ######

Ethernet

Once the eth0 interface is up, you can use iperf3 to check Ethernet performances:

root@<MACHINE>:~# iperf3 -c 192.168.1.60                                                                                                                         
Connecting to host 192.168.1.60, port 5201
[  5] local 192.168.1.13 port 32880 connected to 192.168.1.60 port 5201
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  1.09 GBytes   932 Mbits/sec                  receiver

Wi-Fi

Wi-Fi can be tested with nmcli as shown below:

root@<MACHINE>:~# nmcli d wifi connect <network_name> password <password>
root@<MACHINE>:~# iw wlan0 link
Connected to a4:3e:51:08:54:f6 (on wlan0)
        SSID: Jabu_5GHz
        freq: 5240
        RX: 3243 bytes (31 packets)
        TX: 9117 bytes (48 packets)
        signal: -79 dBm
        tx bitrate: 15.0 MBit/s MCS 0 40MHz short GI
root@<MACHINE>:~# ping google.com -Iwlan0                                                                                                                       
PING google.com (216.58.198.206): 56 data bytes
64 bytes from 216.58.198.206: seq=0 ttl=55 time=3.470 ms
...

Bluetooth

For products with a Silex bluetooth module, you’ll be able to connect using our handy silex-uart script with the following commands:

root@<MACHINE>:~# hciconfig hci0 up
root@<MACHINE>:~# hcitool scan
Scanning ...

VPU decoding

If your platform supports VPU decoding, here is an example on how to test it using the gplay tool:

root@<MACHINE>:~# wget http://linode.boundarydevices.com/videos/Hobbit-1080p.mov
root@<MACHINE>:~# gplay-1.0 /home/root/Hobbit-1080p.mov

VPU encoding

Here is a simple example that shows how to encode a video stream from the camera into H.264 using the VPU encoder:

root@<MACHINE>:~# gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! 'video/x-raw,width=1920,height=1080' \
                    ! vpuenc_h264 ! filesink location=test.h264
^C
root@<MACHINE>:~# gst-launch-1.0 filesrc location=test.h264 typefind=true ! 'video/x-h264' ! \
                    h264parse ! vpudec ! waylandsink

CAN

For platforms with CAN, you’ll be able to bring up the interface(s) using this following command:

root@<MACHINE>:~# ip link set can0 up type can bitrate 500000

From this point, you can use commands such as cansend and candump to send or display messages on the bus respectively.

 

NPU support

NPU support is fully integrated into this build when using our Nitrogen 8M Plus with TensorFlowLite and ARMNN support of the NPU.

You can find various example demos here:

IMX-MACHINE-LEARNING-UG.pdf

 

If you have any issues, please email support@boundarydevices.com

The post Yocto Honister Release for i.MX 8 Platforms appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live