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

From Voipac Wiki
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:i.MX25 SODIMM PC - Development kit]]
+
[[Category:i.MX25 SODIMM PC - Development Kit]]
 
[[Category:Yocto]]
 
[[Category:Yocto]]
 
<!-- -->
 
<!-- -->
 
<div style="float:right">__TOC__</div>
 
<div style="float:right">__TOC__</div>
This Wiki section guides through preparation and compiling images using Yocto Project.
+
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 ==
 
== Install prerequisites ==
This procedure uses a compiling machine with Ubuntu 16.04 operating system installed. Following list of software packages are required to install:
+
This procedure uses a compiling machine with Ubuntu 16.04 operating system installed. More information about Yocto requirements could be found in [http://freescale.github.io/#documentation Freescale GitHub page]. Following list of software packages are required to install:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
Line 18: Line 18:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
mkdir -pv ~/workdir/bin
 
mkdir -pv ~/workdir/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo  > ~/workdir/bin/repo
+
# curl http://commondatastorage.googleapis.com/git-repo-downloads/repo  > ~/workdir/bin/repo
 
chmod a+x ~/workdir/bin/repo
 
chmod a+x ~/workdir/bin/repo
 
PATH=${PATH}:~/workdir/bin
 
PATH=${PATH}:~/workdir/bin
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== Yocto Project Rocko Release ==
+
== Initialize Yocto Project ==
Every OS requires different set of installed packages. More information about Yocto requirements could be found in [http://freescale.github.io/#documentation Freescale GitHub page].
 
 
 
=== Initialize Yocto Project ===
 
 
Download the BSP Yocto Project Environment:
 
Download the BSP Yocto Project Environment:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 34: Line 31:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Init Voipac layer ===
+
== Init Voipac layer ==
 
Add i.MX25 SODIMM PC support:
 
Add i.MX25 SODIMM PC support:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 59: Line 56:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Configure ===
+
== Configure ==
 
Add Voipac meta layer into BSP:
 
Add Voipac meta layer into BSP:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 66: Line 63:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== 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 />
'''''Cause and fix:''''' Compile Barebox manually using toolchain from Ubuntu repository<br />
+
'''''Workaround:''''' Compile Barebox manually using toolchain from Ubuntu repository<br />
  
=== Build customization ===
+
== Build customization ==
 
Configuration files are created during setup (setup-environment, fsl-setup-release.sh). The file to update can be found:
 
Configuration files are created during setup (setup-environment, fsl-setup-release.sh). The file to update can be found:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 94: Line 91:
 
"
 
"
 
</syntaxhighlight>
 
</syntaxhighlight>
<br />
 
  
=== Building images ===
+
== Building images ==
 +
Locate the Yocto working directory:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
cd ~/workdir/vmx/yocto/fsl-community-bsp
 
cd ~/workdir/vmx/yocto/fsl-community-bsp
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Supported machines (Production)
+
Supported machine:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
vmx25
 
vmx25
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Supported distros (Freescale)
+
Supported distros (Freescale):
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
fslc-framebuffer
 
fslc-framebuffer

Latest revision as of 14:35, 24 April 2022

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
Workaround: 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

Locate the Yocto working directory:

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

Supported machine:

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