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/master/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!):
36 bbe # BeagleBoneEnhanced
37 beaglebone # BeagleBone
38 cubox-i # multiple i.MX6 boards
40 dra7xx-evm # TI DRA7xx-EVM 'vayu'
41 dragonboard-410c # Qualcomm Dragonboard 410c
42 dragonboard-820c # Qualcomm Dragonboard 820c
43 ebisu # Renesas RCar Ebisu
44 h3-salvator-x # Renesas RCar Salvator/H3
45 h3ulcb # Renesas RCar H3
46 h3ulcb-kf # Renesas RCar H3 w Kingfisher Board
47 h3ulcb-nogfx # Renesas RCar H3 w/o gfx blobs
49 imx6qdlsabreauto # i.MX6 sabreauto
50 imx8mqevk # i.MX8 w etnaviv
51 imx8mqevk-viv # i.MX8 w vivante
52 intel-corei7-64 # x86-64 (Intel flavour)
53 m3-salvator-x # Renesas RCar Salvator/M3
54 m3ulcb # Renesas RCar M3
55 m3ulcb-kf # Renesas RCar M3 w Kingfisher Board
56 m3ulcb-nogfx # Renesas RCAR M3 w/o gfx blobs
57 nitrogen6x # i.MX6 nitrogen board
59 qemuarm64 # Qemu AArch 64 (ARM 64bit)
60 * qemux86-64 # Qemu x86-64
61 raspberrypi4 # Raspberry Pi 4
66 Before running the `aglsetup.sh`, you should understand what AGL features you
67 want to include as part of your image.
68 The script's help output lists available features and shows you the layers in
71 Following is a list of the available features:
76 agl-all-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-netboot )
81 agl-ci-change-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-devel agl-netboot agl-pipewire agl-cloudproxy agl-buildstats agl-ptest )
82 agl-ci-change-features-nogfx :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-devel agl-netboot agl-pipewire agl-cloudproxy agl-buildstats agl-ptest )
83 agl-ci-snapshot-features :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-devel agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest )
84 agl-ci-snapshot-features-nogfx :( agl-demo agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework agl-devel agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest )
91 agl-profile-cluster :( agl-profile-graphical )
92 agl-profile-cluster-qt5 :( agl-profile-graphical-qt5 agl-profile-graphical )
94 agl-profile-graphical-html5 :( agl-profile-graphical )
95 agl-profile-graphical-qt5 :( agl-profile-graphical )
97 agl-profile-telematics
103 agl-virt-xen :( agl-virt )
104 agl-weston-remoting :( agl-profile-graphical )
105 [meta-agl-cluster-demo]
106 agl-cluster-demo :( agl-profile-cluster-qt5 agl-profile-graphical-qt5 agl-profile-graphical agl-hmi-framework )
107 agl-cluster-demo-preload
110 agl-cluster-demo-support :( agl-weston-remoting agl-profile-graphical )
111 agl-demo :( agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-pipewire agl-speech-framework )
113 agl-demo-soundmanager :( agl-appfw-smack agl-hmi-framework agl-profile-graphical-qt5 agl-profile-graphical agl-audio-soundmanager-framework )
117 agl-voiceagent-alexa :( agl-speech-framework )
118 agl-voiceagent-alexa-wakeword :( agl-voiceagent-alexa agl-speech-framework )
121 [meta-agl-telematics-demo]
122 agl-telematics-demo :( agl-profile-telematics )
125 To find out exactly what a feature provides, check out the respective layer and its README.
127 An AGL feature is a configuration that accounts for specific settings
128 and dependencies needed for a particular build.
129 For example, specifying the "agl-demo" feature makes sure that the
130 `aglsetup.sh` script creates configuration files needed to build the
131 image for the AGL demo.
133 Following are brief descriptions of the AGL features you can specify on the
134 `aglsetup.sh` command line:
136 * **agl-all-features**: A set of AGL default features.
137 Do not think of this set of features as all the AGL features.
139 * **agl-appfw-smack**: Enables IoT.bzh Application Framework plus SMACK and
142 * **agl-archiver**: Enables the archiver class for releases.
144 * **agl-ci**: Flags used for Continuous Integration (CI).
145 Using this feature changes the value of the
146 [`IMAGE_FSTYPES`](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#var-IMAGE_FSTYPES)
149 * **agl-ci-change-features**: Enables features for CI builds for Gerrit changes.
151 * **agl-ci-change-features-nogfx**: Enables features for CI builds for Gerrit changes
152 for targets that use binary graphics drivers (i.e. builds without graphics).
154 * **agl-ci-snapshot-features**: Enables features for CI daily snapshot builds.
156 * **agl-ci-snapshot-features-nogfx**: Enables features for CI daily snapshot builds for
157 targets that use binary graphics drivers (i.e. builds without graphics).
159 * **agl-devel**: Activates development options such as an empty root password,
160 debuggers, strace, valgrind, and so forth.
162 * **agl-netboot**: Enables network boot support through Trivial File Transfer Protocol (TFTP) and Network Block Device (NBD) protocol.
163 Netboot is needed for CI and useful for development to avoid writing
164 sdcards. Needs additional setup.
167 * **agl-profile**: A group or set of Layers and a Package Group as used
168 by the Yocto Project.
169 This feature helps define dependency for various profiles and layers
170 used during the build.
171 For example, "agl-demo" depends on "agl-profile-graphical-qt", which
172 in turn depends on "agl-profile-graphical", which in turn depends
173 on "agl-profile-core".
175 agl-profile-graphical
176 agl-profile-graphical-html5
177 agl-profile-graphical-qt5
179 agl-profile-telematics
181 **NOTE:** For information on Package Groups, see the
182 "[Customizing Images Using Custom Package Groups](https://www.yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-customtasks)"
183 section in the Yocto Project Development Tasks Manual.
184 You can also find general information about Layers in the
185 "[Layers](https://www.yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#yocto-project-layers)"
186 section in that same manual.
189 * **agl-ptest**: Enables
190 [Ptest](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#testing-packages-with-ptest)
191 as part of the build.
193 * **agl-sota**: Enables Software Over-the-Air (SOTA) components and dependencies.
194 Includes meta-updater, meta-updater-qemux86-64, meta-filesystems, and meta-python.
196 * **agl-demo**: Enables the layers meta-agl-demo and meta-qt5.
197 You need agl-demo if you are going to build the agl-demo-platform.
199 * **agl-sdl**: Enables or adds SDL to the build.
201 * **agl-pipewire**: Enables AGLs pipewire support.
203 * **agl-audio-soundmanager-framework**: Enables Soundmanager framework, which is an exclusive switch for audio framework.
205 * **agl-localdev**: Adds a local layer named "meta-localdev" in the
206 meta directory and a local.dev.inc configuration file when that file
209 This feature provides a shortcut for using the layer meta-localdev
210 in the top-level folder for easy modifications to your own recipes.
214 Following is an example that initializes the build environment, selects "beaglebone"
215 for the machine, and chooses the "agl-demo" feature, which also includes the
216 "agl-appfw-smack", "agl-devel", and "agl-hmi-framework" features:
219 $ source meta-agl/scripts/aglsetup.sh -m qemux86-64 -b qemux86-64 agl-demo agl-devel
220 aglsetup.sh: Starting
221 Generating configuration files:
222 Build dir: /home/scottrif/workspace_agl/build
224 Features: agl-appfw-smack agl-demo agl-devel
225 Running /home/scottrif/workspace_agl/poky/oe-init-build-env
226 Templates dir: /home/scottrif/workspace_agl/meta-agl/templates/base
227 Config: /home/scottrif/workspace_agl/build/conf/bblayers.conf
228 Config: /home/scottrif/workspace_agl/build/conf/local.conf
229 Setup script: /home/scottrif/workspace_agl/build/conf/setup.sh
230 Executing setup script ... --- beginning of setup script
231 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/01_setup_EULAfunc.sh
232 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/99_setup_EULAconf.sh
235 Generating setup file: /home/scottrif/workspace_agl/build/agl-init-build-env ... OK
237 Shell environment set up for builds.
238 You can now run 'bitbake target'
240 - meta-agl: (core system)
246 agl-image-ivi-crosssdk
250 - meta-agl-demo: (demo with UI)
251 agl-demo-platform (* default demo target)
253 agl-demo-platform-crosssdk
254 agl-demo-platform-html5
257 Running the script creates the Build Directory if it does not already exist.
258 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>`
259 For this example, the Build Directory is `$AGL_TOP/master/qemux86-64`.
261 The script's output also indicates the machine and AGL features selected for the build.
263 The script creates two primary configuration files used for the build: `local.conf` and `bblayers.conf`.
264 Both these configuration files are located in the Build Directory in the `conf` folder.
265 If you were to examine these files, you would find standard Yocto Project
266 configurations along with AGL configuration fragments, which are driven by the
267 machine (i.e. beaglebone) and the AGL features specified as part of the
268 script's command line.
270 The end result is configuration files specific for your build in the AGL development environment.
272 Finally, part of the `aglsetup.sh` script makes sure that any End User License Agreements (EULA)
274 You can see that processing in the script's output as well.
276 **NOTE:** Use of the `local.conf` and `bblayers.conf` configuration files is fundamental
277 in the Yocto Project build environment.
278 Consequently, it is fundamental in the AGL build environment.
279 You can find lots of information on configuring builds in the Yocto Project
281 Here are some references if you want to dig into configuration further:
283 * [Customizing Images Using local.conf](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-localconf)
284 * [Local](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#ref-varlocality-config-local)
285 * [build/conf/local.conf](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#structure-build-conf-local.conf)
286 * [build/conf/bblayers.conf](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#structure-build-conf-bblayers.conf)
287 * [BBLAYERS](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#var-BBLAYERS)
288 * [User Configuration](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#user-configuration)
289 * [Enabling Your Layer](https://yoctoproject.org/docs/3.1.4/dev-manual/dev-manual.html#enabling-your-layer)