Loading...
 

Build from source - Yocto


This tutorial provides instructions for building Yocto binaries for ESPRESSObin. In-detail requirements for building Yocto on a Linux build machine can be read in the Yocto Project Mega Manual, section 18.3.1 Support Linux Distributions. In this tutorial we will be building Yocto on Ubuntu 14.04.

Prerequisites

Create a directory where the Yocto sources will be downloaded (e.g. /opt/yocto) and head into that directory:

user@laptop:~$ mkdir /opt/yocto && cd /opt/yocto

Before downloading the sources, install repo and other necessary bitbake packages:

user@laptop:/opt/yocto$ sudo apt-get install repo diffstat texi2html texinfo subversion chrpath gettext

Below snippet shows the required packages for Ubuntu; consult this section of the Yocto Project Mega Manual on the required packages for other supported Linux distributions.

Downloading and building from source

Now on to downloading Marvell Yocto source code for ESPRESSObin:

user@laptop:/opt/yocto$ repo init -u https://github.com/MarvellEmbeddedProcessors/marvell-embedded-linux-platform.git -b krogoth

Followed by synchronizing all files:

user@laptop:/opt/yocto$ repo sync

After all the updates have been installed, select the correct MACHINE for ESPRESSObin:

user@laptop:/opt/yocto$ MACHINE=cb-88f3720-ddr3-espressobin . setup-environment espressobin

Executing this command automatically changes the location to the espressobin/ subdirectory. From there, run bitbake command to build the root filesystem and kernel binaries for ESPRESSObin:

 Note

Depending on the speed of your Internet connection and the host machine, the build process could take a while to finish. Make sure to have a stable Internet connection throughout the build process.

user@laptop:/opt/yocto/espressobin$ bitbake marvell-image-machine-test

After the build is finished, find the newly built rootfs tarball and kernel image containing the dtb file in the espressobin/tmp/deploy/images/cb-88f3720-ddr3-espressobin/ subdirectory:

user@laptop:/opt/yocto/espressobin$ ls tmp/deploy/images/cb-88f3720-ddr3-espressobin/
Image
Image--4.4.52-r0.2-armada-3720-community-20170605070422.dtb
Image--4.4.52-r0.2-cb-88f3720-ddr3-espressobin-20170605070422.bin
Image-armada-3720-community.dtb
Image-cb-88f3720-ddr3-espressobin.bin
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
marvell-image-machine-test-cb-88f3720-ddr3-espressobin-20170605070422.license_manifest
marvell-image-machine-test-cb-88f3720-ddr3-espressobin-20170605070422.license_manifest.csv
marvell-image-machine-test-cb-88f3720-ddr3-espressobin-20170605070422.rootfs.manifest
marvell-image-machine-test-cb-88f3720-ddr3-espressobin-20170605070422.rootfs.tar.bz2
marvell-image-machine-test-cb-88f3720-ddr3-espressobin.license_manifest
marvell-image-machine-test-cb-88f3720-ddr3-espressobin.license_manifest.csv
marvell-image-machine-test-cb-88f3720-ddr3-espressobin.manifest
marvell-image-machine-test-cb-88f3720-ddr3-espressobin.tar.bz2
modules--4.4.52-r0.2-cb-88f3720-ddr3-espressobin-20170605070422.tgz
modules-cb-88f3720-ddr3-espressobin.tgz

The important files here are the rootfs package (marvell-image-machine-test-cb-88f3720-ddr3-espressobin.tar.bz2), the kernel image (Image-cb-88f3720-ddr3-espressobin.bin) and the dtb file for ESPRESSObin (Image-armada-3720-community.dtb).

Now head to Boot from removable storage - Yocto to transfer these files to a removable media of your choice and to boot Yocto on ESPRESSObin.