.. _yocto-sumo-setup: Setup ========== References ---------- This guide is based on the *NXP/Freescale Yocto Project User's Guide*. See it `here `_. 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: `NXP/Freescale - Useful bitbake commands `_ A cheat sheet for bitbake: `Bitbake Cheat Sheet `_ Requirements -------------------- For Yocto a Linux Host Machine is needed. .. hint:: The supported distributions are listed at the `official Yocto documentation `_. If you're running such a machine, you should be fine, else we recommend to use *VirtualBox* to run a virtual machine. **Use an Ubuntu 16.04 instance**. Get a working-ready virtual machine image from `osboxes.org `_. See their `guide `_ to run the virtual machine image. 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. Host Packages ------------- The Yocto framework requires (build) dependencies that need to be available on the host system for the builds. To meet minimal version requirements you should have the following installed: * Git 1.8.3.1 or greater * tar 1.27 or greater * Python 3.4.0 or greater If your system does not meet these requirements see `this `_. To get the right packages for your build host, have a look at the official `Yocto project documentation `_. Essential Yocto Project host packages are: .. code-block:: shell sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat libsdl1.2-dev Setting up Git -------------- If not already done, setup git with the commands below: .. code-block:: shell git config --global user.name "Your Name" git config --global user.email "Your Email" git config --list Setting up the Repo Utility [1]_ --------------------------------- 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: 1. Create a bin folder in the home directory: .. code-block:: shell mkdir ~/bin (this step may not be needed if the bin folder already exists) curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo 2. Add the following line to the ``~/.bashrc`` file to ensure that the ``~/bin`` folder is in your PATH variable: .. code-block:: text export PATH=~/bin:$PATH BSP Checkout ------------------- The Repo tool checks out different layers for you, which are defined in our XML-manifest. Their source code can be found in ``sources`` directory, which contains the recipes and machine configurations used to build the image. +-----------------------+----------------+--------------------------------------+ | Branch | Kernel Version | Supported Machines | +=======================+================+======================================+ | 4.14.98-2.3.0-sumo | 4.14.98-2.3.0 | TX8M-(1610|1620|ND00), QS8M-MQ00, | | | | TX6 series, TXUL series | +-----------------------+----------------+--------------------------------------+ | 4.14.98-2.2.0-sumo | 4.14.98-2.2.0 | TX8M series, TX6 series, TXUL series | | | | , *(Added: TX8M-ND00)* | +-----------------------+----------------+--------------------------------------+ | 4.14.98-2.0.0_ga-sumo | 4.14.98-2.0.0 | TX8M series (TX8M-1610 only), | | | | TX6 series, TXUL series | +-----------------------+----------------+--------------------------------------+ The directory ``karo-nxp-bsp`` is just an example and can be chosen free. .. code-block:: shell mkdir karo-nxp-bsp cd karo-nxp-bsp repo init -u https://github.com/karo-electronics/karo-nxp-bsp -b repo sync You can update the codebase if you want to, which can be performed via the following command: .. code-block:: shell repo sync If errors occur during repo initialization, try deleting the ``.repo`` directory and running the repo initialization command again. Building Images ---------------- Continue depending on the Module you want to build images for: .. toctree:: :maxdepth: -1 BuildTX8M BuildTX6 .. [1] Copied from the official `NXP Yocto Project User's Guide `_, mentioned above.