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

Ubuntu Trusty for i.MX6 boards – February 2016 (kernel 3.14.28)

$
0
0

Ubuntu Trusty 3.14.28 LXDE

This is a maintenance release of our last Ubuntu Trusty. Not much new content, but some minor fixes and changes, the only new package is the gstreamer-imx. We added a console image also, it was missing in the last Ubuntu. These systems 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 imagea from here:

For more information, please check the latest Trusty post :

Ubuntu Trusty for i.MX6 boards – December 2015 (kernel 3.14.28)

Most probably this is our last Trusty Tahr system, because the new LTS release is coming in April : Xenial Xerus.  Of course the Trusty won’t be abandoned neither, it will be supported until 2019 .

Programming the image

The image is a slightly-less-than-4GiB image file containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:

~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 20160213-nitrogen*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync

Or you can use Alex Page’s USB Image Tool under Windows.

If you’re using our latest U-Boot and a Nitrogen6 Max board, you can use the new USB Mass Storage Gadget to program the eMMC. If not, there were some notes in our first release that describe a more complicated way of programming eMMC.

The gstreamer-imx package (0.12.0)

This is the only new part of the system. This new package gives you many new options to create your gstreamer1.0 pipeline, with bunch of new plugins :

      • elements of imxaudio  : imxuniaudiodec, imxmp3audioenc
      • element of imxv4l2video : imxv4l2videosrc
      • elements of imxvpu : imxvpudec, imxvpuenc_mjpeg; imxvpuenc_mpeg4; imxvpuenc_h264; imxvpuenc_h263
      • elements of imxg2d : imxg2dvideosink, imxg2dvideotransform, imxg2dcompositor
      • elements of imxpxp : imxpxpvideosink, imxpxpvideotransform
      • element of imxeglvivsink : imxeglvivsink
      • elements of imxipu : imxipuvideosink, imxipuvideotransform, imxipucompositor

Please check these links for further information about gstreamer-imx plugins package :

https://community.freescale.com/thread/376271

https://github.com/Freescale/gstreamer-imx/blob/master/README.md

The post Ubuntu Trusty for i.MX6 boards – February 2016 (kernel 3.14.28) appeared first on Boundary Devices.


Come see Boundary Devices i.MX7 and i.MX6 Quad PLUS Demos at Embedded World

$
0
0

Come see Boundary Devices’ recently announced Nitrogen7 and Nit6QP_MAX boards at Embedded World in the NXP booth.  

The Nitrogen7 is a multi-purpose i.MX7 single board computer based on the i.MX7 processor from NXP/Freescale.  The i.MX7 processor from NXP/Freescale has ARM Cortex™-A7 and ARM Cortex™-M4 cores which provide unique features to the i.MX family.  The Nitrogen7 was designed take advantage of the key features of the i.MX7 processor including power efficiency with a PFUSE PMIC and the M4 core.  For more information:  https://boundarydevices.com/product/nitrogen7/
The Nitrogen7 demo features an HMI application running QT5.5 on a 7″ display.

Nit6QP_MAX is the Quad Plus version of our popular Nitrogen6_MAX series.  These board features the recently released i.MX6 Quad PLUS processor.  Here are the notable improvements from the standard i.MX6 Quad to the i.MX6 Quad PLUS:

  • Dramatic graphics performance with enhanced versions of 3D, 2D and composition GPUs and memory bandwidth utilization
  • Improve the system performance of i.MX 6 class systems by dramatically increasing the memory bandwidth utilization without significant impact to Software or Hardware designs
  • Improvement of the internal bus interconnect to more efficiently transport and order memory requests to the DDR controller. 
  • Significantly upgraded the capabilities of the graphic and display subsystems to generate more efficient memory requests, resulting in further bandwidth improvements. (interchangeable tiled buffer, pre-fetch / resolve modules, larger OCRAM)

The Nit6QP_MAX can be found here:  https://boundarydevices.com/product/nitrogen6max/
The demo will be running Android and multiple graphics intensive applications to show off the increased performance.

Email us if you have specific questions about either product.  Both boards are in stock now.

Boundary Devices at Embedded World

Boundary Devices at Embedded World

i.MX7 and i.MX6 Quad PLUS Demos at Embedded World/NXP Booth

 

The post Come see Boundary Devices i.MX7 and i.MX6 Quad PLUS Demos at Embedded World appeared first on Boundary Devices.

Android Lollipop 5.1.1 GA release for i.MX6 boards

$
0
0

We are glad to release a new version of Android 5.1.1 (Lollipop) for all our platforms: BD-SL-i.MX6 (SABRE Lite)Nitrogen6x, Nitrogen6_Max (Quad and QuadPlus), Nitrogen6_SOM, Nitrogen6_SOMv2Nitrogen6_Lite, Nit6_SoloX and Nitrogen6_VM.

This release went under the same testing as our previous releases.

We now recommend this release for new designs.


For the impatient

You can download images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains Freescale content. The image is a 4GB SD card image that can be restored using zcat and dd under Linux.

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

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

What’s new?

First of all, this release includes all the features that were previously available in our last Android 5.0.0 release. We will only describe the changes brought either by the OS update itself or changes in features that have been enabled in last release.

Since the Beta hasn’t been publicly available, we will also re-enumerate the features from the Beta.

OS update

Here is a non-exhaustive list of noticeable changes between Android 5.0.0 and 5.1.1:

  • Quick Settings drawer allows now to access some menu such as WiFi selection

wifi_menu

  • Notifications have been heavily changed and now offer an option to temporarily dismiss them

notif_menu

  • Change the system volume level while music is playing
  • Fixes most memory leaks reported in 5.0.0 and 5.1.0

For a more complete changelog between the two versions, we invite you to look at the very nice Opersys website which lists all the different commits between every version:

Also, it is worth noting that Freescale/NXP took take of patching the security flaws discovered in the Android media server.

Linux Kernel 3.14.52

This is the first Android release based on a 3.14 kernel which brings:

  • Latest and greatest drivers support
    • Vivante graphics libraries v5.0.11 p7
  • i.MX6 Quad/Dual Plus support
  • i.MX6 SoloX support
  • No more earlysuspend mechanism as recommended by the AOSP folks

Another change is to be noted regarding our display plug-and-play experience. Since the switch to device tree, it has been hard to keep a simple/readable 6x_bootscript that fits all our platforms/displays. So we went ahead and tried another approach having a default node for display timings which U-Boot is in charge to populate. This approach requires an update of U-Boot (see next section).

U-Boot changes

First you need to update U-Boot (after flashing the sdcard image provided above). To do so, you need to set a uboot_defconfig variable which is unique per platform:

  • nit6xlite for Nit6xlite
  • nitrogen6_max for Nitrogen6_MAX
  • nitrogen6q for Nitrogen6x/BD-SL-i.MX6
  • nitrogen6sx for Nit6_SoloX

Below is an example for Nitrogen6x.

U-Boot> setenv uboot_defconfig nitrogen6q
U-Boot> run upgradeu

Then everything should work out of the box again. But in case you wonder how to specify a specific display, here are some useful commands:

U-Boot> fbpanel
 clock-frequency hactive vactive hback-porch hfront-porch vback-porch vfront-porch hsync-len vsync-len
hdmi: 1280x720M@60:m24:74161969,1280,720,220,110,20,5,40,5
 74161969 1280 720 220 110 20 5 40 5
hdmi: 1920x1080M@60:m24:148500148,1920,1080,148,88,36,4,44,5
 148500148 1920 1080 148 88 36 4 44 5
hdmi: 1024x768M@60:m24:64998375,1024,768,220,40,21,7,60,10
 64998375 1024 768 220 40 21 7 60 10
lvds: lg1280x800:j24:71108582,1280,800,48,80,15,2,32,6
 71108582 1280 800 48 80 15 2 32 6
...
U-Boot> setenv fb_lvds lg1280x800
U-Boot> saveenv
U-Boot> reset

The example above uses fbpanel to list all the available settings for this particular platform. Then the LVDS display is set to be the LG1280x800 display by setting fb_lvds. The same can be done for HDMI or LCD displays through fb_hdmi and fb_lcd.

Behind the curtain you can have a look at the cmd_hdmi, cmd_lvds and cmd_lcd variables which are now being run from the 6x_bootscript in order to setup the display timings and resolutions.

More information on those U-Boot changes on a previous blog post:

Miscellaneous additions

  • Our multi-display/multi-app demo is now part of the standard image
  • ExFAT and NTFS support for all external media
    • A USB drive and/or additional SD card doesn’t need to be FAT32 formatted any more to be recognized as a valid external storage.
    • Ext4 support only works with SELinux disabled or permissive since it would require to modify AOSP base sepolicy.
  • Basic Fastboot support
    • Implied to switch to a GPT partition table.
    • Ext4 versions of boot.img and recovery.img are now created.
    • Formatting isn’t supported yet due to our legacy layout.
    • But you can now flash all the images on an already formatted GPT disk as follows:
~/$ adb shell reboot bootloader
~/$ fastboot flash boot $OUT/boot.img
finished. total time: 3.762s
~/$ fastboot flash recovery $OUT/recovery.img
finished. total time: 3.402s
~/$ fastboot flash system $OUT/system.img
finished. total time: 52.153s
~/$ fastboot continue
resuming boot...
  • Support of our HDMI to MIPI daughter board by default
  • F-Droid app store
    • F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. The client makes it easy to browse, install, and keep track of updates on your device.
    • Although it is not installed on our release by default, it has been tested on our platforms and seemed very interesting so we thought it would be worth sharing it here:
    • fdroid_list Installing another app is now as simple as using Google Play:fdroid_install
    • All the source code is available for both client and server side which means you can easily put that in place for your project/company and control what the users have access to.
    • Here is a quick procedure to install the app to your platform: 
      ~/$ wget https://f-droid.org/FDroid.apk
      ~/$ adb install FDroid.apk
      
    • Let us know if you’d like to have it installed on our next releases.

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 source code:

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git 
       -b boundary-imx-l5.1.1_2.1.0-ga
~/myandroid$ repo sync
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose nitrogen6x / nit6xlite / nitrogen6sx from the list of boards
~/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 Lollipop 5.1.1 GA release for i.MX6 boards appeared first on Boundary Devices.

i.MX53 Android 2.3 Tablet with 7″ 1024×600 Display

i.MX Linux kernel 3.14.52

$
0
0

We’re glad to release a new Linux kernel branch based on NXP 3.14.52-1.1.0_ga release for all our i.MX boards:

What’s new?

Well the most important feature is that this kernel is the first consolidated version for all i.MX platforms, including i.MX7 and i.MX6QP. This means that this kernel supports our latest platforms:

Then the rest of the new features can be found on NXP Release Notes:

Features on all platforms:

  • GPU driver upgraded to Vivante v5.0.11p7.4

Features on new i.MX 6QuadPlus:

  • i.MX 6QuadPlus TO1.0 SOC support added.
  • i.MX 6QuadPlus SABRE-AI and SD boards supported.
  • PRE-Prefetch Resolve Engine – Prefetching of IPU data to improve overall memory access and larger on-chip RAM.
  • NOC-based interconnect fabric with scheduler – Improves overall memory access efficiency.
  • 3D GPU enhanced to GC2000+ supporting improved tile buffer handling.
  • 2D GPU enhanced to GC320 supporting 8 overlays and improved tile buffer handling.

Features on i.MX 7Dual:

  • Multimedia: MIPI-DSI, SAI, wm8960, and wm8958 32bit word length support
  • Security: CAAM
  • Connectivity: SIMv2, PCIe-RC, and PCIe-EP mode (validation board)
  • Sensor through the I2C interface including: MPL3115A2, FXOS8700CQR1, FXAS21002CQR1
  • Multi-core communication: RPMsg

This release has gone under a lot of testing in order to make sure all our patches from 3.14.28-1.0.0_ga branch have been ported over successfully.

OS releases

Yocto

Official support will be pushed to the FSL-Community BSP repository very soon, stay tuned.

Ubuntu

Here is an updated Trusty image for all the platforms:

For more information about Trusty, please visit the previous release blog post, all the details still apply here:

Buildroot

Our Nitrogen configurations have been updated on Buildroot master branch and are already available. It will be part of Buildroot release 2016.05.

No image is provided at this time, make sure to read our Buildroot Getting Started Guide to learn about how to generate an image.

U-Boot / Bootscript

This release uses the same mechanism as the 3.14.28 which means that U-Boot is in charge of setting the display parameters in the device tree. So it requires to use U-Boot v2015.07 or higher. Please make sure to read our blog post about this release:

As for the 6x_bootscript/6x_upgrade, both scripts have been updated to support new 6QP and 7D cpu values. You can find the files below if needed:

 

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

The post i.MX Linux kernel 3.14.52 appeared first on Boundary Devices.

U-Boot v2016.03

$
0
0

We’ve just released a new version of U-Boot based on mainline v2016.03:

For the impatient

Our build server generates an archive containing all the binaries for our boards. It will be regularly updated at this address:

As part of the archive, a file named “boundary-v2016.03_” contains the exact commit ID of this build images.

Also, the up-to-date 6x_upgrade U-Boot script is included so you can copy all the files directly to the root of your media storage.

What’s new?

Apart from using the latest mainline version, the main addition of this version is Nitrogen7 (i.MX7) support.

Note that this Nitrogen7 platform (and only this platform) requires to use some new QSPI parameters, so make sure to copy the files named qspi-* to the root of your media along with the usual u-boot. file.

Other than that, the release brings the exact same features as our previous release v2015.07. We strongly recommend you to read our previous blog post in case you haven’t read it yet:

Compilation

The usual compilation disclaimers apply for this. It is highly recommended to use the gcc-arm-linux-gnueabihf package available on Ubuntu.

~$ sudo apt-get install gcc-arm-linux-gnueabihf

First, clone our U-Boot git repository. This is the branch you’ll need to compile and install to work with the new kernel.

~$ git clone https://github.com/boundarydevices/u-boot-imx6 \
-b boundary-v2016.03
~$ cd u-boot-imx6

Here you’ll need to find and make the relevant defconfig for your board.

If you are using a U-Boot >=2015.07, then at the U-Boot prompt you can type the following to see which defconfig you should build.

=> echo $uboot_defconfig

Otherwise, to see all the defconfigs, use this command and pick the one that is right for you.

~/u-boot-imx6$ find . -name "nit*defconfig"
./configs/nitrogen6_vm1g_defconfig
./configs/nitrogen6q2g_defconfig
./configs/nitrogen6dl2g_defconfig
./configs/nitrogen6s1g_defconfig
./configs/nit6xlite_defconfig
./configs/nitrogen6q_fl_defconfig
./configs/nitrogen7_defconfig
./configs/nitrogen6q_som2_2g_defconfig
./configs/nitrogen6sx_defconfig
./configs/nitrogen6dl_defconfig
./configs/nitrogen6q_defconfig
./configs/nitrogen6s_defconfig
./configs/nitrogen6_lum_dl1_defconfig
./configs/nitrogen6_vm_defconfig
./configs/nitrogen6q_som2_1g_defconfig
./configs/nitrogen6q_som2_4g_defconfig
./configs/nit6xlite1g_defconfig
./configs/nitrogen6qp_max_defconfig
./configs/nitrogen6_max_defconfig

 Now compile that defconfig, here I’ll use nitrogen6q_defconfig as an example.

~/u-boot-imx6$ export ARCH=arm
~/u-boot-imx6$ export CROSS_COMPILE=arm-linux-gnueabihf-
~/u-boot-imx6$ make nitrogen6q_defconfig
~/u-boot-imx6$ make all
~/u-boot-imx6$ ./tools/mkimage -A arm -O linux -T script -C none \
-a 0 -e 0 -n "update script" \
-d board/boundary/nitrogen6x/6x_upgrade.txt 6x_upgrade

Now you’ll have a u-boot.imx file compiled. Rename the u-boot.imx file to u-boot.{uboot_defconfig} (see below), then move that and the 6x_upgrade script to the Boot partition of the image you created (see here for instructions on creating a Fido Yocto image). Interrupt u-boot and run the u-boot commands below.

In the u-boot just built, the environment variable uboot_defconfig is defined to show which defconfig was used in the build process. Unless you’re already on a 2015.07 or later u-boot, you won’t have this yet, so for the 1st upgrade you need to set it manually.

You will need to rename u-boot.imx when copying to the SD card, ie.

~/u-boot-imx6/$ cp u-boot.imx /u-boot.nitrogen6q

We changed this so that the next time you upgrade, there will be little risk of accidentally using the wrong u-boot.imx file.

If your u-boot prompt is “U-boot >” then run:

Hit any key to stop autoboot:  0 
U-Boot > setenv uboot_defconfig nitrogen6q
U-Boot > run upgradeu

Otherwise just run:

Hit any key to stop autoboot:  0
=> run upgradeu

This will run the 6x_upgrade script and look for a file u-boot.{uboot_defconfig} and burn it. At this point it might be worth while to clear your envionment variables, this will set you up with the default environment variables and no more.

Hit any key to stop autoboot:  0 
=> env default -a
=> savee

Then as a final note, if you’ve somehow managed to brick your board through this process and need help. Well, we already wrote a blog post here about that topic.

The post U-Boot v2016.03 appeared first on Boundary Devices.

Crank Software demo on i.MX7 Nitrogen7

$
0
0

This post intends to show how the Crank application framework is well suited to run on our i.MX7 Nitrogen7 board.

For the impatient

You can download a pre-built image from here:

As usual, you’ll need to register on our site and agree to the EULA. The image is a SD card image that can be restored using zcat and dd under Linux.

~$ zcat 20160427-yocto-nitrogen7-crank-demo.sdcard.gz | sudo dd of=/dev/sdX bs=1M

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

Demo details

This demonstration is based on the following:

This Launcher demonstration application is made to show the different type of UI that can be created depending on your needs:

launcher2

Crank Launcher

Crank Home Automation Demo

Crank Home Automation Demo

Crank Medical Monitoring Demo

Crank Medical Monitoring Demo

Crank Washing Machine Demo

Crank Washing Machine Demo

Crank Software details

Crank Software Inc. is an innovator in embedded graphical user interface (GUI) solutions. Their products and services enable R&D teams and UI Designers to quickly and collaboratively develop rich animated user interfaces for resource-constrained embedded.

The demo above relies on the Crank Storyboard Engine which is:

  • Multi-platform
    • Supported on Linux, Android, QNX, WindowsCE among others
  • Built for embedded
    • Storyboard Embedded Engine scales from low-end to high-end processors
  • 3D optimized
    • For higher end products embedding a GPU

As for the tools, the Storyboard Suite offers everything needed to design, debug and deploy your application.

Of course, all the details are provided on Crank Software’s website:

Crank also offers many useful videos and webinars for developers to get started quickly:

Note that Crank Software is a NXP Proven Partner.

The post Crank Software demo on i.MX7 Nitrogen7 appeared first on Boundary Devices.

Visit us at NXP FTF May 16-19th to see our i.MX6 and i.MX7 Products

$
0
0

Boundary Devices is proud to be a Bronze Sponsor of the NXP FTF Technology Forum – pedestal #135 in Austin, Texas May 16th to May 19th.

This is our 4th year sponsoring the event and we look forward to showing off some of our new products including:

Nitrogen7 – i.MX7 single board computer running Crank Storyboard Suite
Nit6QP_MAX – i.MX6 Quad PLUS Single Board Computer
SoloX SCM Module with WiFi+BT Top Board
802.11ac SDIO WiFi + BT 4.1 Module

Please visit us at Pedestal #135 to see our SBC and SOM boards.

For more details:  NXP-FTF-TECH-FORUM-HOME

The post Visit us at NXP FTF May 16-19th to see our i.MX6 and i.MX7 Products appeared first on Boundary Devices.


Android Marshmallow 6.0.1 GA release

$
0
0

We are glad to deliver the latest Android Marshmallow 6.0.1 GA release for all our platforms: BD-SL-i.MX6 (SABRE Lite)Nitrogen6x, Nitrogen6_Max (Quad and QuadPlus), Nitrogen6_SOM, Nitrogen6_SOMv2Nitrogen6_Lite, Nit6_SoloX and Nitrogen6_VM.

This release went under the same testing as our previous releases which is why we now recommend this release for new designs.


For the impatient

You can download images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains Freescale content. The image is a 4GB SD card image that can be restored using zcat and dd under Linux.

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

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

What’s new?

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

OS update

Here is a non-exhaustive list of noticeable changes between Android 5.1.1 and 6.0.1:

  • Security enhancements
    • SELinux policies more strict
    • Adoptable external storage
      • Enabled for external SD-Card only on our builds
        sdadopt_1
    • App permissions now selectable
      • Will ask you during first use of the app:
        permissions
      • Also able to change it through Settings > Apps menu:
        app_permissions
  • MultiWindow mode
    • Still experimental in Marshmallow
    • Needs to be enabled manually in Settings > Developer options
      multiwindow_1

Google also provides a list of notable changes for developers:

For a more complete changelog between the two versions, we invite you to look at the very nice Opersys website which lists all the different commits between every version:

Linux Kernel 3.14.52

Just like Android 5.1.1, this release is based on a 3.14 kernel. The only notable change since 5.1.1 is the use of the latest (and greatest) Vivante graphics libraries (v5.0.11 p8).

If you haven’t used Android with a 3.14.x kernel yet, please make sure to update U-Boot.

U-Boot changes

As said in the previous section, using a Linux Kernel >= 3.14.x now requires to have a U-Boot version >= v2015.07 due to our new display detection mechanism.

More information on those U-Boot changes on a previous blog post:

As of this writing, the latest version we support is the 2016.03. You can download binaries directly from this webpage:

Then, you need to set a uboot_defconfig variable which is unique per platform:

  • nit6xlite1g for Nit6xlite with 1GB of RAM
  • nitrogen6_max for Nitrogen6_MAX
  • nitrogen6q for Nitrogen6x/BD-SL-i.MX6
  • nitrogen6sx for Nit6_SoloX

Below is an example for Nitrogen6x.

U-Boot> setenv uboot_defconfig nitrogen6q
U-Boot> run upgradeu

Miscellaneous additions

  • Support of data encryption
    • Requires to setup a PIN password in Settings > Security
    • Needs to be enabled in Settings > Encrypt tablet
    • A new partition (9) has been added to store the keys
      crypt
  • ExFAT, NTFS and Ext4 are supported for all external media
    • BUT requires SELinux to be disabled or permissive due to new more restrictive AOSP policies.
  • Fastboot support improvement
    • Requires to use latest U-Boot v2016.03 
    • Works with both sparse and regular images
    • However, latest fastboot doesn’t look for unknown USB product ID so you now need to specify it as follows:
~/$ adb shell reboot bootloader
~/$ fastboot -i 0x0525 flash boot $OUT/boot.img
finished. total time: 3.762s
~/$ fastboot -i 0x0525 flash recovery $OUT/recovery.img
finished. total time: 3.402s
~/$ fastboot -i 0x0525 flash system $OUT/system.img
finished. total time: 52.153s
~/$ fastboot -i 0x0525 continue
resuming boot...
  • Camera HALv3 is now being used
    • Note that our auto-focus support hasn’t been integrated yet, it will be part of an upcoming update.
  • Bluetooth Low Energy
  • Dual display demo
  • SuperUser removal
    • Since the Koush app isn’t supported in Marshmallow and that new SELinux policies prevent its use

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 source code:

~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u git://github.com/boundarydevices/android-manifest.git \
       -b boundary-imx-m6.0.1_1.0.0-ga
~/myandroid$ repo sync
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose nitrogen6x / nit6xlite / nitrogen6sx from the list of boards
~/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 Marshmallow 6.0.1 GA release appeared first on Boundary Devices.

Krogoth release of Yocto

$
0
0

Yocto 2.1 release, Krogoth, is now available.

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 boundary-eval-image-nitrogen6x-krogoth.sdcard.gz | sudo dd of=/dev/sdc bs=1M

How to Replicate

To make the build process a bit easier, we’ve created our own boundary-bsp-platform that can be used to build images for our boards. This is mostly a clone of fsl-community-bsp-platform but we’ve added meta-browser and our own meta-boundary to the mix. There is also a Boundary-Devices-centric setup-environment script. Again, this is mostly a clone of fsl-community-bsp-base’s setup-environment script however we’ve added central download area and cache and some extras to the default local.conf.

Firstly, you’ll need to create the download/cache folders and give r/w access.

~$ sudo mkdir -p /opt/freescale/yocto/imx
~$ sudo mkdir -p /opt/freescale/yocto/sstate-cache
~$ sudo chmod -R 777 /opt/freescale

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

~$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
~$ sudo chmod a+x /usr/bin/repo

Now create your build directory and initialize everything.

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

Now setup the environment for building. In this example I’m targeting the nitrogen6x, however nitrogen6x-lite and nitrogen6sx are also valid MACHINE targets here. Use whatever your platform is.

~/krogoth$ MACHINE=nitrogen6x . setup-environment boundary-eval-image

Now bitbake boundary-eval-image

~/krogoth/boundary-eval-image$ bitbake boundary-eval-image

Now after some time this should build the same image as above. The image file will deploy to ~/krogoth/boundary-eval-image/tmp/deploy/images/{MACHINE}/boundary-eval-image-{MACHINE}.sdcard.gz. Feel free to tweak and add things as you see fit.

Video Input Tests

If you have our ov5640-mipi camera, ov5642 camera, or our HDMI input daughterboard the image includes easy desktop icons to launch tests for the respective hardware.

The post Krogoth release of Yocto appeared first on Boundary Devices.

i.MX Linux kernel 4.1.15

$
0
0

We’re glad to release a new i.MX Linux kernel 41.15 branch based on NXP 4.1.15-1.0.0_ga branch for all our platforms:

What’s new?

This Linux kernel 4.1.15 contains the same features as the previous 3.14.52 kernel, the rest of the new features can be found on NXP Release Notes:

  • GPU driver upgraded to Vivante v5.0.11p8.3
    • Software floating point not supported
  • Updated drivers (connectivity + multimedia)

Most importantly, each kernel update implies that it takes advantage of the latest drivers, frameworks and security updates. You can see the different improvements of each Linux kernel version on the following website:

This release has gone under a lot of testing in order to make sure all our patches from 3.14.52-1.1.0_ga branch have been ported over successfully.

OS releases

Yocto

The meta-fsl-arm-extra layer master and krogoth-next branches have already been updated:

Here are the updated Krogoth images with 4.1.15 kernel:

Ubuntu

Here is the Xenial Ubuntu image leveraging the latest 4.1.15 kernel for all platforms:

You can find a lot more details about the Xenial release in the following blog post:

Buildroot

Our Nitrogen configurations have been updated on Buildroot master branch and it will be part of the 2016.08 release.

Here is an image of current Buildroot master branch as well as Gstreamer1.0 and Qt5.6 with the Cinematic demo:

Here is the defconfig used to build this image:

U-Boot / Bootscript

This release uses the same mechanism as the 3.14.28 which means that U-Boot is in charge of setting the display parameters in the device tree. So it requires to use U-Boot v2015.07 or higher. Please make sure to read our blog post about this release:

As a FYI, you can find all the latest U-Boot binaries at the following address:

As for the 6x_bootscript/6x_upgrade, both scripts have been updated to support new 6QP and 7D cpu values. You can find the files below if needed:

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

The post i.MX Linux kernel 4.1.15 appeared first on Boundary Devices.

Ubuntu Xenial for i.MX6/7 boards – August 2016 (kernel 4.1.15)

$
0
0

 

Ubuntu Xenial 16.04 - Mate desktop

At last the new Long Term Support Ubuntu has arrived. It’s full name Ubuntu Xenial Xerus 16.04 LTS, it will be supported for 5 years by Canonical (till April 2021). This time we created a MATE desktop, not an LXDE one. This desktop is very similar to the old but beloved and very popular Gnome2 . And of course we added a console image also, for those who don’t need GUI desktop, but a headless server or console application. 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 4.1.15 kernel requires U-Boot version 2015.07 or higher, version 2016.03 is recommended. With this U-Boot you can use the new USB Mass Storage Gadget to program the eMMC.

Tipp: If you want more free space on the console image’s SD card, you can uninstall demos anytime, they take lot of space :

$ sudo apt-get purge imx-gpu-sdk-x8-fb
$ sudo apt-get purge imx-gpu-viv-x8-test

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. Its much more talkative program, although dd does do it’s job honestly, I don’t like mute programs, you never know whats happening in the 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
$ unxz 20160802-nitrogen-4.1.25_1.2.0_ga-xenial-en_US-console_armhf.img.xz
$ sudo ddrescue -D --force 20160802-nitrogen-4.1.25_1.2.0_ga-xenial-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.

At 1:10 I typed lsblk command with unplugged SDHC reader, then I plugged it in, and at 1:15 I checked again. A new node was added , sdg , obviously that was my 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).

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

What’s supported

Since the images above include our stable 4.1.15 kernel, essentially everything is supported including Vivante GPU and C&M VPU accelerations, Wi-Fi and Bluetooth modules (Tiwi BLE, Murata, BD_BCOM ), all of our storage devices (SDHC card, eMMC, SATA, USB sticks, cell modems) and all of our supported touch panels, OV56xx cameras, Toshiba BD-HDMI-MIPI converter. It supports i.MX6Q/DL/SX and i.MX7D boards.

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.1.15 ( meta-package name: linux-boundary-12x )
  • GPU driver was upgraded to Vivante 5.0.11p7.4 ( meta-package name: imx-gpu-viv-x8-… ). Unfortunately this is not the latest driver, because the latest one had some problems with chromium-browser. I preferred stability, I’ll upgrade this later when all the problems were eliminated for sure.
  • The module galcore (CONFIG_MXC_GPU_VIV) was removed from the kernel, and it’s an externally built module. This change makes the graphics sytem modular, and more upgradable, 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.2
  • The new NXP/Vivante GPU SDK was added : imx-gpu-sdk 2.2.2 . You can get the source with the usual apt-get source command.
  • The distribution was upgraded to the new Xenial Xerus. Here are some main component versions :
    • Xorg server 1.18.3
    • gstreamer1.0 1.8.2
    • bluez 5.37
    • Qt5 5.5.1
    • apt 1.2.12
    • chromium-browser 48.0.2564.82
    • dpkg 1.18.4
    • gcc/g++ 5.4.0
    • firefox 47.0
    • libwayland 1.9.0
    • MATE Desktop Environment 1.14.1
  • The package gst1.0-fsl-plugins was removed by default (still installable), the better gstreamer-imx replaces it.
  • The earlier Ubuntu Trusty used upstart init daemon, while the new one uses systemd init system. This is quite significant change, Xenial is similar to Debian Jessie now. The consequence of this change : developers must port their upstart scripts (/etc/init) to systemd services/targets or at least to sysv init scripts. Because fortunately Xenial still runs the sysv init scripts (/etc/init.d). After all, systemd is a better system indeed and it seems it becomes a standard init system. I know this is not a solace for those who must port their init scripts to sysv/systemd. The services must be started stopped by systemctl command, and the journalctl command replaces dmesg.

Let’s see some interesting new options. This is a screen of the new imx-gpu-sdk :

IMX GPU SDK 2.2.2 Gaussian Blur demo

You can find many intersting samples in the SDK, including GLESv2, GLESv3, OpenVG.

The new Qt5  5.5.1 has much more options than the Trusty’s 5.2.1, this is a Qml example :

Qt 5.5.1 QML Video Fx demo

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

Chromium browser nicely supports WebGL , although its not the fastest thing what I’ve ever seen. But this board is not a game computer, and WebGL could help a lot to realize some tasks. This is an example from the web:

Chromium WebGL demo

At last the Qt5 allround demo was added also : 

Qt 5.5.1 QtDemo

This program demonstartes all the major blocks of Qt5

Since bluez is now version 5.37, you can use the command line tool bluetoothctl to control bluetooth dameon, and create connections, pair up with nearby devices. This tool was introduced in Debian Jessie first:

ubuntu@nitrogen:~$ sudo bluetoothctl 
[NEW] Controller 84:DD:20:DA:B1:8F Nitrogen6_max TiWi-BLE [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller 84:DD:20:DA:B1:8F Discovering: yes
[NEW] Device 0C:1D:AF:A2:E3:78 Redmi
[bluetooth]# info 0C:1D:AF:A2:E3:78
Device 0C:1D:AF:A2:E3:78
 Name: Redmi
 Alias: Redmi
 Class: 0x5a020c
 Icon: phone
 Paired: no
 Trusted: no
 Blocked: no
 Connected: no
 LegacyPairing: no
 UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb)
 UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
 UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
 UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb)
 UUID: PANU (00001115-0000-1000-8000-00805f9b34fb)
 UUID: NAP (00001116-0000-1000-8000-00805f9b34fb)
 UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb)
 UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb)
 UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
 UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb)
 RSSI: -66
[bluetooth]# pair 0C:1D:AF:A2:E3:78
Attempting to pair with 0C:1D:AF:A2:E3:78
[CHG] Device 0C:1D:AF:A2:E3:78 Connected: yes
[CHG] Device 0C:1D:AF:A2:E3:78 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001116-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 0C:1D:AF:A2:E3:78 Paired: yes
Pairing successful
[bluetooth]# exit
[DEL] Controller 84:DD:20:DA:B1:8F Nitrogen6_max TiWi-BLE [default]
ubuntu@nitrogen:~$ 

Of course you can use the GUI bluetooth tools as well when you are in the MATE desktop.

GPU development libraries

The package imx-gpu-viv-x8-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}"

 

 


 

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

The post Ubuntu Xenial for i.MX6/7 boards – August 2016 (kernel 4.1.15) appeared first on Boundary Devices.

Writing a system image using u-boot and TFTP

$
0
0

Objective

Many of our customers have requested help in writing an initial file system to eMMC.

For a small file system, this previous post works well.

But for larger images, ram cannot hold the entire image at once. This post seeks to address this issue.

If you need help setting up a tftpserver, try these posts.

TFTP For Windows users

TFTP For Linux users

For the impatient

Grab the image you want to program. A reference to our latest images can be found here

 I’ll be using this 

Then run the script to break it into small chunks

 
~$ mv 20160330-nitrogen-3.14.52_1.1.0_ga-trusty-en_US-lxde_armhf.img.gz trusty.img.gz
~$ ./split.sh trusty.img.gz
~$ sudo cp trusty.img.gz.* /tftpboot/
~$ sudo cp net_upgrade_fs /tftpboot/

Then from the u-boot prompt run

 
=> dhcp 10008000 net_upgrade_fs && source 10008000

A little more detail

If your file system is small, you may not need to run the split.sh script. Since gzwrite decompresses and writes 1MB at a time, only the compressed file needs to fit into memory.  In this case, just copy your mybase.img.gz to mybase.img.gz.0 in the tftpboot directory.  Or perhaps you want to split the file into chunks other than 512MB(default), either because your ram size is only 512MB or you desire fewer files. This can be accomplished by passing a size parameter to the split script. The following will split the gz file into chunks of a maximum size of 1GB when decompressed.

 
~$ ./split trusty.img.gz 1024

The net_upgrade_fs script defaults to trusty.img.gz as the base  filename to program.

You can change this by using 

 
=> setenv upgrade_file mybase.img.gz
=> dhcp 10008000 net_upgrade_fs && source 10008000

Here’s the file if you want to change the default.

Compile it like a normal bootscript

 
~$ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot script" \
-d net_upgrade_fs.txt net_upgrade_fs

The net_upgrade_fs script also defaults to “mmc 1” for the device to be used. This can also be changed.

 
=> setenv upgrade_device "mmc 0"
=> dhcp 10008000 net_upgrade_fs && source 10008000

So, you say you have no ethernet. Well, that isn’t a problem if you use your usb on-the-go port.

 
=> run usbnetwork; tftpboot 10008000 net_upgrade_fs && source 10008000

If your older u-boot does not have “usbnetwork”, here’s how it should be defined.

 
=> setenv usbnet_devaddr "00:19:b8:00:00:02"
=> setenv usbnet_hostaddr "00:19:b8:00:00:01"
=> setenv usbnetwork "setenv ethact usb_ether; setenv ipaddr 10.0.0.2; setenv netmask 255.255.255.0; setenv serverip 10.0.0.1;"

This assumes you have a server at 10.0.0.1 on the usbotg port. To help my usbotg port come up, I have this in /etc/network/interfaces of my desktop PC.

auto enx0019b8000001
iface enx0019b8000001 inet static
address 10.0.0.1
netmask 255.255.255.0

 

Upgrading u-boot using tftp

I often upgrade u-boot using tftp so that I don’t have to copy the new u-boot file to an sd card. Our local network builds u-boot for all of our boards/memory configurations and places the result in the tftp server’s directory whenever our u-boot repo has a commit pushed. So, this will always grab the latest u-boot when connected to the local network.

 

First, grab the appropriate u-boot from here.

For nitrogen6_max, this would be u-boot.nitrogen6_max or u-boot.nitrogen6_max_4gr0 (memory has rank of 0 bits.) Since version v2015.07, you can find the appropriate extension by

 
=> print uboot_defconfig

And the upgrade script from here

And the compiled version,

Then copy to your tftp server’s directory

 
~$ sudo cp u-boot.nitrogen6_max /tftpboot/
~$ sudo cp net_upgradeu /tftpboot/

Then from the u-boot prompt run

 
=> run net_upgradeu

Or for an older u-boot

 
=> setenv uboot_defconfig myboard_config
=> dhcp 10008000 net_upgradeu && source 10008000

So, you want to upgrade both u-boot and the file system by changing your bootscript file ? Well that is still easy. Here’s what the boot script file should contain.

And the compiled version,

This begins by clearing the environment section of the SPI-nor flash,  upgrades u-boot if needed, and if u-boot is up-to-date, then the file system will be written. If the file system is written successfully, then the /6x_bootscript from that file system will load and run. By default this will update whichever device from which the bootscript loads. If this is loaded over the network, it will write to “mmc 1.”

Caveat

The memory address listed above “10008000” is not valid for imx6sx, or imx7d based boards. For them it should be “80008000”.

 

The post Writing a system image using u-boot and TFTP appeared first on Boundary Devices.

FreeRTOS BSP v1.0.1 for i.MX7D/i.MX6SX

$
0
0

This blog post will present the architecture of the i.MX6SoloX and i.MX7D processors and explain how to build and run the FreeRTOS BSP v1.0.1 on the MCU.

Both processors are coupling a Cortex-A with a Cortex-M4 core inside one chip to offer the best of MPU and MCU worlds (see i.MX7D diagram). Content below will apply for our Nit6_SoloX and Nitrogen7 platforms.

i.MX7D Block Diagram

i.MX7D Block Diagram

For the impatient

You can download a demo 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 1GB SD card image that can be restored using zcat and dd under Linux.

~$ zcat 20160804-buildroot*.img.gz | sudo dd of=/dev/sdX bs=1M

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

This image contains the following components:

Please make sure to update U-Boot from its prompt before getting started:

=> run clearenv
=> run upgradeu

After the upgrade, the board should reset, you can start your first Hello World application on the Cortex-M4:

=> run m4update
=> run m4boot

Architecture 

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

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

The i.MX6SX and i.MX7 processors offer an MCU and a MPU in the same chip, this is called a Heterogeneous Multicore Processing Architecture.

How does it work?

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

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

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

Where is the code running from?

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

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

  • TCM (Tightly Coupled Memory): 32kB available
  • OCRAM: 32kB available
    • If not using the EPDC, 128kB can be used but requires to modify the ocram linker script
  • DDR: up to 1MB available
  • QSPI flash (not available for ou Nit6_SoloX): 128kB allocated on Nitrogen7

Note that the TCM is the preferred option when possible since it offers the best performances since it is an internal memory dedicated to the Cortex-M4.

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

In this article, it is assumed that every application runs from the TCM.

When is the MCU useful?

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

We insist here on the fact that the Linux kernel is not real-time, not deterministic whereas FreeRTOS on Cortex-M4 is.

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

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

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

Resource Domain Controller (RDC)

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

This mechanism is the RDC, it can be used to grant peripheral and memory access permissions to each core.

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

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

The default RDC settings are:

  • The ARM Cortex-M4 core is assigned to RDC domain 1, and ARM Cortex-A core and other bus masters use the default assignment (RDC domain 0).
  • Every example/demo has its specific RDC setting in its hardware_init.c. Most of them are set to exclusive access.

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

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

The memory declaration is also modified in the device tree above in order to reserve some areas for FreeRTOS and/or shared memory.

Remote Processor Messaging (RPMsg)

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

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

This API offers the following advantages:

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

Note that the DDR is used by default in RPMsg to exchange messages between cores.

Here are some links with more details on the implementation:

Where can I find more documentation?

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

Build instructions

Development environment setup

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

~$ cd && mkdir toolchains && cd toolchains
~/toolchains$ wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
~/toolchains$ tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
~/toolchains$ rm gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2

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

~$ sudo apt-get install make cmake

Download the BSP

The FreeRTOS BSP v1.0.1 is available from our GitHub freertos-boundary repository.

~$ git clone https://github.com/boundarydevices/freertos-boundary.git freertos
~$ cd freertos

Depending on the processor/board you plan on using, the branch is different.

For Nit6_SoloX (i.MX6SX), use the imx6sx_1.0.1 branch.

~/freertos$ git checkout origin/imx6sx_1.0.1 -b imx6sx_1.0.1

For Nitrogen7 (i.MX7D), use the imx7d_1.0.1 branch.

~/freertos$ git checkout origin/imx7d_1.0.1 -b imx7d_1.0.1

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

~/freertos$ export ARMGCC_DIR=$HOME/toolchains/gcc-arm-none-eabi-4_9-2015q3/

Build the FreeRTOS apps

First, here is a quick overview of what the FreeRTOS BSP looks like:

FreeRTOS BSP

All the applications are located under the examples folder:

  • examples/imx6sx_nit6sx_m4/ for Nit6_SoloX
  • examples/imx7d_nitrogen7_m4/ for Nitrogen7

As an example, we will build the helloworld application for Nitrogen7:

~/freertos$ cd examples/imx7d_nitrogen7_m4/demo_apps/hello_world/armgcc/
~/freertos/examples/imx7d_nitrogen7_m4/demo_apps/hello_world/armgcc$ ./build_all.sh
~/freertos/examples/imx7d_nitrogen7_m4/demo_apps/hello_world/armgcc$ ls release/
hello_world.bin hello_world.elf hello_world.hex hello_world.map

The build_all.sh script builds both debug and release binaries. If you don’t have a JTAG to debug with, the debug target can be discarded.

You can then copy that hello_world.bin firmware to the root of an SD card to flash it.

Run the demo apps

Basic setup

First you need to flash the image provided at the beginning of this post to an SD Card.

The SD Card contains the U-Boot version that enables the use of the Cortex-M4 make sure to update it as explained in the impatient section.

By default, the firmware is loaded from NOR to TCM. You can execute m4update to upgrade the firmware in NOR. It will look for file named m4_fw.bin as the root of any external storage (SD, USB, SATA) and flash it at the offset 0x1E0000 of the NOR:

=> run m4update

If you wish to flash a file named differently, you can modify the m4image variable as follows:

=> setenv m4image 

While debugging on the MCU, you might wish not to write every firmware into NOR so we’ve added a command that loads the M4 firmware directly from external storage.

=> setenv m4boot 'run m4boot_ext'

Before going any further, make sure to hook up the second serial port to your machine as the one marked as “console” will be used for U-Boot and the other one will display data coming from the MCU.

In order to start the MCU automatically at boot up, we need to set a variable that will tell the 6x_bootscript to load the firmware. To do so, make sure to save this variable.

=> setenv m4enabled 1
=> saveenv

This blog post only considers the TCM as the firmware location for execution. If you wish to use another memory, such as the OCRAM or QSPI or DDR, you can specify it with U-Boot variables.

=> setenv m4loadaddr 
=> setenv m4size 

Note that the linker script must be different for a program to be executed from another location. Also, the size reserved in NOR right now is 128kB.

Hello World app

The Hello World project is a simple demonstration program that uses the BSP software. It prints the “Hello World” message to the ARM Cortex-M4 terminal using the BSP UART drivers. The purpose of this demo is to show how to use the UART and to provide a simple project for debugging and further development.

In U-Boot, type the following:

=> setenv m4image hello_world.bin
=> run m4update
=> run m4boot

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

Hello World!

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

RPMsg TTY demo

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

In U-Boot, type the following:

=> setenv m4image rpmsg_str_echo_freertos_example.bin
=> run m4update
=> boot

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

RPMSG String Echo FreeRTOS RTOS API Demo...
RPMSG Init as Remote

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

# modprobe imx_rpmsg_tty
imx_rpmsg_tty rpmsg0: new channel: 0x400 -> 0x0!
Install rpmsg tty driver!
# echo test > /dev/ttyRPMSG 

The last command above writes into the tty node, which means that the Cortex-M4 should have received data as it can be seen on the second serial port.

Name service handshake is done, M4 has setup a rpmsg channel [0 ---> 1024]
Get Message From Master Side : "test" [len : 4]
Get New Line From Master Side

RPMsg Ping Pong demo

Same as previous demo, this one demonstrates the RPMsg communication. After the communication channels are created, Linux OS transfers the first integer to FreeRTOS OS. The receiving peer adds 1 to the integer and transfers it back. The loop continues infinitely.

In U-Boot, type the following:

=> setenv m4image rpmsg_pingpong_freertos_example.bin
=> run m4update
=> boot

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

RPMSG PingPong FreeRTOS RTOS API Demo...
RPMSG Init as Remote

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

# modprobe imx_rpmsg_pingpong
imx_rpmsg_pingpong rpmsg0: new channel: 0x400 -> 0x0!
# get 1 (src: 0x0)
get 3 (src: 0x0)
get 5 (src: 0x0)
...

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

Name service handshake is done, M4 has setup a rpmsg channel [0 ---> 1024]
Get Data From Master Side : 0
Get Data From Master Side : 2
Get Data From Master Side : 4
...

 

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

The post FreeRTOS BSP v1.0.1 for i.MX7D/i.MX6SX appeared first on Boundary Devices.

High Assurance Boot (HAB) for dummies

$
0
0

This post intends to provide all the information you need to understand and use the HAB on your Boundary Devices’ platform.

The goal is also to provide an update on our older blog post on the subject as it required an old U-Boot version. Since then, HAB support has been added to mainline U-Boot and encryption is now possible on top of binary signature.

For simplicity and clarity, this guide and examples have been made on i.MX6Q Nitrogen6x so it applies to most our platforms. However, for i.MX6SX Nit6_SoloX and i.MX7D Nitrogen7 some changes must be made because the fuse map and the RAM start address are different. Please contact us for instructions on those two platforms.

Prerequisites

HAB architecture

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

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

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

On processors supporting the feature, encrypted boot may also be used to provide image cloning protection and, depending on the use case, image confidentiality. The HAB library can not only be used to authenticate the first stage of the boot chain, but the other components of the boot chain as well such as the Linux kernel.

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

i.MX secure boot process

i.MX secure boot process

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

The ROM then loads the bootloader image to DDR memory. The image contains both the bootloader itself and digital signature data and public key certificate data which are collectively called CSF data. This latter is generated off-line using the HAB CST which is introduced in the next section.

Once the bootloader is loaded, execution is then passed to the HAB library which will verify the signatures of the bootloader stage. If signature verification fails, execution is not allowed to leave the ROM for securely configured SoCs, also called “closed” devices.

So as long as a device is not “closed”, the ROM will execute the code loaded in RAM. However, with an “open” device, you will be able to see HAB events which will tell you if the image would pass the authentication process. This last statement is very important since this is what will allow us to make sure the security is working before “closing” the device.

In order to understand the signed image generation, it is best to have a look at the final U-Boot image layout.

Signed U-Boot image layout

Signed U-Boot image layout

In case you want to use the encryption capability, then the image would look like the following.

Encrypted U-Boot image layout

Encrypted U-Boot image layout

Note that all the addresses in the previous diagrams are dependent on U-Boot size and therefore do not necessarily match your setup, it is more for an example.

How to enable/use it?

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

1- Creation of the keys

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

~$ tar xzf cst-2.3.2.tar.gz
~$ cd cst-2.3.2/keys

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

~/cst-2.3.2/keys$ vi serial
42424242

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

~/cst-2.3.2/keys$ vi key_pass.txt
Boundary123!
Boundary123!

You can now create the signature keys.

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

Create the fuse table and binary to be flashed later.

~/cst-2.3.2/keys$ cd ../crts/
~/cst-2.3.2/crts$ ../linux64/srktool -h 4 -t SRK_1_2_3_4_table.bin -e SRK_1_2_3_4_fuse.bin -d sha256 -c \
./SRK1_sha256_4096_65537_v3_ca_crt.pem,./SRK2_sha256_4096_65537_v3_ca_crt.pem,./SRK3_sha256_4096_65537_v3_ca_crt.pem,./SRK4_sha256_4096_65537_v3_ca_crt.pem -f 1
~/cst-2.3.2/crts$ hexdump -C SRK_1_2_3_4_fuse.bin
00000000 c2 64 a0 72 56 49 82 69 59 60 96 63 15 20 84 04 |.d.rVI.iY`.c. ..|
00000010 0e 88 6a 41 3b 45 33 f5 28 6c 30 23 6e 36 2c 8e |..jA;E3.(l0#n6,.|

2- Flashing the keys

The fuse table generated in the previous section is what needs to be flashed to the device. However, the hexdump command above doesn’t show the values in their correct endianness, instead the command below  will be more useful.

~/cst-2.3.2/crts$ hexdump -e '/4 "0x"' -e '/4 "%X""\n"' < SRK_1_2_3_4_fuse.bin
0x72A064C2
0x69824956
0x63966059
0x4842015
0x416A880E
0xF533453B
0x23306C28
0x8E2C366E

The above comand gives you what needs to be flashed in the proper order. Make sure to use your own values here, otherwise your board will never be able to authenticate the boot image.

=> fuse prog -y 3 0 0x72A064C2
=> fuse prog -y 3 1 0x69824956
=> fuse prog -y 3 2 0x63966059
=> fuse prog -y 3 3 0x4842015
=> fuse prog -y 3 4 0x416A880E
=> fuse prog -y 3 5 0xF533453B
=> fuse prog -y 3 6 0x23306C28
=> fuse prog -y 3 7 0x8E2C366E

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

As a customer pointed out, for CPU with the TO1.0 revision (pre-production), you also need to flash some random MasterKey (OTPMK):

=> fuse prog -y 2 0 0xdeadbeef
...
=> fuse prog -y 2 7 0xdadadada

3- Build U-Boot with security features

Build U-Boot with the CONFIG_SECURE_BOOT configuration enabled. Here is an example for Nitrogen6q/BD-SL-iMX6:

~$ git clone https://github.com/boundarydevices/u-boot-imx6 \
     -b boundary-v2016.03
~$ cd u-boot-imx6
~/u-boot-imx6$ export ARCH=arm
~/u-boot-imx6$ export CROSS_COMPILE=arm-linux-gnueabihf-
~/u-boot-imx6$ make nitrogen6q_defconfig
~/u-boot-imx6$ make menuconfig
<select 'ARM architecture' - 'Support i.MX HAB features'>
~/u-boot-imx6$ make V=1
...
./tools/mkimage -n board/boundary/nitrogen6x/nitrogen6q.cfg.cfgtmp -T imximage -e 0x17800000 -d u-boot.bin u-boot.imx
Image Type: Freescale IMX Boot Image
Image Ver: 2 (i.MX53/6/7 compatible)
Data Size: 512000 Bytes = 500.00 kB = 0.49 MB
Load Address: 177ff420
Entry Point: 17800000
HAB Blocks: 177ff400 00000000 00079c00

Note that the last line “HAB Blocks” is very important when creating the .csf file later on.

4.a- Sign a U-Boot image

If you just want to sign your binary, follow this section and then go straight to section 5. Otherwise, if you want to encrypt and sign your binary, jump to next section directly.

Go to the CST tools again:

~$ cd ~/cst-2.3.2/linux64/
~/cst-2.3.2/linux64$ cp ~/u-boot-imx6/u-boot.imx .

At this point you need to create a u-boot.csf file using the “HAB Blocks” information from previous section and the template provided in the HABCST_UG.pdf documentation which is provided in the CST package.

For more convenience, we created a .csf file that applies to Nitrogen6x using latest U-Boot.

~/cst-2.3.2/linux64$ wget -O u-boot.csf \
    https://storage.googleapis.com/boundarydevices.com/u-boot_sign.csf
~/cst-2.3.2/linux64$ ./cst --o u-boot_csf.bin --i u-boot.csf
CSF Processed successfully and signed data available in u-boot_csf.bin

 You can now generate the final binary by concatenating the u-boot.imx image with the CSF binary:

~/cst-2.3.2/linux64$ cat u-boot.imx u-boot_csf.bin > u-boot_signed.imx

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

~/cst-2.3.2/linux64$ cp u-boot_signed.imx <mount path>/u-boot.nitrogen6q

You can now flash this signed version of U-Boot, see section 5.

4.b- Encrypt and sign an image

First, the CST binary provided in the NXP package doesn’t allow to use encryption, so you need to build a new binary yourself:

~$ cd ~/cst-2.3.2/code/back_end/src
~/cst-2.3.2/code/back_end/src$ gcc -o cst_encrypt -I ../hdr -L ../../../linux64/lib *.c -lfrontend -lcrypto
~/cst-2.3.2/code/back_end/src$ cp cst_encrypt ../../../linux64/

Then you can download the .csf we’ve prepared for encryption and build both the DEK blob and the CSF binary:

~$ cd ~/cst-2.3.2/linux64/
~/cst-2.3.2/linux64$ cp ~/u-boot-imx6/u-boot.imx .
~/cst-2.3.2/linux64$ wget -O u-boot.csf \
https://storage.googleapis.com/boundarydevices.com/u-boot_encrypt.csf
~/cst-2.3.2/linux64$ ./cst_encrypt --o u-boot_csf.bin --i u-boot.csf
CSF Processed successfully and signed data available in u-boot_csf.bin

The above will produce the following binaries:

  • u-boot.imx: encrypted version of u-boot
  • u-boot_csf.bin: CSF binary
  • dek.bin: DEK key that needs to be transformed into a blob
    • Each CPU generates a different blob!!

In order to generate the dek blob, the dek.bin must be provided to a U-Boot dek tool which will compute the blob using the secrete and unique key from the specific CPU it is running on. The easiest approach is to copy the dek.bin to the root of an sdcard and issue the following:

=> load mmc 0 10800000 dek.bin
=> dek_blob 0x10800000 0x10801000 128

Write this blob to SDCard, here is the procedure to write to a EXT4 partition:

=> ext4write mmc 0 0x10801000 /dek_blob.bin 0x48

Here is the equivalent for a FAT partition:

=> fatwrite mmc 0 0x10801000 dek_blob.bin 0x48

Once you’ve retrieved the dek_blob.bin, you can generate the final signed & encrypted image. The cst_encrypt binary tool generated earlier will sign the binary and encrypt its content in place.

~/cst-2.3.2/linux64$ objcopy -I binary -O binary --pad-to=0x1F00 \
  --gap-fill=0x00 u-boot_csf.bin u-boot_csf.bin
~/cst-2.3.2/linux64$ cat u-boot.imx u-boot_csf.bin dek_blob.bin > u-boot_encrypt.imx

Note that the CSF region in U-Boot header is set to 0x2000 whereas we pad it to 0x1F00. The reason is that this region also includes the dek_blob.bin, otherwise the boot ROM won’t load the dek blob to memory.

As a result we have encrypted boot image which can be loaded and executed by only current board since dek_blob.bin is unique per board/CPU.

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

~/cst-2.3.2/linux64$ cp u-boot_encrypt.imx <mount path>/u-boot.nitrogen6q

NOTE: so far the encryption has only been working on open devices with 4096-bit keys, if you plan on using encryption, our advice is to use 2048-bit keys since NXP hasn’t come back on the issue yet.

5- Flash and test the device

Use the our standard procedure to update U-Boot:

=> run upgradeu

The device should reboot, then check the HAB status:

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

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

6- Closing the device?

Once you are *absolutely* sure you’ve understood what has been done so far and that you are sure it works, you can “close” the device. Once again, this step is IRREVERSIBLE, better make sure there is no HAB Events in open configuration.

Below is the procedure to “close” the device on i.MX6QDL, for other devices such as the i.MX6SoloX or i.MX7D the fuse map most likely differ and requires another command.

=> fuse prog 0 6 0x2

Going further

What about imx_usb_loader?

As explained in the HAB application notes, it is possible to use the Serial Download Protocol (SDP) on close devices using the MFGTools.

Thanks to Jérémie Corbier from Prove&Run, support has been added to imx_usb_loader to load a signed binary:

But as the documentation says, using SDP requires:

  1. Modify the .csf file in order to check the DCD tabled loaded in OCRAM
    • Otherwise considered as a HAB error
  2. Sign the u-boot.imx binary with the DCD address set to 0 in the IVT header
    • Since the SDP protocol clears the DCD table address

For the first modification to be done, simply add the following to your current 

[Authenticate Data]
Verification index = 2
Blocks = 0x00914000 0x2C 0x318 "u-boot.imx"

Then you need to get a custom script that allows to sign the binary without the DCD table address in the IVT header since it is cleared during the SDP boot process.

~/cst-2.3.2/linux64$ wget \
https://storage.googleapis.com/boundarydevices.com/mod_4_mfgtool.sh
~/cst-2.3.2/linux64$ cp ~/u-boot-imx6/u-boot.imx .
~/cst-2.3.2/linux64$ ./mod_4_mfgtool.sh clear_dcd_addr u-boot.imx
~/cst-2.3.2/linux64$ ./cst --o u-boot_csf.bin --i u-boot.csf
~/cst-2.3.2/linux64$ ./mod_4_mfgtool.sh set_dcd_addr u-boot.imx
~/cst-2.3.2/linux64$ cat u-boot.imx u-boot_csf.bin > u-boot_signed.imx
~/cst-2.3.2/linux64$ <path_to_imxusbloader>/imx_usb u-boot_signed.imx

What about authenticating the kernel?

Now that your bootloader image is properly authenticated and that your device is secured, you can sign your kernel image so U-Boot ensures to load a known version. Here is a zImage layout example:

Signed zImage layout

Signed zImage layout

The first thing to do is to generate the IVT file. We are providing a script that allows you to do so:

~/cst-2.3.2/linux64$ wget \
https://storage.googleapis.com/boundarydevices.com/genIVT
~/cst-2.3.2/linux64$ cp ~/linux-imx6/arch/arm/boot/zImage .
~/cst-2.3.2/linux64$ hexdump -C zImage | tail -n 1
~/cst-2.3.2/linux64$ vi genIVT

The hexdump command above allows to learn the zImage size.  Then you can modify the genIVT to reflect the proper sizes, in our example, the size of the zImage was 0x468628 so the next 4kB boundary was 0x469000 as you can see in the genIVT.

~/cst-2.3.2/linux64$ ./genIVT
~/cst-2.3.2/linux64$ hexdump ivt.bin
00000000 d1 00 20 41 00 10 80 10 00 00 00 00 00 00 00 00
00000010 00 00 00 00 00 90 c6 10 20 90 c6 10 00 00 00 00
00000020
~/cst-2.3.2/linux64$ objcopy -I binary -O binary --pad-to=0x469000 \
  --gap-fill=0x00 zImage zImage-pad.bin
~/cst-2.3.2/linux64$ cat zImage-pad.bin ivt.bin > zImage-pad-ivt.bin

Then you can download the .csf file for the zImage in order to create the CSF blob and generate the signed image:

~/cst-2.3.2/linux64$ wget \
https://storage.googleapis.com/boundarydevices.com/zImage.csf
~/cst-2.3.2/linux64$ cat zImage-pad-ivt.bin zImage_csf.bin > zImage_signed

That’s it, you can now modify your U-Boot bootcmd so it includes the HAB command that checks the kernel:

=> load mmc 0 10800000 zImage_signed
4630872 bytes read in 438 ms (10.1 MiB/s)
=> hab_auth_img 10800000 469000
Authenticate image from DDR location 0x10800000...
Secure boot enabled
HAB Configuration: 0xcc, HAB State: 0x99
No HAB Events Found!

Boot time impact

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

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

References

The post High Assurance Boot (HAB) for dummies appeared first on Boundary Devices.


Visit us at Qt World Summit Oct 18-20th to see our i.MX6 and i.MX7 Products

$
0
0

Boundary Devices is proud to be a sponsor of the 2016 Qt World Summit in San Francisco, CA from October 18 to October 20.  

qtws2016_header_646x220

For customers considering a new embedded project with the NXP i.MX family of processors, Qt is an excellent choice for user-interface development.   At the Qt World Summit, we will be showcasing our wide variety of embedded i.MX6 and i.MX7 System on Modules and Single board Computers running various Qt-based demos.

This is the 13th Qt conference and it has been redesigned for managers and developers alike. This year’s Qt World Summit has something for everyone envisioning, innovating and implementing tomorrow’s devices and applications.

At the Qt World Summit, we’ll hear how software will drive the future of IoT/Automotive/Industrial Automation/Medical. We’ll learn how to build seamless, impactful user experiences — and how to take these into an increasingly connected world. Find out first-hand how to maximize development efforts and target embedded, desktop, and mobile devices.

 Register today to secure your seat as space is limited to 1000 attendees, and don’t forget to choose your training with the Qt experts.  

 What’s at the Qt World Summit for me?

For the business person:

  • Hear trends from other industries that will impact you
  • Learn big picture changes in software and how you can prepare for them
  • Differentiate your products and create a solid software strategy 

For the developer:

  • See how Qt can maximize efficiency and minimize maintenance
  • Take advantage of the newest developments in Qt and learn what’s upcoming
  • Benefit from others’ Qt experiences and successes

For everyone:

  • Create links to the Qt Ecosystem and locate great resources
  • Meet with suppliers, experts, mentors, potential customers and partners
  • Have a great time networking, sharing, and collaborating!

Visit http://www.qtworldsummit.com for more information.

The post Visit us at Qt World Summit Oct 18-20th to see our i.MX6 and i.MX7 Products appeared first on Boundary Devices.

Digital Signage with DisplayIt!Xpress

$
0
0

This blog post will provide some information about DisplayIt!Xpress from BestWave which is a digital signage turnkey solution.

This solution is yet another example of what our platforms can offer. It also shows that our partners offer solutions that can provide exactly what is needed for your project.

Highlights

This solution offers the following:

  • Easily manage one or several displays from your desktop
  • Intuitive management console software
  • Advanced technical skills not required
  • Supports common media formats
    • Video
    • Images
    • Excel
    • PowerPoint
    • Web pages
  • Drag & Drop interface for custom designs
  • Easy-to-use scheduling system

Here is a presentation video that can help understand the full solution

Prerequisites

In order to get started, you need the following:

That’s it, with the above, you can then download the DisplayIt!Xpress components:

Installation

Android Installer Application

The easiest way to install an Android application is to use ADB, please see our Android Getting Started blog post if you are not sure of what it means.

$ adb install DisplayItXInstaller.apk

Otherwise, another option is to copy the apk file to a USB drive and plug it to the platform. Then you should be able to install it with the File Manager application present in our releases.

Explorer installation

It might require you to change the Settings > Security > Unknown sources option so the app can be installed.

Android unknown sources option

Make sure you are connected to the internet, either via Ethernet or WiFi, before starting the app the first time. It will install all the components needed on the target.

apk installer

Then you can either start the Launcher app manually or restart since it will now automatically be launched at bootup.

displayit launcher

Finally, you’ll be prompted to enter your e-mail address so the trial (or license) duration can start.

Management Console

On your Windows PC, execute the Management Console file downloaded above and go through the intallation (Next, Next…)

mc_install

That’s it, the Management Console icon should now be present on your Desktop.

Quick example

This section will describe how we displayed our company presentation slide deck in a couple of clicks.

First add (or find) the platform.

mc_setup

Once the platform is detected properly, you can switch to the content tab.

mc_content1

Click on “Add Item” here to add all the image/video/webpage/widgets you need. In our case we select our PowerPoint presentation.

mc_content2

You now just need to deploy it on the target, clicking on the arrow next to your platform name. Note that you can distribute to several platforms at once with the full license.

mc_deploy

Here is a recording of what our platform now displays at bootup automatically.

That’s it! You should now be able to use any of our platforms as a digital signage in no time.

The post Digital Signage with DisplayIt!Xpress appeared first on Boundary Devices.

Pengutronix Etnaviv demo on Nitrogen6x

$
0
0

Boundary Devices was attending the Embedded Linux Conference Europe (ELCE) 2016 in Berlin and was pleased to discover a very nice Etnaviv demo from Pengutronix running on the Nitrogen6x.

elce16_pengutronix_booth

Pengutronix booth @ELCE2016

What’s Etnaviv?

Etnaviv is an open-source project that provides a user-space graphics and kernel driver for controlling the Vivante GPUs found in the i.MX family (among others).

The huge advantage of the driver is to be open-source, meaning that anyone can contribute to it, making it easier/faster to fix bugs.

Also, since the driver is in mainline, it means that you can take advantage of all the latest kernel features available while still being able to use the multimedia IP of the SoC.

The kernel driver has been mainlined since version 4.5! Since then, the “Etnaviv developers” have been working on the user-space side of things, getting the libdrm code merged in version 2.4.71.

No need to say that Pengutronix, a software services company who started the i.MX mainlining many years ago, is deeply involved in Etnaviv development.

If you’re interested on Etnaviv status, we strongly recommend reading Phoronix articles on the subject.

What’s nice about the demo?

This demo doesn’t “just” show the 3D performances of the driver but instead leverages it to showcase the multimedia capabilities supported upstream:

  • GStreamer1.0 pipeline that decodes 4 H.264 streams (using CODA driver)
  • GPU3D used to do the rendering / effects (using Etnaviv driver)
  • Qt5 QML application that manages the content
elce16_demo_sheet2

Pengutronix demo poster

How well does it run?

Although no benchmarking has been done on the current driver, the demo proved it can be used on various projects.

Here is a quick video that shows how the demo is running.

It is worth noting that all our reference platforms are supported in mainline kernel!

 

As usual, feel free to post a comment below.

The post Pengutronix Etnaviv demo on Nitrogen6x appeared first on Boundary Devices.

Display configuration from U-Boot

$
0
0

Starting with Linux kernel v3.14.x and above, the way to setup the display on our platforms has changed. This blog post will detail how to set the proper display configuration from U-Boot.

This applies to all operating systems that use the Linux kernel (Ubuntu, Debian, Yocto, Buildroot, Android).

What was the problem?

At first, back in the 3.0.x days it was all handled from the kernel bootargs. It required the kernel to know of a display and to recognize the boot parameter and then apply the values. At that time, we were “detecting” the display setup depending on the touch screen controllers present on the I2C bus.

Then, when using the device trees starting with the 3.10.x kernels, we kept this approach of detecting the touch controllers but had to change it a little since the display timings were held in the device tree. So we decided to have a node for each display and then the bootscript would be in charge of deleting the nodes/displays not used.

As the number of supported displays increased, the above approach was not suitable anymore because:

  • The detection on touch controller wasn’t flexible enough
    • Several displays are using the FT5x06 for instance
  • The number of display nodes inside the device tree was getting out of control
  • Each new display required a modification in U-Boot and in the device tree (Kernel)

For all those reasons we decided to change the display configuration for kernel 3.14.x and above.

So what has changed?

Since U-Boot can easily read/write/update nodes inside the device tree blob before booting the kernel, the idea is to have a generic display node in the device tree which U-Boot will populate with the proper values.

You can see in our source tree that all our device trees contain:

So U-Boot is now is charged to setup those nodes which will configure your display(s) easily.

Note that the touch controller detection is still present as a legacy mode, it means that if you don’t provide any information, U-Boot will try to guess which display is connected, but there’s now an easy way to override that setting.

How does it work?

First of all it requires a U-Boot >= v2015.07, at the time of this writing our latest version is v2016.03 but you can always grab the latest U-Boot from the link below:

So if your board contains an older version of U-Boot, please upgrade. You can follow the v2016.03 instructions.

Once you have a recent U-Boot, you can have a look at the supported display for your board by issuing:

=> fbpanel
         clock-frequency hactive vactive hback-porch hfront-porch vback-porch vfront-porch hsync-len vsync-len
hdmi: 1280x720M@60:m24x1,50:74161969,1280,720,220,110,20,5,40,5
                74161969    1280     720         220          110          20            5        40         5
hdmi: 1920x1080M@60:m24x1,50:148500148,1920,1080,148,88,36,4,44,5
               148500148    1920    1080         148           88          36            4        44         5
...

Since the list is actually pretty long and not always easy to read, you can also filter by type of display (hdmi, lcd or lvds)

=> fbpanel lcd
         clock-frequency hactive vactive hback-porch hfront-porch vback-porch vfront-porch hsync-len vsync-len
lcd: fusion7:m18x2,10:33264586,800,480,96,24,31,11,136,3
                33264586     800     480          96           24          31           11       136         3
lcd: CLAA-WVGA:m18x2,48:27000027,800,480,40,60,10,10,20,10
                27000027     800     480          40           60          10           10        20        10
...
=> fbpanel lvds
         clock-frequency hactive vactive hback-porch hfront-porch vback-porch vfront-porch hsync-len vsync-len
lvds: hannstar7:18x2,38:71108582,1280,800,80,48,15,2,32,6
                71108582    1280     800          80           48          15            2        32         6
...

The above command just lists the available displays, when you want to set one, you need will to set the following variables:

  • fb_hdmi controls HDMI display selection
  • fb_lcd controls LCD display selection
  • fb_lvds controls LVDS display selection
  • fb_lvds2 controls LVDS2 display selection

Note that those variables are parsed by U-Boot at bootup, so when set one of those variables: remember to save the environment and reboot the board.

Also, when a display isn’t used, you need to set it to off. Here is an example on how to setup the HDMI to display at 1080P and LVDS display to be the Hannstar 10″.

=> setenv fb_lvds hannstar
=> setenv fb_hdmi 1920x1080M@60
=> setenv fb_lcd off
=> saveenv
Saving Environment to SPI Flash...
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB, total 2 MiB
Erasing SPI flash...Writing to SPI flash...done
=> reset

Once rebooted, you can have a look at the cmd_hdmi, cmd_lcd and cmd_lvds that U-Boot will have set

=> print cmd_hdmi
cmd_hdmi=fdt set fb_hdmi status okay;fdt set fb_hdmi mode_str 1920x1080M@60;
=> print cmd_lvds
cmd_lvds=fdt set fb_lvds status okay;fdt set fb_lvds interface_pix_fmt RGB666;fdt set ldb/lvds-channel@0 fsl,data-width <18>;fdt set ldb/lvds-channel@0 fsl,data-mapping spwg;fdt set t_lvds clock-frequency <64998375>;fdt set t_lvds hactive <1024>;fdt set t_lvds vactive <768>;fdt set t_lvds hback-porch <220>;fdt set t_lvds hfront-porch <40>;fdt set t_lvds vback-porch <21>;fdt set t_lvds vfront-porch <7>;fdt set t_lvds hsync-len <60>;fdt set t_lvds vsync-len <10>;
=> print cmd_lcd 
cmd_lcd=fdt set fb_lcd status disabled

Do not try to set those cmd_* variables yourself, they will be overwritten by U-Boot at bootup anyway.

That’s it, you should now be able to list, select and setup the displays the way you want.

Can I use yet another display easily?

It depends on the type of display:

  • LVDS: yes, since all the timings are inside the device tree node you can change them.

Here is an example for our latest 7″ 1280×800 display, although only the latest U-Boot binary lists it, you can have it running by entering:

=> setenv fb_lvds tm070jdhg30:24:68152388,1280,800,5,63,2,39,1,1
=> saveenv

Note that it goes like this:

setenv fb_xxx mode_str:connection-type:clk-frequency,hactive,vactive,hback-porch,hfront-porch,vback-porch,vfront-porch,hsync-len,vsync-len
  • LCD: yes for U-Boot display, no for the kernel

You can set the fb_lcd like it is done for LVDS above, however the timings will only be used to setup U-Boot, only the mode_str will be passed on to the kernel. This means that the kernel needs to know about the LCD beforehand.

Here is an example for the ASIT500MA6F5D display:

=> setenv fb_lcd ASIT500MA6F5D:m24:32341861,800,480,88,40,32,13,48,3
=> saveenv

The above line will make the display work in U-Boot, however the kernel will require this change to work.

  • HDMI: yes (well more or less)

Same as the LCD setting, only the mode_str is passed on to the kernel. The difference is that it can work out of the box on the kernel side if you ask for a standard resolution and standard refresh rate.

For instance, setting fb_hdmi to 1920x1080M@30 will work automatically since the kernel is smart enough to recognize a known resolution (1080P) with a standard refresh rate (30fps).

As usual, let us know if you have question in comment section below.

The post Display configuration from U-Boot appeared first on Boundary Devices.

Krogoth-next Yocto Release

$
0
0

A new Yocto 2.1 release, Krogoth-next, is now available.

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 boundary-eval-image-nitrogen6x-krogoth-next.sdcard.gz | sudo dd of=/dev/sdc bs=1M

How to Replicate

This image uses a new “krogoth-next” boundary-bsp-platform that can be used to build images for our boards. Lots of this is identical to what was present in our previous Krogoth image. This is mostly a clone of fsl-community-bsp-platform with meta-browser, meta-qt5, and meta-boundary added in. There is also a Boundary-Devices-centric setup-environment script with a central download area and cache and some extras to the default local.conf.

Firstly, you’ll need to create the download/cache folders and give r/w access.

~$ sudo mkdir -p /opt/freescale/yocto/imx
~$ sudo mkdir -p /opt/freescale/yocto/sstate-cache
~$ sudo chmod -R 777 /opt/freescale

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 ~/krogoth-next
~$ cd ~/krogoth-next
~/krogoth-next$ repo init -u http://github.com/boundarydevices/boundary-bsp-platform -b krogoth-next
~/krogoth-next$ repo sync

Now setup the environment for building. In this example I’m targeting the nitrogen6x, however nitrogen6x-lit, nitrogen6sx, and nitrogen7 are all also valid MACHINE targets here. Use whatever your platform is.

~/krogoth-next$ MACHINE=nitrogen6x . setup-environment boundary-eval-image

Now bitbake boundary-eval-image

~/krogoth-next/boundary-eval-image$ bitbake boundary-eval-image

Now after some time this should build the same image as above. The image file will deploy to ~/krogoth-next/boundary-eval-image/tmp/deploy/images/{MACHINE}/boundary-eval-image-{MACHINE}.sdcard.gz. Feel free to tweak and add things as you see fit.

Chromium

Fair warning, Chromium has some problems. It only works if it is opened directly to a webpage. Our desktop launcher opens Chromium to www.google.com and you can navigate around from there. Keep that in mind if you’re launching Chromium for other purposes.

Video Input Tests

If you have our ov5640-mipi camera, ov5642 camera, or our HDMI input daughterboard the image includes easy desktop icons to launch tests for the respective hardware.

The post Krogoth-next Yocto Release appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live