官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 桓仁| 襄汾县| 方山县| 镇原县| 阿图什市| 华蓥市| 弋阳县| 麻阳| 阳新县| 三门县| 陆良县| 新津县| 定兴县| 麟游县| 通化市| 自治县| 壶关县| 临朐县| 惠州市| 库尔勒市| 文昌市| 噶尔县| 鸡东县| 宜州市| 通海县| 新龙县| 甘肃省| 子洲县| 玉门市| 澎湖县| 准格尔旗| 潮州市| 新宾| 舟曲县| 阿合奇县| 浦北县| 获嘉县| 全南县| 克东县| 肃宁县| 玉龙|