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 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 14 | Toaster system dependencies as described in the |
| 15 | "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>" |
| 16 | chapter, you are ready to start Toaster. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 17 | </para> |
| 18 | |
| 19 | <para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | Navigate to the root of your |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 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'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 34 | $ source toaster start |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 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'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 59 | $ source toaster start webport=8400 |
| 60 | </literallayout> |
| 61 | </para> |
| 62 | </section> |
| 63 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 64 | <section id='setting-up-toaster-without-a-web-server'> |
| 65 | <title>Setting Up Toaster Without a Web Server</title> |
| 66 | |
| 67 | <para> |
| 68 | You can start a Toaster environment without starting its |
| 69 | web server. This is useful for the following: |
| 70 | <itemizedlist> |
| 71 | <listitem><para> |
| 72 | Capturing a command-line build’s statistics into |
| 73 | the Toaster database for examination later. |
| 74 | </para></listitem> |
| 75 | <listitem><para> |
| 76 | Capturing a command-line build’s statistics when |
| 77 | the Toaster server is already running. |
| 78 | </para></listitem> |
| 79 | <listitem><para> |
| 80 | Having one instance of the Toaster web server |
| 81 | track and capture multiple command-line builds, |
| 82 | where each build is started in its own “noweb” |
| 83 | Toaster environment. |
| 84 | </para></listitem> |
| 85 | </itemizedlist> |
| 86 | The following commands show how to start a Toaster environment |
| 87 | without starting its web server, perform BitBake operations, |
| 88 | and then shut down the Toaster environment. |
| 89 | Once the build is complete, you can close the Toaster environment. |
| 90 | Before closing the environment, however, you should allow a few |
| 91 | minutes to ensure the complete transfer of its BitBake build |
| 92 | statistics to the Toaster database. |
| 93 | If you have a separate Toaster web server instance running, you |
| 94 | can watch this command-line build’s progress and examine the |
| 95 | results as soon as they are posted: |
| 96 | <literallayout class='monospaced'> |
| 97 | $ source toaster start noweb |
| 98 | $ bitbake <replaceable>target</replaceable> |
| 99 | $ source toaster stop |
| 100 | </literallayout> |
| 101 | </para> |
| 102 | </section> |
| 103 | |
| 104 | <section id='setting-up-toaster-without-a-build-server'> |
| 105 | <title>Setting Up Toaster Without a Build Server</title> |
| 106 | |
| 107 | <para> |
| 108 | You can start a Toaster environment with the |
| 109 | “New Projects” feature disabled. |
| 110 | Doing so is useful for the following: |
| 111 | <itemizedlist> |
| 112 | <listitem><para> |
| 113 | Sharing your build results over the web server while |
| 114 | blocking others from starting builds on your host. |
| 115 | </para></listitem> |
| 116 | <listitem><para> |
| 117 | Allowing only local command-line builds to be captured |
| 118 | into the Toaster database. |
| 119 | </para></listitem> |
| 120 | </itemizedlist> |
| 121 | Use the following command to set up Toaster without a |
| 122 | build server: |
| 123 | <literallayout class='monospaced'> |
| 124 | $ source toaster start nobuild webport=<replaceable>port</replaceable> |
| 125 | </literallayout> |
| 126 | </para> |
| 127 | </section> |
| 128 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 129 | <section id='setting-up-external-access'> |
| 130 | <title>Setting up External Access</title> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 131 | |
| 132 | <para> |
| 133 | By default, Toaster binds to the loop back address |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 134 | (i.e. localhost), which does not allow access from |
| 135 | external hosts. To allow external access, use the |
| 136 | <filename>WEBPORT</filename> parameter to open an |
| 137 | address that connects to the network, specifically the |
| 138 | IP address that your NIC uses to connect to the network. |
| 139 | You can also bind to all IP addresses the computer |
| 140 | supports by using the shortcut |
| 141 | "0.0.0.0:<replaceable>port</replaceable>". |
| 142 | </para> |
| 143 | |
| 144 | <para> |
| 145 | The following example binds to all IP addresses on the |
| 146 | host: |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 147 | <literallayout class='monospaced'> |
| 148 | $ source toaster start webport=0.0.0.0:8400 |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 149 | </literallayout> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 150 | This example binds to a specific IP address on the host's |
| 151 | NIC: |
| 152 | <literallayout class='monospaced'> |
| 153 | $ source toaster start webport=192.168.1.1:8400 |
| 154 | </literallayout> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 155 | </para> |
| 156 | </section> |
| 157 | |
| 158 | <section id='the-directory-for-cloning-layers'> |
| 159 | <title>The Directory for Cloning Layers</title> |
| 160 | |
| 161 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 162 | Toaster creates a <filename>_toaster_clones</filename> |
| 163 | directory inside your Source Directory |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 164 | (i.e. <filename>poky</filename>) to clone any layers |
| 165 | needed for your builds. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 166 | </para> |
| 167 | |
| 168 | <para> |
| 169 | Alternatively, if you would like all of your Toaster related |
| 170 | files and directories to be in a particular location other than |
| 171 | the default, you can set the <filename>TOASTER_DIR</filename> |
| 172 | environment variable, which takes precedence over your current |
| 173 | working directory. |
| 174 | Setting this environment variable causes Toaster to create and use |
| 175 | <filename>$TOASTER_DIR./_toaster_clones</filename>. |
| 176 | </para> |
| 177 | </section> |
| 178 | |
| 179 | <section id='toaster-the-build-directory'> |
| 180 | <title>The Build Directory</title> |
| 181 | |
| 182 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 183 | Toaster creates a build directory within your Source |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 184 | Directory (e.g. <filename>poky</filename>) to execute |
| 185 | the builds. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 186 | </para> |
| 187 | |
| 188 | <para> |
| 189 | Alternatively, if you would like all of your Toaster related files |
| 190 | and directories to be in a particular location, you can set |
| 191 | the <filename>TOASTER_DIR</filename> environment variable, |
| 192 | which takes precedence over your current working directory. |
| 193 | Setting this environment variable causes Toaster to use |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 194 | <filename>$TOASTER_DIR/build</filename> as the build directory. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 195 | </para> |
| 196 | </section> |
| 197 | |
| 198 | <section id='toaster-creating-a-django-super-user'> |
| 199 | <title>Creating a Django Superuser</title> |
| 200 | |
| 201 | <para> |
| 202 | Toaster is built on the |
| 203 | <ulink url='https://www.djangoproject.com/'>Django framework</ulink>. |
| 204 | Django provides an administration interface you can use |
| 205 | to edit Toaster configuration parameters. |
| 206 | </para> |
| 207 | |
| 208 | <para> |
| 209 | To access the Django administration interface, you must |
| 210 | create a superuser by following these steps: |
| 211 | <orderedlist> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 212 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 213 | If you used <filename>pip3</filename>, which is |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 214 | recommended, to set up the Toaster system dependencies, |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 215 | you need be sure the local user path is in your |
| 216 | <filename>PATH</filename> list. |
| 217 | To append the pip3 local user path, use the following |
| 218 | command: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 219 | <literallayout class='monospaced'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 220 | $ export PATH=$PATH:$HOME/.local/bin |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 221 | </literallayout> |
| 222 | </para></listitem> |
| 223 | <listitem><para> |
| 224 | From the directory containing the Toaster database, |
| 225 | which by default is the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 226 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>, |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 227 | invoke the <filename>createsuperuser</filename> command |
| 228 | from <filename>manage.py</filename>: |
| 229 | <literallayout class='monospaced'> |
| 230 | $ cd ~/poky/build |
| 231 | $ ../bitbake/lib/toaster/manage.py createsuperuser |
| 232 | </literallayout> |
| 233 | </para></listitem> |
| 234 | <listitem><para> |
| 235 | Django prompts you for the username, which you need to |
| 236 | provide. |
| 237 | </para></listitem> |
| 238 | <listitem><para> |
| 239 | Django prompts you for an email address, which is |
| 240 | optional. |
| 241 | </para></listitem> |
| 242 | <listitem><para> |
| 243 | Django prompts you for a password, which you must provide. |
| 244 | </para></listitem> |
| 245 | <listitem><para> |
| 246 | Django prompts you to re-enter your password for verification. |
| 247 | </para></listitem> |
| 248 | </orderedlist> |
| 249 | After completing these steps, the following confirmation message |
| 250 | appears: |
| 251 | <literallayout class='monospaced'> |
| 252 | Superuser created successfully. |
| 253 | </literallayout> |
| 254 | </para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 255 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 256 | <para> |
| 257 | Creating a superuser allows you to access the Django administration |
| 258 | interface through a browser. |
| 259 | The URL for this interface is the same as the URL used for the |
| 260 | Toaster instance with "/admin" on the end. |
| 261 | For example, if you are running Toaster locally, use the |
| 262 | following URL: |
| 263 | <literallayout class='monospaced'> |
| 264 | http://127.0.0.1:8000/admin |
| 265 | </literallayout> |
| 266 | You can use the Django administration interface to set Toaster |
| 267 | configuration parameters such as the build directory, layer sources, |
| 268 | default variable values, and BitBake versions. |
| 269 | </para> |
| 270 | </section> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 271 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 272 | <section id='toaster-setting-up-a-production-instance-of-toaster'> |
| 273 | <title>Setting Up a Production Instance of Toaster</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 274 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 275 | <para> |
| 276 | You can use a production instance of Toaster to share the |
| 277 | Toaster instance with remote users, multiple users, or both. |
| 278 | The production instance is also the setup that can handle |
| 279 | heavier loads on the web service. |
| 280 | Use the instructions in the following sections to set up |
| 281 | Toaster to run builds through the Toaster web interface. |
| 282 | </para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 283 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 284 | <section id='toaster-production-instance-requirements'> |
| 285 | <title>Requirements</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 286 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 287 | <para> |
| 288 | Be sure you meet the following requirements: |
| 289 | <note> |
| 290 | You must comply with all Apache, |
| 291 | <filename>mod-wsgi</filename>, and Mysql requirements. |
| 292 | </note> |
| 293 | <itemizedlist> |
| 294 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 295 | Have all the build requirements as described in the |
| 296 | "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 297 | chapter. |
| 298 | </para></listitem> |
| 299 | <listitem><para> |
| 300 | Have an Apache webserver. |
| 301 | </para></listitem> |
| 302 | <listitem><para> |
| 303 | Have <filename>mod-wsgi</filename> for the Apache |
| 304 | webserver. |
| 305 | </para></listitem> |
| 306 | <listitem><para> |
| 307 | Use the Mysql database server. |
| 308 | </para></listitem> |
| 309 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 310 | If you are using Ubuntu 16.04, run the following: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 311 | <literallayout class='monospaced'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 312 | $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 mysql-server python3-pip libmysqlclient-dev |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 313 | </literallayout> |
| 314 | </para></listitem> |
| 315 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 316 | If you are using Fedora 24 or a RedHat distribution, run |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 317 | the following: |
| 318 | <literallayout class='monospaced'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 319 | $ sudo dnf install httpd python3-mod_wsgi python3-pip mariadb-server mariadb-devel python3-devel |
| 320 | </literallayout> |
| 321 | </para></listitem> |
| 322 | <listitem><para> |
| 323 | If you are using openSUSE Leap 42.1, run |
| 324 | the following: |
| 325 | <literallayout class='monospaced'> |
| 326 | $ sudo zypper install apache2 apache2-mod_wsgi-python3 python3-pip mariadb mariadb-client python3-devel |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 327 | </literallayout> |
| 328 | </para></listitem> |
| 329 | </itemizedlist> |
| 330 | </para> |
| 331 | </section> |
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 | <section id='toaster-installation-steps'> |
| 334 | <title>Installation</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 335 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 336 | <para> |
| 337 | Perform the following steps to install Toaster: |
| 338 | <orderedlist> |
| 339 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 340 | Create toaster user and set its home directory to |
| 341 | <filename>/var/www/toaster</filename>: |
| 342 | <literallayout class='monospaced'> |
| 343 | $ sudo /usr/sbin/useradd toaster -md /var/www/toaster -s /bin/false |
| 344 | $ sudo su - toaster -s /bin/bash |
| 345 | </literallayout> |
| 346 | </para></listitem> |
| 347 | <listitem><para> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 348 | Checkout a copy of <filename>poky</filename> |
| 349 | into the web server directory. |
| 350 | You will be using <filename>/var/www/toaster</filename>: |
| 351 | <literallayout class='monospaced'> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 352 | $ git clone git://git.yoctoproject.org/poky |
| 353 | $ git checkout &DISTRO_NAME_NO_CAP; |
| 354 | </literallayout> |
| 355 | </para></listitem> |
| 356 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 357 | Install Toaster |
| 358 | dependencies using the --user flag which |
| 359 | keeps the Python packages |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 360 | isolated from your system-provided packages: |
| 361 | <literallayout class='monospaced'> |
| 362 | $ cd /var/www/toaster/ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 363 | $ pip3 install --user -r ./poky/bitbake/toaster-requirements.txt |
| 364 | $ pip3 install --user mysqlclient |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 365 | </literallayout> |
| 366 | <note> |
| 367 | Isolating these packages is not required but is |
| 368 | recommended. |
| 369 | Alternatively, you can use your operating system's |
| 370 | package manager to install the packages. |
| 371 | </note> |
| 372 | </para></listitem> |
| 373 | <listitem><para> |
| 374 | Configure Toaster by editing |
| 375 | <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename> |
| 376 | as follows: |
| 377 | <itemizedlist> |
| 378 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 379 | Edit the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 380 | <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#databases'>DATABASES</ulink> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 381 | settings: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 382 | <literallayout class='monospaced'> |
| 383 | DATABASES = { |
| 384 | 'default': { |
| 385 | 'ENGINE': 'django.db.backends.mysql', |
| 386 | 'NAME': 'toaster_data', |
| 387 | 'USER': 'toaster', |
| 388 | 'PASSWORD': 'yourpasswordhere', |
| 389 | 'HOST': 'localhost', |
| 390 | 'PORT': '3306', |
| 391 | } |
| 392 | } |
| 393 | </literallayout> |
| 394 | </para></listitem> |
| 395 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 396 | Edit the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 397 | <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SECRET_KEY'>SECRET_KEY</ulink>: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 398 | <literallayout class='monospaced'> |
| 399 | SECRET_KEY = '<replaceable>your_secret_key</replaceable>' |
| 400 | </literallayout> |
| 401 | </para></listitem> |
| 402 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 403 | Edit the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 404 | <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-STATIC_ROOT'>STATIC_ROOT</ulink>: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 405 | <literallayout class='monospaced'> |
| 406 | STATIC_ROOT = '/var/www/toaster/static_files/' |
| 407 | </literallayout> |
| 408 | </para></listitem> |
| 409 | </itemizedlist> |
| 410 | </para></listitem> |
| 411 | <listitem><para> |
| 412 | Add the database and user to the <filename>mysql</filename> |
| 413 | server defined earlier: |
| 414 | <literallayout class='monospaced'> |
| 415 | $ mysql -u root -p |
| 416 | mysql> CREATE DATABASE toaster_data; |
| 417 | mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere'; |
| 418 | mysql> GRANT all on toaster_data.* to 'toaster'@'localhost'; |
| 419 | mysql> quit |
| 420 | </literallayout> |
| 421 | </para></listitem> |
| 422 | <listitem><para> |
| 423 | Get Toaster to create the database schema, |
| 424 | default data, and gather the statically-served files: |
| 425 | <literallayout class='monospaced'> |
| 426 | $ cd /var/www/toaster/poky/ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 427 | $ ./bitbake/lib/toaster/manage.py migrate |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 428 | $ TOASTER_DIR=`pwd` TEMPLATECONF='poky' \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 429 | ./bitbake/lib/toaster/manage.py checksettings |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 430 | $ ./bitbake/lib/toaster/manage.py collectstatic |
| 431 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 432 | In the previous example, from the <filename>poky</filename> |
| 433 | directory, the <filename>migrate</filename> command |
| 434 | ensures the database schema changes have propagated |
| 435 | correctly (i.e. migrations). |
| 436 | The next line sets the Toaster root directory |
| 437 | <filename>TOASTER_DIR</filename> and the location |
| 438 | of the Toaster configuration file |
| 439 | <filename>TOASTER_CONF</filename>, which is relative to |
| 440 | <filename>TOASTER_DIR</filename>. |
| 441 | The <filename>TEMPLATECONF</filename> value reflects the |
| 442 | contents of <filename>poky/.templateconf</filename>, and |
| 443 | by default, should include the string "poky". |
| 444 | For more information on the Toaster configuration |
| 445 | file, see the |
| 446 | "<link linkend='configuring-toaster'>Configuring Toaster</link>" |
| 447 | section.</para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 448 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 449 | <para>This line also runs the <filename>checksettings</filename> |
| 450 | command, which configures the location of the Toaster |
| 451 | <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>. |
| 452 | The Toaster root directory <filename>TOASTER_DIR</filename> |
| 453 | determines where the Toaster build directory |
| 454 | is created on the file system. |
| 455 | In the example above, |
| 456 | <filename>TOASTER_DIR</filename> is set as follows: |
| 457 | <literallayout class="monospaced"> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 458 | /var/www/toaster/poky |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 459 | </literallayout> |
| 460 | This setting causes the Toaster build directory to be: |
| 461 | <literallayout class="monospaced"> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 462 | /var/www/toaster/poky/build |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 463 | </literallayout></para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 464 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 465 | <para>Finally, the <filename>collectstatic</filename> command |
| 466 | is a Django framework command that collects all the |
| 467 | statically served files into a designated directory to |
| 468 | be served up by the Apache web server as defined by |
| 469 | <filename>STATIC_ROOT</filename>. |
| 470 | </para></listitem> |
| 471 | <listitem><para> |
| 472 | Test and/or use the Mysql integration with Toaster’s |
| 473 | Django web server. |
| 474 | At this point, you can start up the normal Toaster |
| 475 | Django web server with the Toaster database in Mysql. |
| 476 | You can use this web server to confirm that the database |
| 477 | migration and data population from the Layer Index is |
| 478 | complete.</para> |
| 479 | |
| 480 | <para>To start the default Toaster Django web server with |
| 481 | the Toaster database now in Mysql, use the standard |
| 482 | start commands: |
| 483 | <literallayout class='monospaced'> |
| 484 | $ source oe-init-build-env |
| 485 | $ source toaster start |
| 486 | </literallayout> |
| 487 | Additionally, if Django is sufficient for your requirements, |
| 488 | you can use it for your release system and migrate later |
| 489 | to Apache as your requirements change. |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 490 | </para></listitem> |
| 491 | <listitem><para> |
| 492 | Add an Apache configuration file for Toaster to your Apache web |
| 493 | server's configuration directory. |
| 494 | If you are using Ubuntu or Debian, put the file here: |
| 495 | <literallayout class='monospaced'> |
| 496 | /etc/apache2/conf-available/toaster.conf |
| 497 | </literallayout> |
| 498 | If you are using Fedora or RedHat, put it here: |
| 499 | <literallayout class='monospaced'> |
| 500 | /etc/httpd/conf.d/toaster.conf |
| 501 | </literallayout> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 502 | If you are using OpenSUSE, put it here: |
| 503 | <literallayout class='monospaced'> |
| 504 | /etc/apache2/conf.d/toaster.conf |
| 505 | </literallayout> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 506 | Following is a sample Apache configuration for Toaster |
| 507 | you can follow: |
| 508 | <literallayout class='monospaced'> |
| 509 | Alias /static /var/www/toaster/static_files |
| 510 | <Directory /var/www/toaster/static_files> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 511 | <IfModule mod_access_compat.c> |
| 512 | Order allow,deny |
| 513 | Allow from all |
| 514 | </IfModule> |
| 515 | <IfModule !mod_access_compat.c> |
| 516 | Require all granted |
| 517 | </IfModule> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 518 | </Directory> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 519 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 520 | <Directory /var/www/toaster/poky/bitbake/lib/toaster/toastermain> |
| 521 | <Files "wsgi.py"> |
| 522 | Require all granted |
| 523 | </Files> |
| 524 | </Directory> |
| 525 | |
| 526 | WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/.local/lib/python3.4/site-packages |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 527 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 528 | WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py" |
| 529 | <Location /> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 530 | WSGIProcessGroup toaster_wsgi |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 531 | </Location> |
| 532 | </literallayout> |
| 533 | If you are using Ubuntu or Debian, |
| 534 | you will need to enable the config and module for Apache: |
| 535 | <literallayout class='monospaced'> |
| 536 | $ sudo a2enmod wsgi |
| 537 | $ sudo a2enconf toaster |
| 538 | $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py |
| 539 | </literallayout> |
| 540 | Finally, restart Apache to make sure all new configuration |
| 541 | is loaded. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 542 | For Ubuntu, Debian, and OpenSUSE use: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 543 | <literallayout class='monospaced'> |
| 544 | $ sudo service apache2 restart |
| 545 | </literallayout> |
| 546 | For Fedora and RedHat use: |
| 547 | <literallayout class='monospaced'> |
| 548 | $ sudo service httpd restart |
| 549 | </literallayout> |
| 550 | </para></listitem> |
| 551 | <listitem><para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 552 | Prepare the systemd service to run Toaster builds. |
| 553 | Here is a sample configuration file for the service: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 554 | <literallayout class='monospaced'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 555 | [Unit] |
| 556 | Description=Toaster runbuilds |
| 557 | |
| 558 | [Service] |
| 559 | Type=forking |
| 560 | User=toaster |
| 561 | ExecStart=/usr/bin/screen -d -m -S runbuilds /var/www/toaster/poky/bitbake/lib/toaster/runbuilds-service.sh start |
| 562 | ExecStop=/usr/bin/screen -S runbuilds -X quit |
| 563 | WorkingDirectory=/var/www/toaster/poky |
| 564 | |
| 565 | [Install] |
| 566 | WantedBy=multi-user.target |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 567 | </literallayout> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 568 | Prepare the <filename>runbuilds-service.sh</filename> |
| 569 | script that you need to place in the |
| 570 | <filename>/var/www/toaster/poky/bitbake/lib/toaster/</filename> |
| 571 | directory by setting up executable permissions: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 572 | <literallayout class='monospaced'> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 573 | #!/bin/bash |
| 574 | |
| 575 | #export http_proxy=http://proxy.host.com:8080 |
| 576 | #export https_proxy=http://proxy.host.com:8080 |
| 577 | #export GIT_PROXY_COMMAND=$HOME/bin/gitproxy |
| 578 | |
| 579 | cd ~/poky/ |
| 580 | source ./oe-init-build-env build |
| 581 | source ../bitbake/bin/toaster $1 noweb |
| 582 | [ "$1" == 'start' ] && /bin/bash |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 583 | </literallayout> |
| 584 | </para></listitem> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 585 | <listitem><para> |
| 586 | Run the service: |
| 587 | <literallayout class='monospaced'> |
| 588 | # service runbuilds start |
| 589 | </literallayout> |
| 590 | Since the service is running in a detached screen |
| 591 | session, you can attach to it using this command: |
| 592 | <literallayout class='monospaced'> |
| 593 | $ sudo su - toaster |
| 594 | $ screen -rS runbuilds |
| 595 | </literallayout> |
| 596 | You can detach from the service again using "Ctrl-a" |
| 597 | followed by "d" key combination. |
| 598 | </para></listitem> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 599 | </orderedlist> |
| 600 | You can now open up a browser and start using Toaster. |
| 601 | </para> |
| 602 | </section> |
| 603 | </section> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 604 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 605 | <section id='using-the-toaster-web-interface'> |
| 606 | <title>Using the Toaster Web Interface</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 607 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 608 | <para> |
| 609 | The Toaster web interface allows you to do the following: |
| 610 | <itemizedlist> |
| 611 | <listitem><para> |
| 612 | Browse published layers in the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame^] | 613 | <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 614 | that are available for your selected version of the build |
| 615 | system. |
| 616 | </para></listitem> |
| 617 | <listitem><para> |
| 618 | Import your own layers for building. |
| 619 | </para></listitem> |
| 620 | <listitem><para> |
| 621 | Add and remove layers from your configuration. |
| 622 | </para></listitem> |
| 623 | <listitem><para> |
| 624 | Set configuration variables. |
| 625 | </para></listitem> |
| 626 | <listitem><para> |
| 627 | Select a target or multiple targets to build. |
| 628 | </para></listitem> |
| 629 | <listitem><para> |
| 630 | Start your builds. |
| 631 | </para></listitem> |
| 632 | <listitem><para> |
| 633 | See what was built (recipes and packages) and what |
| 634 | packages were installed into your final image. |
| 635 | </para></listitem> |
| 636 | <listitem><para> |
| 637 | Browse the directory structure of your image. |
| 638 | </para></listitem> |
| 639 | <listitem><para> |
| 640 | See the value of all variables in your build configuration, |
| 641 | and which files set each value. |
| 642 | </para></listitem> |
| 643 | <listitem><para> |
| 644 | Examine error, warning and trace messages to aid in |
| 645 | debugging. |
| 646 | </para></listitem> |
| 647 | <listitem><para> |
| 648 | See information about the BitBake tasks executed and |
| 649 | reused during your build, including those that used |
| 650 | shared state. |
| 651 | </para></listitem> |
| 652 | <listitem><para> |
| 653 | See dependency relationships between recipes, packages |
| 654 | and tasks. |
| 655 | </para></listitem> |
| 656 | <listitem><para> |
| 657 | See performance information such as build time, task time, |
| 658 | CPU usage, and disk I/O. |
| 659 | </para></listitem> |
| 660 | </itemizedlist> |
| 661 | </para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 662 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 663 | <section id='web-interface-videos'> |
| 664 | <title>Toaster Web Interface Videos</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 665 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 666 | <para> |
| 667 | Following are several videos that show how to use the Toaster GUI: |
| 668 | <itemizedlist> |
| 669 | <listitem><para><emphasis>Build Configuration:</emphasis> |
| 670 | This |
| 671 | <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink> |
| 672 | overviews and demonstrates build configuration for Toaster. |
| 673 | </para></listitem> |
| 674 | <listitem><para><emphasis>Build Custom Layers:</emphasis> |
| 675 | This |
| 676 | <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink> |
| 677 | shows you how to build custom layers that are used with |
| 678 | Toaster. |
| 679 | </para></listitem> |
| 680 | <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis> |
| 681 | This |
| 682 | <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink> |
| 683 | goes over the Toaster entry page, and provides |
| 684 | an overview of the data manipulation capabilities of |
| 685 | Toaster, which include search, sorting and filtering by |
| 686 | different criteria. |
| 687 | </para></listitem> |
| 688 | <listitem><para><emphasis>Build Dashboard:</emphasis> |
| 689 | This |
| 690 | <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink> |
| 691 | shows you the build dashboard, a page providing an |
| 692 | overview of the information available for a selected build. |
| 693 | </para></listitem> |
| 694 | <listitem><para><emphasis>Image Information:</emphasis> |
| 695 | This |
| 696 | <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink> |
| 697 | walks through the information Toaster provides |
| 698 | about images: packages installed and root file system. |
| 699 | </para></listitem> |
| 700 | <listitem><para><emphasis>Configuration:</emphasis> |
| 701 | This |
| 702 | <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink> |
| 703 | provides Toaster build configuration information. |
| 704 | </para></listitem> |
| 705 | <listitem><para><emphasis>Tasks:</emphasis> |
| 706 | This |
| 707 | <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink> |
| 708 | shows the information Toaster provides about the |
| 709 | tasks run by the build system. |
| 710 | </para></listitem> |
| 711 | <listitem><para><emphasis>Recipes and Packages Built:</emphasis> |
| 712 | This |
| 713 | <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink> |
| 714 | shows the information Toaster provides about recipes |
| 715 | and packages built. |
| 716 | </para></listitem> |
| 717 | <listitem><para><emphasis>Performance Data:</emphasis> |
| 718 | This |
| 719 | <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink> |
| 720 | shows the build performance data provided by |
| 721 | Toaster. |
| 722 | </para></listitem> |
| 723 | </itemizedlist> |
| 724 | </para> |
| 725 | </section> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 726 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 727 | <section id='a-note-on-the-local-yocto-project-release'> |
| 728 | <title>Additional Information About the Local Yocto Project Release</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 729 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 730 | <para> |
| 731 | This section only applies if you have set up Toaster |
| 732 | for local development, as explained in the |
| 733 | "<link linkend='starting-toaster-for-local-development'>Starting Toaster for Local Development</link>" |
| 734 | section. |
| 735 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 736 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 737 | <para> |
| 738 | When you create a project in Toaster, you will be asked to |
| 739 | provide a name and to select a Yocto Project release. |
| 740 | One of the release options you will find is called |
| 741 | "Local Yocto Project". |
| 742 | <imagedata fileref="figures/new-project.png" align="center" width="9in" /> |
| 743 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 744 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 745 | <para> |
| 746 | When you select the "Local Yocto Project" release, Toaster |
| 747 | will run your builds using the local Yocto |
| 748 | Project clone you have in your computer: the same clone |
| 749 | you are using to run Toaster. |
| 750 | Unless you manually update |
| 751 | this clone, your builds will always use the same Git revision. |
| 752 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 753 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 754 | <para> |
| 755 | If you select any of the other release options, Toaster |
| 756 | will fetch the tip of your selected release from the upstream |
| 757 | <ulink url='https://git.yoctoproject.org'>Yocto Project repository</ulink> |
| 758 | every time you run a build. |
| 759 | Fetching this tip effectively |
| 760 | means that if your selected release is updated upstream, the |
| 761 | Git revision you are using for your builds will change. |
| 762 | If you are doing development locally, you might not want this |
| 763 | change to happen. |
| 764 | In that case, the "Local Yocto Project" |
| 765 | release might be the right choice. |
| 766 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 767 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 768 | <para> |
| 769 | However, the "Local Yocto Project" release |
| 770 | will not provide you with any compatible layers, other than the |
| 771 | three core layers that come with the Yocto Project: |
| 772 | <itemizedlist> |
| 773 | <listitem><para> |
| 774 | <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/openembedded-core/'>openembedded-core</ulink> |
| 775 | </para></listitem> |
| 776 | <listitem><para> |
| 777 | <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-poky/'>meta-poky</ulink> |
| 778 | </para></listitem> |
| 779 | <listitem><para> |
| 780 | <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-yocto-bsp/'>meta-yocto-bsp</ulink> |
| 781 | </para></listitem> |
| 782 | </itemizedlist> |
| 783 | <imagedata fileref="figures/compatible-layers.png" align="center" width="9in" /> |
| 784 | </para> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 785 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 786 | <para> |
| 787 | If you want to build any other layers, you will need to |
| 788 | manually import them into your Toaster project, using the |
| 789 | "Import layer" page. |
| 790 | <imagedata fileref="figures/import-layer.png" align="center" width="9in" /> |
| 791 | </para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 792 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 793 | </section> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 794 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 795 | <section id='toaster-web-interface-preferred-version'> |
| 796 | <title>Building a Specific Recipe Given Multiple Versions</title> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 797 | |
| 798 | <para> |
| 799 | Occasionally, a layer might provide more than one version of |
| 800 | the same recipe. |
| 801 | For example, the <filename>openembedded-core</filename> layer |
| 802 | provides two versions of the <filename>bash</filename> recipe |
| 803 | (i.e. 3.2.48 and 4.3.30-r0) and two versions of the |
| 804 | <filename>which</filename> recipe (i.e. 2.21 and 2.18). |
| 805 | The following figure shows this exact scenario: |
| 806 | <imagedata fileref="figures/bash-oecore.png" align="center" width="9in" depth="6in" /> |
| 807 | </para> |
| 808 | |
| 809 | <para> |
| 810 | By default, the OpenEmbedded build system builds one of the |
| 811 | two recipes. |
| 812 | For the <filename>bash</filename> case, version 4.3.30-r0 is |
| 813 | built by default. |
| 814 | Unfortunately, Toaster as it exists, is not able to override |
| 815 | the default recipe version. |
| 816 | If you would like to build bash 3.2.48, you need to set the |
| 817 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink> |
| 818 | variable. |
| 819 | You can do so from Toaster, using the "Add variable" form, |
| 820 | which is available in the "BitBake variables" page of the |
| 821 | project configuration section as shown in the following screen: |
| 822 | <imagedata fileref="figures/add-variable.png" align="center" width="9in" depth="6in" /> |
| 823 | </para> |
| 824 | |
| 825 | <para> |
| 826 | To specify <filename>bash</filename> 3.2.48 as the version to build, |
| 827 | enter "PREFERRED_VERSION_bash" in the "Variable" field, and "3.2.48" |
| 828 | in the "Value" field. |
| 829 | Next, click the "Add variable" button: |
| 830 | <imagedata fileref="figures/set-variable.png" align="center" width="9in" depth="6in" /> |
| 831 | </para> |
| 832 | |
| 833 | <para> |
| 834 | After clicking the "Add variable" button, the settings for |
| 835 | <filename>PREFERRED_VERSION</filename> are added to the bottom |
| 836 | of the BitBake variables list. |
| 837 | With these settings, the OpenEmbedded build system builds the |
| 838 | desired version of the recipe rather than the default version: |
| 839 | <imagedata fileref="figures/variable-added.png" align="center" width="9in" depth="6in" /> |
| 840 | </para> |
| 841 | </section> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 842 | </section> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 843 | </chapter> |