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

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.

主站蜘蛛池模板: 东源县| 鸡西市| 莎车县| 房产| 云和县| 赫章县| 台南县| 阳城县| 望都县| 新野县| 平度市| 秦皇岛市| 时尚| 炉霍县| 盈江县| 秭归县| 泉州市| 长宁区| 昆明市| 宜州市| 临沭县| 台中市| 仪陇县| 彭水| 乳源| 郴州市| 邵东县| 高要市| 乌兰县| 道真| 乌鲁木齐县| 海盐县| 平陆县| 三门峡市| 沙田区| 上蔡县| 呼玛县| 云南省| 石棉县| 彝良县| 山阴县|