Difference between revisions of "i.MX25 SODIMM PC Yocto"

From Voipac Wiki
Jump to navigation Jump to search
Line 64: Line 64:
  
 
== Build workarounds ==
 
== Build workarounds ==
As Barebox built by Yocto Project does not support all the booting options, a manual compile is recommended<br /><br />
+
As Barebox built by Yocto Project does not support all the booting options, a manual compile is recommended:<br /><br />
  
 
'''''Issue:''''' Barebox compiled by Yocto toolchain is unable to boot from NAND<br />
 
'''''Issue:''''' Barebox compiled by Yocto toolchain is unable to boot from NAND<br />

Revision as of 23:57, 22 April 2021

This Wiki section guides through preparation and compiling images using Yocto Project. Release codenamed Rocko was selected and adjusted for i.MX25 SODIMM PC - Development kit.

Install prerequisites

This procedure uses a compiling machine with Ubuntu 16.04 operating system installed. More information about Yocto requirements could be found in Freescale GitHub page. Following list of software packages are required to install:

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

Note: As Freescale disabled its primary git servers, the official repositories were moved. The files for building can be accessed by following this workaround.

To download the board support package, repositories need to be installed. To prepare them follow these steps:

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

Initialize 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 Voipac layer

Add i.MX25 SODIMM PC 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

Synchronize repositories:

cd ~/workdir/vmx/yocto/fsl-community-bsp
PATH=${PATH}:~/workdir/bin
repo sync

Configure

Add Voipac meta layer into BSP:

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

Build workarounds

As Barebox built by Yocto Project does not support all the booting options, a manual compile is recommended:

Issue: Barebox compiled by Yocto toolchain is unable to boot from NAND
Cause and fix: Compile Barebox manually using toolchain from Ubuntu repository

Build customization

Configuration files are created during setup (setup-environment, fsl-setup-release.sh). The file to update can be found:

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

By modifying local.conf file, custom features can be easily added:

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


Building images

cd ~/workdir/vmx/yocto/fsl-community-bsp

Supported machines (Production)

vmx25

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

Commands used for i.MX25 SODIMM PC environment:

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

Toolchain

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 in these locations:

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