- Yocto for Raspberry Pi
- Pierre Jean Texier Petter Mab?cker
- 587字
- 2021-07-14 11:27:09
Hob
In order to explore Hob, we will, through this section, sweep through the different essential steps for its proper functioning.
Preparing the environment for Hob
As in Chapter 2 , Building our First Poky Image for the Raspberry Pi, the first step is to initialize the environment. Recall this command:
$ source oe-init-build-env rpi-build
Once the command is launched, the terminal will be redirected to the rpi-build
directory.
Running Hob
Now that we have initialized all the variables required to build, we can start the Hob interface with this command:
$ hob
Once you run this command, Hob will try to parse the configuration files (local.conf
and bblayers.conf
) in order to find the metadata available to create the image. After this step, you will see the interface launch screen, as shown here:

Now, we can choose the desired machine from the list offered by Hob. Select the raspberrypi machine.
Note
The machine option you choose corresponds to the MACHINE
variable in the local.conf
file.
You will see the following progress screen:

Adding a layer is very simple. We just have to click on the Layers button, as shown in this screenshot:

After choosing the target machine, we need to choose he image that we want to create.
Like in Chapter 2 , Building our First Poky Image for the Raspberry Pi, we will select rpi-basic-image for our example:

The next step (if you want to modify the default configuration) is to select advanced configuration options by clicking on Advanced configuration, as shown in the following two screenshots. These options could be image types (such as cpio.gz
, ext2.bz2
, and ext3.gz
) or package formats (IPK, DEB, or RPM).


At this point, we can build the final image by clicking on the Build Image button. If you want to modify the recipe of an image, you just have to click on the Edit Image Recipe button.
Configuring recipes and packages
You can see the list of included recipes in Hob in the following screenshot:

As you can see, it is easy to add or remove recipes for the configuration of our image by selecting or deselecting them. If you click on the recipe name, you can see details such as its version and license. The next step is to click on the Build packages button. Once you do this, you will see the following screen:

Here, you will see a list of selected packages and can know the value of the estimated image size (in the top-right corner) and decide to remove some applications in order to generate a smaller image. It is also possible to see the number of selected packages and the size of the selected packages.
Note
BitBake resolves all dependencies from the selected packages, including any required additional packages.
Building the image
As you can imagine, the last step consists of building our image (by clicking on Build image). Hob tracks the progress of the construction, as shown in this screenshot:

You will see this screen when the build has completed:

On this screen, Hob displays a summary of the build. It is possible to go to the directory where the files have been generated (rpi- build/tmp/deploy/images/raspberrypi/
), and you can also view the log of the build process.
After that, we can create a bootable SD card with our Hob Image for the Raspberry Pi:
$ sudo dd if=rpi-basic-image-edited-20150221-135730-raspberrypi.rpi- sdimg of=/dev/sdX bs=1M
At this point, we just have to put the SD card into the Raspberry Pi, turn on the board, and play with it.
- Spring Boot開發與測試實戰
- Building Modern Web Applications Using Angular
- Windows系統管理與服務配置
- Big Data Analytics
- Solr Cookbook(Third Edition)
- C++20高級編程
- Swift 4從零到精通iOS開發
- HTML5權威指南
- RocketMQ實戰與原理解析
- 邊玩邊學Scratch3.0少兒趣味編程
- Tableau Dashboard Cookbook
- HTML5 WebSocket權威指南
- Python計算機視覺與深度學習實戰
- RESTful Web API Design with Node.js
- Apache Solr for Indexing Data