Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | <!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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 9 | <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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | Navigate to the root of your |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 21 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 26 | 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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 36 | 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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 39 | </para> |
| 40 | |
| 41 | <para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 42 | To access the Toaster web interface, open your favorite |
| 43 | browser and enter the following: |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 44 | <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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 57 | For example, the following command sets the port to "8400": |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 58 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 68 | Toaster creates a <filename>_toaster_clones</filename> |
| 69 | directory inside your Source Directory |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 70 | (i.e. <filename>poky</filename>) to clone any layers |
| 71 | needed for your builds. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 72 | </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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 89 | Toaster creates a build directory within your Source |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 90 | Directory (e.g. <filename>poky</filename>) to execute |
| 91 | the builds. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 92 | </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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 100 | <filename>$TOASTER_DIR/build</filename> as the build directory. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 101 | </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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 118 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 159 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 160 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 175 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 176 | <section id='toaster-setting-up-a-production-instance-of-toaster'> |
| 177 | <title>Setting Up a Production Instance of Toaster</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 178 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 179 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 187 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 188 | <section id='toaster-production-instance-requirements'> |
| 189 | <title>Requirements</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 190 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 191 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 229 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 230 | <section id='toaster-installation-steps'> |
| 231 | <title>Installation</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 232 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 233 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 323 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 324 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 332 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 333 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 345 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 346 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 363 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 364 | <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 | <Directory /var/www/toaster/static_files> |
| 386 | Order allow,deny |
| 387 | Allow from all |
| 388 | Require all granted |
| 389 | </Directory> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 390 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 391 | WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 392 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 393 | WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py" |
| 394 | <Location /> |
| 395 | WSGIProcessGroup toastern_wsgi |
| 396 | </Location> |
| 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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 438 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 439 | <section id='using-the-toaster-web-interface'> |
| 440 | <title>Using the Toaster Web Interface</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 441 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 442 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 496 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 497 | <section id='web-interface-videos'> |
| 498 | <title>Toaster Web Interface Videos</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 499 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 500 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 560 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 561 | <section id='a-note-on-the-local-yocto-project-release'> |
| 562 | <title>Additional Information About the Local Yocto Project Release</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 563 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 564 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 570 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 571 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 578 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 579 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 587 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 588 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 601 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 602 | <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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 619 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 620 | <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 Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 626 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 627 | </section> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 628 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 629 | <section id='toaster-web-interface-preferred-version'> |
| 630 | <title>Building a Specific Recipe Given Multiple Versions</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 631 | |
| 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 676 | </section> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 677 | </chapter> |