Please note that you can find more detailed information about image generation using Yocto directly in the README of the meta-wifx github page.

PrerequisitesLink to Prerequisites

The toolchain concerned by this document has been created using Yocto project 2.1.2 and has been tested on Ubuntu 16.04 LTS (the host).

The following packages must be installed on the host prior to begin:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm
CODE

Sources locationLink to Sources location

WifxLink to Wifx

meta-wifxLink to meta-wifx

URI: git://github.com/Wifx/meta-wifx.git

URI: https://github.com/Wifx/meta-wifx.git

Branch: krogoth

DependenciesLink to Dependencies

meta-openembeddedLink to meta-openembedded

URI: git://git.openembedded.org/meta-openembedded

URI: http://cgit.openembedded.org/meta-openembedded/

Branch: krogoth

meta-golangLink to meta-golang

URI: git://github.com/Wifx/meta-golang.git

URI: https://github.com/Wifx/meta-golang.git

Branch: master

meta-makerLink to meta-maker

URI: git://git.yoctoproject.org/meta-maker

URI: https://git.yoctoproject.org/git/meta-maker

Branch: master

DownloadLink to Download

Begin by creating a working directoy:

$ mkdir yocto
$ cd yocto
CODE

Then download the various layers

$ git clone git://git.yoctoproject.org/poky -b krogoth
$ git clone git://git.openembedded.org/meta-openembedded -b krogoth
$ git clone git://github.com/Wifx/meta-wifx.git -b krogoth
$ git clone git://github.com/Wifx/meta-golang.git golang/meta-golang -b master
$ git clone git://git.yoctoproject.org/meta-maker -b master
CODE

Clone meta-maker layer with the proper branch ready

git clone git://git.yoctoproject.org/meta-maker
cd meta-maker 
git reset --hard c039fafa7a0276769d0928d16bdacd2012f2aff6 
cd ..
CODE

ConfigureLink to Configure

Enter the poky directory to configure the build system and start the build process

$ cd poky
CODE

Initialize build directory

$ source oe-init-build-env build-wifx
CODE

Add the various layers to bblayer configuration file

$ vim conf/bblayers.conf
CODE
$stringEscapeUtils.escapeHtml($body)
CODE

Edit local.conf to specify the machine, location of source archived, package type (rpm, deb or ipk). Here is an example:

vim conf/local.conf
[...]
# LORIX One NAND memory based (256MB NAND version)
MACHINE ??= "sama5d4-lorix-one"
or
# LORIX One NAND memory based (512MB NAND version)
MACHINE ??= "sama5d4-lorix-one-512"
or
# LORIX One SD-Card memory based (256MB NAND version)
MACHINE ??= "sama5d4-lorix-one-sd"
or
# LORIX One SD-Card memory based (512MB NAND version)
MACHINE ??= "sama5d4-lorix-one-512-sd"
[...]
DL_DIR ?= "your_download_directory_path"
[...]
PACKAGE_CLASSES ?= "package_ipk"
[...]
EXTRA_IMAGE_FEATURES ?= ""
[...]
USER_CLASSES ?= "buildstats image-mklibs"
To get better performance, use the "poky-wifx" distribution by also adding that
line:
DISTRO = "poky-wifx"
CODE

CustomizeLink to Customize

The Wifx image recipe file is under ${BSPDIR}/meta-wifx/recipes-wifx/images/wifx-base.inc. This file describes the packages which will be included into the image. You can add for example the python packages by adding the following in the IMAGE_INSTALL variable:

 python \
 python-psutil \
 python-netifaces \
 python-ujson \
 python-cryptography \
 python-pyserial \
 python-setuptools \
 \
 python3 \
 python3-setuptools \
CODE

BuildLink to Build

Build Wifx standard image:

$ bitbake wifx-base
Typical bitbake output ======================
Build Configuration: BB_VERSION = "1.30.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "sama5d4-lorix-one"
DISTRO = "poky-wifx"
DISTRO_VERSION = "2.1.2"
TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa5"
TARGET_FPU = "hard"
meta-wifx = "krogoth:f5e1a500096c1a4ffa8b77657ad553f102bfa986"
meta
meta-poky
meta-yocto-bsp = "krogoth:ae9b341ecfcc60e970f29cfe04306411ad26c0cf"
meta-oe
meta-networking
meta-perl
meta-python
meta-ruby
meta-multimedia = "krogoth:55c8a76da5dc099a7bc3838495c672140cedb78e"
meta-golang = "master:72e26c77e91311e79f38863424adca9536a2bde6"
meta-maker = "master:c039fafa7a0276769d0928d16bdacd2012f2aff6"
CODE

Or build the devel image which contains also the app headers

$ bitbake wifx-base-dev
CODE

Or build the SDK image which contains in addition the kernel headers and debug utilities:

$ bitbake wifx-base-sdk
CODE

ToolchainLink to Toolchain

You can create a toolchain installer, not depending on the image you choose to create using the command "bitbake {image} -c populate_sdk", for example:

$ bitbake wifx-base -c populate_sdk
CODE

In all cases, the toolchain installer is then located in build-wifx/tmp/deploy/sdk under the form poky-wifx-glibc-x86_64-{image name}-cortexa5hf-neon-toolchain-2.1.2.sh

Its installation is explained in the Toolchain page.

ImageLink to Image

The resulting images are availlable in /build-wifx/tmp/deploy/images/sama5d4-lorix-one:

  • sama5d4_lorix_one-nandflashboot-uboot-{version}.bin
    This is the AT91 bootstrap pre-bootloader binary which load U-Boot from NAND
    Commonly used by SAM-BA script as at91bootstrap.bin
  • u-boot-sama5d4-lorix-one-{version}-{package revision}.bin
    This is the U-Boot binary which load the Linux kernel
    Commonly used by SAM-BA script as u-boot.bin
  • zImage--{version}-{package revision}-at91-sama5d4_lorix_one-{date code}.dtb
    This is the device tree image binary used by the Linux kernel
    Commonly used by the SAM-BA script at91-sama5d4_lorix_one.dtb
  • zImage--{version}-{package revision}-sama5d4-lorix-one-{date code}.bin
    This is the Linux kernel image
    Commonly used by the SAM-BA script as zImage

The programming of these binaries is explained in the page NAND Programming.

Was this page helpful for you?

Yes
No
Fix it