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

Android 10 release for i.MX8 platforms

$
0
0

We are glad to deliver the latest Android 10 1.0.0 release for all our i.MX8M-based Nitrogen platforms:

Android 10


For the impatient

You can download the Android 10 images from here:

Update 20200818 -> 20200825 changelog:

  • Updated kernel stable release to 4.19.141
  • Fixed Nitrogen8M Nano SBC support (rev1)

Update 20200512 -> 20200818 changelog:

  • Updated kernel stable release to 4.19.134
  • Fixed M4/M7 core boot
  • Added Serial port / GPIO SELinux rules
  • Fixed WiFi P2P for Nitrogen8M
  • Added SD Card boot support

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 q10*nitrogen8*.zip -d q10-nitrogen8
~/$ cd q10-nitrogen8
~/q10-nitrogen8$ ./device/boundary/scripts/flash_fastboot.sh

Since our i.MX8 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:

~/q10-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:\q10-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 q10*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

Once the OS is flashed, make sure to update U-Boot:

=> run upgradeu

Reason for that update is explained later in that article.

What’s new?

This section will only describe the changes brought either by the OS update itself or modified/added features.

Android 10 OS updates

Google provides a list of notable changes for developers:

Build variant change

Although we used to provide eng(ineering) builds as our prebuilt images, Android enables too many security features by default that deprecated such approach.

For that reason, all our prebuilt images are now userdebug images, and we strongly recommend our customers to only ship with user variants to avoid security issues.

SELinux

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

If you are using the userdebug build, you can still 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.

A/B vs. non-A/B

Considering the size of our eMMC storage (8GB for most devices, 16GB for some) we decided to focus on non-A/B partitioning.

This approach allows to save some space and keep the most space for your applications.

However, considering that we now support all the security features, we can easily switch to A/B scheme, let us know if you have any interest in it.

Bootloader Control Block

Another notable change in this release is with the use of the Bootloader Control Block (BCB).

In previous releases, the bootloader was reading one SNVS register (non-volatile) to either execute fastboot or even go to recovery partition.

We are now using the misc partition to receive messages from the OS. This approach is mandatory for A/B partitioning.

AVB2.0

For the first time, our Android release supports Android Verified Boot 2.0!

That is a big deal as it makes the release more secure while getting our build process closer to standard AOSP.

This news might trigger a few questions:

What does that mean? It basically means that the integrity of the critical partitions is checked at boot up to make sure nobody tampered with them.

Where is that integrity checked? There are two steps actually:

  1. The bootloader (U-Boot in our case) first checks the boot partition against the hash present inside the vbmeta partition
    • If the check fails, it won’t go any further
    • If the check succeeds, it sets the kernel cmdline to include the necessary info for the OS
  2. The OS (Android) then checks the hash/integrity of all the critical partitions
    • Which is composed of: dtbo, boot, system, vendor

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

$ adb root
$ adb disable-verity
$ adb reboot

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

It goes without saying that this disablement isn’t possible on user builds.

Do we need a special U-Boot for this? No, not really. You need an up-to-date U-Boot version (at least as new as this blog post) in order to make sure all the Android features are enabled.

That is why the first section of the article asks for U-Boot update after flashing the release.

But the U-Boot version being used is still compatible with our Linux images.

Main reason for this compatibility is that, unlike the NXP version, we only rely the upstream U-Boot/Android features, allowing us to be more flexible and future-proof.

Preboot image

That last part about U-Boot being the same as for the Linux release might bring some questions on how it works.

How can we be compatible with our Linux images that load a boot.scr script from the first partition and yet use the regular Android bootimage?

Well that’s where we cheat a little, we created a new preboot partition that only includes:

  • boot.scr : script executed by U-Boot by default
    • in charge of making of the OS checks (verity, BCB etc) and set up the display
  • u-boot.<board> : u-boot binaries for upgrade

That approach gives us flexibility and it can easily be removed for a custom design, then the boot.scr content would become the default U-Boot environment.

dtbo image

This release also makes use of a new aspect of Android: the dtbo image.

It should include overlays of a default device tree blob included in the boot image. However since dtb overlays are not supported by the kernel, NXP is using populating the dtbo image with a regular dtb file.

In our case, we kept that approach but added the support for multiple dtb files inside the same dtbo image.

That allows us to have one OS images (like above) that targets several hardware variants (like SBC and SOM) at once.

Are we in Treble?

Yes! This marks our first release Treble-compliant!

This means that the OS is fully compliant with Android requirements, allowing for easier OS updates.

Linux Kernel 4.19.x

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

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 HALv3 version
    • This releases offers continuous autofocus support for our cameras
  • Support for our 802.11b/g/n/ac + BT4.1 Silex Module
  • Display rotation setting from U-Boot
    • Note that this doesn’t work well on 8M Mini for now, see this thread to be updated
=> setenv hwrotation 270
=> saveenv
=> reset
  • Variety of accessories
  • Up to date kernel stable release
    • While NXP kernel is based upon 4.19.42 kernel, we provide latest updates up to 4.19.122
    • This includes 8700+ bug/CVE fixes that makes your device much more secure

Source 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:

For those already familiar with our releases, here is a condensed version to get the Android 10 source code:

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git \
       -b boundary-android-10.0.0_1.0.0
~/myandroid$ repo sync
~/myandroid$ export TEMPORARY_DISABLE_PATH_RESTRICTIONS=true
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose nitrogen8m / nitrogen8mm / nitrogen8mn 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 kernel the 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

There’s also one variable (TEMPORARY_DISABLE_PATH_RESTRICTIONS) that needs to be set as Android build now forbids the use of mke2fs which is required for our preboot partition. We suggest setting this inside your .bashrc or .profile user file.

 

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

The post Android 10 release for i.MX8 platforms appeared first on Boundary Devices.


BD-SDMAC Bluetooth Update – Now BT 5.0 Compatible

$
0
0

We are pleased to announce that our BD-SDMAC Wifi + BT module is now Bluetooth 5.0 Compatible!

We have updated our qcacld-2.0 driver and qca-firmware in order to support this. Our latest Yocto Zeus images already have this support included.

Testing/Validation of Bluetooth 5.0

In order to test/validate BT 5.0 with the BD-SDMAC we will do the following:

  • Setup Yocto Image to enable testing tools
  • Bring up the Bluetooth interface (hci0)
  • Confirm BT 5.0 version
  • Test pairing/connecting to BT 5.0 compatible device
  • Test data transfer with audio streaming.
  • Test BLE using gatttool

Test Setup

Nitrogen8M Mini with a BD-SDMAC module running Yocto 3.0 Zeus

Kernel Revision: 4.14.x_2.0.0_ga

Bluetooth Test Devices:

  • iPhone 8
  • JBL Flip 4 Bluetooth Speaker
  • Windows 10 PC

Note that we are testing with Nitrogen8M Mini, but this testing applies to all platforms with the BD-SDMAC.

Also note that in this post we are testing using Yocto, but just know that similar testing applies to other Linux OSs as well. 

Setup Yocto Image to enable Bluetooth audio streaming

We need to make one modification to the Yocto Zeus build in order to enable audio streaming.

Assuming you have followed the Build Procedure in our Yocto 3.0 Zeus post, we need to add pulseaudio as a DISTRO_FEATURE in local.conf. 

DISTRO_FEATURES_append = " pulseaudio"

Now we will build and flash the image are ready to test.

Bring up Bluetooth Interface

We will initialize the interface using our handy silex-uart script.

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found

Then, we will bring up the interface using hciconfig.

root@<MACHINE>:~# hciconfig hci0 up

Confirm BT 5.0 Version

We can now confirm the module is using BT 5.0 firmware using hciconfig

root@nitrogen8mm:~# hciconfig -a
    hci0: 
        Type: Primary Bus: UART
        BD Address: E0:4F:43:44:95:3B ACL MTU: 1024:7 SCO MTU: 60:8
        UP RUNNING
        RX bytes:1363 acl:0 sco:0 events:75 errors:0
        TX bytes:1193 acl:0 sco:0 commands:75 errors:0
        Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'nitrogen8mm'
        Class: 0x200000
        Service Classes: Audio
        Device Class: Miscellaneous,
        HCI Version: 5.0 (0x9) Revision: 0x0
        LMP Version: 5.0 (0x9) Subversion: 0x25a
        Manufacturer: Qualcomm (29)

The LMP version denotes that we are using Bluetooth 5.0

Test Pairing/Connecting

In this example, we will pair an iPhone using bluetoothctl

Start bluetoothctl.

root@nitrogen8mm:~# bluetoothctl
Agent registered
[bluetooth]#

Start scanning.

[bluetooth]# scan on
Discovery started
[NEW] Device AA:BB:CC:DD:EE:FF Iphone
[bluetooth]#

Grab MAC of iPhone and pair.

[bluetooth]# pair AA:BB:CC:DD:EE:FF
Attempting to pair with AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Connected: yes
Request confirmation

Verify passkey on both ends.

[agent] Confirm passkey 141814 (yes/no): yes
[CHG] Device AA:BB:CC:DD:EE:FF Modalias: bluetooth:...
[CHG] Device AA:BB:CC:DD:EE:FF UUIDs:

....
[CHG] Device AA:BB:CC:DD:EE:FF ServicesResolved: yes
[CHG] Device AA:BB:CC:DD:EE:FF Paired: yes
Pairing successful

Trust this device.

[bluetooth]# trust AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Trusted: yes
Changing AA:BB:CC:DD:EE:FF trust succeeded

Finally, connect to the device.

[bluetooth]# connect AA:BB:CC:DD:EE:FF
Attempting to connect to AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Connected: yes
Connection successful
[CHG] Device AA:BB:CC:DD:EE:FF ServicesResolved: yes
[Iphone]#

Test Data Transfer With Audio Streaming

For testing audio streaming, we need use pulseaudio and must start it before bringing the Bluetooth interface up. 

After bootup start pulseaudio as a daemon (you can ignore the error message it prints).

root@nitrogen8mm:~# pulseaudio -D
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

Next, load a couple modules required for Bluetooth audio streaming using pactl.

root@nitrogen8mm:~# pactl load-module module-bluetooth-discover
18
root@nitrogen8mm:~# pactl load-module module-switch-on-connect
20

Now you can bring up the interface as directed above and connect either a slave device such a Bluetooth speaker to stream audio to, or connect to a master device like a phone or PC to stream audio from and play through the boards speakers. 

If pairing to a master device, after connection the Nitrogen device will show up as speakers to play audio to.

For example here is how the Nitrogen device shows up on a Windows 10 PC when we do the above steps. 

If pairing to a slave device to stream audio to, there a couple more steps required. In this example we will use a JBL Flip 4 Bluetooth speaker.

After doing the above steps to start pulseaudio and connect to the speaker, lets make sure its available as a sink for playing audio once again using pactl.

root@nitrogen8mm:~# pactl list sinks
Sink #0
State: SUSPENDED
Name: alsa_output.platform-sound-wm8960.analog-mono
Description: Built-in Audio Analog Mono
Driver: module-alsa-card.c
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Owner Module: 6
Mute: no
Volume: mono: 52057 / 79% / -6.00 dB
balance 0.00
Base Volume: 52057 / 79% / -6.00 dB
Monitor Source: alsa_output.platform-sound-wm8960.analog-mono.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HiFi wm8960-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "wm8960-audio"
alsa.long_card_name = "wm8960-audio"
device.bus_path = "platform-sound-wm8960"
sysfs.path = "/devices/platform/sound-wm8960/sound/card0"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "8816"
device.buffering.fragment_size = "2204"
device.access_mode = "mmap"
device.profile.name = "analog-mono"
device.profile.description = "Analog Mono"
device.description = "Built-in Audio Analog Mono"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output-speaker: Speakers (priority: 10000)
analog-output-headphones: Headphones (priority: 9000, not available)
Active Port: analog-output-speaker
Formats:
pcm

Sink #1
State: SUSPENDED
Name: bluez_sink.00_42_79_A1_96_30.a2dp_sink
Description: JBL Flip 4
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 21
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_sink.00_42_79_A1_96_30.a2dp_sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
bluetooth.protocol = "a2dp_sink"
device.description = "JBL Flip 4"
device.string = "00:42:79:A1:96:30"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "speaker"
bluez.path = "/org/bluez/hci0/dev_00_42_79_A1_96_30"
bluez.class = "0x240414"
bluez.alias = "JBL Flip 4"
device.icon_name = "audio-speakers-bluetooth"
Ports:
speaker-output: Speaker (priority: 0)
Active Port: speaker-output
Formats:
pcm

As you can see the JBL Flip 4 shows up as Sink #1. Now lets stream some audio to it.

Grab the “Name:” Field from Sink #1 above and set it as pulseaudio’s default sink.

root@nitrogen8mm:~# pactl set-default-sink bluez_sink.00_42_79_A1_96_30.a2dp_sink

Now play any .wav file using paplay

root@nitrogen8mm:~# paplay test.wav

Validate the audio is playing, and now we have successfully validated data transfer via audio streaming using BT 5.0.

BLE Testing using gatttool 

gatttool is a handy tool for testing BLE devices. Instead of reinventing the wheel in terms of instructions for use, please instead use this post as a helpful guide for using the tool.

There you have it, we have provided a good validation of Bluetooth 5.0 on our BD-SDMAC BT module. 

 

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

The post BD-SDMAC Bluetooth Update – Now BT 5.0 Compatible appeared first on Boundary Devices.

High Assurance Boot (HAB) – i.MX8M edition

$
0
0

This post intends to provide all the information you need to understand and use the HAB (High Assurance Boot) on your Boundary Devices Nitrogen8 platform.

The goal is also to provide an update to our HAB for Dummies blog post so that new platforms are covered.

Indeed, the i.MX8M family (including i.MX8MQ, i.MX8M Mini and i.MX8M Nano) have a different boot process than older i.MX6/7 platforms. So although some of the details from the previous blog post still apply, a new version is required to explain/show the differences.

For simplicity and clarity, this guide and examples have been made on i.MX8M Mini based Nitrogen8M_Mini but the procedure applies to the entire Nitrogen8 family.

Please contact us if you need more details for other platforms.

Prerequisites

HAB architecture

Before getting started, let’s explain a few acronyms related to this subject

  • CSF: Command Sequence File
  • CST: Code-Signing Tool
  • DCD: Device Configuration Data
  • DEK: Data Encryption Key
  • HAB: High Assurance Boot
  • IVT: Image Vector Table
  • SRK: Super Root Key

The HAB library is a sub-component of the boot ROM on i.MX processors. It is responsible for verifying the digital signatures included as part of the product software and ensures that, when the processor is configured as a secure device, no unauthenticated code is allowed to run.

In short, enabling HAB/secure boot on your platform prevents hackers to alter the boot process, making sure only the software you have previously signed/approved can be ran. The ROM and HAB cannot be changed so they can be considered as trusted software components.

First, i.MX Boot ROM reads the eFuses to determine the security configuration of the SoC and the type of the boot device.

The ROM then loads the SPL image into the OCRAM memory along with the DDR training binaries. Next it verifies the authenticity of the SPL code both in flash and memory against the signature embedded in the binary (CSF).

That is the first stage verification. If it fails, execution is not allowed to leave the ROM for securely configured SoCs, also called “closed” devices.

However, with an “open” device, you will be able to see HAB events which will tell you if the image would pass the authentication process.

If it succeeds (or if the device is open), the Boot ROM executes the HDMI/DP Firmware first which in turn jumps to SPL. For other i.MX8M processors, there’s no such firmware so it goes straight to SPL.

SPL initializes the clocks, PMIC, (LP)DDR4 and UART. Then it is able to load and verify the rest of the components using the HAB APIs to extend the root of trust

A FIT image (see here for details) is used to package all those components which are:

  • U-Boot binary + device tree blob (dtb)
  • ARM Trusted Firmware (ATF)
  • OP-TEE binary (TrustZone, optional, not covered in this blog post)

Finally, if that second stage verification succeeds, ATF is executed which will in turn execute U-Boot.

The root of trust can be extended again at U-Boot level to authenticate Kernel and M4 images.

In order to understand the signed image generation, it is best to have a look at the final flash.bin image layout.

You can see there are 2 CSF binaries required, one per verification stage:

  1. CSF SPL that is used by Boot ROM to authenticate SPL + DDR FW
  2. CSF FIT that is used by SPL (through HAB APIs) to authenticate FIT components

How to enable/use it?

The below procedure will describe an example on how it has been done on one Nitrogen8M_Mini, make sure to modify the serial/password/keys values by your own!

1- Creation of the keys

First you need to unpack the Code Siging Tools package from NXP:

~$ tar xzf cst-3.3.0.tar.gz
~$ cd release/keys

Then a couple of files need to be created, the first one being name ‘serial’ with an 8-digit content. OpenSSL uses the contents of this file for the certificate serial numbers.

~/release/keys$ vi serial
42424242

Create a file called ‘key_pass.txt’ that contains your pass phrase that will protect the HAB code signing private keys.
The format of this file is the pass phrase repeated on the first and second lines of the file.

~/release/keys$ vi key_pass.txt
Boundary123!
Boundary123!

You can now create the signature keys.

~/release/keys$ ./hab4_pki_tree.sh
...
Do you want to use an existing CA key (y/n)?: n
Do you want to use Elliptic Curve Cryptography (y/n)?: n
Enter key length in bits for PKI tree: 4096
Enter PKI tree duration (years): 20
How many Super Root Keys should be generated? 4
Do you want the SRK certificates to have the CA flag set? (y/n)?: y
...

Create the fuse table and binary to be flashed later.

~/release/keys$ cd ../crts/
~/release/crts$ ../linux64/bin/srktool -h 4 -t SRK_1_2_3_4_table.bin -e SRK_1_2_3_4_fuse.bin -d sha256 -c \
./SRK1_sha256_4096_65537_v3_ca_crt.pem,./SRK2_sha256_4096_65537_v3_ca_crt.pem,./SRK3_sha256_4096_65537_v3_ca_crt.pem,./SRK4_sha256_4096_65537_v3_ca_crt.pem -f 1

2- Flashing the keys

The fuse table generated in the previous section is what needs to be flashed to the device.

~/release/crts$ hexdump -e '/4 "0x"' -e '/4 "%X""\n"' < SRK_1_2_3_4_fuse.bin
0x3402271
0x67166C19
0x64679AE8
0x25056CEE
0x676D664
0xE46DD5CA
0x3A561C27
0x9E6742BA

The above command gives you what needs to be flashed in the proper order.

The commands below are made for i.MX8MQ, i.MX8M Mini and i.MX8M Nano only.

Make sure to use your own values here, otherwise your board will never be able to authenticate the boot image.

=> fuse prog -y 6 0 0x3402271
=> fuse prog -y 6 1 0x67166C19
=> fuse prog -y 6 2 0x64679AE8
=> fuse prog -y 6 3 0x25056CEE
=> fuse prog -y 7 0 0x676D664
=> fuse prog -y 7 1 0xE46DD5CA
=> fuse prog -y 7 2 0x3A561C27
=> fuse prog -y 7 3 0x9E6742BA

If you flashed the above by mistake, without reading the note above, know that we share the set of keys used for this blog post:

3- Build U-Boot/SPL with security features

Build U-Boot with the CONFIG_SECURE_BOOT configuration enabled. Here is an example for Nitrogen8M_Mini:

~$ git clone https://github.com/boundarydevices/u-boot-imx6 \
     -b boundary-v2018.07
~$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.5.bin
~$ chmod +x firmware-imx-8.5.bin
~$ ./firmware-imx-8.5.bin
~$ cp firmware-imx-8.5/firmware/hdmi/cadence/signed_*.bin u-boot-imx6/
~$ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin u-boot-imx6/
~$ cd u-boot-imx6
~/u-boot-imx6$ export ARCH=arm64
~/u-boot-imx6$ export CROSS_COMPILE=aarch64-linux-gnu-
~/u-boot-imx6$ make nitrogen8mm_2g_defconfig
~/u-boot-imx6$ make menuconfig
<select 'ARM architecture' - 'Support i.MX HAB features'>
~/u-boot-imx6$ make flash.bin V=1
...
========= OFFSET dump =========
Loader IMAGE:
 header_image_off 	0x0
 image_off 		0x40
 csf_off 		0x2ae00
 spl hab block: 	0x7e0fc0 0x0 0x2ae00

Second Loader IMAGE:
 sld_header_off 	0x57c00
 sld_csf_off 		0x58c20
 sld hab block: 	0x401fcdc0 0x57c00 0x1020

Note that the “hab block” lines are very important when creating the .csf files:

  • spl hab block: includes IVT (SPL) + u-boot-spl-ddr.bin
  • sld hab block: includes FDT (FIT header) + IVT (FIT)

Also the “csf_off” are useful to know where to copy the signatures.

~/u-boot-imx6$ ./print_fit_hab.sh 
0x40200000 0x5AC00 0xA0AF0
0x402A0AF0 0xFB6F0 0x72E0
0x920000 0x1029D0 0x9170

The above output gives you the addresses/offsets of (in that order):

  • u-boot-nodtb.bin
  • u-boot.dtb
  • bl31.bin (ARM Trusted Firmware)

4- Sign your flash.bin bootloader

Go to the CST tools again:

~$ cd ~/release/linux64/bin/
~/release/linux64/bin$ cp ~/u-boot-imx6/flash.bin .

At this point you need to create two .csf file using the information from previous section:

  1. csf_spl.txt: definition of the SPL signature which includes:
    • IVT (SPL) + u-boot-spl-ddr.bin (see spl hab block)
  2. csf_fit.txt: definition of the FIT signature that includes:
    • FDT (FIT) + IVT (FIT) (see sld hab block)
    • u-boot-nodtb.bin (see print_fit_hab.sh output)
    • u-boot.dtb (see print_fit_hab.sh output)
    • bl31.bin (see print_fit_hab.sh output)

You can download the files we used for this blog post:

~/release/linux64/bin$ wget https://storage.googleapis.com/boundarydevices.com/csf_spl.txt
~/release/linux64/bin$ wget https://storage.googleapis.com/boundarydevices.com/csf_fit.txt 
... edit the size in the "Blocks = " lines in both files...
~/release/linux64/bin$ ./cst -i csf_spl.txt -o csf_spl.bin
CSF Processed successfully and signed data available in csf_spl.bin
~/release/linux64/bin$ ./cst -i csf_fit.txt -o csf_fit.bin
CSF Processed successfully and signed data available in csf_fit.bin

At this point, all the signatures are generated, you can now insert them into the (unsigned) flash.bin:

~/release/linux64/bin$ cp flash.bin signed_flash.bin
~/release/linux64/bin$ dd if=csf_spl.bin of=signed_flash.bin seek=$((0x2ae00)) bs=1 conv=notrunc
~/release/linux64/bin$ dd if=csf_fit.bin of=signed_flash.bin seek=$((0x58c20)) bs=1 conv=notrunc

You can see that the seek addresses match the ‘csf_off‘ info provided by U-Boot.

That’s a lot of offsets/addresses to remember!

You might wonder if there isn’t a way to make the whole process above simpler?

Writing this blog post required a lot of concentration not to get any address wrong, so we created scripts that can do everything for you. This script requires you to specify the path of the CST tool as well as the keys necessary for signing, that’s it. Here is the simplified version to build and sign U-Boot:

~/u-boot-imx6$ export CST_BIN=~/release/linux64/bin/cst
~/u-boot-imx6$ export SIGN_KEY=~/release/crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem
~/u-boot-imx6$ export IMG_KEY=~/release/crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem
~/u-boot-imx6$ export SRK_TABLE=~/release/crts/SRK_1_2_3_4_table.bin
~/u-boot-imx6$ make flash.bin V=1
~/u-boot-imx6$ ./sign_hab_imx8m.sh 
CSF Processed successfully and signed data available in csf_spl.bin
CSF Processed successfully and signed data available in csf_fit.bin
6472+0 records in
6472+0 records out
6472 bytes (6.5 kB, 6.3 KiB) copied, 0.00416391 s, 1.6 MB/s
6488+0 records in
6488+0 records out
6488 bytes (6.5 kB, 6.3 KiB) copied, 0.00414051 s, 1.6 MB/s
signed_flash.bin is ready!

You can copy this binary to the root of an SD card along with upgrade.scr. Don’t forget that the name of the binary must match the platform name (see U-Boot blog post for the explanation).

~/release/linux64/bin$ cp signed_flash.bin <mount_point>/u-boot.nitrogen8mm_2g

5- Flash and test the device

Use our standard procedure to update U-Boot:

=> run upgradeu

The device should reboot, then check the HAB status:

=> hab_status
Secure boot disabled
HAB Configuration: 0xf0, HAB State: 0x66
No HAB Events Found!

The Secure boot disabled means that the device is open. But still the HAB engine will check the image and report errors (Events) if the signature isn’t right.

6- Closing the device?

Once you are *absolutely* sure you’ve understood what has been done so far and that you are sure it works, you can “close” the device.

Once again, this step is IRREVERSIBLE, better make sure there is no HAB Events in open configuration.

Below is the procedure to “close” the device on i.MX8MQ and i.MX8M Mini.

=> fuse prog 1 3 0x02000000
=> reset
...
=> hab_status 
Secure boot enabled
HAB Configuration: 0xcc, HAB State: 0x99
No HAB Events Found!

Going further

What about USB recovery?

Although this step was pretty complicated on i.MX6/7 due to the DCD reset, it is much easier now.

As the DCD pointer is always NULL now, you can simply turn on the USB recovery switch on your platform for it to appear as a NXP device:

~/u-boot-imx6$ lsusb | grep NXP
Bus 001 Device 064: ID 1fc9:0134 NXP Semiconductors SP Blank M845S

At this point you just need to run uuu tool and it will load your signed binary:

~/u-boot-imx6$ uuu -d signed_flash.bin

If you’re not familiar with uuu, we highly recommend reading our blog post on the topic:

What about authenticating the kernel?

This part hasn’t changed since out previous blog post so you can have a look at it:

Note that the tool paths changed a bit so you might need to adapt the procedure.

Once again, to ease the process, we created a script that simply takes an Image file and signs it for you:

~/u-boot-imx6$ ./sign_hab_imx8m-Image.sh /path/to/Image
Extracting size from Image header...
Padding Image file...
Generating IVT header...
Generating CSF binary...
CSF Processed successfully and signed data available in csf_image.bin
Image-signed.bin is ready!

Then you can use the U-Boot hab_auth_img function to check your kernel signature. Here is an example for our kernel (your offsets might differ):

=> dhcp ${loadaddr} ${tftpserverip}:Image-signed.bin
=> hab_auth_img ${loadaddr} ${filesize} 0x1d22000      
Authenticate image from DDR location 0x40480000...
Secure boot enabled
HAB Configuration: 0xcc, HAB State: 0x99
No HAB Events Found!

Boot time impact

We have not run any test to know how much impact HAB has on boot time yet.

Enabling the signature definitely increases the time it takes before U-Boot is loaded. Feel free to let us know if you have made some comparison.

References

The post High Assurance Boot (HAB) – i.MX8M edition appeared first on Boundary Devices.

Yocto Dunfell Release for i.MX8 Platforms

$
0
0

We are pleased to announce a new Yocto release Dunfell for our Nitrogen8 family of SBCs and SOMs based on i.MX8 processors. This release includes our latest 5.4 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:

Update 20200829 changelog:

  • Various updates to Uboot

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 dunfell 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 ~/yocto-dunfell && cd yocto-dunfell
~/yocto-dunfell$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b dunfell
~/yocto-dunfell$ repo sync

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

~/yocto-dunfell$ MACHINE=<MACHINE> DISTRO=boundary-wayland . 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.

~/yocto-dunfell/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:

  • Weston 8.0.0 for i.MX
  • GStreamer1.0 1.16 for i.MX
  • GPU Vivante libraries 6.4.0p2.0
  • VPU Hantro libraries v1.16.0
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.54 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:

GPU acceleration

In order to test the GPU, you can either use the standard Weston EGL programs or the ones provided by Vivante.

Here are a few examples:

root@<MACHINE>:~# weston-simple-egl &
root@<MACHINE>:~# cd /opt/viv_samples/vdk/
root@<MACHINE>:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPU

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

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

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

If your platform supports VPU encoding, here is an example on how to test it using gstreamer:

root@<MACHINE>:~# gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! 'video/x-raw,format=(string)YUY2, width=1920, height=1080, framerate=30/1' ! vpuenc_h264 ! filesin
k location=test.h264
Setting pipeline to PAUSED ...
====== VPUENC: 4.4.5 build on Apr[   39.759990] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
  1 2020 21:23:34. ======
        wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Mar 28 2020 08:53:37)
        vpulib: 1.1.1
        firmware: 1.1[   39.777613] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
.1.43690
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, [   40.518172] ov5640_mipisubdev 5-003c: s_stream: 1
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
[   40.620867] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.629361] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.635818] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.643804] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.649791] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.657768] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.663741] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
/GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting [   69.642199] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
for EOS...
Got EOS from element [   69.650922] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
"pipeline0".
EOS received - stop[   69.662880] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
ping pipeline...
Execution ended[   69.669822] ov5640_mipisubdev 5-003c: s_stream: 0
 after 0:00:29.580964436
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

root@<MACHINE>:~# ls -alh
drwx------    3 root     root        4.0K Apr  1 22:59 .
drwxr-xr-x    3 root     root        4.0K Apr  1 21:25 ..
-rw-------    1 root     root        4.9K Apr  1 23:00 .ash_history
drwxr-xr-x    3 root     root        4.0K Apr  1 22:08 .cache
-rw-r--r--    1 root     root       34.6M Apr  1 22:59 test.h264

root@<MACHINE>:~# gst-launch-1.0 filesrc location=test.h264 typefind=true ! 'video/x-h264' ! h264parse ! vpudec ! waylandsink sync=true
Setting pipeline to PAUSED ...
====== VPUDEC: 4.4.5 build on Apr[   79.404937] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
  1 2020 21:23:34. ======
        wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Mar 28 2020 08:53:37)
        vpulib: 1.1.1
        firmware: 1.1[   79.424233] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
.1.0
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(G[   79.443039] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
stGLDisplayWayland\)\ gldisplaywayland0";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:29.[  108.609182] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
034084646
Setting pipeline to PA[  108.617333] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
USED ...
Setting pipeline to REA[  108.629178] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
DY ...
Setting pipeline to NULL ...
Total showed frames (857), playing for (0:00:29.034898533), fps (29.516).
Freeing pipeline ...
root@<MACHINE>:~#

CAN

CAN is supported when using our DB_8MM_CSI_EXP . You’ll be able to bring up the interface 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.

 

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

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

Yocto Dunfell Release for i.MX6/i.MX7 Platforms

$
0
0

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

For the Impatient

You can download the Yocto images from here:

Update 20200829 changelog:

  • Various updates to Uboot

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-mx6/7

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 dunfell 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 ~/yocto-dunfell && cd yocto-dunfell
~/yocto-dunfell$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b dunfell
~/yocto-dunfell$ repo sync

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

~/yocto-dunfell$ MACHINE=<MACHINE> DISTRO=boundary-wayland . setup-environment build

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

~/yocto-dunfell/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 images built above contains the following components:

  • Weston 8.0.0 for i.MX
  • GStreamer1.0 1.16.2
  • GPU Vivante libraries 6.4.0p2.0
  • VPU libraries 5.4.39.2
  • Firmware-imx 8.5
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.54 with support for BD-SDMAC

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

GPU acceleration

In order to test the GPU, you can either use the standard Weston EGL programs or the ones provided by Vivante.

Here are a few examples:

root@<MACHINE>:~# weston-simple-egl &
root@<MACHINE>:~# cd /opt/viv_samples/vdk/
root@<MACHINE>:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPU

Camera input

Camera MIPI-CSI input can be checked using our Nit6X_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@nitrogen8mm:~# 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
root@<MACHINE>:~# ifconfig can0 up

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 Dunfell Release for i.MX6/i.MX7 Platforms appeared first on Boundary Devices.

Ubuntu Focal 20.04 LTS for Nitrogen8M and Nitrogen8M Mini boards – August 2020 (kernel 5.4.x)

$
0
0

Ubuntu 20.04 Weston/Wayland Compositor

We’re glad to release our first Ubuntu Focal image for Nitrogen8MQ and Nitrogen8M Mini board. Since this board supports only Wayland graphical backend, the system is simpler than earlier systems with i.MX6.

We use Weston, the reference Wayland compositor in this system.

This image is a console developer image also, it boots to the command prompt. Weston compositor could be started manually or you can set autostart the service, as per your preference.

This system contains NXP/Freescale licensed content, so you will need to register on our web-site and log in before you can accept the license agreement and download the images from here:

Nitrogen8M board:

Nitrogen8M Mini board:

Important !

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

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

You can find the bootscript in the /boot subdirectory now, its named boot.scr. The partition labels are set if you use the fastboot method.

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

Programming the image

Since the Nitrogen8M board has no SD card slot, you need to program this image in the same way as an Android  system: by using fastboot.

Please install the following packages on your desktop PC, Debian or Ubuntu :

$ sudo apt update
$ sudo apt install fastboot android-tools-fastboot

To avoid using sudo for each command, please download the following file and move it to the /lib/udev/rules.d directory, then reboot your PC: 

Now connect your Nitrogen8M board’s J67 USB OTG port to your PC’s USB port.

Use regular USB2.0 OTG cable do not use USB3.0 cable (as it seems to be problematic with U-Boot).

Connect the Nitrogen board’s RS232 console to your PC so you can communicate with the board.

You can then power up the Nitrogen8M board, and stop the u-boot execution by pressing any key. Then type:

Hit any key to stop autoboot: 0
=> fastboot 0

Now test the USB connection on the PC, please type on the PC:

$ sudo fastboot devices -l
<some MAC address> fastboot usb-x:y

If you get the above response, a MAC address , the word fastboot, then the USB device:id numbers, the communication is OK.

Now type on PC:

$ sudo fastboot flash gpt gpt_8G.img
$ sudo fastboot flash rootfs rootfs_8G.simg

, then wait till its completed.

When its done you can disconnect USB cable, and restart your Nitrogen8M board.

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

https://boundarydevices.com/android-tools-windows-support-nitrogen-platforms/


Since the Nitrogen8M_Mini board has an SD card slot, not like Nitrogen8M, you can create an SD car similarly to i.MX6 boards.

The image is a slightly-less-than-4GiB image file containing the partition table.  Inspired by ubuntu-mate.org, I changed over from dd to another disk copy program called ddrescue. It is a much more talkative program, although dd does do it’s job honestly. I don’t like mute programs, you never know whats happening in a given moment. For example, if you want to create an SD card for a console image, you need to do the following :

$ sudo apt-get install gddrescue xz-utils util-linux
$ gunzip 20200806-nitrogen8mm-5.4.x_2.1.0_ga-focal-en_US-console-weston_aarch64.img.gz
$ sudo ddrescue -D --force 20200806-nitrogen8mm-5.4.x_2.1.0_ga-focal-en_US-console-weston_aarch64.img /dev/sdX

You have to replace sdX with your actual SDHC reader/writer device. Use the lsblk command to check it.

Type lsblk with unplugged SDHC reader, then insert the device, and type lsblk again. A new node will be added , that is your SDHC reader/writer device.


Usernames and passwords

Two users are defined for use on the system: ubuntu and root. The password for each is Boundary (capital B). The user ubuntu has administrator rights, but doesn’t need to enter password at sudo command.

We wanted to make life easier at the cost of some security. If you want to change this please type:

ubuntu@focal-dev64:~$ sudo visudo

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

An ssh server is configured 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 (8MQ + 8MM)
    • video/x-vp9 (8MQ + 8MM)
    • video/x-h264 (8MQ + 8MM)
    • video/x-vp8 (8MQ + 8MM)
    • video/x-vp6-flash (8MQ)
    • video/mpeg (8MQ)
    • video/x-h263 (8MQ)
    • video/x-flash-video (8MQ)
    • video/x-divx (8MQ)
    • video/x-xvid (8MQ)
    • video/x-cavs (8MQ)
    • video/x-wmv (8MQ)
    • video/x-pn-realvideo (8MQ)
    • video/x-raw (8MQ + 8MM)
  • The Hantro Video Processing Unit supports the following encoders:
    • video/x-h265 (8MM)
    • video/x-vp9 (8MM)
    • video/x-h264 (8MM)
    • video/x-vp8 (8MM)
  • Wi-Fi and Bluetooth modules for the built-in Silex module
  • 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 (inluding kernel) is done in the normal debian way, so apt-get update/dist-upgrade will keep your image up and running the latest as patches come out.

What’s new in this release

The Linux kernel was upgraded to 5.4.50 ( meta-package name: linux-boundary-18f )
GPU driver was upgraded to Vivante 6.4.0p2.4 ( meta-package name: imx-gpu-viv-f17-… ).
The module galcore (CONFIG_MXC_GPU_VIV) was removed from the kernel, and it’s an externally built 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, because its a DKMS module.
The NXP/Vivante GPU SDK was added : imx-gpu-sdk 4.0.2 . 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 :

  • Xorg server 1.20.8-2ubuntu2.2
  • gstreamer1.0 1.16.2
  • bluez 5.53-0ubuntu3
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • VPU Hantro libraries v1.18.0
  • Qt5 5.12.8
  • apt 2.0.3
  • dpkg 1.19.7ubuntu3.1
  • gcc/g++ 9.3.0-1ubuntu2
  • libwayland 1.18.0
  • weston 6.0.1
  • Silex WiFi / Bluetooth is supported in Focal also, as well as in Bionic and Buster.

 

Weston playing video via gstreamer.


 

Running the glmark2 GPU Benchmark


The system boots to the command prompt, as I mentioned before. You can start Weston compositor on any tty (not ssh, not RS232) terminal by typing:

ubuntu@focal-dev64:~$ wl
or
ubuntu@focal-dev64:~$ weston-launch

If you want to start Weston at boot automatically, you have to enable the service, you have to type the following:

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

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

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

You can find the weston.ini file in the /usr/share/weston/examples directory. Please type:

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

,to 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):

binding-modifier={none | ctrl | alt | super}
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 give us some feedback and let us know how things work for you.

The post Ubuntu Focal 20.04 LTS for Nitrogen8M and Nitrogen8M Mini boards – August 2020 (kernel 5.4.x) appeared first on Boundary Devices.

Customizing Ubuntu/Debian kernels on i.MX8 boards

$
0
0

This post is a modification of Customizing Ubuntu/Debian kernels on i.MX6/7 boards to make it work on i.MX8 boards also.

Also I try to give you a guide how to modify and customize the system image on the host PC before installing it on SD card. You can automatize the process if you want and you’ll get the a customized and ready to work system image as result.

1. Preparing and building kernel

As usual, the first step is cloning and building the kernel as it was described earlier in our Cross Compiling Kernels post:

~/$ git clone https://github.com/boundarydevices/linux-imx6.git linux-imx8 && cd linux-imx8
~/linux-imx8$ export KERNEL_SRC=$PWD
~/linux-imx8$ export INSTALL_MOD_PATH=$KERNEL_SRC/ubuntunize64/linux-staging
~/linux-imx8$ export ARCH=arm64
~/linux-imx8$ export CROSS_COMPILE=aarch64-linux-gnu-
~/linux-imx8$ git checkout boundary-imx_4.14.x_2.0.0_ga
~/linux-imx8$ make -C ubuntunize64 prerequisites 
~/linux-imx8$ make boundary_defconfig
... make your customization, code or configuration changes here.
~/linux-imx8$ make Image modules dtbs -j8
~/linux-imx8$ make -C ubuntunize64 tarball
~/linux-imx8$ cd ..

Let’s see line by line:

  1.  Clone Boundary’s linux-imx6 repository. We clone it into a renamed directory, “imx6” would be confusing
  2.  Set KERNEL_SRC variable, it’s needed for building modules.
  3.  Set INSTALL_MOD_PATH variable, it’s needed for installing modules here and later too.
  4.  Set the target architecture. It’s arm64 now.
  5.  Set the CROSS_COMPILE prefix.
    • We recommend using the official cross-toolchain that comes with Ubuntu/Debian.
  6.  Checkout the kernel branch you need. At the time of this writing, you can choose between the following versions (later this list might be extended): 
    • 4.9.x_2.0.0_ga
    • 4.14.x_2.0.0_ga
    • 4.19.x_1.1.0_ga
    • 5.4.x_2.1.0_ga
  7.  Install the arm64 cross-toolchain.
  8.  Create the config file. If you have one of these boards, you need to use boundary_defconfig. Custom designs have their own specific defconfig.
  9.  Now you can customize the kernel configuration by running make menuconfig enable/disable options/modules as you wish. 
  10.  Build the kernel image (Image), the modules (.ko) and the device tree blob (.dtb) files using 8 CPU cores. The kernel image is usually uncompressed on arm64 platform, not zImage but Image.
  11.  This command copies the new files in a directory named linux-staging, and then creates a tarball of it.
    • Although the folder name is “ubuntunize64”, this process also works with Debian images.
    • The kernel’s tarball is placed into the ubuntunize64/ directory, and is named with the kernel version and localversion. If you modified the kernel source, then a -dirty flag will be appended to the name.
~/linux-imx8$ ls -l ubuntunize64
total 12828
-rwxrwxr-x 1 tele tele      573 Aug 26 00:43 apt-upgrade.sh
-rw-rw-r-- 1 tele tele     2194 Aug 26 01:25 common.mk
-rwxrwxr-x 1 tele tele      171 Aug 26 00:43 create-initrd.sh.in
-rwxrwxr-x 1 tele tele     1989 Aug 26 01:28 customize-kernel.sh
-rw-rw-r-- 1 tele tele 13096839 Aug 26 02:09 linux-4.14.98-g90af3cd4ee6e.tar.gz
drwxrwxr-x 4 tele tele     4096 Aug 26 02:09 linux-staging
-rw-rw-r-- 1 tele tele     2179 Aug 26 02:08 Makefile
-rw-rw-r-- 1 tele tele     2870 Aug 26 00:43 Merge.mk
-rw-rw-r-- 1 tele tele      133 Aug 26 01:27 pbuilderrc
-rwxrwxr-x 1 tele tele      479 Aug 26 00:43 uninstall-kernel.sh

2. Building galcore and other modules

The galcore is a kernel module which is necessary to run Vivante GPU acceleration packages. Since the galcore module version must match exactly the version of the libraries in the rootfs, it is important to be able to build it independently from the kernel. 

Here is the procedure to generate the module using the version of your choosing.

~/$ git clone https://github.com/Freescale/kernel-module-imx-gpu-viv.git && cd kernel-module-imx-gpu-viv
~/kernel-module-imx-gpu-viv$ git checkout upstream/6.2.4.p4.6
~/kernel-module-imx-gpu-viv$ sed 's,-Werror,-Werror -Wno-error=misleading-indentation,g' -i ./kernel-module-imx-gpu-viv-src/Kbuild
~/kernel-module-imx-gpu-viv$ make -j8
~/kernel-module-imx-gpu-viv$ make modules_install
~/kernel-module-imx-gpu-viv$ cd ..

Before you start building this module you have to select the proper galcore version, it could be 6.2.4.p4.0 or 6.2.4.p4.6 or 6.4.0.p2.4 or another version in the future.

It depends on rootfs you are going to use, so you have to check that first. Please boot the original Ubuntu/Debian system (what you are going to modify) on your board. Open a console window and type:

~/$ dp imx-gpu-viv

In the 2nd column you’ll find the version. 

  1. Checkout the kernel branch you need. Possible versions are: 
    • 6.2.4.p4.0
    • 6.2.4.p4.6
    • 6.4.0.p2.4

Here is the line by line details of the procedure:

  1.  Clone the galcore repository from Freescale’s Github.
  2.  Set the matching branch as described above.
  3.  This sed command is only necessary if you use gcc 6 or higher, which will be used in Debian Stretch for instance.
    • This is a new kind of warning, but it would be considered as error, because of strict module building rules, so it must be disabled.
  4.  In this line we build the module. You don’t need to worry about KERNEL_SRC variable, because it was set earlier. We use 8 CPU cores.
  5.  Install the galcore module in place. You don’t need to worry about INSTALL_MOD_PATH variable, it was set earlier.
    • The module will be copied to a directory named extra.

Similarly to galcore, you can build any other kernel modules. For example if you have a Silex WiFi module, you’ll have to build it’s driver as follows:

~/$ git clone https://github.com/boundarydevices/qcacld-2.0.git && cd qcacld-2.0
~/qcacld-2.0$ export CONFIG_CLD_HL_SDIO_CORE=y
~/qcacld-2.0$ git checkout boundary-LNX.LEH.4.2.2.2
~/qcacld-2.0$ make -j8
~/$qcacld-2.0 make modules_install
~/qcacld-2.0$ cd ..

Based on the above examples you can build your own kernel modules as well. Fetch your sources to a working directory, set your environment variables and build flags as necessary, then simply run make and make modules_install. The environment variables KERNEL_SRC and  INSTALL_MOD_PATH has already been set earlier, you don’t need to worry about them.

After you have built all modules you wanted you need to refresh the tarball:

~/$ make -C $KERNEL_SRC/ubuntunize64 targz

3. Merging rootfs with kernel and modules

In this step we will merge the new kernel and modules and the original rootfs to a complete image tarball. I assume that you have already downloaded a Ubuntu or Debian system image from this page, (after selected your board):

You have two options to merge the new kernel parts into the image; either on the target or on the host PC.

3.1 Merging on the target

Please create the SD card as usual, as described in the paragraph “Programming the image” in the system image’s blog post.

Then copy the tarball file what you have just created (linux-<version>-<localversion>.tar.gz) to the SD card’s ${HOME} directory. Don’t forget to type sync to finish copy. Now insert the card in the target board’s socket, and boot the new system up. After booting please do this:

~/$ rmlinux
~/$ sudo apt-get purge qcacld-module
~/$ sudo tar --numeric-owner -xf ${HOME}/linux-4.14.98-g90af3cd4ee6e.tar.gz -C /
~/$ sudo update-initramfs -c -k4.14.98-g90af3cd4ee6e
~/$ sudo apt-get update && sudo apt-get dist-upgrade
~/$ sync && sudo reboot
  1. Uninstall the old kernel first
  2. Extract the new kernel
  3. Create an initrd.img ramdisk
  4. Refresh the system, this is optional, it might take about 15-20 minutes
  5. Reboot

As always, let us know how/if this works for you.

The post Customizing Ubuntu/Debian kernels on i.MX8 boards appeared first on Boundary Devices.

Buildroot 2020.08 release for i.MX platforms

$
0
0

Buildroot 2020.08 has just been published and we’re glad to provide new images!Buildroot

It has been a long time since our last release due to missing i.MX 8M features but today marks the first of many releases for all our platforms.

For the impatient

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

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

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

~$ zcat 2020*br2020.08-nitrogen*.img.gz | sudo dd of=/dev/sdX bs=1M

What’s new?

Buildroot 2020.08 release

It would be too long of a list to enumerate all the changes Buildroot went through since 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

We still provide our own Boundary Devices external layer in order to include proprietary bits like WiFi/BT driver/firmware:

This includes the following custom configurations

New features

Buildroot 2020.08 includes the following versions of packages:

  • BlueZ5 5.54
  • GStreamer 1.16.2
  • GStreamer-imx v0.13.0 for i.MX6
  • GStreamer-imx v2.0 for i.MX8M*
  • imx-codec 4.3.5
  • imx-gpu-viv 6.4.0.p2.4
  • imx-vpu-hantro 1.15.0 for i.MX8M*
  • imx-vpu 5.4.39.1 for i.MX6
  • Linux kernel 5.4.x_2.1.0
  • qcacld-2.0 LEA-2.0 Wi-Fi driver
  • Qt5 5.15.0
  • Wayland 1.18.0
  • Weston 8.0.0

Regarding i.MX8M support, 3 patches unfortunately didn’t hit the master branch for this release in order to properly support Weston. Hopefully those will be merged for next Buildroot release so we don’t need a fork on Github.

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 ~/br2020.08 && cd br2020.08
~/br2020.08$ repo init -u https://github.com/boundarydevices/buildroot-manifest -b 2020.08.x
~/br2020.08$ repo sync
  1. Create an output folder for your configuration:
~/br2020.08$ make BR2_EXTERNAL=$PWD/buildroot-external-boundary/ \
  -C $PWD/buildroot/ O=$PWD/output nitrogen8mm_qt5_gst1_defconfig
~/br2020.08$ cd output
  1. Build the image
~/br2020.08/output$ make
  1. Your image is now ready!
~/br2020.08/output$ ls -l images/sdcard.img
~/br2020.08/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.

Since i.MX8M support is new, we will detail some of the commands here.

  • 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
< wait a few seconds for the device to connect >
# 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:DC	Voyager PRO+

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


Official Release of the Nitrogen8M Plus System on Module

$
0
0

Boundary Devices is pleased to announce the official release of our Nitrogen8M Plus System on Module based on the i.MX 8M Plus processor from NXP.  The i.MX 8M Plus is the first CPU from NXP that includes an integrated Neural Processing Unit for accelerated Machine Learning and AI applications.  The i.MX 8M PLUS is part of the i.MX 8M series of NXP processors targeting multimedia and IoT markets.

Nitrogen8M Plus SOM

48mm x 38mm

The Nitrogen8M Plus SOM is a small 48mm x 38mm board that utilizes high density, high speed board to board connectors. With integrated 802.11ac+BT5.0 QCA9377 WiFi+BT module as well as Gigabit Ethernet PHY, this SOM is designed to get customers to market quickly.  There will be 2 Carrier boards available for the SOM: an EVK evaluation carrier exposing the key features of the SOM, as well as a low cost, production-ready version, with available enclosure.

Processors, Memory and Storage

The Nitrogen8M Plus SOM will launch with the i.MX 8M Plus Quad processor, featuring 4 Cortex-A53 and 1 Cortex-M7 cores and an NPU, with 1.8GHz CPU clock max.

The boards will launch with 2GB of LPDDR4 RAM and 16GB of eMMC standard, with custom options to expand up to 4GB RAM and up to 128GB of eMMC.

Networking Specifications

The i.MX 8M Plus System on Module includes the latest in network connectivity options to serve IoT applications that employ edge and cloud computing.  The SOM will have an integrated, pre-certified 802.11ac + BT5.0 WiFi + BT module based on the QCA9377 chipset.  In addition, the SOM includes a 10/100/1GB Ethernet PHY to help get customers to market quickly.  The i.MX 8M Plus SOM supports a 2nd Ethernet interface which is exposed to the carrier board and available via the EVK carrier option.

Optimized for Low Power Consumption

The Nitrogen8M Plus is designed to maximize power efficiency making it ideal for low power applications by leveraging the following technologies:

  • Heterogeneous Multicore Processing (HMP)
  • Advanced 14LPC FinFET technology
  • High-speed LPDDR4
  • NXP’s PCA9450 Power Management Integrated Circuit (PMIC)

Operating System Support

As with all of Boundary Devices’ SBCs and SOMs, the Nitrogen8M Plus will come with an extensive set of operating system options.

The board will support Linux (Yocto, Ubuntu/Debian, Buildroot, Mendel), FreeRTOS, and Android 10 OS images. All of these OS options will include our best-in-class support via our WikiBlog, and Support page.

Development Accessories

In order to promote rapid development, Nitrogen8M Plus SOM will come with a number of accessories. These accessories include:

  • Touchscreen Displays (7”, 8”, and 10” options)
  • Camera Modules
  • EVK Carrier board for full evaluation
  • Production-ready Carrier board and enclosure

Please visit the product page for schematics, 3D models, user manuals and more!

Check out our video to learn about the features of our Nitrogen8M Plus SOM!

CLICK HERE TO SIGN UP for our Early Access Program!

The post Official Release of the Nitrogen8M Plus System on Module appeared first on Boundary Devices.

i.MX8M PLUS SOM Demos – Machine Learning and Multiple Displays

$
0
0

The i.MX8M Plus processor from NXP contains some notable differences from the i.MX8M and i.MX8M Mini predecessors:

  1.  Integrated Neural Processing Unit (NPU)
  2. LVDS display support
  3. Integrated CAN 
  4. Built-in Dual Camera ISP 

The Nitrogen8M Plus System on Module was designed to take advantage of these new features.  In the 2 demos below, we demonstrate the NPU capabilities of the i.MX8M Plus processor as well as show the additional LVDS output while driving multiple displays.

Demo #1 Object Detection

In this demo, we demonstrate the object detection performance of the i.MX8M Plus compared to a strict CPU method.  We also show how the NPU can quickly detect various options utilizing a USB camera.

 

Demo #2 Multiple Displays

In this demo, we show 2 different displays – 1 via LVDS and the 2nd via HDMI – being driven at the same time with independent content.

Please visit the Nitrogen8M PLUS SOM page for more information:  Nitrogen 8M Plus SOM

 

 

The post i.MX8M PLUS SOM Demos – Machine Learning and Multiple Displays appeared first on Boundary Devices.

Using the OptConnect ema Modem with Nitrogen8M

$
0
0

We are pleased to announce support for the OptConnect ema Smart Embedded Modem on our Nitrogen8M board! We will discuss how to connect the modem via USB to the Nitrogen8M using a mPCIe adapter card, as well as instructions on how to do some basic testing of the modem. Once ema is connected, you get an enterprise grade, fully-managed connection from OptConnect’s award winning service.

More information on the modem can be found here

Hardware Installation

As mentioned, the modem connects via USB using this mPCIe adapter. The connection to the Nitrogen8M is shown below:

Software Installation 

This testing was done with our latest yocto image found here

Testing whether the system recognizes the modem

The modem will be recognized as a USB device under Linux. You can check the presence of the modem device using lsusb:

root@nitrogen8m:~# lsusb
Bus 002 Device 002: ID 045b:0210 Hitachi, Ltd 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1bc7:0036 Telit Wireless Solutions 
Bus 001 Device 005: ID 10c4:ea70 Silicon Labs CP2105 Dual UART Bridge
Bus 001 Device 004: ID 0424:2412 Microchip Technology, Inc. (formerly SMSC) 
Bus 001 Device 002: ID 045b:0209 Hitachi, Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see, the Nitrogen8M recognizes the Telit modem (1bc7:0036).

Now that we validated the modem is recognized as a usb device, you can validate that it is detected by modemmanager:

root@nitrogen8m:~# mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [Telit] LE910-NA V2

And you can see more details of the modem with mmcli -m:

root@nitrogen8m:~# mmcli -m 0
--------------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: 9eeb9dfa3d73e64418d4257a000cdfe4c207c4d1
--------------------------------
Hardware | manufacturer: Telit
| model: LE910-NA V2
| firmware revision: 20.00.506
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 358148062963801
-------------------------------
System | device: /sys/devices/platform/soc@0/38200000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4.2
| drivers: cdc_acm, cdc_ncm
| plugin: Telit
| primary port: ttyACM0
| ports: ttyACM1 (unknown), ttyACM3 (unknown), ttyACM5 (unknown), 
| wwan0 (net), ttyACM2 (unknown), ttyACM4 (unknown), ttyACM0 (at)
--------------------------------
Status | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: registered
| power state: on
| access tech: lte
| signal quality: 71% (recent)
--------------------------------
Modes | supported: allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: none
| current: allowed: 3g, 4g; preferred: none
--------------------------------
Bands | supported: utran-5, utran-2, eutran-2, eutran-4, eutran-5, eutran-12, 
| eutran-13, eutran-17
| current: utran-2, eutran-2
--------------------------------
IP | supported: ipv4, ipv6, ipv4v6
--------------------------------
3GPP | imei: 358148062963801
| operator id: 310410
| operator name: AT&T
| registration: home
--------------------------------
3GPP EPS | ue mode of operation: csps-1
--------------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0

We can also start a screen serial console application to communicate with the modem on ttyACM0 (primary AT port of the modem, as shown above).

root@nitrogen8m:~# screen /dev/ttyACM0 115200

Now you get an empty console screen. If local command echo is not set, then type ATE1 to the modem blindly, which will enable command echo. You can now talk to the modem via AT commands found in this document

For example, we can get the modem serial number:

AT+GSN
0000675966
OK

Viewing the modem status in OptConnect Summit Portal

Once you purchase a modem, you can call OptConnect with an ema serial number and they will set you up with an account.  The account can also be set up at the same time an order is placed. Once you have the modem linked with an account, you can login to the portal and view your device:

We can see the device online and view its status:

More information on OptConnect ema

You can find more information on OptConnect ema via the following links:

The Creation of OptConnect ema™

Is OptConnect ema™ the Right Fit for Me? Get the answers you need

ema:Play – Questions and answers WITH MATT VOIGT ON

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

The post Using the OptConnect ema Modem with Nitrogen8M appeared first on Boundary Devices.

Debian Buster images for Nitrogen8 family boards with kernel 5.4.x

$
0
0

We’re proud to release our new Debian Buster images for Nitrogen8 boards!  These boards support only the Wayland graphical backend.

We use Weston, the reference Wayland compositor, in this system.

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/Freescale licensed content, so you will need to register on our website and log in before you can accept the license agreement and download the Debian Buster images for Nitrogen8 from here:

For i.MX 8MQ based Nitrogen8M, Nitrogen8M SOM:

For i.MX 8M Mini-based Nitrogen8M Mini, Nitrogen8M Mini SOM and for i.MX 8M Nano-based Nitrogen8M NanoNitrogen8M Nano SOM:

 

Important!

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

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

You can find the bootscript in the /boot subdirectory now, its named boot.scr. The partition labels are set if you use the fastboot method.

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

Programming the image

Since the Nitrogen8M board has no SD card slot, you need to program this image in the same way as an Android system, by using fastboot.

Please install the following packages on your desktop PC, Debian or Ubuntu :

$ sudo apt update
$ sudo apt install fastboot android-tools-fastboot

To avoid using sudo for each command, please download the following file and move it to the /lib/udev/rules.d directory, then reboot your PC

Now connect your Nitrogen8M board’s J67 USB OTG port to your PC’s USB port.

Use regular USB2.0 OTG cable do not use USB3.0 cable (as it seems to be problematic with U-Boot).

Connect the Nitrogen board’s RS232 console to your PC so you can communicate with the board.

You can then power up the Nitrogen8M board, and stop the u-boot execution by pressing any key. Then type:

Hit any key to stop autoboot: 0
=> fastboot 0

Now test the USB connection on the PC, please type on the PC:

$ fastboot devices -l
<some MAC address> fastboot usb-x:y

If you get the above response, a MAC address, the word fastboot, then the USB device:id numbers, the communication is OK.

Now type on PC:

$ fastboot flash gpt gpt_8G.img
$ fastboot flash rootfs rootfs_8G.simg

, then wait till its completed, until the PC side prints:

$ finished, total time: 584.109sec 

When its done you can disconnect USB cable, and restart your Nitrogen8 board.

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

https://boundarydevices.com/android-tools-windows-support-nitrogen-platforms/

Usernames and passwords

Two users are defined for use on the system: debian and root. The password for each is Boundary (capital B). The user debian has administrator rights, but doesn’t need to enter password at sudo command.

We wanted to make life easier at the cost of some security. If you want to change this please type:

debian@buster-dev64:~$ sudo visudo

, and 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@buster-dev64:~$ sudo mkdir /root/.ssh
debian@buster-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
debian@buster-dev64:~$ sudo chmod 600 /root/.ssh/auth*
debian@buster-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported

Since the images above include our stable 4.9.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.4.72 ( meta-package name: linux-boundary-18b ).
GPU driver was upgraded to Vivante 6.4.3p0.0 ( meta-package name: imx-gpu-viv-b18-… ).
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 added : imx-gpu-sdk 4.0.2 . 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 Buster 10.6 . Here are some main component versions of these Debian Buster images for Nitrogen8:

  • Xorg server 1.20.4-1.1
  • gstreamer1.0 1.16.2
  • bluez 5.50-1.2
  • Qt5.11.3
  • apt 1.8.2.1
  • dpkg 1.19.7-3
  • gcc/g++ 8.3.0-6
  • libwayland 1.18.0-1
  • weston 6.0.1-2debian4
  • the image supports the Silex WiFi / Bluetooth module

The system boots to Weston compositor as mentioned before.

If you don't want to start Weston at boot automatically, you have to disnable the service, you have to type the following:
debian@buster-dev64:~$ sudo systemctl disable weston.service
debian@buster-dev64:~$ sudo systemctl mask weston.service 

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

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

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

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

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


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

The post Debian Buster images for Nitrogen8 family boards with kernel 5.4.x appeared first on Boundary Devices.

MIPI-DSI to HDMI for i.MX8 boards with DB_8MM_DSIHD

$
0
0

We are pleased to announce the release of the DB_8MM_DSIHD, a daughter board that allows MIPI-DSI to HDMI conversion. Product details can be found here.

The product is mainly geared towards the Nitrogen8M Mini and Nitrogen8m Nano, as the i.MX8M Mini and i.MX8M Nano processors only support a single MIPI-DSI display output. Therefore, this daughter board is necessary to enable HDMI output. It can also be used with the Nitrogen8M, if a second HDMI output is desired. 

Find below a video demo of the board in action. The specs of the setup in the video are as follows:

Board Specs:

Nitrogen8M Mini running Yocto 3.0 Zeus + 1080p HDMI Display

Kernel Revision: 4.14.x_2.0.0_ga

Video Summary:

The MIPI-DSI display output (1080p) of the Nitrogen8M Mini connects to the MIPI-DSI input on the DB_8MM_DSIHD and the HDMI is outputted from there to the 1080p Monitor. 

The post MIPI-DSI to HDMI for i.MX8 boards with DB_8MM_DSIHD appeared first on Boundary Devices.

eDP Display Support on Nitrogen8M

DB_8MM_CSI_EXP for Nitrogen8M Mini

$
0
0

We are pleased to announce the release of the DB_8MM_CSI_EXP, an expansion daughter board for the Nitrogen8M Mini.

This daughter board includes SPI to CAN Bus transceiver, UART, I2C, and other pins exposed. Product details can be found here.

Find below a video demo of the board in action. In this demo, we will connect our Nit8M_MINI_5MP_MIPI to the daughter board and show the camera feed.

The specs of the setup in the video are as follows:

Board Specs:

Nitrogen8M Mini running Yocto 3.0 Zeus + 10″ Display

Kernel Revision: 4.14.x_2.0.0_ga

The post DB_8MM_CSI_EXP for Nitrogen8M Mini appeared first on Boundary Devices.


Using an SSD via mPCIe on our i.MX8 Nitrogen boards

$
0
0
We would like to share some basic instructions for using an SSD via the mPCIe interface on one of our i.MX8 based Nitrogen boards.  This has been tested on our Nitrogen8M and Nitrogen8M MINI SBCs.
 
We officially support the U-SNS8154P3/256GJ Kingston SSD so our testing was done using this. In addition to the SSD, you will need this daughter board in order to connect the SSD to the mPCIe connector on the i.MX8 board.
 
The connection will look like this:
 

Now, you can boot up any of our OS images and use the SSD. In this example we will be using our Yocto Zeus image for Nitrogen8M.
 
First, verify the hardware connection is good by executing “lspci” on the console and verify you can see the Kingston SSD:
root@nitrogen8m:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 (rev 01)
01:00.0 Non-Volatile memory controller: Kingston Technology Company, Inc. Device 5008 (rev 01)
 
Next, determine the disk name by executing “fdisk -l”. In this case, the kingston is “/dev/nvme0n1p1” 
root@nitrogen8m:~# fdisk -l
Disk /dev/mmcblk0: 7296 MB, 7650410496 bytes, 14942208 sectors
233472 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1 *  0,0,9       609,0,22             8      77973      77966 38.0M  c Win95 FAT32 (LBA)
/dev/mmcblk0p2    609,0,25    1023,3,32        77976    4839759    4761784 2325M 83 Linux
Disk /dev/sda: 3796 MB, 3980394496 bytes, 7774208 sectors
1019 cylinders, 123 heads, 62 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device  Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/sda1 *  0,0,9       640,0,10             8      81929      81922 40.0M  c Win95 FAT32 (LBA)
Partition 1 has different physical/logical end:
     phys=(640,0,10) logical=(10,91,28)
/dev/sda2    640,0,17    1023,3,32        81936    1244617    1162682  567M 83 Linux
Partition 2 has different physical/logical start (non-Linux?):
     phys=(640,0,17) logical=(10,91,35)
Partition 2 has different physical/logical end:
     phys=(1023,3,32) logical=(163,25,30)
Disk /dev/nvme0n1: 238 GB, 256060514304 bytes, 500118192 sectors
1420790 cylinders, 22 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/nvme0n1p1    1,0,1       486,21,16         2048  500118191  500116144  238G 83 Linux
 
Then, create an ext4 filesystem (or any fs format of your choice) on the SSD. 
root@nitrogen8m:~# mkfs.ext4 /dev/nvme0n1
Discarding device blocks: done
Creating filesystem with 62514774 4k blocks and 15630336 inodes
Filesystem UUID: 4d1aecb1-1c1b-4ba9-b7e8-5092d1588b96
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

Now we can mount the SSD and start using it. Lets create a simple file for a sanity test.  
root@nitrogen8m:~# mkdir /tmp/kingston_ssd
root@nitrogen8m:~# mount /dev/nvme0n1 /tmp/kingston_ssd/
[  296.092862] EXT4-fs (nvme0n1): mounted filesystem with ordered data mode. Opts: (null)
root@nitrogen8m:~# cd /tmp/kingston_ssd/
root@nitrogen8m:/tmp/kingston_ssd# ls
lost+found
root@nitrogen8m:/tmp/kingston_ssd# echo This is a test! > test.txt
root@nitrogen8m:/tmp/kingston_ssd# cd
root@nitrogen8m:~# umount /tmp/kingston_ssd/

Now reboot and verify the file is in tact. 

root@nitrogen8m:~# mkdir /tmp/kingston_ssd
root@nitrogen8m:~# mount /dev/nvme0n1 /tmp/kingston_ssd/
[   68.319706] EXT4-fs (nvme0n1): mounted filesystem with ordered data mode. Opts: (null)
root@nitrogen8m:~# cd /tmp/kingston_ssd/
root@nitrogen8m:/tmp/kingston_ssd# cat test.txt
This is a test!
 
There you have it! You are now up and running with an SSD on our one of our i.MX8 based Nitrogen boards.
 
If you have any issues, please email support@boundarydevices.com
 

The post Using an SSD via mPCIe on our i.MX8 Nitrogen boards appeared first on Boundary Devices.

BD-SDMAC Bluetooth Update – Now BT 5.0 Compatible

$
0
0

We are pleased to announce that our BD-SDMAC Wifi + BT module is now Bluetooth 5.0 Compatible!

We have updated our qcacld-2.0 driver and qca-firmware in order to support this. Our latest Yocto Zeus images already have this support included.

Testing/Validation of Bluetooth 5.0

In order to test/validate BT 5.0 with the BD-SDMAC we will do the following:

  • Setup Yocto Image to enable testing tools
  • Bring up the Bluetooth interface (hci0)
  • Confirm BT 5.0 version
  • Test pairing/connecting to BT 5.0 compatible device
  • Test data transfer with audio streaming.
  • Test BLE using gatttool

Test Setup

Nitrogen8M Mini with a BD-SDMAC module running Yocto 3.0 Zeus

Kernel Revision: 4.14.x_2.0.0_ga

Bluetooth Test Devices:

  • iPhone 8
  • JBL Flip 4 Bluetooth Speaker
  • Windows 10 PC

Note that we are testing with Nitrogen8M Mini, but this testing applies to all platforms with the BD-SDMAC.

Also note that in this post we are testing using Yocto, but just know that similar testing applies to other Linux OSs as well. 

Setup Yocto Image to enable Bluetooth audio streaming

We need to make one modification to the Yocto Zeus build in order to enable audio streaming.

Assuming you have followed the Build Procedure in our Yocto 3.0 Zeus post, we need to add pulseaudio as a DISTRO_FEATURE in local.conf. 

DISTRO_FEATURES_append = " pulseaudio"

Now we will build and flash the image are ready to test.

Bring up Bluetooth Interface

We will initialize the interface using our handy silex-uart script.

root@<MACHINE>:~# /usr/share/silex-uart/silex-uart.sh start
Starting silex-uart
rfkill on/off cycle.
silex found

Then, we will bring up the interface using hciconfig.

root@<MACHINE>:~# hciconfig hci0 up

Confirm BT 5.0 Version

We can now confirm the module is using BT 5.0 firmware using hciconfig

root@nitrogen8mm:~# hciconfig -a
    hci0: 
        Type: Primary Bus: UART
        BD Address: E0:4F:43:44:95:3B ACL MTU: 1024:7 SCO MTU: 60:8
        UP RUNNING
        RX bytes:1363 acl:0 sco:0 events:75 errors:0
        TX bytes:1193 acl:0 sco:0 commands:75 errors:0
        Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'nitrogen8mm'
        Class: 0x200000
        Service Classes: Audio
        Device Class: Miscellaneous,
        HCI Version: 5.0 (0x9) Revision: 0x0
        LMP Version: 5.0 (0x9) Subversion: 0x25a
        Manufacturer: Qualcomm (29)

The LMP version denotes that we are using Bluetooth 5.0

Test Pairing/Connecting

In this example, we will pair an iPhone using bluetoothctl

Start bluetoothctl.

root@nitrogen8mm:~# bluetoothctl
Agent registered
[bluetooth]#

Start scanning.

[bluetooth]# scan on
Discovery started
[NEW] Device AA:BB:CC:DD:EE:FF Iphone
[bluetooth]#

Grab MAC of iPhone and pair.

[bluetooth]# pair AA:BB:CC:DD:EE:FF
Attempting to pair with AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Connected: yes
Request confirmation

Verify passkey on both ends.

[agent] Confirm passkey 141814 (yes/no): yes
[CHG] Device AA:BB:CC:DD:EE:FF Modalias: bluetooth:...
[CHG] Device AA:BB:CC:DD:EE:FF UUIDs:

....
[CHG] Device AA:BB:CC:DD:EE:FF ServicesResolved: yes
[CHG] Device AA:BB:CC:DD:EE:FF Paired: yes
Pairing successful

Trust this device.

[bluetooth]# trust AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Trusted: yes
Changing AA:BB:CC:DD:EE:FF trust succeeded

Finally, connect to the device.

[bluetooth]# connect AA:BB:CC:DD:EE:FF
Attempting to connect to AA:BB:CC:DD:EE:FF
[CHG] Device AA:BB:CC:DD:EE:FF Connected: yes
Connection successful
[CHG] Device AA:BB:CC:DD:EE:FF ServicesResolved: yes
[Iphone]#

Test Data Transfer With Audio Streaming

For testing audio streaming, we need use pulseaudio and must start it before bringing the Bluetooth interface up. 

After bootup start pulseaudio as a daemon (you can ignore the error message it prints).

root@nitrogen8mm:~# pulseaudio -D
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

Next, load a couple modules required for Bluetooth audio streaming using pactl.

root@nitrogen8mm:~# pactl load-module module-bluetooth-discover
18
root@nitrogen8mm:~# pactl load-module module-switch-on-connect
20

Now you can bring up the interface as directed above and connect either a slave device such a Bluetooth speaker to stream audio to, or connect to a master device like a phone or PC to stream audio from and play through the boards speakers. 

If pairing to a master device, after connection the Nitrogen device will show up as speakers to play audio to.

For example here is how the Nitrogen device shows up on a Windows 10 PC when we do the above steps. 

If pairing to a slave device to stream audio to, there a couple more steps required. In this example we will use a JBL Flip 4 Bluetooth speaker.

After doing the above steps to start pulseaudio and connect to the speaker, lets make sure its available as a sink for playing audio once again using pactl.

root@nitrogen8mm:~# pactl list sinks
Sink #0
State: SUSPENDED
Name: alsa_output.platform-sound-wm8960.analog-mono
Description: Built-in Audio Analog Mono
Driver: module-alsa-card.c
Sample Specification: s16le 1ch 44100Hz
Channel Map: mono
Owner Module: 6
Mute: no
Volume: mono: 52057 / 79% / -6.00 dB
balance 0.00
Base Volume: 52057 / 79% / -6.00 dB
Monitor Source: alsa_output.platform-sound-wm8960.analog-mono.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HiFi wm8960-hifi-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "wm8960-audio"
alsa.long_card_name = "wm8960-audio"
device.bus_path = "platform-sound-wm8960"
sysfs.path = "/devices/platform/sound-wm8960/sound/card0"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "8816"
device.buffering.fragment_size = "2204"
device.access_mode = "mmap"
device.profile.name = "analog-mono"
device.profile.description = "Analog Mono"
device.description = "Built-in Audio Analog Mono"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output-speaker: Speakers (priority: 10000)
analog-output-headphones: Headphones (priority: 9000, not available)
Active Port: analog-output-speaker
Formats:
pcm

Sink #1
State: SUSPENDED
Name: bluez_sink.00_42_79_A1_96_30.a2dp_sink
Description: JBL Flip 4
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 21
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor Source: bluez_sink.00_42_79_A1_96_30.a2dp_sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
bluetooth.protocol = "a2dp_sink"
device.description = "JBL Flip 4"
device.string = "00:42:79:A1:96:30"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "speaker"
bluez.path = "/org/bluez/hci0/dev_00_42_79_A1_96_30"
bluez.class = "0x240414"
bluez.alias = "JBL Flip 4"
device.icon_name = "audio-speakers-bluetooth"
Ports:
speaker-output: Speaker (priority: 0)
Active Port: speaker-output
Formats:
pcm

As you can see the JBL Flip 4 shows up as Sink #1. Now lets stream some audio to it.

Grab the “Name:” Field from Sink #1 above and set it as pulseaudio’s default sink.

root@nitrogen8mm:~# pactl set-default-sink bluez_sink.00_42_79_A1_96_30.a2dp_sink

Now play any .wav file using paplay

root@nitrogen8mm:~# paplay test.wav

Validate the audio is playing, and now we have successfully validated data transfer via audio streaming using BT 5.0.

BLE Testing using gatttool 

gatttool is a handy tool for testing BLE devices. Instead of reinventing the wheel in terms of instructions for use, please instead use this post as a helpful guide for using the tool.

There you have it, we have provided a good validation of Bluetooth 5.0 on our BD-SDMAC BT module. 

 

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

The post BD-SDMAC Bluetooth Update – Now BT 5.0 Compatible appeared first on Boundary Devices.

Yocto Dunfell Release for i.MX8 Platforms

$
0
0

We are pleased to announce a new Yocto release Dunfell for our Nitrogen8 family of SBCs and SOMs based on i.MX8 processors. This release includes our latest 5.4 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:

Update 20200829 changelog:

  • Various updates to Uboot

Update 20201102 changelog:

  • Updated kernel to version 5.4.70
  • Added some useful tools to boundary-image-multimedia-full

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 dunfell 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 ~/yocto-dunfell && cd yocto-dunfell
~/yocto-dunfell$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b dunfell
~/yocto-dunfell$ repo sync

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

~/yocto-dunfell$ MACHINE=<MACHINE> DISTRO=boundary-wayland . 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.

~/yocto-dunfell/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:

  • Weston 8.0.0 for i.MX
  • GStreamer1.0 1.16 for i.MX
  • GPU Vivante libraries 6.4.0p2.0
  • VPU Hantro libraries v1.16.0
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.54 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:

GPU acceleration

In order to test the GPU, you can either use the standard Weston EGL programs or the ones provided by Vivante.

Here are a few examples:

root@<MACHINE>:~# weston-simple-egl &
root@<MACHINE>:~# cd /opt/viv_samples/vdk/
root@<MACHINE>:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPU

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

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

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

If your platform supports VPU encoding, here is an example on how to test it using gstreamer:

root@<MACHINE>:~# gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! 'video/x-raw,format=(string)YUY2, width=1920, height=1080, framerate=30/1' ! vpuenc_h264 ! filesin
k location=test.h264
Setting pipeline to PAUSED ...
====== VPUENC: 4.4.5 build on Apr[   39.759990] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
  1 2020 21:23:34. ======
        wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Mar 28 2020 08:53:37)
        vpulib: 1.1.1
        firmware: 1.1[   39.777613] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
.1.43690
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, [   40.518172] ov5640_mipisubdev 5-003c: s_stream: 1
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
[   40.620867] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.629361] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.635818] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.643804] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.649791] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
[   40.657768] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
[   40.663741] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
/GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting [   69.642199] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
for EOS...
Got EOS from element [   69.650922] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
"pipeline0".
EOS received - stop[   69.662880] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
ping pipeline...
Execution ended[   69.669822] ov5640_mipisubdev 5-003c: s_stream: 0
 after 0:00:29.580964436
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

root@<MACHINE>:~# ls -alh
drwx------    3 root     root        4.0K Apr  1 22:59 .
drwxr-xr-x    3 root     root        4.0K Apr  1 21:25 ..
-rw-------    1 root     root        4.9K Apr  1 23:00 .ash_history
drwxr-xr-x    3 root     root        4.0K Apr  1 22:08 .cache
-rw-r--r--    1 root     root       34.6M Apr  1 22:59 test.h264

root@<MACHINE>:~# gst-launch-1.0 filesrc location=test.h264 typefind=true ! 'video/x-h264' ! h264parse ! vpudec ! waylandsink sync=true
Setting pipeline to PAUSED ...
====== VPUDEC: 4.4.5 build on Apr[   79.404937] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
  1 2020 21:23:34. ======
        wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Mar 28 2020 08:53:37)
        vpulib: 1.1.1
        firmware: 1.1[   79.424233] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
.1.0
Pipeline is PREROLLING ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(G[   79.443039] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
stGLDisplayWayland\)\ gldisplaywayland0";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:29.[  108.609182] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
034084646
Setting pipeline to PA[  108.617333] check_voltage: voltage=855000 900000 950000 freq=650000000 VPUMIX_PD
USED ...
Setting pipeline to REA[  108.629178] imx_gpc_pd_power_off: voltage=850000 VPUMIX_PD
DY ...
Setting pipeline to NULL ...
Total showed frames (857), playing for (0:00:29.034898533), fps (29.516).
Freeing pipeline ...
root@<MACHINE>:~#

CAN

CAN is supported when using our DB_8MM_CSI_EXP . You’ll be able to bring up the interface 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.

 

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

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

Yocto Dunfell Release for i.MX6/i.MX7 Platforms

$
0
0

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

For the Impatient

You can download the Yocto images from here:

Update 20200829 changelog:

  • Various updates to Uboot

Update 20201102 changelog:

  • Updated kernel to version 5.4.70
  • Added some useful tools to boundary-image-multimedia-full

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-mx6/7

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 dunfell 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 ~/yocto-dunfell && cd yocto-dunfell
~/yocto-dunfell$ repo init -u https://github.com/boundarydevices/boundary-bsp-platform -b dunfell
~/yocto-dunfell$ repo sync

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

~/yocto-dunfell$ MACHINE=<MACHINE> DISTRO=boundary-wayland . setup-environment build

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

~/yocto-dunfell/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 images built above contains the following components:

  • Weston 8.0.0 for i.MX
  • GStreamer1.0 1.16.2
  • GPU Vivante libraries 6.4.0p2.0
  • VPU libraries 5.4.39.2
  • Firmware-imx 8.5
  • qcacld-lea-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.54 with support for BD-SDMAC

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

GPU acceleration

In order to test the GPU, you can either use the standard Weston EGL programs or the ones provided by Vivante.

Here are a few examples:

root@<MACHINE>:~# weston-simple-egl &
root@<MACHINE>:~# cd /opt/viv_samples/vdk/
root@<MACHINE>:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPU

Camera input

Camera MIPI-CSI input can be checked using our Nit6X_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@nitrogen8mm:~# 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
root@<MACHINE>:~# ifconfig can0 up

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 Dunfell Release for i.MX6/i.MX7 Platforms appeared first on Boundary Devices.

Official Release of the Nitrogen8M Plus System on Module

$
0
0

Boundary Devices is pleased to announce the official release of our Nitrogen8M Plus System on Module based on the i.MX 8M Plus processor from NXP.  The i.MX 8M Plus is the first CPU from NXP that includes an integrated Neural Processing Unit for accelerated Machine Learning and AI applications.  The i.MX 8M PLUS is part of the i.MX 8M series of NXP processors targeting multimedia and IoT markets.

Nitrogen8M Plus SOM

48mm x 38mm

The Nitrogen8M Plus SOM is a small 48mm x 38mm board that utilizes high density, high speed board to board connectors. With integrated 802.11ac+BT5.0 QCA9377 WiFi+BT module as well as Gigabit Ethernet PHY, this SOM is designed to get customers to market quickly.  There will be 2 Carrier boards available for the SOM: an EVK evaluation carrier exposing the key features of the SOM, as well as a low cost, production-ready version, with available enclosure.

Processors, Memory and Storage

The Nitrogen8M Plus SOM will launch with the i.MX 8M Plus Quad processor, featuring 4 Cortex-A53 and 1 Cortex-M7 cores and an NPU, with 1.8GHz CPU clock max.

The boards will launch with 2GB of LPDDR4 RAM and 16GB of eMMC standard, with custom options to expand up to 4GB RAM and up to 128GB of eMMC.

Networking Specifications

The i.MX 8M Plus System on Module includes the latest in network connectivity options to serve IoT applications that employ edge and cloud computing.  The SOM will have an integrated, pre-certified 802.11ac + BT5.0 WiFi + BT module based on the QCA9377 chipset.  In addition, the SOM includes a 10/100/1GB Ethernet PHY to help get customers to market quickly.  The i.MX 8M Plus SOM supports a 2nd Ethernet interface which is exposed to the carrier board and available via the EVK carrier option.

Optimized for Low Power Consumption

The Nitrogen8M Plus is designed to maximize power efficiency making it ideal for low power applications by leveraging the following technologies:

  • Heterogeneous Multicore Processing (HMP)
  • Advanced 14LPC FinFET technology
  • High-speed LPDDR4
  • NXP’s PCA9450 Power Management Integrated Circuit (PMIC)

Operating System Support

As with all of Boundary Devices’ SBCs and SOMs, the Nitrogen8M Plus will come with an extensive set of operating system options.

The board will support Linux (Yocto, Ubuntu/Debian, Buildroot, Mendel), FreeRTOS, and Android 10 OS images. All of these OS options will include our best-in-class support via our WikiBlog, and Support page.

Development Accessories

In order to promote rapid development, Nitrogen8M Plus SOM will come with a number of accessories. These accessories include:

  • Touchscreen Displays (7”, 8”, and 10” options)
  • Camera Modules
  • EVK Carrier board for full evaluation
  • Production-ready Carrier board and enclosure

Please visit the product page for schematics, 3D models, user manuals and more!

Check out our video to learn about the features of our Nitrogen8M Plus SOM!

CLICK HERE TO SIGN UP for our Early Access Program!

The post Official Release of the Nitrogen8M Plus System on Module appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live