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-start'> |
| 6 | |
| 7 | <title>Preparing to Use Toaster</title> |
| 8 | |
| 9 | <para> |
| 10 | This chapter describes how you need to prepare your system in order to |
| 11 | use Toaster. |
| 12 | </para> |
| 13 | |
| 14 | <section id='toaster-setting-up-the-basic-system-requirements'> |
| 15 | <title>Setting Up the Basic System Requirements</title> |
| 16 | |
| 17 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 18 | Before you can use Toaster, you need to first set up your |
| 19 | build system to run the Yocto Project. |
| 20 | To do this, follow the instructions in the |
| 21 | "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>" |
| 22 | and |
| 23 | "<ulink url='&YOCTO_DOCS_QS_URL;#releases'>Yocto Project Release</ulink>" |
| 24 | sections in the Yocto Project Quick Start. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | </para> |
| 26 | </section> |
| 27 | |
| 28 | <section id='toaster-establishing-toaster-system-dependencies'> |
| 29 | <title>Establishing Toaster System Dependencies</title> |
| 30 | |
| 31 | <para> |
| 32 | Toaster requires extra Python dependencies in order to run. |
| 33 | A Toaster requirements file named |
| 34 | <filename>toaster-requirements.txt</filename> defines the |
| 35 | Python dependencies. |
| 36 | The requirements file is located in the |
| 37 | <filename>bitbake</filename> directory, which is located in the |
| 38 | root directory of the |
| 39 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> |
| 40 | (e.g. <filename>poky/bitbake/toaster-requirements.txt</filename>). |
| 41 | The dependencies appear in a <filename>pip</filename>, |
| 42 | install-compatible format. |
| 43 | </para> |
| 44 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 45 | <section id='toaster-virtual-environment'> |
| 46 | <title>Set Up a Python Virtual Environment</title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | |
| 48 | <para> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 49 | Set up a Python virtual environment that allows you |
| 50 | to maintain a dedicated Python executable and its own |
| 51 | set of installed modules. |
| 52 | Doing so separates the executable from Python and the |
| 53 | modules provided by the operating system. |
| 54 | This separation avoids any version conflicts. |
| 55 | <note> |
| 56 | Creating a virtual environment is not absolutely |
| 57 | necessary. |
| 58 | However, doing so is highly recommended. |
| 59 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 60 | </para> |
| 61 | |
| 62 | <para> |
| 63 | Follow these steps to set up your virtual environment. |
| 64 | These steps assume a Ubuntu distribution: |
| 65 | <orderedlist> |
| 66 | <listitem><para><emphasis>Install <filename>virtualenv</filename>:</emphasis> |
| 67 | Install the supported |
| 68 | <filename>python-virtualenv</filename> package from your |
| 69 | distribution rather than using <filename>pip</filename>. |
| 70 | <literallayout class='monospaced'> |
| 71 | $ sudo apt-get install python-virtualenv |
| 72 | </literallayout> |
| 73 | </para></listitem> |
| 74 | <listitem><para><emphasis>Create and Activate a Virtual Environment:</emphasis> |
| 75 | <literallayout class='monospaced'> |
| 76 | $ virtualenv venv |
| 77 | $ source venv/bin/activate |
| 78 | </literallayout> |
| 79 | </para></listitem> |
| 80 | </orderedlist> |
| 81 | <note> |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame^] | 82 | After setting up a virtual environment in |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 83 | which to run Toaster, you must initialize that |
| 84 | virtual environment each time you want to start |
| 85 | Toaster. |
| 86 | Use the following to initialize the environment just |
| 87 | before you start Toaster: |
| 88 | <literallayout class='monospaced'> |
| 89 | $ source venv/bin/activate |
| 90 | </literallayout> |
| 91 | </note> |
| 92 | </para> |
| 93 | </section> |
| 94 | |
| 95 | <section id='toaster-load-packages'> |
| 96 | <title>Install Toaster Packages</title> |
| 97 | |
| 98 | <para> |
| 99 | You need to install the packages that Toaster requires. |
| 100 | Use this command: |
| 101 | <literallayout class='monospaced'> |
| 102 | $ pip install -r bitbake/toaster-requirements.txt |
| 103 | </literallayout> |
| 104 | </para> |
| 105 | </section> |
| 106 | |
| 107 | <!-- Commenting this section out for now in case it needs to be used again. |
| 108 | |
| 109 | <section id='toaster-install-daemon'> |
| 110 | <title>Install <filename>daemon</filename></title> |
| 111 | |
| 112 | <para> |
| 113 | Toaster depends on |
| 114 | <ulink url='http://www.libslack.org/daemon/'><filename>daemon</filename></ulink>. |
| 115 | Depending on your distribution, how you install |
| 116 | <filename>daemon</filename> differs: |
| 117 | <itemizedlist> |
| 118 | <listitem><para><emphasis>Debian-Based Systems:</emphasis> |
| 119 | If you are running a Debian-based distribution, |
| 120 | install <filename>daemon</filename> using the |
| 121 | following command: |
| 122 | <literallayout class='monospaced'> |
| 123 | $ sudo apt-get install daemon |
| 124 | </literallayout> |
| 125 | </para></listitem> |
| 126 | <listitem><para><emphasis>Non-Debian-Based Systems:</emphasis> |
| 127 | If you are not running a Debian-based distribution |
| 128 | (Redhat-based distribution such as Fedora), |
| 129 | you need to download the file relevant to the |
| 130 | architecture and then install |
| 131 | <filename>daemon</filename> manually. |
| 132 | Following are the commands for 64-bit distributions: |
| 133 | <literallayout class='monospaced'> |
| 134 | $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.x86_64.rpm |
| 135 | $ sudo rpm -i daemon-0.6.4-1.x86_64.rpm |
| 136 | </literallayout> |
| 137 | Here are the commands for a 32-bit distribution: |
| 138 | <literallayout class='monospaced'> |
| 139 | $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.i686.rpm |
| 140 | $ sudo rpm -i daemon-0.6.4-1.i686.rpm |
| 141 | </literallayout> |
| 142 | </para></listitem> |
| 143 | </itemizedlist> |
| 144 | </para> |
| 145 | </section> --> |
| 146 | </section> |
| 147 | </chapter> |