Install prerequisites
Every distribution requires different set of prerequisites. The list below is for Ubuntu 16.04:
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping libsdl1.2-dev xterm curl
Download and install repo utility
To get the BSP you need to have repo installed and use it as:
Install the repo utility:
mkdir -pv ~/workdir/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/workdir/bin/repo
chmod a+x ~/workdir/bin/repo
PATH=${PATH}:~/workdir/bin
Yocto Project
Yocto Project - rocko
Getting the BSP
Every OS require different set of the installed packages. More information about Yocto requirements are on http://freescale.github.io/#documentation .
Download
Init yocto project
Download the BSP Yocto Project Environment
mkdir ~/workdir/vmx/yocto/fsl-community-bsp
cd ~/workdir/vmx/yocto/fsl-community-bsp
repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b rocko
Init VMX layer
Add VMX support
mkdir -pv .repo/local_manifests/
cat > .repo/local_manifests/vmx.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://github.com/Voipac" name="voipac"/>
<project remote="voipac" revision="meta-freescale-vmx-rocko" name="yocto-vmx" path="sources/meta-freescale-vmx">
<copyfile src="vmx-setup.sh" dest="vmx-setup.sh"/>
</project>
</manifest>
EOF
Sync
Sync repositories
cd ~/workdir/vmx/yocto/fsl-community-bsp
PATH=${PATH}:~/workdir/bin
repo sync
Add VMX meta layer into BSP
source vmx-setup.sh
patch -p1 < sources/meta-freescale-vmx/meta-freescale_recipes-bsp_barebox_barebox_inc.patch
Building images
Build process may fail.
Workaround session contains few workaround for commonly observed failures.
cd ~/workdir/vmx/yocto/fsl-community-bsp
Supported machines
Supported distros (Freescale)
fslc-framebuffer
fslc-wayland
fslc-x11
fslc-xwayland
Console image
Setup and Build for Console image
MACHINE=<machine name> DISTRO=<distro name> source setup-environment build-dir
MACHINE=<machine name> bitbake core-image-base
Examples
MACHINE=vmx25 DISTRO=fslc-framebuffer source ./setup-environment build-fb
MACHINE=vmx25 bitbake core-image-base
Setup and Build for Toolchain
MACHINE=<machine name> DISTRO=<distro name> source setup-environment build-dir
MACHINE=<machine name> DISTRO=<distro name> bitbake meta-toolchain
Output files
Output images and archives are stored here
cd ~/workdir/vmx/yocto/fsl-community-bsp/build-dir/tmp/deploy/images
cd ~/workdir/vmx/yocto/fsl-community-bsp/build-dir/tmp/deploy/sdk
Build customization
Configuration files are created during setup (setup-environment, fsl-setup-release.sh).
By modifying local.conf files we can easily add custom features.
Edit /workdir/vmx/yocto/fsl-community-bsp/build-dir/conf/local.conf
Yocto - rocko
IMAGE_INSTALL_append = " \
dropbear \
openssh-sftp-server \
alsa-utils-aplay \
evtest \
ethtool \
i2c-tools \
memtester \
mtd-utils \
stress \
multimedia-demo \
vpac-busybox-logo \
"
Workarounds
Yocto - rocko
Ubuntu 16.04
Problem: Barebox compiled by Yocto toolchain does not boot from NAND.
Workaround: Compile Barebox manually using toolchain from Ubuntu repository.