Search by Tags

Build Apalis iMX8 Yocto/OpenEmbedded Bring-up Image

 
Applicable for

Subscribe for this article updates

This article describes how to build the Yocto/OpenEmbedded validation image for the Apalis iMX8 module. The Apalis iMX8 module uses a NXP® i.MX 8QuadMax SoC. This initial bring-up image is based on the Linux L4.9.51 for i.MX 8QuadMax Beta2 BSP provided by NXP.

Introduction

The Yocto/OpenEmbedded layers for the image are stored on Github:

U-Boot and Linux kernel source code with the Toradex specific modifications are stored on git.toradex.com. When building the image using the Yocto/OpenEmbedded build system the U-Boot and Linux kernel will be downloaded from the during build repositories automatically.

Prerequisites

The Beta 2 bring-up BSP is based on OpenEmbedded morty/Yocto 2.2. Please make sure you use a supported Linux distribution and install required prerequisits as documented by the Yocto Project Reference Manual System Requirements chapter.

For easier git repository management the utility repo is used. The repo bootstrap binary can be installed using the following commands:

mkdir ~/bin
export PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Build Environment Setup

mkdir imx-yocto-bsp
cd imx-yocto-bsp
repo init -u git://github.com/toradex/imx-manifest.git -b toradex-linux-morty -m toradex-4.9.51-8qm_beta2_bring_up.xml
repo sync

When this process is completed, the source code is checked out into the directory imx-yocto-bsp/sources.

Image Build

Run i.MX Linux Yocto Project Setup for Apalis iMX8:

MACHINE=apalis-imx8 DISTRO=fsl-imx-x11 source fsl-setup-release.sh -b build-apalis/

And build an image using

bitbake fsl-image-validation-imx

Depending on the performance of your machine this can take several hours. Once the build is completed you can find the build output in the folder tmp/deploy/images/apalis-imx8/. The file fsl-image-validation-imx-apalis-imx8.sdcard.bz2 should symlink to the SD card card image which contains a completely bootable system, including the SCU firmware, boot loader, a FAT boot partition and a ext4 rootfs file system.

Image Deployment

Since Apalis iMX8 currently boot from SD card, the image can be directly flashed on a SD card. Use lsblk or a similar utility to find the SD card on your Linux host machine. All data on it will be destroyed! Make sure to unmount any mounted partition first (using umount).

Copy the resulting image on a SD-card (replace /dev/sdx with /dev/mmcblkx if necessary)

bunzip2 -c fsl-image-validation-imx-apalis-imx8.sdcard.bz2 | sudo dd of=/dev/<sdcard> bs=4M

More Resources