Building Yocto HIO-Image-xfce with Qt5 SSH and WiFi

From Estone Technology Wiki
Jump to: navigation, search


This tutorial is the next step after Setting up Yocto Environment. We will compile from scratch an image that can be run in HIO core-board.
hio-image-xfce is a full image with Xfce Desktop Environment, SSH, USB WiFi module driver and Qt 5.2.1 framework

Minimum Spec Requirement

CPU 2 Core Processors
Memory Size 2G
Remaining Disk Space 80G
Operating System Ubuntu 12.04 LTS, Ubuntu 14.04 LTS

Setup MACHINE system variable and build directory

Different HIO board has different machine variable, select it from the table below.

HIO Board Machine Variable
HIO-EMB-1200 Dual Core hio-imx6dl-board
HIO-EMB-1200 Quad Core hio-imx6q-board
HIO i.MX6 Starter Kit hio-imx6dl-board
HIO i.MX6 POE Kit hio-imx6dl-board
3.5" Wallpad hio-imx6dl-ppc4535
7" Wallpad hio-imx6dl-ppc4507
10" Wallpad hio-imx6dl-ppc4510

In Terminal, input the following command to setup system variable and build directory (build-xfce).

~/hio-yocto-bsp/$ export MACHINE=<Input Machine Variable>
~/hio-yocto-bsp/$ . ./setup-environment build-xfce

Adjust the configuration file for xfce Image

Adjust the configuration file bblayers.conf

Use a text editor and add the following hio and qt related layers (bold) to build-xfce/conf/bblayers.conf file

BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-yocto \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-fsl-arm \
  ${BSPDIR}/sources/meta-fsl-arm-extra \
  ${BSPDIR}/sources/meta-fsl-demos \
  ${BSPDIR}/sources/meta-qt5 \
  ${BSPDIR}/sources/meta-openembedded/meta-ruby \
  ${BSPDIR}/sources/meta-hio \
  ${BSPDIR}/sources/meta-hio-demos \
  ${BSPDIR}/sources/meta-openembedded/meta-xfce \
  ${BSPDIR}/sources/meta-openembedded/meta-efl \
  ${BSPDIR}/sources/meta-openembedded/meta-filesystems \
  ${BSPDIR}/sources/meta-openembedded/meta-gnome \
  ${BSPDIR}/sources/meta-openembedded/meta-gpe \
  ${BSPDIR}/sources/meta-openembedded/meta-initramfs \
  ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
  ${BSPDIR}/sources/meta-openembedded/meta-networking \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-openembedded/meta-perl \
  ${BSPDIR}/sources/meta-openembedded/meta-ruby \
  ${BSPDIR}/sources/meta-openembedded/meta-systemd \
  ${BSPDIR}/sources/meta-openembedded/meta-webserver \
  ${BSPDIR}/sources/meta-openembedded/meta-xfce \

Adjust the configuration file local.conf

Add the following (italic bold) to build-xfce/conf/local.conf file
Note: remember to add ssh-server-openssh that is next to EXTRA_IMAGE_FEATURES. The BB_NUMBER_THREADS and PARALLEL_MAKE number are based on the processor of the current device. It is automatically generated and varies for different computers.

MACHINE ??= 'hio-imx6dl-board
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES = "debug-tweaks   ssh-server-openssh"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
    STOPTASKS,${DL_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1"

Using Bitbake to Compile the image

Run the following bitbake command to compile the image.

~/hio-yocto-bsp/build-xfce$ bitbake hio-image-xfce

Note: For initial compiling stage of Hio-Yocto Project, the process will take several hours. It will not take that long for recompiling after.

Yocto Image Build Deploy Files

After successfully compiled, the following important files are generated.
They are located in /build-xfce/tmp/deploy/images/hio-imx6dl-board/

File and Item Name Description
Board Hio-imx6dl-board Model 1200+1240+1250+1280 (Default IO setting)
Uboot u-boot-hio-imx6dl-board-2014.01-r0.imx Boot loader.
Kernel uImage--3.10.17-r0-hio-imx6dl-board-YYYYmmddHHMMSS.dtb Kernel Tree Structure files, include hardware information.
uImage--3.10.17-r0-hio-imx6dl-board-YYYYmmddHHMMSS.bin Compressed Kernel file. File rename to uImage when system update.
.SDCard hio-image-xfce-hio-imx6dl-board-YYYYmmddHHMMSS.rootfs.sdcard Include uboot, kernel, rootfs. Can be written to SDCard by using dd command or Win32DiskImager
rootfs hio-image-xfce-hio-imx6dl-board-YYYYmmddHHMMSS.rootfs.tar.bz2 xfce file system, using X11 Desktop Environment, xfce framework, support SSH, USB Wifi, QT 5 etc.

References: Build Version for Hio-Yocto Sample Image

  • hio-image-minimal
    • Amall image that can only capable of allowing the system to boot with SSH and USB WiFi module driver support.
  • hio-image-fb
    • Based on hio-image-mimimal and added QT 5.2.1 frame buffer framework.
  • hio-image-x11
    • A full image that is based on Yocto Project's core image-sato with X11 Window System, SSH, USB Wifi module driver and Qt 5.2.1 framework
  • hio-image-xfce
    • A full image with Xfce Desktop Environment, SSH, USB WiFi module driver and Qt 5.2.1 framework

Next Step: Prepare SD Card for boot or update