6.2. Platform Pipeline

This section contains direct excerpts and quotes from publicly accessible documentation: Revision Control of your Embedded Linux System — © 2019 Ville Baillie.

../_images/lpn-central-bsp-pipeline.svg

Figure 6.1 Revision Control of your Embedded Linux System using Git repo

Revision Control of your Embedded Linux System

Using Yocto you’ll need to juggle several repositories at once. You’ll have your “poky” repository (typically you’ll get this from https://git.yoctoproject.org/git/poky), then you’ll have your OpenEmbedded layer (usually retrieved from https://github.com/openembedded/meta-openembedded.git).

In addition, you’ll also have your SoC and SoM specific layers, and then you’ll probably have your own project specific layer. So you may have anywhere up to 10 or possibly more repositories to handle.

Earlier in this series, a short introduction to the tool named repo was given. This tool allows multiple git repositories to be handled together as a cohesive whole. At its heart is the idea of a manifest, which is simply a list of git repositories and commit IDs (or tags or branches), and how to arrange them on your local filesystem. The repo comes in two parts: One is the repo launcher you download and install. It’s a Python script that communicates with the second part and knows how to initialize a checkout and can download the second part, the full repo tool included in a source code checkout. To install repo, e.g. from the lipro-yocto setup:

mkdir -p ~/.local/bin
curl https://raw.githubusercontent.com/lipro-yocto/git-repo/lpn-launcher/repo > \
     ~/.local/bin/repo
chmod a+x ~/.local/bin/repo
sha1sum ~/.local/bin/repo

For repo launcher version 2.12.2.2021.2.20, the SHA-1 checksum for repo is 93cab6406f072e78874dac1d891427c84189f0b6.

Optionally verify the launcher matches the correct signature:

gpg --recv-key 5BA1FE49FB5F4F60C974D991579B34AFDE6AB439
curl https://raw.githubusercontent.com/lipro-yocto/git-repo/lpn-launcher/repo.asc | \
     gpg --verify - ~/.local/bin/repo

Alternatively, of course, the original can also be downloaded and installed directly from Google.

Basic repo usage

You need to create a repository to hold your manifest file (I know another repository) is the last thing you need. But this can be on your local machine if you wish, at least to begin with.

Once this is done, you should find a folder in which you wish to keep all your sources, and run the following, e.g. from the lipro-yocto setup:

mkdir lpn-central-bsp
cd lpn-central-bsp
repo init --manifest-url=https://github.com/lipro-yocto/lpn-central-repo \
          --manifest-branch=master --manifest-name=default.xml

This sets up the current directory as the working directory for this repo manifest. Now you can run:

repo sync

…which will fetch all the repositories into the local directory. If you want to see if everything is as it should be (no changes in the repositories and branches with respect to their upstream brothers) you can run:

repo status

…and if you want to update everything to the manifest discarding all changes you can run

repo sync --detach

These tools should give you enough get starting and going with repo and Embedded Linux development. The original project page has a more comprehensive command line documentation and should always be consulted if there are any questions.