Yocto Project 1.6 - Daisy

NOTE: Hob is now deprecated and will no longer be available starting from the upcoming 2.1 release of the Yocto Project. You can use Toaster instead.

Hob is a graphical user interface for BitBake. Its primary goal is to enable a user to perform common tasks more easily.

Here is what you can do with the current version of Hob:

Hob image configuration screen

Interaction between Hob and BitBake

Prior to the Yocto Project 1.4 Release (Dylan), Hob had its own separate configuration, which was not linked to your .conf files. Thus, the two build environments (Hob and command line) were separate and could produce different output.

The 1.4 release started the process of "synchronizing" Hob and BitBake, so that both the command line and Hob share a single configuration. This work is still in progress. Currently, Hob takes (and updates) the local.conf and bblayers.conf values for the following variables:

What do you need to run Hob?

Hob requires the following packages:

  • Gtk+ 2.20.0 or higher
  • PyGtk 2.21.0 or higher

NOTE: The CentOS 6.4 distribution does not include the Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are required to run Hob. For more information about supported Linux distributions, see the Supported Linux Distributions section in the Yocto Project Reference Manual.

Running Hob

Hob is included with the Yocto Project 1.6 Release (Daisy)

Before running Hob, you need to make sure your environment is set up. To do that:

  1. Change your working directory to the root directory of your Yocto Project files (usually poky-daisy-11.0.0).
    $ cd ~/poky-daisy-11.0.0
  2. Run the environment script.
    $ source oe-init-build-env

For more information about setting up your build environment, see the oe-init-build-env and oe-init-build-env-memres sections in the Yocto Project Reference Manual.

After the environment script finishes, launch Hob:

$ hob

The Hob initial screen will appear:

The image configuration screen as it will appear when you launch Hob

To get help information, roll your mouse over controls and buttons, or click the information icons throughout the interface. Here is an example that shows the help information for Layers:

Information text for the Layers dialog

Once Hob has launched, you should go to the "Settings" dialog and be sure everything is set up for how you want your builds to occur. Clicking the "Settings" button in the top-right corner of the main window reveals the "Settings" dialog:

Hob Settings dialog

By default, the Hob "Settings" dialog provides reasonable values for the different variables. You can review the values by selecting each of the tabs and inspecting the settings. The following list briefly describes which variables you can configure within each tab of the "Settings" dialog:

  • Build environment: Number of threads and parallelism to apply during the build and the location of the download directory.
  • Shared state: SSTATE directory and SSTATE mirror(s) locations.
  • Proxies: Various proxy settings (all, http, https, ftp, git, and cvs).
  • Others: Other build variables you want to include.

Building images

Once your settings are established and saved, you can pick the profile for the target machine for which you are building the image.

The Hob machine selection menu

Once you pick the target machine, recipes are parsed.

Hob parsing recipes for the selected machine

After the recipes are parsed, you can set image-related options using the "Advanced configuration" dialog. Clicking the button next to the "Select a base image" drop down menu reveals the "Advanced configuration" dialog:

Hob Advanced configuration dialog

The following list briefly describes what each tab of the "Advanced configuration" dialog lets you configure:

  • Image types: The Yocto Project distribution to use (poky, poky-lsb, etc.), and the types of root file systems you want to produce.
  • Output: The package formats, the size of your image and the option to populate an SDK for a certain host platform.

Now you need to choose the image recipe you want to build. You can choose from many image recipes. The Images Appendix in the Yocto Project Reference Manual provides a full list and descriptions. Hob will also show a brief explanation of your selected image recipe.

Selecting an image recipe

To build the image recipe as is, click the "Build image" button.

Editing existing image recipes

If you want to customize the recipes and packages included by default in your selected image recipe, click the "Edit image recipe" button.

If you are not satisfied with the set of default recipes, you can use the "Edit recipes" screen to include or exclude recipes of your choice. You need to be aware that including and excluding recipes also includes or excludes dependent recipes. Use the check boxes in the "Included" column to include and exclude recipes.

The edit recipes screen in Hob

Click on a recipe to see some background information about it: description, homepage, license, and a full list of the recipes which bring in the selected recipe.

An example of recipe background information

Once you are satisfied with the set of recipes, you can proceed by clicking the "Build packages" button. Or, you can cancel your changes and go back to the main screen by clicking the "Cancel" button. Here is what the screen looks like during package building:

Hob while building packages

When the packages are built, you can further customize the image contents by changing which packages are actually included in the image. Use the check boxes in the "Included" column to include and exclude packages.

Hob 'Edit packages' screen

Click on a package to see some additional details about it. The information includes the list of files that the package will install into the root file system.

An example of package information

Once you are satisfied with the set of packages, you can proceed by clicking the "Build image" button.

Hob building an image

Creating your own image recipes

Once the build completes, you have several options. You can view the image files, check the build log, edit the configuration, edit the packages or build a new image.

If you customized the content of you selected image recipe, Hob will also give you the option to save your changes as a new recipe.

The save image recipe option

Clicking the "Save image recipe" button in the lower-right hand corner of the screen displays a dialog where you enter the name and description for your image recipe. The name is mandatory, but the description is optional.

The save image recipe dialog

To build your image recipe, use the "Select from my image recipes" option that you'll find at the top of the image recipe selection menu.

The option to select from my image recipes

Running or deploying your image

If you selected a QEMU option as your target machine, you can run the image using the QEMU emulator.

Hob after completing a QEMU build

Clicking the "Run Image" button in the lower-right hand corner of the screen launches the QEMU emulator.

The QEMU emulator

For any other target machine, if you selected the 'iso' or 'hddimg' image types in the Advanced configuration dialog, you can deploy your image to a USB disk for live-booting on a device.

Hob after completing a real hardware build with the live image type selected

Clicking the "Deploy image" button in the lower-right hand corner of the screen launches a deployment tool that will guide you through the process.

First step of the deployment process