Google Repo

repo
#1

To simplify fetching sources and setting up the Yocto build environment we have decided to use the Google repo tool, which allows fetching sources from multiple location in a single command based on manifest files (xml).

Google repo is widely used within the Yocto community and we have simply adopted the “best practice” for Mender integrations.

The following is a one time installation of Google repo.

Create directory for repo

mkdir ${HOME}/bin

Fetch the repo script

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo

Set the executable bit

chmod a+x ${HOME}/bin/repo

You should also add the following to your .bashrc or equivalent, for convenience.

PATH=${PATH}:~/bin

Troubleshooting

Git user configuration

The repo tool is a wrapper for git and it will print out an error if you have not setup your git identity. You can do this by simply running:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

This will store the configuration globally ($HOME/.gitconfig) and is only required to setup once.

missing python

The repo tool depends on availability of python on the system, e.g Ubuntu 18.04.2 LTS comes with python3 installed by default but not python; to install:

sudo apt install -y python
0 Likes

About the Yocto Project category
pinned #2
0 Likes

Variscite DART-MX6
Hardkernel ODROID-C28
Variscite var-som-solo
Technexion PICO-IMX7D SOM
QEMU, the FAST! processor emulator
Compulab CL-SOM-iMX8
Boundary Devices - Nitrogen8m
SolidRun ClearFog Base
Intel® NUC
Running Mender together with Automotive Grade Linux (AGL)
[ Topic template ]
Microchip SAMA5D3 Xplained
Boundary Devices - Nitrogen6X
NVIDIA Tegra Jetson TX2
Microchip SAMA5d27-SOM1-EK1
OrangePi Zero
Compulab CL-SOM-iMX6
MinnowBoard Turbot
Technexion PICO-PI-IMX7
Toradex Colibri iMX7 Dual 512MB / Colibri iMX7 Solo 256MB
NXP WaRP7
Toradex Colibri iMX7 Dual 1GB
UP Squared (UP2)
Raspberry Pi Compute Module 3
BeagleBone Black
Raspberry Pi 0 Wifi
OrangePi PC Plus
Renesas R-Car M3 Starter Kit Pro
NanoPi M1 Plus
Asus Tinker Board
Raspberry Pi 3 Model B/B+
#3

Note that Ubuntu 18.04.2 LTS comes with python3 installed by default but not python; to install for repo:

sudo apt install -y python
1 Like

#4

Also useful is setting your git color preference, which avoids having git ask for your preference when running repo for the first time:

git config --global color.ui false
0 Likes