Setting up a local instance of Toaster: Difference between revisions

From Yocto Project
Jump to navigationJump to search
 
Line 10: Line 10:
=== You need this stuff ready ===
=== You need this stuff ready ===


1. Django 1.5
1. Django 1.6


The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]
The easiest way is to install it system wide [http://pip.readthedocs.org/en/latest/installing.html with pip]


     $ sudo pip install django==1.5
     $ sudo pip install django==1.6


Alternatively, you can use  
Alternatively, you can use  


     $ pip install --user django==1.5
     $ pip install --user django==1.6


rather than <code>sudo pip</code>, to install it to your user site-packages directory under <code>~/.local</code>, which won't impact the rest of the system.
rather than <code>sudo pip</code>, to install it to your user site-packages directory under <code>~/.local</code>, which won't impact the rest of the system.

Latest revision as of 14:31, 13 November 2014

This page explains how to set up Toaster in the same host where you are running your Yocto Project builds. Do it this way if you want to try Toaster or use it for individual purposes.

Before you start

Before you start, make sure you install the packages required by the Yocto Project

Using Yocto Project 1.6 "Daisy", Yocto Project 1.7 "Dizzy", or the master branch

You need this stuff ready

1. Django 1.6

The easiest way is to install it system wide with pip

   $ sudo pip install django==1.6

Alternatively, you can use

   $ pip install --user django==1.6

rather than sudo pip, to install it to your user site-packages directory under ~/.local, which won't impact the rest of the system.

2. South 0.8.4

  $ sudo pip install South==0.8.4

3. Make sure that port 8000 and 8200 are free, i.e. no servers on them

To get Toaster up and running

  • Clone one of the Yocto Project releases supported by Toaster
   $ git clone -b daisy git://git.yoctoproject.org/poky.git
   $ git clone -b dizzy git://git.yoctoproject.org/poky.git
  • or the Yocto Project master branch
  $ git clone http://git.yoctoproject.org/git/poky
  • Source your build environment (as you usually do)
   $ source poky/oe-init-build-env 
  • Edit your local.conf, layers, etc as required for your build
  • Before you start the build, start Toaster
   $ source toaster start 
  • Once Toaster is running, start a build. For example
   $ bitbake core-image-minimal
  • To see the Toaster web interface, open a browser and type the following in the navigation bar
   $ http://localhost:8000
  • or type the following command on your terminal
   $ xdg-open http://localhost:8000/ 
  • To stop Toaster do
   $ source toaster stop

Using the Dora + Toaster release (part of Yocto Project 1.5 "Dora" release)

You need this stuff ready

  1. Django 1.4.5. The easiest way is to install it system wide with pip
   $ sudo pip install django==1.4.5
  1. Make sure that port 8000 and 8200 are free, i.e. no servers on them

To get Toaster up and running

  • Clone the Dora + Toaster release tree
   $ git clone http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=dora-toaster
  • Source your build environment (as you usually do)
   $ source poky/oe-init-build-env 
  • Edit your local.conf, layers, etc as required for your build
  • Before you start the build, start Toaster
   $ source toaster start 
  • Once Toaster is running, start a build. For example
   $ bitbake core-image-minimal
  • To see the Toaster web interface, open a browser and type the following in the navigation bar
   $ http://localhost:8000
  • or type the following command on your terminal
   $ xdg-open http://localhost:8000/ 
  • To stop Toaster do
   $ source toaster stop

Bitbake extra options

This is an overview of extra options needed for Bitbake. These should be automatically added by Toaster in a conf/toaster.conf file that is enabled when the system starts through the toaster start command.

The gritty details are here:

Toaster needs the toaster bbclass enabled in Bitbake in order to record target image package information.

   $ INHERIT += "toaster" 

This enables the toaster bbclass in BitBake, needed to record target image package information.

   $ INHERIT += "buildhistory"   
   $ BUILDHISTORY_COMMIT = "1" 

This enables buildhistory in BitBake, needed to record target image package information. This last command is not strictly needed, yet without it buildhistory will not properly work.

A bunch of files are created and used under the build/ directory:

  • toaster.sqlite - the database file
  • toaster_web.log - the log file of the web server
  • toaster_ui.log - the log file of the ui component
  • .toastermain.pid - contains the pid of the web server
  • .toasterui.pid - contains the pid of the DSI data bridge
  • bitbake-cookerdaemon.log - the log file of the bitbake server