blob: 963b2112236d41ac8eee635d074f12f37cfb0f4e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='toaster-manual-setup-and-use'>
6
7<title>Setting Up and Using Toaster</title>
8
Patrick Williamsf1e5d692016-03-30 15:21:19 -05009 <section id='starting-toaster-for-local-development'>
10 <title>Starting Toaster for Local Development</title>
11
12 <para>
13 Once you have set up the Yocto Project and installed the
14 Toaster system dependencies as described in
15 "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>",
16 you are ready to start Toaster.
17 </para>
18
19 <para>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020 Navigate to the root of your
Patrick Williamsf1e5d692016-03-30 15:21:19 -050021 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
22 (e.g. <filename>poky</filename>):
23 <literallayout class='monospaced'>
24 $ cd poky
25 </literallayout>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050026 Once in that directory, source the build environment script:
27 <literallayout class='monospaced'>
28 $ source oe-init-build-env
29 </literallayout>
30 Next, from the build directory (e.g.
31 <filename>poky/build</filename>), start Toaster using this
32 command:
33 <literallayout class='monospaced'>
34 $ source ../bitbake/bin/toaster
35 </literallayout>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050036 You can now run your builds from the command line, or with
37 Toaster as explained in section
38 "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>".
Patrick Williamsf1e5d692016-03-30 15:21:19 -050039 </para>
40
41 <para>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042 To access the Toaster web interface, open your favorite
43 browser and enter the following:
Patrick Williamsf1e5d692016-03-30 15:21:19 -050044 <literallayout class='monospaced'>
45 http://127.0.0.1:8000
46 </literallayout>
47 </para>
48 </section>
49
50 <section id='setting-a-different-port'>
51 <title>Setting a Different Port</title>
52
53 <para>
54 By default, Toaster starts on port 8000.
55 You can use the <filename>WEBPORT</filename> parameter to
56 set a different port.
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057 For example, the following command sets the port to "8400":
Patrick Williamsf1e5d692016-03-30 15:21:19 -050058 <literallayout class='monospaced'>
59 $ source ../bitbake/bin/toaster webport=8400
60 </literallayout>
61 </para>
62 </section>
63
64 <section id='the-directory-for-cloning-layers'>
65 <title>The Directory for Cloning Layers</title>
66
67 <para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050068 Toaster creates a <filename>_toaster_clones</filename>
69 directory inside your Source Directory
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050070 (i.e. <filename>poky</filename>) to clone any layers
71 needed for your builds.
Patrick Williamsf1e5d692016-03-30 15:21:19 -050072 </para>
73
74 <para>
75 Alternatively, if you would like all of your Toaster related
76 files and directories to be in a particular location other than
77 the default, you can set the <filename>TOASTER_DIR</filename>
78 environment variable, which takes precedence over your current
79 working directory.
80 Setting this environment variable causes Toaster to create and use
81 <filename>$TOASTER_DIR./_toaster_clones</filename>.
82 </para>
83 </section>
84
85 <section id='toaster-the-build-directory'>
86 <title>The Build Directory</title>
87
88 <para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -050089 Toaster creates a build directory within your Source
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050090 Directory (e.g. <filename>poky</filename>) to execute
91 the builds.
Patrick Williamsf1e5d692016-03-30 15:21:19 -050092 </para>
93
94 <para>
95 Alternatively, if you would like all of your Toaster related files
96 and directories to be in a particular location, you can set
97 the <filename>TOASTER_DIR</filename> environment variable,
98 which takes precedence over your current working directory.
99 Setting this environment variable causes Toaster to use
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500100 <filename>$TOASTER_DIR/build</filename> as the build directory.
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500101 </para>
102 </section>
103
104 <section id='toaster-creating-a-django-super-user'>
105 <title>Creating a Django Superuser</title>
106
107 <para>
108 Toaster is built on the
109 <ulink url='https://www.djangoproject.com/'>Django framework</ulink>.
110 Django provides an administration interface you can use
111 to edit Toaster configuration parameters.
112 </para>
113
114 <para>
115 To access the Django administration interface, you must
116 create a superuser by following these steps:
117 <orderedlist>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500118 <listitem><para>
119 If you used <filename>virtualenv</filename>, which is
120 recommended, to set up the Toaster system dependencies,
121 you need be sure the virtual environment is activated.
122 To activate this environment, use the following command:
123 <literallayout class='monospaced'>
124 $ source venv/bin/activate
125 </literallayout>
126 </para></listitem>
127 <listitem><para>
128 From the directory containing the Toaster database,
129 which by default is the
130 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
131 invoke the <filename>createsuperuser</filename> command
132 from <filename>manage.py</filename>:
133 <literallayout class='monospaced'>
134 $ cd ~/poky/build
135 $ ../bitbake/lib/toaster/manage.py createsuperuser
136 </literallayout>
137 </para></listitem>
138 <listitem><para>
139 Django prompts you for the username, which you need to
140 provide.
141 </para></listitem>
142 <listitem><para>
143 Django prompts you for an email address, which is
144 optional.
145 </para></listitem>
146 <listitem><para>
147 Django prompts you for a password, which you must provide.
148 </para></listitem>
149 <listitem><para>
150 Django prompts you to re-enter your password for verification.
151 </para></listitem>
152 </orderedlist>
153 After completing these steps, the following confirmation message
154 appears:
155 <literallayout class='monospaced'>
156 Superuser created successfully.
157 </literallayout>
158 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500159
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500160 <para>
161 Creating a superuser allows you to access the Django administration
162 interface through a browser.
163 The URL for this interface is the same as the URL used for the
164 Toaster instance with "/admin" on the end.
165 For example, if you are running Toaster locally, use the
166 following URL:
167 <literallayout class='monospaced'>
168 http://127.0.0.1:8000/admin
169 </literallayout>
170 You can use the Django administration interface to set Toaster
171 configuration parameters such as the build directory, layer sources,
172 default variable values, and BitBake versions.
173 </para>
174 </section>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500175
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500176 <section id='toaster-setting-up-a-production-instance-of-toaster'>
177 <title>Setting Up a Production Instance of Toaster</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500178
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500179 <para>
180 You can use a production instance of Toaster to share the
181 Toaster instance with remote users, multiple users, or both.
182 The production instance is also the setup that can handle
183 heavier loads on the web service.
184 Use the instructions in the following sections to set up
185 Toaster to run builds through the Toaster web interface.
186 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500187
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500188 <section id='toaster-production-instance-requirements'>
189 <title>Requirements</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500190
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500191 <para>
192 Be sure you meet the following requirements:
193 <note>
194 You must comply with all Apache,
195 <filename>mod-wsgi</filename>, and Mysql requirements.
196 </note>
197 <itemizedlist>
198 <listitem><para>
199 Have all the build requirements as described in
200 "<link linkend='toaster-setting-up-the-basic-system-requirements'>Setting Up the Basic System Requirements</link>"
201 chapter.
202 </para></listitem>
203 <listitem><para>
204 Have an Apache webserver.
205 </para></listitem>
206 <listitem><para>
207 Have <filename>mod-wsgi</filename> for the Apache
208 webserver.
209 </para></listitem>
210 <listitem><para>
211 Use the Mysql database server.
212 </para></listitem>
213 <listitem><para>
214 If you are using Ubuntu 14.04.3, run the following:
215 <literallayout class='monospaced'>
216 $ sudo apt-get install apache2 libapache2-mod-wsgi mysql-server virtualenv libmysqlclient-dev
217 </literallayout>
218 </para></listitem>
219 <listitem><para>
220 If you are using Fedora 22 or a RedHat distribution, run
221 the following:
222 <literallayout class='monospaced'>
223 $ sudo dnf install httpd mod_wsgi python-virtualenv gcc mysql-devel
224 </literallayout>
225 </para></listitem>
226 </itemizedlist>
227 </para>
228 </section>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500229
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500230 <section id='toaster-installation-steps'>
231 <title>Installation</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500232
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500233 <para>
234 Perform the following steps to install Toaster:
235 <orderedlist>
236 <listitem><para>
237 Checkout a copy of <filename>poky</filename>
238 into the web server directory.
239 You will be using <filename>/var/www/toaster</filename>:
240 <literallayout class='monospaced'>
241 $ mkdir -p /var/www/toaster
242 $ cd /var/www/toaster/
243 $ git clone git://git.yoctoproject.org/poky
244 $ git checkout &DISTRO_NAME_NO_CAP;
245 </literallayout>
246 </para></listitem>
247 <listitem><para>
248 Initialize a virtual environment and install Toaster
249 dependencies.
250 Using a virtual environment keeps the Python packages
251 isolated from your system-provided packages:
252 <literallayout class='monospaced'>
253 $ cd /var/www/toaster/
254 $ virtualenv venv
255 $ source ./venv/bin/activate
256 $ pip install -r ./poky/bitbake/toaster-requirements.txt
257 $ pip install mysql
258 $ pip install MySQL-python
259 </literallayout>
260 <note>
261 Isolating these packages is not required but is
262 recommended.
263 Alternatively, you can use your operating system's
264 package manager to install the packages.
265 </note>
266 </para></listitem>
267 <listitem><para>
268 Configure Toaster by editing
269 <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename>
270 as follows:
271 <itemizedlist>
272 <listitem><para>
273 Edit the <filename>DATABASE</filename> settings:
274 <literallayout class='monospaced'>
275 DATABASES = {
276 'default': {
277 'ENGINE': 'django.db.backends.mysql',
278 'NAME': 'toaster_data',
279 'USER': 'toaster',
280 'PASSWORD': 'yourpasswordhere',
281 'HOST': 'localhost',
282 'PORT': '3306',
283 }
284 }
285 </literallayout>
286 </para></listitem>
287 <listitem><para>
288 Edit the <filename>SECRET_KEY</filename>:
289 <literallayout class='monospaced'>
290 SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
291 </literallayout>
292 </para></listitem>
293 <listitem><para>
294 Edit the <filename>STATIC_ROOT</filename>:
295 <literallayout class='monospaced'>
296 STATIC_ROOT = '/var/www/toaster/static_files/'
297 </literallayout>
298 </para></listitem>
299 </itemizedlist>
300 </para></listitem>
301 <listitem><para>
302 Add the database and user to the <filename>mysql</filename>
303 server defined earlier:
304 <literallayout class='monospaced'>
305 $ mysql -u root -p
306 mysql> CREATE DATABASE toaster_data;
307 mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
308 mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
309 mysql> quit
310 </literallayout>
311 </para></listitem>
312 <listitem><para>
313 Get Toaster to create the database schema,
314 default data, and gather the statically-served files:
315 <literallayout class='monospaced'>
316 $ cd /var/www/toaster/poky/
317 $ ./bitbake/lib/toaster/manage.py syncdb
318 $ ./bitbake/lib/toaster/manage.py migrate
319 $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-poky/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
320 $ ./bitbake/lib/toaster/manage.py collectstatic
321 </literallayout>
322 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500323
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500324 <para>
325 For the above set of commands, after moving to the
326 <filename>poky</filename> directory,
327 the <filename>syncdb</filename> and <filename>migrate</filename>
328 commands ensure the database
329 schema has had changes propagated correctly (i.e.
330 migrations).
331 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500332
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500333 <para>
334 The next line sets the Toaster root directory
335 <filename>TOASTER_DIR</filename> and the location of
336 the Toaster configuration file
337 <filename>TOASTER_CONF</filename>, which is
338 relative to the Toaster root directory
339 <filename>TOASTER_DIR</filename>.
340 For more information on the Toaster configuration file
341 <filename>TOASTER_CONF</filename>, see the
342 <link linkend='toaster-json-files'>JSON Files</link>
343 section of this manual.
344 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500345
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500346 <para>
347 This line also runs the <filename>checksettings</filename>
348 command, which configures the location of the Toaster
349 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build directory</ulink>.
350 The Toaster root directory <filename>TOASTER_DIR</filename>
351 determines where the Toaster build directory
352 is created on the file system.
353 In the example above,
354 <filename>TOASTER_DIR</filename> is set as follows:
355 <literallayout class="monospaced">
356 /var/www/toaster/poky
357 </literallayout>
358 This setting causes the Toaster build directory to be:
359 <literallayout class="monospaced">
360 /var/www/toaster/poky/build
361 </literallayout>
362 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500363
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500364 <para>
365 Finally, the <filename>collectstatic</filename> command
366 is a Django framework command that collects all the
367 statically served files into a designated directory to
368 be served up by the Apache web server.
369 </para></listitem>
370 <listitem><para>
371 Add an Apache configuration file for Toaster to your Apache web
372 server's configuration directory.
373 If you are using Ubuntu or Debian, put the file here:
374 <literallayout class='monospaced'>
375 /etc/apache2/conf-available/toaster.conf
376 </literallayout>
377 If you are using Fedora or RedHat, put it here:
378 <literallayout class='monospaced'>
379 /etc/httpd/conf.d/toaster.conf
380 </literallayout>
381 Following is a sample Apache configuration for Toaster
382 you can follow:
383 <literallayout class='monospaced'>
384 Alias /static /var/www/toaster/static_files
385 &lt;Directory /var/www/toaster/static_files&gt;
386 Order allow,deny
387 Allow from all
388 Require all granted
389 &lt;/Directory&gt;
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500390
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500391 WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500392
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500393 WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
394 &lt;Location /&gt;
395 WSGIProcessGroup toastern_wsgi
396 &lt;/Location&gt;
397 </literallayout>
398 If you are using Ubuntu or Debian,
399 you will need to enable the config and module for Apache:
400 <literallayout class='monospaced'>
401 $ sudo a2enmod wsgi
402 $ sudo a2enconf toaster
403 $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
404 </literallayout>
405 Finally, restart Apache to make sure all new configuration
406 is loaded.
407 For Ubuntu and Debian use:
408 <literallayout class='monospaced'>
409 $ sudo service apache2 restart
410 </literallayout>
411 For Fedora and RedHat use:
412 <literallayout class='monospaced'>
413 $ sudo service httpd restart
414 </literallayout>
415 </para></listitem>
416 <listitem><para>
417 Install the build runner service.
418 This service needs to be running in order to dispatch
419 builds.
420 Use this command:
421 <literallayout class='monospaced'>
422 /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
423 </literallayout>
424 Here is an example:
425 <literallayout class='monospaced'>
426 #!/bin/sh
427 # toaster run builds dispatcher
428 cd /var/www/toaster/
429 source ./venv/bin/activate
430 ./bitbake/lib/toaster/manage.py runbuilds
431 </literallayout>
432 </para></listitem>
433 </orderedlist>
434 You can now open up a browser and start using Toaster.
435 </para>
436 </section>
437 </section>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500438
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500439 <section id='using-the-toaster-web-interface'>
440 <title>Using the Toaster Web Interface</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500441
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500442 <para>
443 The Toaster web interface allows you to do the following:
444 <itemizedlist>
445 <listitem><para>
446 Browse published layers in the
447 <ulink url='http://layers.openembedded.org'>OpenEmbedded Metadata Index</ulink>
448 that are available for your selected version of the build
449 system.
450 </para></listitem>
451 <listitem><para>
452 Import your own layers for building.
453 </para></listitem>
454 <listitem><para>
455 Add and remove layers from your configuration.
456 </para></listitem>
457 <listitem><para>
458 Set configuration variables.
459 </para></listitem>
460 <listitem><para>
461 Select a target or multiple targets to build.
462 </para></listitem>
463 <listitem><para>
464 Start your builds.
465 </para></listitem>
466 <listitem><para>
467 See what was built (recipes and packages) and what
468 packages were installed into your final image.
469 </para></listitem>
470 <listitem><para>
471 Browse the directory structure of your image.
472 </para></listitem>
473 <listitem><para>
474 See the value of all variables in your build configuration,
475 and which files set each value.
476 </para></listitem>
477 <listitem><para>
478 Examine error, warning and trace messages to aid in
479 debugging.
480 </para></listitem>
481 <listitem><para>
482 See information about the BitBake tasks executed and
483 reused during your build, including those that used
484 shared state.
485 </para></listitem>
486 <listitem><para>
487 See dependency relationships between recipes, packages
488 and tasks.
489 </para></listitem>
490 <listitem><para>
491 See performance information such as build time, task time,
492 CPU usage, and disk I/O.
493 </para></listitem>
494 </itemizedlist>
495 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500496
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500497 <section id='web-interface-videos'>
498 <title>Toaster Web Interface Videos</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500499
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500500 <para>
501 Following are several videos that show how to use the Toaster GUI:
502 <itemizedlist>
503 <listitem><para><emphasis>Build Configuration:</emphasis>
504 This
505 <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink>
506 overviews and demonstrates build configuration for Toaster.
507 </para></listitem>
508 <listitem><para><emphasis>Build Custom Layers:</emphasis>
509 This
510 <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink>
511 shows you how to build custom layers that are used with
512 Toaster.
513 </para></listitem>
514 <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis>
515 This
516 <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink>
517 goes over the Toaster entry page, and provides
518 an overview of the data manipulation capabilities of
519 Toaster, which include search, sorting and filtering by
520 different criteria.
521 </para></listitem>
522 <listitem><para><emphasis>Build Dashboard:</emphasis>
523 This
524 <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink>
525 shows you the build dashboard, a page providing an
526 overview of the information available for a selected build.
527 </para></listitem>
528 <listitem><para><emphasis>Image Information:</emphasis>
529 This
530 <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink>
531 walks through the information Toaster provides
532 about images: packages installed and root file system.
533 </para></listitem>
534 <listitem><para><emphasis>Configuration:</emphasis>
535 This
536 <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink>
537 provides Toaster build configuration information.
538 </para></listitem>
539 <listitem><para><emphasis>Tasks:</emphasis>
540 This
541 <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink>
542 shows the information Toaster provides about the
543 tasks run by the build system.
544 </para></listitem>
545 <listitem><para><emphasis>Recipes and Packages Built:</emphasis>
546 This
547 <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink>
548 shows the information Toaster provides about recipes
549 and packages built.
550 </para></listitem>
551 <listitem><para><emphasis>Performance Data:</emphasis>
552 This
553 <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink>
554 shows the build performance data provided by
555 Toaster.
556 </para></listitem>
557 </itemizedlist>
558 </para>
559 </section>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500560
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500561 <section id='a-note-on-the-local-yocto-project-release'>
562 <title>Additional Information About the Local Yocto Project Release</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500563
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500564 <para>
565 This section only applies if you have set up Toaster
566 for local development, as explained in the
567 "<link linkend='starting-toaster-for-local-development'>Starting Toaster for Local Development</link>"
568 section.
569 </para>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500570
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500571 <para>
572 When you create a project in Toaster, you will be asked to
573 provide a name and to select a Yocto Project release.
574 One of the release options you will find is called
575 "Local Yocto Project".
576 <imagedata fileref="figures/new-project.png" align="center" width="9in" />
577 </para>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500578
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500579 <para>
580 When you select the "Local Yocto Project" release, Toaster
581 will run your builds using the local Yocto
582 Project clone you have in your computer: the same clone
583 you are using to run Toaster.
584 Unless you manually update
585 this clone, your builds will always use the same Git revision.
586 </para>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500587
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500588 <para>
589 If you select any of the other release options, Toaster
590 will fetch the tip of your selected release from the upstream
591 <ulink url='https://git.yoctoproject.org'>Yocto Project repository</ulink>
592 every time you run a build.
593 Fetching this tip effectively
594 means that if your selected release is updated upstream, the
595 Git revision you are using for your builds will change.
596 If you are doing development locally, you might not want this
597 change to happen.
598 In that case, the "Local Yocto Project"
599 release might be the right choice.
600 </para>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500601
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500602 <para>
603 However, the "Local Yocto Project" release
604 will not provide you with any compatible layers, other than the
605 three core layers that come with the Yocto Project:
606 <itemizedlist>
607 <listitem><para>
608 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/openembedded-core/'>openembedded-core</ulink>
609 </para></listitem>
610 <listitem><para>
611 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-poky/'>meta-poky</ulink>
612 </para></listitem>
613 <listitem><para>
614 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-yocto-bsp/'>meta-yocto-bsp</ulink>
615 </para></listitem>
616 </itemizedlist>
617 <imagedata fileref="figures/compatible-layers.png" align="center" width="9in" />
618 </para>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500619
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500620 <para>
621 If you want to build any other layers, you will need to
622 manually import them into your Toaster project, using the
623 "Import layer" page.
624 <imagedata fileref="figures/import-layer.png" align="center" width="9in" />
625 </para>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500626
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500627 </section>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500628
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500629 <section id='toaster-web-interface-preferred-version'>
630 <title>Building a Specific Recipe Given Multiple Versions</title>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500631
632 <para>
633 Occasionally, a layer might provide more than one version of
634 the same recipe.
635 For example, the <filename>openembedded-core</filename> layer
636 provides two versions of the <filename>bash</filename> recipe
637 (i.e. 3.2.48 and 4.3.30-r0) and two versions of the
638 <filename>which</filename> recipe (i.e. 2.21 and 2.18).
639 The following figure shows this exact scenario:
640 <imagedata fileref="figures/bash-oecore.png" align="center" width="9in" depth="6in" />
641 </para>
642
643 <para>
644 By default, the OpenEmbedded build system builds one of the
645 two recipes.
646 For the <filename>bash</filename> case, version 4.3.30-r0 is
647 built by default.
648 Unfortunately, Toaster as it exists, is not able to override
649 the default recipe version.
650 If you would like to build bash 3.2.48, you need to set the
651 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
652 variable.
653 You can do so from Toaster, using the "Add variable" form,
654 which is available in the "BitBake variables" page of the
655 project configuration section as shown in the following screen:
656 <imagedata fileref="figures/add-variable.png" align="center" width="9in" depth="6in" />
657 </para>
658
659 <para>
660 To specify <filename>bash</filename> 3.2.48 as the version to build,
661 enter "PREFERRED_VERSION_bash" in the "Variable" field, and "3.2.48"
662 in the "Value" field.
663 Next, click the "Add variable" button:
664 <imagedata fileref="figures/set-variable.png" align="center" width="9in" depth="6in" />
665 </para>
666
667 <para>
668 After clicking the "Add variable" button, the settings for
669 <filename>PREFERRED_VERSION</filename> are added to the bottom
670 of the BitBake variables list.
671 With these settings, the OpenEmbedded build system builds the
672 desired version of the recipe rather than the default version:
673 <imagedata fileref="figures/variable-added.png" align="center" width="9in" depth="6in" />
674 </para>
675 </section>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500676 </section>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500677</chapter>