2 title: Initializing Your Build Environment
5 Part of the downloaded AGL software is a setup script that you must
6 run to initialize the build environment.
8 ## `aglsetup.sh` Script
10 You can find this script here:
13 $AGL_TOP/lamprey/meta-agl/scripts/aglsetup.sh
16 The script accepts many options that allow you to define build parameters such
17 as the target hardware (i.e. the machine), build directory, and so forth.
18 Use the following commands to see the available options and script syntax:
22 $ source meta-agl/scripts/aglsetup.sh -h
25 ## AGL Machines (board support)
27 Your target platform will be selected with the `-m` flag.
28 The MACHINE can be selected from the templates in `meta-agl/templates/machine/*`.
29 Note: This is also the place where you can add new boards.
31 Following is a list of the available machines (level of support varies!):
67 Before running the `aglsetup.sh`, you should understand what AGL features you
68 want to include as part of your image.
69 The script's help output lists available features and shows you the layers in
72 Following is a list of the available features:
77 agl-all-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire agl-netboot )
82 agl-ci-change-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire agl-devel agl-package-management agl-netboot agl-pipewire agl-cloudproxy agl-buildstats agl-ptest )
83 agl-ci-change-features-nogfx :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire agl-devel agl-package-management agl-netboot agl-pipewire agl-cloudproxy agl-buildstats agl-ptest )
84 agl-ci-snapshot-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire agl-devel agl-package-management agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest )
85 agl-ci-snapshot-features-nogfx :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire agl-devel agl-package-management agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest )
86 agl-devel :( agl-package-management )
92 agl-package-management
100 agl-virt-xen :( agl-virt )
101 agl-weston-remoting :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire )
102 agl-weston-waltham-remoting :( agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire )
105 agl-cluster-demo-support :( agl-weston-remoting agl-demo agl-appfw-smack agl-hmi-framework agl-pipewire )
106 agl-demo :( agl-appfw-smack agl-hmi-framework agl-pipewire )
112 agl-lxc :( agl-virt agl-drm-lease )
114 agl-voiceagent-alexa-wakeword :( agl-voiceagent-alexa )
117 To find out exactly what a feature provides, check out the respective layer and its README.
119 An AGL feature is a configuration that accounts for specific settings
120 and dependencies needed for a particular build.
121 For example, specifying the "agl-demo" feature makes sure that the
122 `aglsetup.sh` script creates configuration files needed to build the
123 image for the AGL demo.
125 Following are brief descriptions of the AGL features you can specify on the
126 `aglsetup.sh` command line:
128 * **agl-all-features**: A set of AGL default features.
129 Do not think of this set of features as all the AGL features.
131 * **agl-appfw-smack**: Enables IoT.bzh Application Framework plus SMACK and
134 * **agl-archiver**: Enables the archiver class for releases.
136 * **agl-ci**: Flags used for Continuous Integration (CI).
137 Using this feature changes the value of the
138 [`IMAGE_FSTYPES`](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#var-IMAGE_FSTYPES)
141 * **agl-ci-change-features**: Enables features for CI builds for Gerrit changes.
143 * **agl-ci-change-features-nogfx**: Enables features for CI builds for Gerrit changes
144 for targets that use binary graphics drivers (i.e. builds without graphics).
146 * **agl-ci-snapshot-features**: Enables features for CI daily snapshot builds.
148 * **agl-ci-snapshot-features-nogfx**: Enables features for CI daily snapshot builds for
149 targets that use binary graphics drivers (i.e. builds without graphics).
151 * **agl-devel**: Activates development options such as an empty root password,
152 debuggers, strace, valgrind, and so forth.
154 * **agl-netboot**: Enables network boot support through Trivial File Transfer Protocol (TFTP) and Network Block Device (NBD) protocol.
155 Netboot is needed for CI and useful for development to avoid writing
156 sdcards. Needs additional setup.
159 * **agl-profile**: A group or set of Layers and a Package Group as used
160 by the Yocto Project.
161 This feature helps define dependency for various profiles and layers
162 used during the build.
163 For example, "agl-demo" depends on "agl-profile-graphical-qt", which
164 in turn depends on "agl-profile-graphical", which in turn depends
165 on "agl-profile-core".
167 agl-profile-graphical
168 agl-profile-graphical-html5
169 agl-profile-graphical-qt5
171 agl-profile-telematics
173 **NOTE:** For information on Package Groups, see the
174 "[Customizing Images Using Custom Package Groups](https://www.yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-customtasks)"
175 section in the Yocto Project Development Tasks Manual.
176 You can also find general information about Layers in the
177 "[Layers](https://www.yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#yocto-project-layers)"
178 section in that same manual.
181 * **agl-ptest**: Enables
182 [Ptest](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#testing-packages-with-ptest)
183 as part of the build.
185 * **agl-demo**: Enables the layers meta-agl-demo and meta-qt5.
186 You need agl-demo if you are going to build the agl-demo-platform.
188 * **agl-pipewire**: Enables AGLs pipewire support.
190 * **agl-localdev**: Adds a local layer named "meta-localdev" in the
191 meta directory and a local.dev.inc configuration file when that file
194 This feature provides a shortcut for using the layer meta-localdev
195 in the top-level folder for easy modifications to your own recipes.
199 Following is an example that initializes the build environment, selects "beaglebone"
200 for the machine, and chooses the "agl-demo" feature, which also includes the
201 "agl-appfw-smack", "agl-devel", and "agl-hmi-framework" features:
204 $ source meta-agl/scripts/aglsetup.sh -m qemux86-64 -b qemux86-64 agl-demo agl-devel
205 aglsetup.sh: Starting
206 Generating configuration files:
207 Build dir: /home/scottrif/workspace_agl/build
209 Features: agl-appfw-smack agl-demo agl-devel
210 Running /home/scottrif/workspace_agl/poky/oe-init-build-env
211 Templates dir: /home/scottrif/workspace_agl/meta-agl/templates/base
212 Config: /home/scottrif/workspace_agl/build/conf/bblayers.conf
213 Config: /home/scottrif/workspace_agl/build/conf/local.conf
214 Setup script: /home/scottrif/workspace_agl/build/conf/setup.sh
215 Executing setup script ... --- beginning of setup script
216 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/01_setup_EULAfunc.sh
217 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/99_setup_EULAconf.sh
220 Generating setup file: /home/scottrif/workspace_agl/build/agl-init-build-env ... OK
222 Shell environment set up for builds.
223 You can now run 'bitbake target'
225 - meta-agl: (core system)
231 agl-image-ivi-crosssdk
235 - meta-agl-demo: (demo with UI)
236 agl-demo-platform (* default demo target)
238 agl-demo-platform-crosssdk
239 agl-demo-platform-html5
242 Running the script creates the Build Directory if it does not already exist.
243 The default Build Directory is `$AGL_TOP/<release-branch-name>/build`, and the nomenclature to be used throughout this doc is going to be `$AGL_TOP/<release-branch-name>/<build-dir>`
244 For this example, the Build Directory is `$AGL_TOP/lamprey/qemux86-64`.
246 The script's output also indicates the machine and AGL features selected for the build.
248 The script creates two primary configuration files used for the build: `local.conf` and `bblayers.conf`.
249 Both these configuration files are located in the Build Directory in the `conf` folder.
250 If you were to examine these files, you would find standard Yocto Project
251 configurations along with AGL configuration fragments, which are driven by the
252 machine (i.e. beaglebone) and the AGL features specified as part of the
253 script's command line.
255 The end result is configuration files specific for your build in the AGL development environment.
257 Finally, part of the `aglsetup.sh` script makes sure that any End User License Agreements (EULA)
259 You can see that processing in the script's output as well.
261 **NOTE:** Use of the `local.conf` and `bblayers.conf` configuration files is fundamental
262 in the Yocto Project build environment.
263 Consequently, it is fundamental in the AGL build environment.
264 You can find lots of information on configuring builds in the Yocto Project
266 Here are some references if you want to dig into configuration further:
268 * [Customizing Images Using local.conf](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-localconf)
269 * [Local](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#ref-varlocality-config-local)
270 * [build/conf/local.conf](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#structure-build-conf-local.conf)
271 * [build/conf/bblayers.conf](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf)
272 * [BBLAYERS](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#var-BBLAYERS)
273 * [User Configuration](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#user-configuration)
274 * [Enabling Your Layer](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#enabling-your-layer)