i.MX53 SODIMM PC Yocto

From Voipac Wiki
Revision as of 21:22, 3 April 2021 by Voipac (talk | contribs)
Jump to navigation Jump to search

Yocto distributions version 2.7 Warrior and 2.4 Rocko were used during this building process.

Install prerequisites

These software modules are required by Ubuntu 16.04/18.04 operating system in order to set up the compiling environment successfully:

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
sudo apt-get install autoconf libtool libglib2.0-dev libarchive-dev python-git \
sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 \
help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev \
mercurial automake groff curl lzop asciidoc u-boot-tools dos2unix mtd-utils pv \
libncurses5 libncurses5-dev libncursesw5-dev libelf-dev zlib1g-dev

More information about Yocto requirements can be found on Freescale GitHub page.

Download and install repo utility

mkdir -pv ~/workdir/bin/repo
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/workdir/bin/repo/repo
chmod a+x ~/workdir/bin/repo/repo

export PATH=~/workdir/bin/repo:$PATH

Initialize Yocto project

Downloading the BSP Yocto Project Environment version 2.7 Warrior:

mkdir -pv ~/workdir/voipac/imx53/yocto/fsl-community-bsp-platform_2_7
cd ~/workdir/voipac/imx53/yocto/fsl-community-bsp-platform_2_7
repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b warrior

Initialize Voipac layer

Addidng Voipac 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-warrior" name="yocto-vmx" path="sources/meta-freescale-vmx">
    <copyfile src="vmx-setup.sh" dest="vmx-setup.sh"/>
  </project>
</manifest>
EOF

Synchronize repositories

cd ~/workdir/voipac/imx53/yocto/fsl-community-bsp-platform_2_7
export PATH=~/workdir/bin/repo:$PATH
repo sync

Configure

Adding Voipac meta layer into BSP:

source vmx-setup.sh
patch -p1 < sources/meta-freescale-vmx/meta-freescale_recipes-bsp_barebox_barebox_inc.patch

Building images

Building workarounds

This workaround is applied for Yocto version 2.4 Rocko on Ubuntu 16.04 operation system:

Issue: Barebox compiled using Yocto toolchain does not boot from NAND Workaround: Compile Barebox manually using toolchain from Ubuntu repository

Build customization

By modifying configuration files additional custom features can be easily included. All there modules were successfully added into Yocto version 2.4 Rocko.

Edit file: /workdir/vmx/yocto/fsl-community-bsp/build-dir/conf/local.conf:

IMAGE_INSTALL_append = " \
    dropbear \
    openssh-sftp-server \
    alsa-utils-aplay \
    evtest \
    ethtool \
    i2c-tools \
    memtester \
    mtd-utils \
    stress \
    multimedia-demo \
    vpac-busybox-logo \
"

Supported options

Supported machines:

vmx53

Supported Freescale distros:

fslc-framebuffer
fslc-wayland
fslc-x11
fslc-xwayland

Console image

General device is defined in this structure:

MACHINE=<machine name> DISTRO=<distro name> source setup-environment build-dir
MACHINE=<machine name> bitbake core-image-base

i.MX53_SODIMM_PC Module machine definition:

MACHINE=vmx53 DISTRO=fslc-framebuffer source ./setup-environment build-fb
MACHINE=vmx53 bitbake core-image-base

Setup and build structure 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 in these directories:

cd ~/workdir/vmx/yocto/fsl-community-bsp/build-dir/tmp/deploy/images
cd ~/workdir/vmx/yocto/fsl-community-bsp/build-dir/tmp/deploy/sdk