Sep 15, 2020 Dr. Design

Binary Images Optimized for Your Embedded Device

By Mark Asselstine and Robert Yang

Introduction

Embedded systems developers have usually had two choices when setting off to create exciting new devices based on Linux and built using the latest embedded SOCs. Use a binary distribution typically optimized for laptops, desktops and servers and hope it either fits or painstakingly customize it. Use an embedded Linux product which makes customization easy but has a rather large learning curve and doesn't have an easy way to even determine if the learning curve is worth the journey.

Wind River Linux now provides access to binary images of our industry leading embedded Linux OS, allowing you to get the best of both worlds. Binary images, which are optimized for embedded devices, are available to be used for deploying on your embedded device and keeping it up to date. Or these same images can be used to try out on your embedded device to evaluate the capabilities of Wind River Linux while you ease into the workflow required to use our source based embedded Linux product.

Out of the Box

When you download and use our Wind River Linux binary images you get:

  • Simple instructions on how to install the binary image on your embedded device

  • Access, via rpm and dnf, to a package repository offering an ever-growing library of the most popular embedded Linux software to extend the image at runtime

  • The choice of two different images making it easy to match your usecase

  • A minimal image when you are focused on keeping your image small and only want to install the software you really need

  • A full image which includes the lightweight graphical desktop environment, XFCE

  • OSTree allowing you to roll back and upgrade the system easily

  • Images which are compatible with QEMU allowing for development prior to hardware purchases and developer & test automation workflows not restricted by available hardware

  • Consistency between root filesystem and container images, available on dockerhub, as both have been created using the same process and therefor contain mostly the same software

  • Clearly documented steps to rebuild the images, allowing you to transition easily from using the binaries to Wind River Linux's source based embedded Linux product

  • Access to an application SDK allowing you to easily develop software for your ARM or Intel embedded device from the comfort of your laptop or desktop

Getting Started

Visit Wind River Labs where you can find the device images available for download alongside many other exciting projects Wind River is involved in.

Using Wind River Linux Binaries on a Raspberry Pi 4

Now we will walk you through downloading and use Wind River Linux binary images on a Raspberry Pi 4. Start by visiting Wind River Labs at https://labs.windriver.com/downloads/wrlinux.html

Select the image such as Target System Image Full for Raspberry Pi 4 to download

Wind River Labs download page

After the download is complete extract the contents and review the contents of the target_bcm-2xxx-rpi4.README.md file for more details about the contents of the archive

$ tar xjvf target-full-bcm-2xxx-rpi4.tar.bz2
$ cd target-full-bcm-2xxx-rpi4
$ less target_bcm-2xxx-rpi4.README.md

The images for other targets will be much the same as for the Raspberry Pi 4 with binaries to deploy to the target, README.md files with instructions, and support files for running images with QEMU.

Writing the image to a SD card

  1. Prepare a SD card which is larger than 8 GB.

    NOTE: All data on the SD card will be destroyed, so please save the data on the SD before the following actions.

  2. Insert the SD card to the host and write the image

    $ gunzip wrlinux-image-full-bcm-2xxx-rpi4.ustart.img.gz
    $ sudo bmaptool copy --bmap wrlinux-image-full-bcm-2xxx-rpi4.ustart.bmap \
         wrlinux-image-full-bcm-2xxx-rpi4.ustart.img /dev/sdb
    

    NOTE: The /dev/sdX is the SD card which is /dev/sdb in this example, but might be a different name for you.

    Write the image

  3. The SD card can now be used to boot the target device

Boot the image on board

  1. Insert the SD card to the board

  2. Power on the board

    There is a small installer on the image which is used for installing files to the SD card on first boot. The system will reboot automatically after the install is done, and then the system will boot into the XFCE desktop environment.

  3. Login to the board

    The default username and password are 'root' and 'root', changing the password using the 'passwd' command in a terminal is highly recommended after the first login.

image3

Install a package

Since the system is managed by OSTree, so you must unlock the system before installing packages.

  1. Open a terminal and run the following command to unlock the system:

    $ ostree admin unlock --hotfix
    

    Wind River Linux desktop

  2. Now use 'dnf' to install packages from Wind River's package repository

    $ dnf install -y xfce4-screenshooter
    

    Install xfce4-screenshooter with dnf

Upgrade the system

Since the system is managed by OSTree, so you can use 'ostree_upgrade.sh' to upgrade it.

$ ostree_upgrade.sh

OSTree upgrade

You can also use "dnf upgrade" to upgrade the system in theory, but it may fail because of ostree, so use ostree_ugprade when "dnf upgrade" fails.

Building an application

You can develop and build applications on the device just like other Linux systems. To demonstrate this let's build and run xeyes

  1. Install essential build tools

    $ dnf install -y packagegroup-core-buildessential
    
  2. Install xeyes' dependencies

    $ dnf install -y libx11-dev libxau-dev libxt-dev libxext-dev \
       libxmu-dev libxrender-dev libxcb-dev libxdmcp-dev libice-dev libsm-dev
    
  3. Download the source of xeyes

    $ wget https://www.x.org/releases//individual/app/xeyes-1.1.2.tar.bz2
    
  4. Extract the source

    $ tar xjvf xeyes-1.1.2.tar.bz2
    
  5. Build the xeyes

    $ cd xeyes-1.1.2
    $ ./configure
    $ make
    
  6. Run xeyes

    $ ./xeyes
    

    xeyes

Running container images

The docker tool is installed by default on full target images, so you can use it to pull container images from Docker Hub and run:

$ docker pull windriver/wrlx-image:minimal-x86-64-10.20.33.0

docker pull

$ docker run -it windriver/wrlx-image:minimal-x86-64-10.20.33.0 /bin/sh

docker run

More information

You can visit the following links for more information.

Homepage:
https://labs.windriver.com/downloads/wrlinux.html

Container images:
https://hub.docker.com/r/windriver/wrlx-image

Quick Start:
https://docs.windriver.com/bundle/Wind_River_Linux_Binary_Release_Quick_Start_CD/page/vgd1593545985991.html

Previous Wind River Linux Binaries – Accelerate IoT/Edge application development with a high-performance Linux
Next Assured Partitioning for FACE Systems