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
39 dragonboard-410c # Qualcomm Dragonboard 410c
40 dragonboard-820c # Qualcomm Dragonboard 820c
41 ebisu # Renesas RCar Ebisu
42 h3-salvator-x # Renesas RCar Salvator/H3
43 h3ulcb # Renesas RCar H3
44 h3ulcb-kf # Renesas RCar H3 w Kingfisher Board
45 h3ulcb-nogfx # Renesas RCar H3 w/o gfx blobs
47 imx6qdlsabreauto # i.MX6 sabreauto
48 imx8mqevk # i.MX8 w etnaviv
49 imx8mqevk-viv # i.MX8 w vivante
50 intel-corei7-64 # x86-64 (Intel flavour)
51 j7-evm # TI Jacinto 7 EVM
52 m3-salvator-x # Renesas RCar Salvator/M3
53 m3ulcb # Renesas RCar M3
54 m3ulcb-kf # Renesas RCar M3 w Kingfisher Board
55 m3ulcb-nogfx # Renesas RCAR M3 w/o gfx blobs
56 nitrogen6x # i.MX6 nitrogen board
58 qemuarm64 # Qemu AArch 64 (ARM 64bit)
59 * qemux86-64 # Qemu x86-64
60 raspberrypi4 # Raspberry Pi 4
61 virtio-aarch64 # Virtio Guest
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 [meta-agl] # CORE layer
78 Refer: https://git.automotivelinux.org/AGL/meta-agl/tree/templates/feature
79 agl-all-features # For the usual demo image
80 agl-app-framework # Application Framework
81 agl-archiver # Source Archiver
82 agl-buildstats # Build Statistics
83 agl-ci-change-features-nogfx # CI: features enabled for gerrit change builds w/o gfx
84 agl-ci-change-features # CI: features enabled for gerrit change builds with gfx
85 agl-ci-snapshot-features-nogfx # CI: features enabled for nightly builds w/o gfx
86 agl-ci-snapshot-features # CI: features enabled for nightly builds with gfx
87 agl-ci # CI: specific settings for the CI environment
88 agl-create-spdx # Software Bill of Materials (SBOM) generation
89 agl-devel :( agl-package-management ) # Developer Env (root login w/o pass)
90 agl-fossdriver # Fossology integration, Scancode, etc.
91 agl-localdev # inclusion of local development folder ./meta-localdev
92 agl-netboot # network boot (e.g. in CI)
93 agl-package-management # include package management (e.g. rpm)
94 agl-pipewire # include pipewire
95 agl-ptest # enable ptest pckages
96 agl-refhw-h3 # enable reference hardware when building h3ulcb machine
97 agl-selinux # Enables building with SELinux
98 agl-virt # EG-Virt features
99 agl-virt-guest-xen # EG-Virt features
100 agl-virt-xen # EG-Virt features
101 agl-weston-remoting # remote streaming support
102 agl-weston-waltham-remoting # remote streaming support w/ waltham
104 [meta-agl-demo] # DEMO layer
105 Refer: https://git.automotivelinux.org/AGL/meta-agl-demo/tree/templates/feature
106 agl-demo-cluster-support # Add streaming to cluster of AGL demo system
107 agl-demo-preload # Add Tokens and sample files specific to AGL demo system
108 agl-demo # default IVI demo
109 agl-kvm # Enables support for building multiconfig based KVM+QEMU demo images
111 [meta-agl-devel] # Development layer
112 Refer: https://git.automotivelinux.org/AGL/meta-agl-devel/tree/templates/feature
113 agl-basesystem # Toyota basesystem
114 agl-drm-lease # DRM lease support
115 agl-egvirt # EG-Virt feature
116 agl-flutter # Flutter support
117 agl-ic-container # Instrument Cluster EG demo using containers
118 agl-jailhouse # GSoC: jailhouse enablement
119 agl-offline-voice-agent # Feature template for meta-offline-voice-agent layer
120 agl-test # Test framework under development
124 To find out exactly what a feature provides, check out the respective layer and its README.
126 An AGL feature is a configuration that accounts for specific settings
127 and dependencies needed for a particular build.
128 For example, specifying the "agl-demo" feature makes sure that the
129 `aglsetup.sh` script creates configuration files needed to build the
130 image for the AGL demo.
132 Following are brief descriptions of the AGL features you can specify on the
133 `aglsetup.sh` command line:
135 * **agl-all-features**: A set of AGL default features.
136 Do not think of this set of features as all the AGL features.
138 * **agl-app-framework**: Application Framework
140 * **agl-archiver**: Enables the archiver class for releases.
142 * **agl-ci**: Flags used for Continuous Integration (CI).
143 Using this feature changes the value of the
144 [`IMAGE_FSTYPES`](https://yoctoproject.org/docs/3.1.4/ref-manual/ref-manual.html#var-IMAGE_FSTYPES)
147 * **agl-ci-change-features**: Enables features for CI builds for Gerrit changes.
149 * **agl-ci-change-features-nogfx**: Enables features for CI builds for Gerrit changes
150 for targets that use binary graphics drivers (i.e. builds without graphics).
152 * **agl-ci-snapshot-features**: Enables features for CI daily snapshot builds.
154 * **agl-ci-snapshot-features-nogfx**: Enables features for CI daily snapshot builds for
155 targets that use binary graphics drivers (i.e. builds without graphics).
157 * **agl-devel**: Activates development options such as an empty root password,
158 debuggers, strace, valgrind, and so forth.
160 * **agl-netboot**: Enables network boot support through Trivial File Transfer Protocol (TFTP) and Network Block Device (NBD) protocol.
161 Netboot is needed for CI and useful for development to avoid writing
162 sdcards. Needs additional setup.
164 * **agl-ptest**: Enables
165 [Ptest](https://docs.yoctoproject.org/dev-manual/common-tasks.html#testing-packages-with-ptest)
166 as part of the build.
168 * **agl-demo**: Enables the layers meta-agl-demo and meta-qt5.
169 You need agl-demo if you are going to build the agl-demo-platform.
171 * **agl-pipewire**: Enables AGLs pipewire support.
173 * **agl-localdev**: Adds a local layer named "meta-localdev" in the
174 meta directory and a local.dev.inc configuration file when that file
177 This feature provides a shortcut for using the layer meta-localdev
178 in the top-level folder for easy modifications to your own recipes.
182 Following is an example that initializes the build environment, selects "beaglebone"
183 for the machine, and chooses the "agl-demo" feature, which also includes the
184 "agl-appfw-smack", "agl-devel", and "agl-hmi-framework" features:
187 $ source meta-agl/scripts/aglsetup.sh -m qemux86-64 -b qemux86-64 agl-demo agl-devel
188 aglsetup.sh: Starting
189 Generating configuration files:
190 Build dir: /home/scottrif/workspace_agl/build
192 Features: agl-appfw-smack agl-demo agl-devel
193 Running /home/scottrif/workspace_agl/poky/oe-init-build-env
194 Templates dir: /home/scottrif/workspace_agl/meta-agl/templates/base
195 Config: /home/scottrif/workspace_agl/build/conf/bblayers.conf
196 Config: /home/scottrif/workspace_agl/build/conf/local.conf
197 Setup script: /home/scottrif/workspace_agl/build/conf/setup.sh
198 Executing setup script ... --- beginning of setup script
199 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/01_setup_EULAfunc.sh
200 fragment /home/scottrif/workspace_agl/meta-agl/templates/base/99_setup_EULAconf.sh
203 Generating setup file: /home/scottrif/workspace_agl/build/agl-init-build-env ... OK
205 Shell environment set up for builds.
206 You can now run 'bitbake target'
208 - meta-agl: (core system)
214 agl-image-ivi-crosssdk
218 - meta-agl-demo: (demo with UI)
219 agl-demo-platform (* default demo target)
221 agl-demo-platform-crosssdk
222 agl-demo-platform-html5
225 Running the script creates the Build Directory if it does not already exist.
226 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>`
227 For this example, the Build Directory is `$AGL_TOP/master/qemux86-64`.
229 The script's output also indicates the machine and AGL features selected for the build.
231 The script creates two primary configuration files used for the build: `local.conf` and `bblayers.conf`.
232 Both these configuration files are located in the Build Directory in the `conf` folder.
233 If you were to examine these files, you would find standard Yocto Project
234 configurations along with AGL configuration fragments, which are driven by the
235 machine (i.e. beaglebone) and the AGL features specified as part of the
236 script's command line.
238 The end result is configuration files specific for your build in the AGL development environment.
240 Finally, part of the `aglsetup.sh` script makes sure that any End User License Agreements (EULA)
242 You can see that processing in the script's output as well.
244 **NOTE:** Use of the `local.conf` and `bblayers.conf` configuration files is fundamental
245 in the Yocto Project build environment.
246 Consequently, it is fundamental in the AGL build environment.
247 You can find lots of information on configuring builds in the Yocto Project
249 Here are some references if you want to dig into configuration further:
251 * [Customizing Images Using local.conf](https://docs.yoctoproject.org/dev-manual/common-tasks.html#customizing-images-using-local-conf)
252 * [Local](https://docs.yoctoproject.org/ref-manual/varlocality.html#local)
253 * [build/conf/local.conf](https://docs.yoctoproject.org/ref-manual/structure.html#build-conf-local-conf)
254 * [build/conf/bblayers.conf](https://docs.yoctoproject.org/ref-manual/structure.html#build-conf-bblayers-conf)
255 * [BBLAYERS](https://docs.yoctoproject.org/ref-manual/variables.html#term-BBLAYERS)
256 * [User Configuration](https://docs.yoctoproject.org/ref-manual/structure.html#build)
257 * [Enabling Your Layer](https://docs.yoctoproject.org/dev-manual/common-tasks.html#enabling-your-layer)