2 title: Downloading AGL Software
5 Once you have determined the build host can build an AGL image,
6 you need to download the AGL source files.
7 The AGL source files, which includes the Yocto Project layers, are
8 maintained on the AGL Gerrit server.
9 For information on how to create accounts for Gerrit, see the
10 [Getting Started with AGL](https://wiki.automotivelinux.org/start/getting-started)
13 **NOTE:** Further information about Download and Build AGL Source Code available at [AGL wiki](https://wiki.automotivelinux.org/agl-distro/source-code).
15 The remainder of this section provides steps on how to download the AGL source files:
17 1. **Define Your Top-Level Directory:**
18 You can define an environment variable as your top-level AGL workspace folder.
19 Following is an example that defines the `$HOME/workspace_agl` folder using
20 an environment variable named "AGL_TOP":
23 $ export AGL_TOP=$HOME/AGL
24 $ echo 'export AGL_TOP=$HOME/AGL' >> $HOME/.bashrc
28 2. **Download the `repo` Tool and Set Permissions:**
29 AGL Uses the `repo` tool for managing repositories.
30 Use the following commands to download the tool and then set its
31 permissions to allow for execution:
35 $ export PATH=$HOME/bin:$PATH
36 $ echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
37 $ curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/bin/repo
38 $ chmod a+x $HOME/bin/repo
42 "[Repo Command Reference](https://source.android.com/setup/develop/repo)"
43 for more information on the `repo` tool.
45 3. **Download the AGL Source Files:**
48 Using the latest stable release gives you a solid snapshot of the
50 The release is static, tested, and known to work.
51 To download the latest stable release branch (i.e. Jellyfish), use
52 the following commands:
58 $ repo init -b jellyfish -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
62 Once you `sync` the repository, you have the AGL files in the form of
63 "layers" (e.g. `meta-*` folders).
64 You also have the `poky` repository in your AGL workspace.
66 Listing out the resulting directory structure appears as follows:
74 ├── meta-agl-cluster-demo
78 └── meta-agl-telematics-demo