.. _yocto-scarthgap-setup: BSP Setup ========= Setting up Git -------------- If not already done, setup git with the commands below: .. prompt:: :prompts: $ 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: 1. Create a bin folder in the home directory: .. prompt:: :prompts: $ mkdir -p ~/bin 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: .. hint:: If the ``bin`` folder is already included in your PATH variable, you should skip this step. .. code-block:: text 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 the ``sources`` directory of the NXP BSP or the ``layers`` directory of the Mainline BSP, which contains the recipes and machine configurations used to build the images. Depending on your module you want to checkout different repositories: * **Mainline BSP** (STM32MP, RZ/G2L): ``karo-bsp`` * **NXP BSP** (i.MX): ``karo-nxp-bsp`` The following commands check out the ``scarthgap`` branch of the Mainline BSP: .. prompt:: :prompts: $ mkdir karo-bsp cd karo-bsp repo init -u https://github.com/karo-electronics/ -b scarthgap repo sync .. note:: The directory ``karo-bsp`` is just an example and can be chosen freely. If errors occur during repo initialization, try deleting the ``.repo`` directory and running the repo initialization commands again.