Buildroot 2017.08 for i.MX platforms

Published on September 7, 2017

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

//

Buildroot 2017.08 has just been released and we're glad to provide new images for it.Buildroot

This release brings some new features that will be discussed in this blog post as well as some news of our own.

For the impatient

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

The images can be restored using zcat and dd under Linux:

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

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

What's new?

Buildroot 2017.08 new features

This release brings its usual series of improvements:

  • Toolchains are now using GCC6.x by default
  • Binaries in $(TARGET_DIR) are now cleaned up from invalid RPATH

Many new/interesting packages were introduced:

  • azure-iot-sdk-c, libressl, linuxptp, qt5virtualkeyboard, etc...

But the most important improvement in our opinion is the ability to create a relocatable SDK.

This feature is very useful for customers that want their app team not to have to deal with a BSP. The SDK allows anyone to cross-compile any application meant for this rootfs image by leveraging all the libraries available in this latter. This new feature will be detailed in a section below.

For a more exhaustive list of change, here is the full release announcement:

Note that our Nitrogen platforms are all supported in mainline Buildroot. Their configurations for this release include:

Boundary Devices external layer

As mentioned in our Buildroot Getting Started Guide, Buildroot now allows to have custom packages/defconfigs inside an external repository.

Since we've had many requests on how to replicate the Buildroot demo images in the past, it was time for us to create our own external layer.

This layer includes:

  • defconfig files for the images above (gst1, qt5 and many useful tools)
  • BD-SDMAC driver and firmware custom packages
  • Custom boot scripts to have ADB support by default
  • Mainline kernel defconfig with Etnaviv/CODA support

This is the first release of this external layer so to let us know if you think some other packages/conf should be added.

External layer configuration details

Here are some details about the configurations available:

NBBD-SDMAC firmware package is commented out in the defconfig files since it requires access to our private git server. Make sure to un-comment it once the access is granted.

Build procedure

  1. Download the latest Buildroot tree:
~$ git clone https://git.busybox.net/buildroot -b 2017.08.x
  1. Download Boundary Devices external layer:
~$ git clone https://github.com/boundarydevices/buildroot-external-boundary -b 2017.08.x
  1. Create an output folder for your build:
~$ make BR2_EXTERNAL=$PWD/buildroot-external-boundary/ -C buildroot/ O=$PWD/output nitrogen6x_qt5_gst1_defconfig ~$ cd output
  1. Build the image:
~/output$ make
  1. Your rootfs image is ready!
~/output$ ls -l images/sdcard.img ~/output$ sudo dd if=images/sdcard.img of=/dev/sdX bs=1M

Testing the image

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

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

Our Wiki is also a good source of information to get started with Qt5 or GStreamer.

Qt5.9 Cinematic Demo Qt5.9 Cinematic Demo

Creating/Using an SDK

As mentioned previously, this release allows to create an SDK that can be relocated anywhere.

Here is a link to the SDK for the images above:

Creating the SDK is very simple:

~/output$ make sdk ~/output$ cd host ~/output/host$ tar czf br2017.08-sdk-nitrogen-20170904.tar.gz *

Then it can be provided to all the teams / 3rd parties that need to develop on the platform:

~$ mkdir -p ~/sdk-buildroot-2017.08 ~$ cd ~/sdk-buildroot-2017.08 ~/sdk-buildroot-2017.08$ tar xzf ~/Downloads/br2017.08-sdk-nitrogen-20170904.tar.gz ~/sdk-buildroot-2017.08$ ./relocate-sdk.sh

The relocate-sdk.sh script is necessary to adjust the path to the SDK new location.

From there, the developer can build any software that leverages the libraries included in the OS image.

The toolchain in this SDK therefore has its sysroot properly setup:

~/sdk-buildroot-2017.08$ ./bin/arm-linux-gnueabihf-gcc -print-sysroot /home//sdk-buildroot-2017.08/arm-buildroot-linux-gnueabihf/sysroot

As an example, here is the procedure for cross-compiling imx_usb_loader tool for the target.

It is important to note that imx_usb_loader relies on libusb and its Makefile uses pkg-config.

~$ git clone https://github.com/boundarydevices/imx_usb_loader.git ~$ cd imx_usb_loader ~/imx_usb_loader$ CC=~/sdk-buildroot-2017.08/bin/arm-linux-gnueabihf-gcc PKG_CONFIG=~/sdk-buildroot-2017.08/bin/pkg-config make

You can even use that SDK with QtCreator by following the procedures below:

 

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