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:
- Build images
- Edit existing image recipes
- Create your own image recipes
- Run images in the QEMU emulator
- Deploy images to a USB disk for live-booting on a target device
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
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.
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:
- Change your working directory to the root directory of your Yocto Project files (usually
$ cd ~/poky-daisy-11.0.0
- Run the environment script.
$ source oe-init-build-env
After the environment script finishes, launch Hob:
The Hob initial screen will appear:
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:
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:
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.
Once your settings are established and saved, you can pick the profile for the target machine for which you are building the image.
Once you pick the target machine, recipes are parsed.
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:
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.
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.
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.
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:
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.
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.
Once you are satisfied with the set of packages, you can proceed by clicking the "Build image" button.
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.
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.
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.
Running or deploying your image
If you selected a QEMU option as your target machine, you can run the image using the QEMU emulator.
Clicking the "Run Image" button in the lower-right hand corner of the screen launches 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.
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.