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

Yocto release for i.MX 8MM

$
0
0

We’ve received many requests for Yocto support on our Nitrogen8M Mini SBC. Although this Yocto release isn’t tied to a specific version (Thud 2.6 not released yet), we believe it is still beneficial to release details on building a Yocto image for NXP’s i.MX 8MM application processor.

Below you will find the download link for the image as well as detailed instructions for the build including a features set.

For the Impatient

You can download the Yocto image from here:

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

The image is a SD card image that can be restored using zcat and dd under Linux.

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

For Windows users, please use Alex Page’s USB Image Tool.

Build procedure

We are currently working on the git repo for this image. Find the procedure below for when the git repo will be available: 

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

This is mostly a clone of fsl-community-bsp-platform with meta-boundary added in.

To build the image, 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-imx8m && cd yocto-imx8m
~/yocto-imx8m$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b master
~/yocto-imx8m$ repo sync

Setup the environment for building, in this example we will be building our boundary-wayland distro for nitrogen8m.

~/yocto-imx8m$ MACHINE=nitrogen8mm 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-imx8m/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above.

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:

  • GPU Vivante libraries 6.2.4p1.8
  • VPU Hantro libraries v1.8.0
  • GStreamer1.0 1.14.0 for i.MX
  • Weston 4.0.0 for i.MX
  • qcacld-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.50 with support for BD-SDMAC

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

The post Yocto release for i.MX 8MM appeared first on Boundary Devices.


Android Pie 9.0.0 release for i.MX8M Mini

$
0
0

We are glad to deliver the latest Android Pie 9.0 GA release for our i.MX8M MINI Nitrogen8M Mini platform.  This image is an evaluation image which demonstrates the main functions of the board.  Thanks to our Android software partner, Kynetics, for their help in releasing this evaluation image.  Kynetics has also posted their own evaluation image for the i.MX8M Mini boards.  Please contact BD or Kynetics for help creating a production-ready version of  Android for your embedded project which includes security patches, field upgrade, and performance improvements.


For the impatient

You can download the Android Pie images from here:

This archive includes all the files to be flashed using fastboot.

First you need to enter fastboot mode:

From U-Boot prompt, enter the following command:

=> fastboot 0

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

~/$ unzip p900-nitrogen8mm-*.zip -d p900-nitrogen8mm
~/$ cd p900-nitrogen8mm/device/boundary/scripts/ 
~/p900-nitrogen8mm/device/boundary/scripts$ sudo ./flash_fastboot.sh nitrogen8mm

Note that it is recommended to use a standard USB2.0 mini-USB cable for fastboot to work, it has been reported that U-Boot has some issues with USB3.0 OTG cable.

What’s new?

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

Android Pie OS updates

Google provides a list of notable changes for developers:

Linux Kernel 4.14.x

This Android Pie release is based on a 4.14.x kernel. It therefore benefits from all our latest drivers/fixes.

Just like our other branches, we will include latest security updates to it.

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.

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

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git \
       -b boundary-imx-p9.0.0_1.0.0-ga
~/myandroid$ repo sync

After that, you need to get NXP vendor package from here:

Then please extract it:

~/myandroid$ tar xvzf imx-p9.0.0_1.0.0-ga.tar.gz

and then do as the following:

~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/vendor/nxp/ vendor/ 
~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/EULA.txt . 
~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/SCP* .

Then you can safely remove the nxp package sources using the following commands:

~/myandroid$ rm -rf imx-p9.0.0_1.0.0-ga/
~/myandroid$ rm imx-p9.0.0_1.0.0-ga.tar.gz

And finally you can build the android using the following commands:

~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch nitrogen8mm-userdebug
~/myandroid$ make 2>&1 | tee build.out

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

The post Android Pie 9.0.0 release for i.MX8M Mini appeared first on Boundary Devices.

Android Pie 9.0.0 release for i.MX8MQ

$
0
0

We are glad to deliver the latest Android Pie 9.0 GA release for our i.MX8MQ Nitrogen8M platform.  This image is an evaluation image which demonstrates the main functions of the board.  Thanks to our Android software partner, Kynetics, for their help in releasing this evaluation image.  Kynetics has also posted their own evaluation image for the i.MX8MQ boards.  Please contact BD or Kynetics for help creating a production-ready version of  Android for your embedded project which includes security patches, field upgrade, and performance improvements.


For the impatient

You can download the Android Pie images from here:

This archive includes all the files to be flashed using fastboot.

First you need to enter fastboot mode:

From U-Boot prompt, enter the following command:

=> fastboot 0

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

~/$ unzip p900-nitrogen8m-*.zip -d p900-nitrogen8m
~/$ cd p900-nitrogen8m/device/boundary/scripts/ 
~/p900-nitrogen8m/device/boundary/scripts$ sudo ./flash_fastboot.sh nitrogen8m

Note that it is recommended to use a standard USB2.0 mini-USB cable for fastboot to work, it has been reported that U-Boot has some issues with USB3.0 OTG cable.

What’s new?

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

Android Pie OS updates

Google provides a list of notable changes for developers:

Linux Kernel 4.14.x

This Android Pie release is based on a 4.14.x kernel. It therefore benefits from all our latest drivers/fixes.

Just like our other branches, we will include latest security updates to it.

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.

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

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git \
       -b boundary-imx-p9.0.0_1.0.0-ga
~/myandroid$ repo sync

After that, you need to get NXP vendor package from here:

Then please extract it:

~/myandroid$ tar xvzf imx-p9.0.0_1.0.0-ga.tar.gz

and then do as the following:

~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/vendor/nxp/ vendor/ 
~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/EULA.txt . 
~/myandroid$ cp -r imx-p9.0.0_1.0.0-ga/SCP* .

Then you can safely remove the nxp package sources using the following commands:

~/myandroid$ rm -rf imx-p9.0.0_1.0.0-ga/
~/myandroid$ rm imx-p9.0.0_1.0.0-ga.tar.gz

And finally you can build the android using the following commands:

~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch nitrogen8m-userdebug
~/myandroid$ make 2>&1 | tee build.out

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

The post Android Pie 9.0.0 release for i.MX8MQ appeared first on Boundary Devices.

Ubuntu Bionic 18.04 LTS for Nitrogen8M board – June 2019 (kernel 4.14.x)

$
0
0

Ubuntu 18.04.2 Weston/Wayland Compositor

We’re glad to release our first Ubuntu Bionic image for Nitrogen8M 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:

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/

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

What’s supported

Since the images above include our stable 4.14.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
  • 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 4.14.98 ( meta-package name: linux-boundary-17b )
GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b16-… ).
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 Bionic 18.04.2 LTS . Here are some main component versions :

  • Xorg server 1.19.6
  • gstreamer1.0 1.14.4
  • bluez 5.48
  • Qt5 5.9.5
  • apt 1.6.3
  • dpkg 1.19.0
  • gcc/g++ 7.3.0
  • libwayland 1.14.0
  • weston 5.0.0-3ubuntu9
  • Silex WiFi / Bluetooth is supported in Bionic also, as well as in Stretch, Xenial and Jessie.

This is a short video/GPU SDK demo, uploaded to Youtube.

 

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@bionic-dev64:~$ wl
or
ubuntu@bionic-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@bionic-dev64:~$ sudo systemctl enable weston.service
ubuntu@bionic-dev64:~$ sudo systemctl unmask weston.service

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

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

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

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

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


As always, please give us some feedback and let us know how things work for you.

The post Ubuntu Bionic 18.04 LTS for Nitrogen8M board – June 2019 (kernel 4.14.x) appeared first on Boundary Devices.

GuruCE iMX6 WinCE Release

$
0
0

GuruCE has a new i.MX6 release of WinCE.  This release adds some great new features, like High Assurance Boot and 100% flicker-free transition from bootloader splash to the CE desktop or your application, new drivers for displays, touch controllers, and RTCs, and many code improvements and fixes.  Please see the video below to see how easy it is to use:

For more information, visit the GuruCE website.  

 

The post GuruCE iMX6 WinCE Release appeared first on Boundary Devices.

Ubuntu Bionic 18.04.2 LTS for Nitrogen8M_Mini board – June 2019 (kernel 4.14.x)

$
0
0

Ubuntu 18.04.2 Weston/Wayland Compositor

 

We’re happy to release our Ubuntu Bionic image for Nitrogen8M_Mini board. Since this board supports only Wayland graphical backend, the system is simpler than earlier systems with i.MX6, similar to i.MX8M system.

We use Weston, the reference Wayland compositor in this system, later we’ll release other Wayland compositors as well.

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:

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-0Bh for example) now. You can use e2label to modify partition label.

Programming the image

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 20190611-nitrogen8mm-4.14.x_2.0.1_ga-bionic-en_US-console-weston_aarch64.img.gz
$ sudo ddrescue -D --force 20190611-nitrogen8mm-4.14.x_2.0.1_ga-bionic-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@bionic-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@bionic-dev64:~$ sudo mkdir /root/.ssh
ubuntu@bionic-dev64:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@bionic-dev64:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@bionic-dev64:~$ sudo chmod 600 /root/.ssh/

What’s supported

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

  • Vivante GPU accelerations for Wayland (OpenGL ES 2.0)
  • 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
  • The Hantro Video Processing Unit supports the following encoders:
    • video/x-h264
    • video/x-vp8
  • Wi-Fi and Bluetooth modules for the built-in Silex module
  • All kind of storage devices , eMMC, SDXC, USB2.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 4.14.98 ( meta-package name: linux-boundary-16b )
GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b15-… ).
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 OpenGL ES2, OpenVG.
The distribution is Bionic 18.04.2 LTS . Here are some main component versions :

  • Xorg server 1.19.6-1ubuntu4.2
  • gstreamer1.0 1.14.4
  • bluez 5.48-1ubuntu3.1
  • Qt5 5.9.5+dfsg-0ubuntu2.1.2
  • apt 1.6.8
  • dpkg 1.19.0.5ubuntu2.3
  • gcc/g++ 7.4.0-1ubuntu1~18.04
  • 1.16.0-2ubuntu1.1~18.04.1
  • 5.0.0-3ubuntu9
  • Silex WiFi / Bluetooth is supported in Bionic also, as well as in Stretch, Xenial and Jessie.

This screenshot shows a playing video, it works via gstreamer as usual:

Ubuntu 18.04.2 Weston/Wayland Compositor, playing video on glimagesink

And this screenshot is the usual Qt5/QML demo application running on Weston Compositor:

Ubuntu 18.04.2 Weston/Wayland Compositor, running Qt5/QML demo

 

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

ubuntu@bionic-dev64:~$ wl
or
ubuntu@bionic-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@bionic-dev64:~$ sudo systemctl enable weston.service
ubuntu@bionic-dev64:~$ sudo systemctl unmask weston.service

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

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

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

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

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


As always, please give us some feedback and let us know how things work for you.

The post Ubuntu Bionic 18.04.2 LTS for Nitrogen8M_Mini board – June 2019 (kernel 4.14.x) appeared first on Boundary Devices.

Introduction to Android Lock Task Mode (Kiosk Mode)

$
0
0

 

In this post we have a brief introduction of Android Lock Task Mode. When the device is in this mode, it can be locked to a single app or a set of apps.

Overview

Android can run tasks in an immersive, kiosk-like fashion called lock task mode. You might use lock task mode if you’re developing a kiosk application or a launcher to present a collection of apps. When the system runs in lock task mode, device users typically can’t see notifications, access non-whitelisted apps, or return to the home screen (unless the home screen is whitelisted).

Whitelist Apps

A DPC must whitelist apps before they can be used in lock task mode. Call DevicePolicyManager.setLockTaskPackages() to whitelist apps for lock task mode as shown in the following sample:

KOTLIN:

// Whitelist two apps.
private val KIOSK_PACKAGE = "com.example.kiosk"
private val PLAYER_PACKAGE = "com.example.player"
private val APP_PACKAGES = arrayOf(KIOSK_PACKAGE, PLAYER_PACKAGE)
// ...
val context = context
val dpm = context.getSystemService(Context.DEVICE_POLICY_SERVICE)
        as DevicePolicyManager
val adminName = getComponentName(context)
dpm.setLockTaskPackages(adminName, APP_PACKAGES)

JAVA:

// Whitelist two apps.
private static final String KIOSK_PACKAGE = "com.example.kiosk";
private static final String PLAYER_PACKAGE = "com.example.player";
private static final String[] APP_PACKAGES = {KIOSK_PACKAGE, PLAYER_PACKAGE};
// ...
Context context = getContext();
DevicePolicyManager dpm =
    (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName adminName = getComponentName(context);
dpm.setLockTaskPackages(adminName, APP_PACKAGES);
To find out the apps previously whitelisted for lock task mode, a DPC can call DevicePolicyManager.getLockTaskPackages(). Other apps can call DevicePolicyManager.isLockTaskPermitted() to confirm that an app package supports lock task mode.

Start Lock Task Mode

In Android 9.0 (API level 28) or higher, you can start another app’s activity in lock task mode. If an activity is already running in the foreground or background, you need to relaunch the activity. Call ActivityOptions.setLockTaskEnabled() and supply these options when starting the activity. The following snippet shows one way you can do this:

KOTLIN:

// Set an option to turn on lock task mode when starting the activity.
val options = ActivityOptions.makeBasic()
options.setLockTaskEnabled(true)
// Start our kiosk app's main activity with our lock task mode option.
val packageManager = context.packageManager
val launchIntent = packageManager.getLaunchIntentForPackage(KIOSK_PACKAGE)
if (launchIntent != null) {
    context.startActivity(launchIntent, options.toBundle())
}

JAVA:

// Set an option to turn on lock task mode when starting the activity.
ActivityOptions options = ActivityOptions.makeBasic();
options.setLockTaskEnabled(true);
// Start our kiosk app's main activity with our lock task mode option.
PackageManager packageManager = context.getPackageManager();
Intent launchIntent = packageManager.getLaunchIntentForPackage(KIOSK_PACKAGE);
if (launchIntent != null) {
  context.startActivity(launchIntent, options.toBundle());
} In Android versions before 9.0, an app starts its own activities in lock task mode by calling Activity.startLockTask(). To call this method, the activity must be running in the foreground (see Activity-lifecycle concepts) so we suggest calling in the onResume() method of an Activity or Fragment. Here’s how you can call startLockTask():

KOTLIN:

// In our Fragment subclass.
override fun onResume() {
    super.onResume()
    // First, confirm that this package is whitelisted to run in lock task mode.
    if (dpm.isLockTaskPermitted(context.packageName)) {
        activity.startLockTask()
    } else {
        // Because the package isn't whitelisted, calling startLockTask() here
        // would put the activity into screen pinning mode.
    }
}

JAVA:

// In our Fragment subclass.
@Override
public void onResume() {
  super.onResume();

  // First, confirm that this package is whitelisted to run in lock task mode.
  if (dpm.isLockTaskPermitted(context.getPackageName())) {
    getActivity().startLockTask();
  } else {
    // Because the package isn't whitelisted, calling startLockTask() here
    // would put the activity into screen pinning mode.
  }
}

Don’t start lock task mode when the device is locked because the user might not be able to unlock the device. You can call KeyguardManager methods to find out if the device is locked and use an Activity lifecycle callback (such as onResume() that’s called after unlocking) to start lock task mode.

An app in lock task mode can start new activities as long as the activity doesn’t start a new task—except tasks that launch a whitelisted app. To understand how tasks relate to activities, read the guide Understand Tasks and Back Stack.

Alternatively, you can declare in your app manifest file how an activity should behave when the system is running in lock task mode. To have the system automatically run your activity in lock task mode, set the android:lockTaskMode attribute to if_whitelisted as shown in the following example:

<activity
    android:name=".MainActivity"
    android:lockTaskMode="if_whitelisted">
    <!-- ... -->
</activity>

You can learn more about declaring options in the app manifest file, by reading the lockTaskMode reference.

For more info on how to stop lock task mode and other stuff, please refer to the references.

References

https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode

https://developer.android.com/work/dpc/dedicated-devices

The post Introduction to Android Lock Task Mode (Kiosk Mode) appeared first on Boundary Devices.

Ubuntu Bionic 18.04.3 LTS for i.MX6/7 boards – August 2019 (kernel 4.14.x)

$
0
0

 

Ubuntu Bionic 18.04.3 LTS – XFCE4 desktop

We are glad to offer our new images of Ubuntu Bionic for i.MX6 and i.MX7  Nitrogen boards with the newest 4.14.x_2.0.1 kernel and 4.14.98_2.0.1_ga BSP.

These systems contain 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:

Important !

Before installing this image please check your U-Boot version. The above images require U-Boot version 2018.07  to be used. Make sure to visit our wiki if you need to upgrade: https://boundarydevices.com/wiki/u-boot/ .You can find the bootscript in the /boot subdirectory now, its named boot.scr . The partition labels are set if you use dd or ddrescue to create the disk. If you use your own method please check the boot partition labels, because the fstab boots by label (LABEL=sys-16h for example) now. You can use ext2label to modify partition label.

Programming the image

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 20190805-nitrogen-4.14.x_2.0.1_ga-bionic-en_US-console_armhf.img.gz
$ sudo ddrescue -D --force 20190805-nitrogen-4.14.x_2.0.1_ga-bionic-en_US-console_armhf.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@bionic-xfce:~$ 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@bionic-xfce:~$ sudo mkdir /root/.ssh
ubuntu@bionic-xfce:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@bionic-xfce:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@bionic-xfce:~$ sudo chmod 600 /root/.ssh/

What’s supported

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

  • Vivante GPU accelerations
  • C&M VPU accelerations
  • Wi-Fi and Bluetooth modules for Tiwi-BLE, BD_BCOM, BD-SDMAC
  • All kind of storage devices , SDHC card, eMMC, SATA hdd, USB pen sticks, cell modems
  • All of our supported touch panels
  • IMX Capture devices including OV56xx parallel and mipi cameras, Toshiba BD-HDMI-MIPI converter, UVC cameras
  • It supports i.MX6Q/DL/SX and i.MX7D board’s BSP

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 4.14.x ( meta-package name: linux-boundary-17b )
  • GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b16-… ).
  • 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 package gstreamer-imx was upgraded to 0.13.0-4ubuntu9
  • 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. This is an SDK with many new demos, for example OpenCL, OpenVG,G2D.
  • The distribution was upgraded to Bionic 18.04.3 LTS . Here are some main component versions :
    • Xorg server 1.19.6
    • gstreamer1.0 1.14.5
    • bluez 5.48-1ubuntu3
    • Qt5 5.9.5
    • apt 1.6.11
    • chromium 76.0.3809.87-0ubuntu0.18.04.1
    • dpkg 1.19.0.5ubuntu2.3
    • gcc/g++ 7.4.0
    • firefox-esr 67.0.4+build1-0ubuntu0.18.04.1
    • libwayland 1.16.0
    • weston 5.0.0-1
    • XFCE Desktop Environment 4.12.3
  • Silex WiFi / Bluetooth is supported also.

 


Let’s see some interesting demos,  this is a screen of the imx-gpu-sdk OpenGLESv2 Blur demo, a spinning bubble with environment mapping:

IMX GPU SDK 4.0.2 Gaussian Blur demo

You can find many other interesting samples and framework in the SDK, including GLESv2, GLESv3, OpenCL, OpenVG.


This Qt5  Qml demo below shows how to apply various effects on a running video stream, using GPU shaders :

Qt5 QMLVideoFX application

You can apply various effects on a playing video and/or recording camera screen . Source is available.


H264 file streaming with gstreamer:

Playing Warcraft movie trailer

GPU development libraries

The package imx-gpu-viv-b16-dev ( development headers and libraries for OpenGL / ESv2 / ESv3 / Khronos / OpenVG / OpenCL /G2D ) is installed by default. You have to set the headers path, before any other headers, or you might include the mesa headers first, and you don’t want to do that. For example :

export CFLAGS="-I/usr/include/vivante ${CFLAGS}"

and you have to set the library path as well :

export LDFLAGS="-L/usr/lib/arm-linux-gnueabihf/vivante ${LDFLAGS}"

Alternatively you can use the much more precise pkg-config way, in the makefile. Setting the flags in case of X11 system :

PKG_CONFIG_PATH = /usr/lib/arm-linux-gnueabihf/vivante/pkgconfig

EGL :

CFLAGS += $(shell pkg-config --cflags egl_x11)

LDFLAGS += $(shell pkg-config --libs egl_x11)

GLESv1 :

CFLAGS += $(shell pkg-config --cflags glesv1_cm_x11)

LDFLAGS += $(shell pkg-config --libs glesv1_cm_x11)

GLESv2 :

CFLAGS += $(shell pkg-config --cflags glesv2_x11)

LDFLAGS += $(shell pkg-config --libs glesv2_x11)

OpenVG :

CFLAGS += $(shell pkg-config --cflags vg_x11)

LDFLAGS += $(shell pkg-config --libs vg_x11)

In case of FB backend change the _x11 postfix above to _fb, thats all.

OpenCL is the same at both fb and x11 :

CFLAGS += $(shell pkg-config --cflags OpenCL)

LDFLAGS += $(shell pkg-config --libs OpenCL)

Check the directory /usr/lib/arm-linux-gnueabihf/vivante/pkgconfig for more information


 

As always, please give us some feedback and let us know how things work for you.

The post Ubuntu Bionic 18.04.3 LTS for i.MX6/7 boards – August 2019 (kernel 4.14.x) appeared first on Boundary Devices.


How to Upgrade U-Boot

$
0
0

 

Please follow the following steps to upgrade u-boot on your board:

1- First download “6x_upgrade” and “upgrade.scr” from the following link:

http://linode.boundarydevices.com/u-boot-images-2018.07/

2- (if you already have a u-boot file of your own that you want to upgrade to, please ignore this step)

Then if you want to upgrade your u-boot to the latest version download the specific u-boot file for your board from the following link: (for example for nitrogen8m board, download “u-boot.nitrogen8m”)

http://linode.boundarydevices.com/u-boot-images-2018.07/

3- Copy “6x_upgrade”, “upgrade.scr” and “your own u-boot file”/”latest u-boot file download in step 2” to the root of an sd card. (If your device does not have sd card slot, copy the files to the root of a usb flash drive)

4- Put sd card inside your board. (or Connect the usb flash drive to the board)

5- Connect the board using the serial cable to your host pc, turn on the board and stop it in u-boot through console on your host pc.

6- Type the following in u-boot:

=> run upgradeu

7- Wait till it finish and then restart the board.

8- Enjoy.

As always, let us know your experiences (both good and bad).

The post How to Upgrade U-Boot appeared first on Boundary Devices.

Programming eMMC on i.MX8

$
0
0

 

This post intends to answer the question of programming the eMMC memory you can find on our Nitrogen8m and Nitrogen8m mini devices.

Although there are many different approaches available based on Linux or the MFG Tools, this post will focus on two solutions provided under U-Boot.

Solution #1: Using Fastboot

Here is a quick summary:

  • Connect the board serial output (console) to your computer
    • On the host machine, start a terminal software such as minicom for Linux or TeraTerm for Windows
    • Set the connection baudrate to 115200 with no hardware flow control
  • Power up the board and stop auto-boot process to get U-Boot prompt
    • Simply enter any character on the terminal software to stop auto-boot
  • Go into Fastboot Mode
    • This can be done by simply using the following command in u-boot on the board:

=> fastboot 0

  • If you are flashing Android, please use the provided script (flash_fastboot.sh) to fastboot the image to eMMC.
boundary@boundary:~/$ sudo ./flash_fastboot.sh
  • If you are flashing Ubuntu, please use the following command on your host machine to fastboot the image to eMMC.
boundary@boundary:~/$ sudo fastboot flash gpt gpt_8G.img
boundary@boundary:~/$ sudo fastboot flash rootfs rootfs_8G.simg

Solution #2: Using U-Boot USB Mass Storage Gadget

This feature is fully explained here:

Here is a quick summary:

  • Plug a micro-USB cable from your host machine to the target
  • Connect the board serial output (console) to your computer
    • On the host machine, start a terminal software such as minicom for Linux or TeraTerm for Windows
    • Set the connection baudrate to 115200 with no hardware flow control
  • Power up the board and stop auto-boot process to get U-Boot prompt
    • Simply enter any character on the terminal software to stop auto-boot
  • Enable the UMS Gadget for the eMMC
U-Boot > ums mmc 0
  • On the host machine, you should now see a new USB drive attached, you can now flash it
    • On Linux you can simply use the dd utility
~$ zcat [your image name].img.gz | sudo dd of=/dev/sdX bs=1M
 

The post Programming eMMC on i.MX8 appeared first on Boundary Devices.

Boot2Qt embedded qt5 image and toolchain for Nitrogen8M and 8M Mini

$
0
0

We are pleased to announce the release of a Boot2Qt embedded qt5 image and toolchain for our Nitrogen8M and Nitrogen8M Mini platforms.

Below you will find the download link for the image as well as detailed instructions for the build.

For the Impatient

You can download the Boot2Qt Yocto image from here:

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

The image is a SD card image that can be flashed using dd under Linux.

~$ sudo dd if=*boundary-image*.wic of=/dev/sdX bs=1M && sync

For Windows users, please use Alex Page’s USB Image Tool.

Build procedure

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

To build the image, 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-imx8m && cd yocto-imx8m
~/yocto-imx8m$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b thud
~/yocto-imx8m$ repo sync

Setup the environment for building, in this example we will be building the b2qt distro for nitrogen8m.

~/yocto-imx8m$ MACHINE=nitrogen8m DISTRO=b2qt . setup-environment build

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

SDKMACHINE = “i686-mingw32”

 

Now “bitbake meta-b2qt-embedded-qbsp” which will build both the “b2qt-embedded-qt5-image” and “meta-toolchain-b2qt-embedded-qt5-sdk”

~/yocto-imx8m/build$ bitbake meta-b2qt-embedded-qbsp

After some time this should build the same image as above.

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

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

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

 

Display support

Please make sure your platform includes the latest U-Boot for i.MX8M:

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

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

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

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

The post Boot2Qt embedded qt5 image and toolchain for Nitrogen8M and 8M Mini appeared first on Boundary Devices.

Cellular modems on i.MX8 boards, Nitrogen8M and Nitrogen8M Mini under Ubuntu

$
0
0

In this post, we’ll walk through all of the steps needed to configure a specific set of modems under Ubuntu as a reference. We’ll use Quectel EC25 modem in this showcase, if you’re using another modem or another userspace, the details may be different, but the fundamentals will be the same.

We used and tested the Quectel EC25 Mini PCIe , and ublox SARA-R410M-02B during this process, and will be adding them to our default kernels going forward.

As you can see in this file here, and here, the following Qualcomm/Quectel models are supported in the current kernel :

  • UC15  UMTS/HSDPA : 3.6 Mbit/s DL,  384 Kbit/s UL 
  • UC20  UMTS/HSPA+ : 14.4 Mbit/s DL,  5.76 Mbit/s UL
  • EC21   LTE Cat1 : 10 Mbit/s DL,  5 Mbit/s UL 
  • EC25   LTE Cat4 : 150 Mbit/s DL,  50 Mbit/s UL 
  • BG96  LTE Cat M1/NB1 : 375 kbit/s DL and 375 kbit/s UL
  • EP06   LTE Cat6 : 300 Mbit/s DL,  50 Mbit/s UL 

And from u-blox:

  • SARA-R410M-02B LTE Cat M1/NB1 : 300 kbit/s DL and 375 kbit/s UL
  • SARA-R410M-52B LTE Cat M1 : 300 kbit/s DL and 375 kbit/s UL

 

For the impatient

These images contain 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: 

The above images contain all packages what needed to work with cellular modems, including network-manager and modemmanager and screen packages.

Programming the image

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

The image is a slightly-less-than-8GiB image file containing the partition table.  For example, if you want to create an SD card for a console image, you need to do the following :

$ sudo apt install gddrescue xz-utils util-linux
$ gunzip 20190922-nitrogen8mm-4.14.x_2.0.1_ga-bionic-en_US-console-weston_aarch64.img.gz
$ sudo ddrescue -D --force 20190922-nitrogen8mm-4.14.x_2.0.1_ga-bionic-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.

Contents

In the rest of this post we’ll walk through the following:

 

Hardware Installation

Installing EC25 modem on Nitrogen8M and Nitrogen8M Mini

These boards require a mini PCI-e to USB adapter to connect the EC25 mini PCIe modem. They’re cheap and easy to find (Search Amazon for “mini PCI-e USB wireless SIM” keywords). Th uBlox SARA modem doesn’t need adapter, it has a built-in micro USB connector or its a surface mounted unit on your board.

If you need a free USB port, install a USB HUB, and problem solved.

EC25 Modem in USB adapter

uBlox SARA-R410M

 

Using modem on a headless (No GUI) Ubuntu system

Software prerequisites

Make sure you have the latest kernel installed, but at least the ABI >= 17 :

ubuntu@bionic-dev64:/$ uname -r
4.14.98-17-boundary-17b

If this is not the case, please update your system :

ubuntu@bionic-dev64:/$ aptu

We will solve the modem handling tasks with the modemmanager package. This package provides a unified high level API for communicating with (mobile broadband) modems. ModemManager is a daemon that gets started at boot time.

The modemmanager package provides a command line tool, named mmcli, to control the ModemManager daemon. That will be the tool used below.

We will solve the connection handling tasks with the network-manager package. We can use the NetworkManager’s huge database to use the cellular service provider data and settings. With the NetworkManager we can create connection configuration files, with specific parameters, that makes internet connection handling very easy.

Make sure you have installed modemmanager , networkmanager packages :

ubuntu@bionic-dev64:~$ dpkg -l | grep -e modemmanager -e network-manager
ii  modemmanager        1.10.0-1~ubuntu18.04.2    arm64    D-Bus service for managing modems
ii  network-manager     1.10.6-2ubuntu1.1         arm64    network management framework (daemon and userspace tools)

If these packages are not installed, please type the following and then restart the system:

ubuntu@bionic-dev64:/$ sudo apt install modemmanager network-manager uuid

If everything went well, your ModemManager and NetworkManager will start at boot time. You can check it like so:

ubuntu@bionic-dev64:~$ systemctl --no-pager list-units --state=running | grep Manager.service
ModemManager.service            loaded active running Modem Manager
NetworkManager.service          loaded active running Network Manager 

When ModemManager starts it scans the serial ports for modems and it tries to recognize them. It takes few seconds after the login prompt, so you’ll need to be patient.

Depending on your modem it might be necessary to create the following zero length file (to set your modem managed):

ubuntu@bionic-dev64:~$ sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

 

Testing whether the system recognizes the modem

You can check the presence of the USB modem device using lsusb:

ubuntu@bionic-dev64:~$ lsusb
Bus 003 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 0458:018b KYE Systems Corp. (Mouse Systems) 
Bus 001 Device 006: ID 04d9:a0f8 Holtek Semiconductor, Inc. 
Bus 001 Device 005: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The 6th one with 2c7c:0125 key, that is our EC25 modem.

You can check the modem’s serial ports :

ubuntu@bionic-dev64:~$ ls -a1 /dev/ttyU*
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3

The EC25 modem creates three USB serial ports (ttyUSB1 does not belong to the modem in the above list). Other modems may create fewer or more.

At this point, you can see if modemmanager detects the modem with mmcli -L:

ubuntu@bionic-dev64:~$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module

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

ubuntu@bionic-dev64:~$ mmcli -m 0
  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 94ec3702b44ee6fb7d67141906997d7070bf8198
  --------------------------------
  Hardware |         manufacturer: QUALCOMM INCORPORATED
           |                model: QUECTEL Mobile Broadband Module
           |             revision: EC25EFAR06A04M4G
           |         h/w revision: 10000
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 866758045611098
  --------------------------------
  System   |               device: /sys/devices/platform/32e50000.usb/ci_hdrc.1/usb1/1-1/1-1.2/1-1.2.1
           |              drivers: option1, qmi_wwan
           |               plugin: Quectel
           |         primary port: cdc-wdm0
           |                ports: ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net), 
           |                       ttyUSB3 (at)
  --------------------------------
  Status   |                 lock: sim-pin2
           |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 84% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 4g; preferred: none
           |                       allowed: 2g, 3g; preferred: 3g
           |                       allowed: 2g, 3g; preferred: 2g
           |                       allowed: 2g, 4g; preferred: 4g
           |                       allowed: 2g, 4g; preferred: 2g
           |                       allowed: 3g, 4g; preferred: 3g
           |                       allowed: 3g, 4g; preferred: 4g
           |                       allowed: 2g, 3g, 4g; preferred: 4g
           |                       allowed: 2g, 3g, 4g; preferred: 3g
           |                       allowed: 2g, 3g, 4g; preferred: 2g
           |              current: allowed: 2g, 3g, 4g; preferred: 4g
  --------------------------------
  Bands    |            supported: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3, 
           |                       eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40, 
           |                       eutran-41
           |              current: egsm, dcs, utran-1, utran-5, utran-8, eutran-1, eutran-3, 
           |                       eutran-5, eutran-7, eutran-8, eutran-20, eutran-38, eutran-40, 
           |                       eutran-41
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 866758045611098
           |          operator id: unknown
           |         registration: unknown
  --------------------------------
  3GPP EPS | ue mode of operation: ps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0

 

ubuntu@bionic-dev64:~$ nmcli dev
DEVICE    TYPE        STATE         CONNECTION 
eth0       ethernet   connected     Wired connection 1 
cdc-wdm0   gsm        disconnected  -- 
wlan0      wifi       disconnected  -- 
lo         loopback   unmanaged     -- 

 

Finding the optimal antenna position

Now we have stop NetworkManager and ModemManager temporarily, because we want to run some more tests:

ubuntu@bionic-dev64:~$ systemctl --no-pager list-units --state=running | grep Manager.service
ModemManager.service            loaded active running Modem Manager                  
NetworkManager.service          loaded active running Network Manager                
ubuntu@bionic-dev64:~$ sudo systemctl stop ModemManager.service NetworkManager.service
ubuntu@bionic-dev64:~$ systemctl --no-pager list-units --state=running | grep Manager.service
ubuntu@bionic-dev64:~$ 

 And we start screen serial console application to communicate with modem on ttyUSB2 (primary AT port of the modem, as shown above).

ubuntu@bionic-dev64:~$ screen /dev/ttyUSB2 115200

Now you get an empty console screen. If local echo is not set, then type ATZ for the modem blindly, and that will reset it.

Now type :

ATI
Quectel
EC25
Revision: EC25EFAR06A04M4G
OK

This tells us that the modem is present and working. Now type the following command, to check if your GSM antenna is set properly:

AT+CSQ
+CSQ: 26,99
OK

This is the GSM signal quality in +CSQ: RSSI, BER format, where

RSSI = Received Signal Strength Indication, and

BER = Channel Bit Error Rate 0…7  (in percent) or 99 = Not known or not detectable

The RSSI = 99 (+CSQ: 99,99) means an unknown or undetectable signal level.

Here is a table to calculate the signal levels from RSSI :

Calculating signal levels from RSSI to dBm
RSSI 0 1 2 3 4 5 6 7
level dBm -113 dBm -111 dBm -109 dBm -107 dBm -105 dBm -103 dBm -101 dBm – 99 dBm
RSSI 8 9 10 11 12 13 14 15
level dBm -97 dBm -95 dBm -93 dBm -91 dBm -89 dBm -87 dBm -85 dBm -83 dBm
RSSI 16 17 18 19 20 21 22 23
level dBm -81 dBm -79 dBm -77 dBm -75 dBm -73 dBm -71 dBm -69 dBm -67 dBm
RSSI 24 25 26 27 28 29 30 31
level dBm -65 dBm -63 dBm -61 dBm -59 dBm -57 dBm -55 dBm -53 dBm >-51 dBm

Move/rotate your antenna and repeat the command above until you find the antenna’s optimal position.

In general we can say:

  • RSSI values below 10 will not work
  • RSSI values between 10 and 15 will have many disconnections
  • RSSI values between 15 and 20 are weak, but could work
  • RSSI values between 20 and 25 are good
  • RSSI values above 25 are excellent, recommended

For LTE 100 Mbit/s or higher speed connections you’ll need excellent signal quality, RSSI > 25 for reliable service.

 

Checking the subscriber information 

You should check your SIM card, since it provides a lot of information:

AT+CIMI
3100262475092493
OK

This command will query your SIM card’s IMSI number ( International Mobile Subscriber Identity )

The first 3 digits of IMSI number is MCC ( Mobile Country Code )

The following 2 (Europe) or 3 (North America) digits of the IMSI is the MNC ( Mobile Network Code )

The remaining digits is the MIN ( Mobile Identification Number )

You can check your MCC/MNC code in the following page :

Mobile Country Codes

For example if your MCC is 310 and your MNC is 026 then you are a T-Mobile subscriber in USA .

Why is this important ? Because on this page :

Mobile Broadband Service Providers

You can find your APN number based on you MCC and MNC number, and that is necessary, when you want to create a connection setup,  to dial up your service provider. Of course you may ask your service provider about these datas.

If you get an error :

AT+CIMI
+CME ERROR: Sim failure

Then your SIM card is not inserted properly, or it is locked by the CardLock feature, or its broken.

If the tests above pass, you can exit the screen console application ( <ctrl+A> Q, then Y ) .

Connecting to the internet

For doing that, you have to create a connection setup file as user “root” in the /etc/NetworkManager/system-connections directory, with the following content :

ubuntu@bionic-dev64:/$ sudo cat /etc/NetworkManager/system-connections/MyModem
[connection]
id=EC25
uuid=15d742f1-2b5a-421e-9f27-fcb1fc26d72d
type=gsm
autoconnect=false

[ipv4]
method=auto

[gsm]
number=*99#
#username=user
#password=passwd
apn=epc.tmobile.com
[serial]
baud=115200

The username and the password  are usually not necessary, or can be anything. The uuid is a unique identifier you can create with the uuid command (which installed earlier) :

ubuntu@bionic-dev64:~$ uuid
15d742f1-2b5a-421e-9f27-fcb1fc26d72d
ubuntu@trusty-dev:~$

The id can be anything that you can memorize easily (“EC25” is not mandatory). The same goes to for the file name “MyModem”. It can be anything. You have to get the apn from your service provider, or from HERE , as described above, earlier.

This is a minimal connection setup file. For detailed instructions, type :

ubuntu@bionic-dev64:/$ man nm-settings

When finished, set the connection setup file’s attribute to 0600 :

ubuntu@bionic-dev64:/$ sudo chmod 600 /etc/NetworkManager/system-connections/MyModem

And make sure that the file’s owner:group is root. If the owner is not root, then the Network Manager will ignore the connection setup.

ubuntu@bionic-dev64:/$ sudo chown root:root /etc/NetworkManager/system-connections/MyModem

Now reboot, and wait for modemmanager to recognize the modem.

Then enable modem :

ubuntu@bionic-dev64:/$ sudo mmcli -m 0 -e
successfully enabled the modem
ubuntu@bionic-dev64:/$

And check the connections :

ubuntu@bionic-dev64:~$ nmcli con
NAME                UUID                                  TYPE      DEVICE 
Wired connection 1  355a9384-3ebf-3a20-b822-e3f4b39b4b46  ethernet  eth0   
EC25                15d742f1-2b5a-421e-9f27-fcb1fc26d72d  gsm       --     

Then you can dial (connect) to any of them :

ubuntu@bionic-dev64:~$ sudo nmcli con up id EC25
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
ubuntu@bionic-dev64:/$

 

You can see the status of the active connections like this :

ubuntu@bionic-dev64:~$ nmcli con show --active
NAME                UUID                                  TYPE      DEVICE   
EC25                15d742f1-2b5a-421e-9f27-fcb1fc26d72d  gsm       cdc-wdm0 
Wired connection 1  355a9384-3ebf-3a20-b822-e3f4b39b4b46  ethernet  eth0     

You can use the internet now, download, upload, browse, launch wget, as you like it. When finished, you can disconnect with the following command. You don’t need to be in a hurry, service providers usually bill for data traffic and not connection time.

ubuntu@bionic-dev64:~$ sudo nmcli con down id EC25
Connection 'EC25' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)

Pay close attention to the commands above, since we show both mmcli (modem manager) and nmcli (network manager).

A note: when you restart the system, Network Manager needs about 20 seconds to close and release the network devices. (“A stop job is running for Modem Manager”) Please be patient, the proper shutdown is important as always.

As always please tell us how this works for you. Contact us if you have any trouble or ask a question by posting a reply below.

 

The post Cellular modems on i.MX8 boards, Nitrogen8M and Nitrogen8M Mini under Ubuntu appeared first on Boundary Devices.

Debian 10 Buster for Nitrogen8M board – October 2019 (kernel 4.14.x)

$
0
0

Debian 10 Wayland/Weston Compositor

We’re glad to release our first Debian Buster image for Nitrogen8M 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:

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-09h 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 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/

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 configured 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
  • 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 4.14.98 ( meta-package name: linux-boundary-17b )
GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b16-… ).
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 Stretch 9.5 . Here are some main component versions :

  • Xorg server 1.20.4-1.1
  • gstreamer1.0 1.14.4
  • bluez 5.50-1.1
  • Qt5.11.3
  • apt 1.8.2
  • dpkg 1.19.7
  • gcc/g++ 8.3.0-6
  • libwayland 1.16.0-1.1
  • weston 5.0.0-3debian4
  • Silex WiFi / Bluetooth is supported in Bionic also, as well as in Stretch, Xenial and Jessie.

 

 

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:

debian@buster-dev64:~$ wl
or
debian@buster-dev64:~$ weston-launch

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

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

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

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

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

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

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


As always, please give us some feedback and let us know how things work for you.

The post Debian 10 Buster for Nitrogen8M board – October 2019 (kernel 4.14.x) appeared first on Boundary Devices.

Debian 10 Buster for Nitrogen8M_Mini board – October 2019 (kernel 4.14.x)

$
0
0

Debian 10 Weston/Wayland Compositor

 

We’re happy to release our Debian 10 Buster image for Nitrogen8M_Mini board. Since this board supports only Wayland graphical backend, the system is simpler than earlier systems with i.MX6, similar to i.MX8M system.

We use Weston, the reference Wayland compositor in this system, later we’ll release other Wayland compositors as well.

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:

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-0Dh for example) now. You can use e2label to modify partition label.

Programming the image

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 20191027-nitrogen8mm-4.14.x_2.0.1_ga-buster-en_US-console-weston_aarch64.img.gz
$ sudo ddrescue -D --force 20191027-nitrogen8mm-4.14.x_2.0.1_ga-buster-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: 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-dev64m:~$ sudo visudo

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

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

What’s supported

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

  • Vivante GPU accelerations for Wayland (OpenGL ES 2.0)
  • The Hantro Video Processing Unit supports the following decoders:
    • video/x-h265
    • video/x-vp9
    • video/x-h264
    • video/x-vp8
  • The Hantro Video Processing Unit supports the following encoders:
    • video/x-h264
    • video/x-vp8
  • Wi-Fi and Bluetooth modules for the built-in Silex module
  • All kind of storage devices , eMMC, SDXC, USB2.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 4.14.98 ( meta-package name: linux-boundary-17b )
GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b16-… ).
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 OpenGL ES2, OpenVG.
The distribution is Debian 10 Buster. Here are some main component versions :

  • Xorg server 1.20.4-1.1
  • gstreamer1.0 1.14.4
  • bluez 5.5-1.2
  • Qt5 5.11.3
  • apt 1.8.2
  • dpkg 1.19.7
  • gcc/g++ 8.3.0-6
  • 1.16.0-1.1
  • 5.0.0-3debian4
  • Silex WiFi / Bluetooth is supported in Buster also, as well as in Stretch, Xenial and Jessie.

This screenshot shows a playing video, it works via gstreamer as usual:

Debian 10 Weston/Wayland Compositor, playing video on glimagesink

And this screenshot is the usual Qt5/QML demo application running on Weston Compositor:

Debian 10 Weston/Wayland Compositor, running Qt5/QML demo

 

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

debian@buster-dev64m:~$ wl
or
debian@buster-dev64m:~$ weston-launch

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

debian@buster-dev64m:~$ sudo apt install weston-systemd
debian@buster-dev64m:~$ sudo systemctl enable weston.service
debian@buster-dev64m:~$ sudo systemctl unmask weston.service

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

debian@buster-dev64m:~$ sudo systemctl disable weston.service
debian@buster-dev64m:~$ sudo systemctl mask weston.service

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

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

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


As always, please give us some feedback and let us know how things work for you.

The post Debian 10 Buster for Nitrogen8M_Mini board – October 2019 (kernel 4.14.x) appeared first on Boundary Devices.

Yocto release for i.MX8M MINI

$
0
0

We’ve received many requests for Yocto support on our Nitrogen8M Mini SBC based on the i.MX8M MINI processor. Below you will find the download link for the image as well as detailed instructions for the build including a features set.

For the Impatient

You can download the Yocto image from here:

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

The image is a SD card image that can be restored using zcat and dd under Linux.

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

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

balena-etcher 

Build procedure

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

This is mostly a clone of fsl-community-bsp-platform with meta-boundary added in.

To build the image, 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-imx8m && cd yocto-imx8mm
~/yocto-imx8mm$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b warrior
~/yocto-imx8mm$ repo sync

Setup the environment for building, in this example we will be building our boundary-wayland distro for nitrogen8mm

~/yocto-imx8mm$ MACHINE=nitrogen8mm 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-imx8mm/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above.

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:

  • GPU Vivante libraries 6.2.4p1.8
  • VPU Hantro libraries v1.8.0
  • GStreamer1.0 1.14.0 for i.MX
  • Weston 4.0.0 for i.MX
  • qcacld-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.50 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 for i.MX8M MINI:

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

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

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

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

GPU acceleration

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@nitrogen8mm:~# weston-simple-egl &
root@nitrogen8mm:~# cd /opt/viv_samples/vdk/
root@nitrogen8mm:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPUVPU decoding

The i.MX8MM processor can decode videos with a resolution up to 1080p so here is an example using GPlay tool:

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

Camera input

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

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

nitrogen8m-camera

Ethernet

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

root@nitrogen8mm:~# 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@nitrogen8mm:~# nmcli d wifi connect <network_name> password <password>
root@nitrogen8mm:~# 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 Bluetooth, you’ll be able to connect using these commands:

root@nitrogen8mm:~# echo 0 > /sys/class/rfkill/rfkill0/state
root@nitrogen8mm:~# echo 1 > /sys/class/rfkill/rfkill0/state 
root@nitrogen8mm:~# hciattach /dev/ttymxc0 qca 3000000 -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                 : 33060 bytes
Total Length           : 32804 bytes
Patch Data Length      : 32780 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x0114
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
root@nitrogen8mm:~# echo 1 > /sys/class/rfkill/rfkill2/state 
root@nitrogen8mm:~# hciconfig hci0 up
root@nitrogen8mm:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device
 

As usual, feel free to leave a comment below to share your experience.

The post Yocto release for i.MX8M MINI appeared first on Boundary Devices.


Yocto release for i.MX8MQ

$
0
0

YoctoWe’ve received many requests for Yocto support on our Nitrogen8M SBC. Below you will find the download link for the image as well as detailed instructions for the build including a features set.

For the Impatient

You can download the Yocto image from here:

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

Since the Nitrogen8M board has no SD card slot, you need to program this image via fastboot or

using U-Boot USB Mass Storage Gadget. Instructions on programming the SW can be found below:

programming-emmc-on-i-mx8

However, you can still flash the image onto an SD card and use an SD Card to USB adapter or flash to a 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 etcher utility to flash the SD Card or USB stick via Windows or Linux:

balena-etcher 

Build procedure

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

This is mostly a clone of fsl-community-bsp-platform with meta-boundary added in.

To build the image, 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-imx8m && cd yocto-imx8m
~/yocto-imx8m$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b warrior
~/yocto-imx8m$ repo sync

Setup the environment for building, in this example we will be building our boundary-wayland distro for nitrogen8m.

~/yocto-imx8m$ MACHINE=nitrogen8m 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-imx8m/build$ bitbake boundary-image-multimedia-full

After some time this should build the same image as above.

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:

  • GPU Vivante libraries 6.2.4p1.8
  • VPU Hantro libraries v1.8.0
  • GStreamer1.0 1.14.0 for i.MX
  • Weston 4.0.0 for i.MX
  • qcacld-2.0 Wi-Fi driver for BD-SDMAC
  • BlueZ 5.50 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 for i.MX8M:

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

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

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

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

GPU acceleration

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@nitrogen8m:~# weston-simple-egl &
root@nitrogen8m:~# cd /opt/viv_samples/vdk/
root@nitrogen8m:/opt/viv_samples/vdk# ./tutorial7

Nitrogen8M GPUVPU decoding

The i.MX8MQ processor can decode videos with a resolution up to 4K so here is an example using GPlay tool:

root@nitrogen8m:~# wget http://linode.boundarydevices.com/videos/SKYFALL-4K.mp4
root@nitrogen8m:~# gplay-1.0 SKYFALL-4K.mp4

nitrogen8m-vpuCamera input

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

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

nitrogen8m-camera

Ethernet

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

root@nitrogen8m:~# 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@nitrogen8m:~# nmcli d wifi connect <network_name> password <password>
root@nitrogen8m:~# 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@nitrogen8m:~# 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 Bluetooth, you’ll be able to connect using these commands:

root@nitrogen8m:~# echo 0 > /sys/class/rfkill/rfkill0/state
root@nitrogen8m:~# echo 1 > /sys/class/rfkill/rfkill0/state 
root@nitrogen8m:~# hciattach /dev/ttymxc2 qca 3000000 -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                 : 33060 bytes
Total Length           : 32804 bytes
Patch Data Length      : 32780 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x0114
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
root@nitrogen8m:~# echo 1 > /sys/class/rfkill/rfkill2/state 
root@nitrogen8m:~# hciconfig hci0 up
root@nitrogen8m:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device
 

As usual, feel free to leave a comment below to share your experience.

The post Yocto release for i.MX8MQ appeared first on Boundary Devices.

Warrior Yocto Release

$
0
0

A new Yocto 2.7 release, Warrior, is now available for the i.MX series platform from NXP. We apologize for the delay. 

For the Impatient

How to Burn

To burn the image file to a sdcard, run this command assuming your sdcard is mounted on /dev/sdc

~$ sudo umount /dev/sdc*
~$ zcat 20191101-boundary-image-multimedia-full-nitrogen6x.wic.gz | sudo dd of=/dev/sdc bs=1M

To build the image, you’ll need these packages installed as well as this repo tool that can be installed like this:

~$ sudo apt-get install repo

Now create your build directory and initialize everything.

~$ mkdir ~/warrior
~$ cd ~/warrior
~/warrior$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b warrior
~/warrior$ repo sync

Now setup the environment for building. In this example we’re targeting the nitrogen6x, however nitrogen6x-lite, nitrogen6sx, and nitrogen7 are all also valid MACHINE targets here. Use whatever your platform is. Take a look through those MACHINE configuration files linked, you’ll notice the nitrogen6x MACHINE configuration covers many different boards. The other three configurations cover only one board. We are building the boundary-wayland DISTRO

~/warrior$ MACHINE=nitrogen6x 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

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

After some time this should build the same image as above.

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

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

Ethernet

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

root@nitrogen8mm:~# 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@nitrogen8mm:~# nmcli d wifi connect <network_name> password <password>
root@nitrogen8mm:~# 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 Bluetooth, you’ll be able to connect using these commands:

root@nitrogen8mm:~# echo 0 > /sys/class/rfkill/rfkill0/state
root@nitrogen8mm:~# echo 1 > /sys/class/rfkill/rfkill0/state 
root@nitrogen8mm:~# hciattach /dev/ttymxc2 qca 1000000 -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                 : 33060 bytes
Total Length           : 32804 bytes
Patch Data Length      : 32780 bytes
Signing Format Version : 0x1
Signature Algorithm    : 0x2
Event Handling         : 0x3
Reserved               : 0x0
Product ID             : 0x0008
Rom Build Version      : 0x0302
Patch Version          : 0x0114
Reserved               : 0x8000
Patch Entry Address    : 0x19b08
====================================================
====================================================
TLV Type               : 0x2
Length                 : 1992 bytes
Failed to open /etc/bluetooth/firmware.conf
Ignoring invalid deep sleep config value
Failed to open /etc/bluetooth/firmware.conf
====================================================
Device setup complete
root@nitrogen8mm:~# echo 1 > /sys/class/rfkill/rfkill2/state 
root@nitrogen8mm:~# hciconfig hci0 up
root@nitrogen8mm:~# hcitool scan
Scanning ...
11:22:DE:AD:BE:EF    Some Device
 

As usual, feel free to leave a comment below to share your experience.

The post Warrior Yocto Release appeared first on Boundary Devices.

Debian Buster 10.2 for i.MX6/7 boards – December 2019 (kernel 4.14.x)

$
0
0

 

Debian Buster 10.2 XFCE4 desktop

As it happens every other year, Debian released a new version of its distribution named Buster. We are glad to offer new images for i.MX6/7 boards with the current 4.14.98 kernel.

As earlier, we used XFCE4 desktop since it offers the best trade-off speed/size for Debian GUI desktop environment. As usual, a console image is also available for those who don’t need a GUI desktop.

We also created an other GUI desktop image without the demo applications. And this time we’ve added a Weston/Wayland image as well.

Debian Buster 10.2 Weston/Wayland desktop

These systems contain 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:

Important !

Before installing this image please check your U-Boot version. The above images require U-Boot version 2018.07  to be used. Make sure to visit our wiki if you need to upgrade: https://boundarydevices.com/wiki/u-boot/ .You can find the bootscript in the /boot subdirectory now, its named boot.scr . The partition labels are set if you use dd or ddrescue to create the disk. If you use your own method please check the boot partition labels, because the fstab boots by label (LABEL=sys-16h for example) now. You can use e2label to modify partition label.

Programming the image

The image is a slightly-less-than-8GiB 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 20191215-nitrogen-4.14.x_2.0.1_ga-buster-en_US-devcon_armhf.img.gz
$ sudo ddrescue -D --force 20191215-nitrogen-4.14.x_2.0.1_ga-buster-en_US-devcon_armhf.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: debian and root. The password for each is Boundary (capital B).

An ssh server is configured 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@nitrogen:~$ sudo mkdir /root/.ssh
[sudo] password for debian:
debian@nitrogen:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
debian@nitrogen:~$ sudo chmod 600 /root/.ssh/auth*
debian@nitrogen:~$ sudo chmod 600 /root/.ssh/

What’s supported

Since the images above include our stable 4.14.98 kernel, essentially everything is supported including :

  • Vivante GPU accelerations
  • C&M VPU accelerations
  • Wi-Fi and Bluetooth modules for Tiwi-BLE, BD_BCOM, BD-SDMAC
  • All kind of storage devices , SDHC card, eMMC, SATA hdd, USB pen sticks, cell modems
  • All of our supported touch panels
  • IMX Capture devices including OV56xx parallel and mipi cameras, Toshiba BD-HDMI-MIPI converter, UVC cameras
  • It supports i.MX6Q/DL/SX and i.MX7D board’s BSP

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 4.14.98 ( meta-package name: linux-boundary-17b )
  • GPU driver was upgraded to Vivante 6.2.4p4.0 ( meta-package name: imx-gpu-viv-b16-… ).
  • 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 package gstreamer-imx was upgraded to 0.12.3-5
  • The new NXP/Vivante GPU SDK was added : imx-gpu-sdk 4.0.2 . You can get the source with the usual apt-get source command. This SDK has many demos, for example OpenCL, OpenVG,G2D, and for OpenVX and Vulkan, but those demos will be supported only by the i.MX8 SoC.
  • The distribution was upgraded to Buster 10.2 . Here are some main component versions :
    • Xorg server 1.20.4-1.1
    • gstreamer1.0 1.14.4
    • bluez 5.50-1.1
    • Qt5 5.11.3
    • apt 1.8.2
    • chromium 59.0.3071.86-1
    • dpkg 1.19.7
    • gcc/g++ 8.3.0-6
    • libwayland 1.16.0-1.1
    • weston 5.0.0-3debian4
    • XFCE Desktop Environment 4.12.5
  • The desktop icon structure is similar to Ubuntu now, the demo icons are grouped in the same way.
  • Silex WiFi / Bluetooth is supported in Buster.

 


Let’s see some interesting new demos,  this is a screen of the imx-gpu-sdk OpenGLESv2 Blur demo, a spinning bubble with environment mapping:

IMX GPU SDK 4.0.2 Gaussian Blur demo

You can find many other interesting samples and framework in the SDK, including GLESv2, GLESv3, OpenCL, OpenVG.


This Qt5  Qml demo below shows how to apply various effects on a running video stream, using GPU shaders :

Qt 5.11.3 QmlVideoFX demo

You can apply various effects on a playing video and/or recording camera screen . Source is available.


Chromium browser now supports WebGL. This is an example from the web:

gstreamer playing Demo

 

GPU development libraries

The package imx-gpu-viv-s13-dev ( development headers and libraries for OpenGL / ESv2 / ESv3 / Khronos / OpenVG / OpenCL /G2D ) is installed by default. You have to set the headers path, before any other headers, or you might include the mesa headers first, and you don’t want to do that. For example :

export CFLAGS="-I/usr/include/vivante ${CFLAGS}"

and you have to set the library path as well :

export LDFLAGS="-L/usr/lib/arm-linux-gnueabihf/vivante ${LDFLAGS}"

Alternatively you can use the much more precise pkg-config way, in the makefile. Setting the flags in case of X11 system :

PKG_CONFIG_PATH = /usr/lib/arm-linux-gnueabihf/vivante/pkgconfig

EGL :

CFLAGS += $(shell pkg-config --cflags egl_x11)

LDFLAGS += $(shell pkg-config --libs egl_x11)

GLESv1 :

CFLAGS += $(shell pkg-config --cflags glesv1_cm_x11)

LDFLAGS += $(shell pkg-config --libs glesv1_cm_x11)

GLESv2 :

CFLAGS += $(shell pkg-config --cflags glesv2_x11)

LDFLAGS += $(shell pkg-config --libs glesv2_x11)

OpenVG :

CFLAGS += $(shell pkg-config --cflags vg_x11)

LDFLAGS += $(shell pkg-config --libs vg_x11)

In case of FB backend change the _x11 postfix above to _fb, thats all.

OpenCL is the same at both fb and x11 :

CFLAGS += $(shell pkg-config --cflags opencl)

LDFLAGS += $(shell pkg-config --libs opencl)

Check the directory /usr/lib/arm-linux-gnueabihf/vivante/pkgconfig for more information


 

As always, please give us some feedback and let us know how things work for you.

The post Debian Buster 10.2 for i.MX6/7 boards – December 2019 (kernel 4.14.x) appeared first on Boundary Devices.

Ubuntu Bionic 18.04.3 LTS for i.MX6 boards with etnaviv GPU acceleration – January 2020 (mainline kernel 5.4.6)

$
0
0

 

Ubuntu Bionic 18.04.3 LTS – XFCE4 desktop

We are glad to offer our new special images of Ubuntu Bionic for i.MX6 Nitrogen boards with the most recent mainline 5.4.6  kernel and without NXP/IMX BSP. The mainline kernel supports the GPU acceleration with the etnaviv driver, and supports the C&M VPU also with its CODA-960 driver.

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:

Important !

Before installing this image please check your U-Boot version. The above images require U-Boot version 2018.07  to be used. Make sure to visit our wiki if you need to upgrade: https://boundarydevices.com/wiki/u-boot/ .You can find the bootscript in the /boot subdirectory now, its named boot.scr . The partition labels are set if you use dd or ddrescue to create the disk. If you use your own method please check the boot partition labels, because the fstab boots by label (LABEL=sys-0Dh for example) now. You can use ext2label to modify partition label.

One more important rule: you must disable all unused video devices in U-Boot environment. For example in case of HDMI diplay (only):

=> setenv fb_lcd off
=> setenv fb_lvds off
=> setenv fb_lvds2 off
=> setenv fb_mipi off
=> setenv fb_hdmi 1280x720M@60
=> setenv fb_hdmi_set 1280x720-32@60
=> saveenv
=> reset

The number 32 after the resolution is the bpp.

Programming the image

The image is a slightly-less-than-8GiB 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 20200105-nitrogen6x-5.4.6-ml-bionic-en_US-console_armhf.img.gz
$ sudo ddrescue -D --force 20200105-nitrogen6x-5.4.6-ml-bionic-en_US-console_armhf.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@bionic-mlb:~$ 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@bionic-mlb:~$ sudo mkdir /root/.ssh
ubuntu@bionic-mlb:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@bionic-mlb:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@bionic-mlb:~$ sudo chmod 600 /root/.ssh/

What’s supported

Since the images above include the mainline stable 5.4.6 kernel, essentially almost everything is supported including :

  • Vivante GPU accelerations (etnaviv)
  • C&M VPU accelerations (coda-960)
  • All kind of storage devices , SDHC card, eMMC, SATA hdd, USB pen sticks, cell modems
  • It supports i.MX6Q/DL/SX board’s

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 has been changet to 5.4.6 mainline kernel ( meta-package name: linux-boundary-mlb )
  • GPU driver was changed to etnaviv kernel driver,  libdrm-etnaviv1, libdrm-armada2 DRM userspace drivers, mesa EGL and OpenGL ES2 libraries,  etnaviv_dri.so DRI driver (comes with mesa package), xf86-video-armada xorg video driver for DRM KMS etnaviv driver.
  • The NXP BSP packages have been removed, there are no gstreamer-imx and imx-gpu-viv and imx-galcore, imx-lib, imx-vpu packages anymore.
  • The distribution was upgraded to Bionic 18.04.3 LTS . Here are some main component versions :
    • Xorg server 1.19.6
    • mesa 19.0.8-0ubuntu0~18.04.3
    • gstreamer1.0 1.14.5
    • bluez 5.48-1ubuntu3
    • Qt5 5.9.5
    • apt 1.6.12
    • chromium-browser 79.0.3945.79-0ubuntu0.18.04.1
    • dpkg 1.19.0.5ubuntu2.3
    • gcc/g++ 7.4.0
    • firefox 71.0+build5-0ubuntu0.18.04.1
    • libwayland 1.16.0
    • weston 3.0.0-1
    • XFCE Desktop Environment 4.12.4

 


First let’s see the console mode. You can test the GPU acceleration with the following command:

ubuntu@bionic-mlb:$ kmscube -D /dev/dri/card1
Using display 0x19bb030 with EGL version 1.4
===================================
EGL information:
version: "1.4"
vendor: "Mesa Project"
client extensions: ......
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 2.0 Mesa 19.0.8"
shading language version: "OpenGL ES GLSL ES 1.0.16"
vendor: "etnaviv"
renderer: "Vivante GC2000 rev 5108"
extensions: .....
===================================

As you can see the installed mesa package from the Ubuntu repository supports the etnaviv DRM driver, it provides OpenGL ES2 acceleration

You’ll see a spinning color cube on the screen.

The mainline kernel supports the imx6q VPU by the coda-960 driver. It creates v4l2 gstreamer codec and scaler elements, you can check it in the following way:

ubuntu@bionic-mlb:/$ gst-inspect-1.0 | grep V4L2
video4linux2: v4l2video10convert: V4L2 Video Converter
video4linux2: v4l2h264enc: V4L2 H.264 Encoder
video4linux2: v4l2mpeg4enc: V4L2 MPEG4 Encoder
video4linux2: v4l2mpeg4dec: V4L2 MPEG4 Decoder
video4linux2: v4l2mpeg2dec: V4L2 MPEG2 Decoder
video4linux2: v4l2h264dec: V4L2 H264 Decoder

The videosink can only be the kmssink. That sink is unable to scale/resize the video canvas, you can do that only with the v4l2video10convert (the number in the name could be different) . That converter/scaler gstreamer element is able to convert RAW videostream’s colorspace and/or size. It uses the i.MX6Q IPU, so its HW accelerated converter.

You can play a video in the following way:

$ gst-launch-1.0 playbin uri=${URI} video-sink="kmssink connector-id=${conn_id} name=imx-drm can-scale=false sync=true"

You can check the connector ID in the following way (in case of HDMI display):

$ modetest -M imx-drm -c | grep HDMI-A-1

The connector ID will be the first number in the line, usually 56

 

Let’s see Chromium Browser status:

The Chromium Browser is GPU accelerated

Its driven by etnaviv + Mesa GL

HTML5 score is acceptable

WebGL runs, although its very slow

Playing movie trailer via gstreamer xvimagesink

Running glmark2 on etnaviv

glxgears 3D mesa test

 

 

 

 

 

 

 

In the /root folder you can find 2 xorg server configurations. Both work, but in a different way. The xorg configuration is a symbolic link to one of these files, in the folder /usr/share/X11/xorg.conf.d/75-device.conf

One uses Armada graphics driver for xorg via etnadrm:

http://git.arm.linux.org.uk/cgit/xf86-video-armada.git/tree/README?h=unstable-devel

,the other xorg configuration uses etnaviv DRM/KMS driver with modesetting.

 


As always, please give us some feedback and let us know how things work for you.

The post Ubuntu Bionic 18.04.3 LTS for i.MX6 boards with etnaviv GPU acceleration – January 2020 (mainline kernel 5.4.6) appeared first on Boundary Devices.

Boundary Devices Scores a Touchdown with New Mobile Ticketing Solution for Sports Stadiums

$
0
0

New York, NY January 21, 2020 — INTIX Annual Conference & Exhibition — Boundary Devices, a leading global supplier of ARM-based Single Board Computers and System on Modules for the general embedded market, today announced that Near-field communication (NFC) paperless ticketing is now enabled in Boundary Devices’ Nitrogen Access Control product family, found in sports and entertainment venues across the country. One of the first deployments was completed in the premium suites of Arrowhead Stadium, home of the Kansas City Chiefs.

Ahead of the 2019-2020 football season, the NFL mandated that all NFL ticketing go mobile, with teams across the league turning to mobile-only ticket entry as an increased security measure and means of increasing operational efficiencies. Mobile tickets allow for greater protection against fraudulent tickets, as the trail of a ticket can now be tracked digitally. Mobile tickets also can be shared easily and allow for quicker entry at the gate. 

Boundary Devices’ Nitrogen Access Control product is designed to conform to this rule, in addition to enhancing security by checking and validating credentials at stadiums and other venues. The addition of NFC ticketing technology provides customers an even higher level of security, while improving the speed of entrance. That means less time in line for sports fans and more time cheering on their favorite team. Fans can now receive their ticket directly on their mobile phone, approach their suite or the stadium main entrance, and “tap” their phone for immediate entry via Apple Wallet and Google Pay. 

“Secure access control into our premium suites is one of our top priorities. It’s important that we protect the exclusivity of their ticket, while providing a seamless method of entry for their guests,” said Justin Sauser, Director of Ticket Operations at the Kansas City Chiefs. “Our Boundary suite scanners have allowed us to deliver a custom experience to each suite member and accommodate an array of different methods of entry and varying levels of NFC-based tickets and credentials.”

In order to help facilitate this process for venue customers such as the Kansas City Chiefs, Boundary Devices has integrated HID OMNIKEY® 5127CK readers within the Nitrogen Access Control product to enable mobile ticketing. HID is an industry leader in access control solutions and has proven expertise in creating highly integrated and interoperable products and solutions.  Boundary Devices is able to leverage this expertise with the very popular OMNIKEY 5127CK series and rely on HID’s certifications that are necessary for the most popular smartphones on the market, allowing Boundary Devices to get to market quickly with an NFC solution.

With the convenience and security provided by the new technology, it’s no surprise that more and more venues are switching to mobile, and Boundary Devices has already outfitted multiple stadiums in the US, with more stadium upgrades planned in the future. “Technology is changing rapidly and Boundary Devices is uniquely positioned to help our partners implement the latest features,” said Pejman Kalkhoran, CEO of Boundary Devices. “With our strong partnership with HID, and significant technical expertise, we can help our customers like the Kansas City Chiefs adopt the latest technology.”

“HID is laser focused on ensuring our innovative hardware, software and services deliver more convenient and secure experiences that help people get to where they need to go and achieve what they want to do in everyday life,” said Cesare Paciello, VP of Events and Mobile Ticketing, Identification Technologies with HID Global. “Boundary Device’s mobile ticketing offering represents the ideal use of solutions and technologies across HID’s trusted identity portfolio that deliver on this promise, while eliminating complex lifecycle management issues and accelerating the time to market of finished products for our partners.”

HID’s OMNIKEY® 5127CK Mini Reader Board opens market opportunities for system integrators seeking simple integration and development of readers using standard interfaces such as CCID, UART or Keyboard Wedge. For the Boundary Devices solution, the OMNIKEY reader board incorporates events and mobile ticketing software from HID’s Identification Technologies business, which allows sports fans to store, access and read their event tickets in Apple and Google wallet.

About Boundary Devices

Boundary Devices is a leading supplier of i.MX-based SBCs and SOMs for the general embedded market. Headquartered in Lake Forest, CA, we are ISO9001 certified and an NXP proven partner. We view our customers as partners, and because we offer every aspect of embedded boards – hardware, software, manufacturing, integration and support – we can offer as much or little expertise as you need for your project. On time, on budget, and made in the US: that’s our promise to our partners.

 

The post Boundary Devices Scores a Touchdown with New Mobile Ticketing Solution for Sports Stadiums appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live