The instructions for setting up and building Linux in the Yocto Project were adopted to our products.
A list of helpful bitbake commands can be found here:
For Yocto a Linux host machine is needed.
The supported distributions for Yocto are listed at the official Yocto documentation.
If you’re already running a Linux host, you should be fine.
Windows users see Ubuntu on Windows 10.
An important consideration is the hard disk space required for the virtual appliance. It is recommended that at least 120 GiB is provided, 500 GiB would be better.
The Yocto framework requires (build) dependencies that need to be available on the host system for the builds.
Follow the instructions at the official Yocto project documentation to install the neccessary host packages for your system.
Setting up Git¶
If not already done, setup git with the commands below:
git config --global user.name "Your Name" git config --global user.email "Your Email" git config --list
Setting up the Repo Utility¶
Repo is a tool built on top of Git that makes it easier to manage projects that contain multiple repositories, which do not need to be on the same server. Repo complements very well the layered nature of the Yocto Project, making it easier for users to add their own layers to the BSP.
To install the
repo utility, perform these steps:
- Create a bin folder in the home directory:
bin folder already exists skip the
mkdir ~/bin step.
mkdir ~/bin curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
- Add the following line to the
~/.bashrcfile to ensure that the
~/binfolder is in your PATH variable:
bin folder is already in your path skip this step in it’s entirety.
The Repo tool checks out different layers for you, which are defined in our XML-manifest. Their source code can be found
layers directory, which contains the recipes and machine configurations used to build the images.
|Branch||Kernel Version||Supported Machines|
karo-bsp is just an example and can be chosen freely.
The following command will checkout the latest version of the BSP in Branch gatesgarth.
mkdir karo-bsp cd karo-bsp repo init -u https://github.com/karo-electronics/karo-bsp -b gatesgarth repo sync
If you want to checkout a previous Release Version, use repo as follows:
repo init -u https://github.com/karo-electronics/karo-bsp -b refs/tags/<tagname>
Release-Tags can be viewed on GitHub: https://github.com/karo-electronics/karo-bsp/releases
repo init --help:
--no-clone-bundle: disable use of /clone.bundle on HTTP/HTTPS
Not using this option can lead to errors when calling
If errors occur during repo initialization, try deleting the
.repo directory and running the repo initialization command again.