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

From HIO Wiki
Jump to: navigation, search

About

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-fb is based on hio-image-minimal which allow the system to boot up with SSH, USB Wifi module driver, and Qt 5.2.1 frame buffer framework.

Minimum Compiling Requirement

CPU 2 Core Processors
Memory Size 2G
Remaining Disk Space 50G
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-fb).

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

Note :Freescale required user to read all the license agreement, Press "space" until the end and press "Y"

Adjust the configuration file for specific Image

Adjust the configuration file bblayers.conf

Using a text editor and add the following Hio and QT related layers (italic bold) to build-fb/conf/bblayers.conf file

LCONF_VERSION = "6"
BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
BBFILES ?= ""
BBLAYERS = " \
 ${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-openembedded/meta-multimedia \
 ${BSPDIR}/sources/meta-hio \
 ${BSPDIR}/sources/meta-hio-demos \
"

Adjust the configuration file local.conf

Add the following (italic bold) to build-fb/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 number of 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"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K" 
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
DISTRO_FEATURES_remove = "x11 wayland" PREFERRED_VERSION_hio-image = "1.01" SOURCE_MIRROR_URL ?= "http://www.hioproject.org/support/images/source_mirror/sources/" INHERIT += "own-mirrors" BB_GENERATE_MIRROR_TARBALLS = "1"
DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1"
PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010" PACKAGECONFIG_append_pn-qtbase = " sql-sqlite gstreamer \ gst-plugins-base accessibility pulseaudio "

Using Bitbake to Compile the image

Run the following command to bitbake the image.

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

Note: This is the initial compiling stage of Hio-Yocto Project. The compiling process will take several hours. Recompiling the same image will be quick after.

Yocto Image Build Deploy Files

After successfully compiled, the following important files are generated.
They are located in /build-fb/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.
.SDCard hio-image-fb-hio-imx6dl-board-YYYYmmddHHMMSS.rootfs.sdcard Include uboot, kernel, rootfs. Can be written to SDCard by using dd command or Win32DiskImager
rootfs hio-image-fb-hio-imx6dl-board-YYYYmmddHHMMSS.rootfs.tar.bz2 Build-fb File system. A small image supports SSH, USB WiFi etc and added QT 5.2.1 frame buffer framework.


References: Build Version for Hio-Yocto Sample Image

  • hio-image-minimal
    • A small 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