Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Using Yocto Project with BeagleBone Black
Using Yocto Project with BeagleBone Black

Using Yocto Project with BeagleBone Black: Unleash the power of the BeagleBone Black embedded platform with Yocto Project

Arrow left icon
Profile Icon Irfan Sadiq Profile Icon Hafiz Muhammad I Sadiq
Arrow right icon
€32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
Paperback Jun 2015 144 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Irfan Sadiq Profile Icon Hafiz Muhammad I Sadiq
Arrow right icon
€32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
Paperback Jun 2015 144 pages 1st Edition
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Using Yocto Project with BeagleBone Black

Chapter 2. What's BitBake All About?

In the previous chapter, we created a working image for BeagleBone using Yocto Project. We also briefly discussed the different concepts while working on the exercises. In this chapter, we will move one step ahead by detailing different aspects of the basic engine behind Yocto Project, and other similar projects. This engine is BitBake. Covering all the various aspects of BitBake in one chapter is not possible; it will require a complete book. We will familiarize you as much as possible with this tool.

We will cover the following topics in this chapter:

  • A brief history of BitBake
  • Legacy tools and BitBake
  • Execution of BitBake
  • BitBake options

A brief history of BitBake

BitBake drew inspiration from the Gentoo package management tool, Portage. Gentoo has a unique philosophy of building binaries on the system where they are supposed to run, so that maximum optimizations can be applied to the code. This philosophy fits best in the case of embedded systems, where you always have a different set of hardware in hand, and you need to prepare board support packages for that hardware. Initially, BitBake was a part of OpenEmbedded.

Later on, an OpenEmbedded project team member, Chris Larson, split it into two separate pieces:

  • BitBake: This is a generic task executor
  • OpenEmbedded: This is a metadata set utilized by BitBake

Now, BitBake is the base for OpenEmbedded and Yocto Project, which are being used to build and maintain multiple Linux distributions.

Legacy tools and BitBake

This discussion does not intend to invoke any religious row between other alternatives and BitBake. Every step in the evolution has its own importance, which cannot be denied, and so do other available tools. BitBake was developed keeping in mind the Embedded Linux Development domain. So, it tried to solve the problems faced in this core area, and in my opinion, it addresses these in the best way till date. You might get the same output using other tools, such as Buildroot, but the flexibility and ease provided by BitBake in this domain is second to none. The major difference is in addressing the problem. Legacy tools are developed considering packages in mind, but BitBake evolved to solve the problems faced during the creation of BSPs, or embedded distributions. Let's go through the challenges faced in this specific domain and understand how BitBake helps us face them.

Cross-compilation

BitBake takes care of cross compilation. You do not have to worry about...

BitBake execution

To get us to a successful package or image, BitBake performs some steps that we need to go through to get an understanding of the workflow. In certain cases, some of these steps can be avoided; but we are not discussing such cases, considering them as corner cases. For details on these, we should refer to the BitBake user manual.

Parsing metadata

When we invoke the BitBake command to build our image, the first thing it does is parse our base configuration metadata. This metadata, as we have already seen in the previous chapter, consists of build_bb/conf/bblayers.conf, multiple layer/conf/layer.conf, and poky/meta/conf/bitbake.conf. This data can be of the following types:

  • Configuration data
  • Class data
  • Recipes

Key variables BBFILES and BBPATH, which are constructed from the layer.conf file. Thus, the constructed BBPATH variable is used to locate configuration files under conf/ and class files under class/ directories. The BBFILES variable is used to find recipe files (.bb and...

BitBake options

BitBake also follows the standard of the -h or --help option. So, anytime, we can list all the available options by running BitBake with any of these options. Thus, we won't get into their details. We will try to discuss only those options that we will encounter most, or we need the most. Another standard or generic option is to get the --version version of BitBake, which is also available. We used the simplest form of BitBake in the previous chapter to build our images:

$ bitbake core-image-sato

Here, core-image-sato was the name of the image recipe we were building.

The format of bitbake command as inferred from bitbake -h is as follows:

Usage: bitbake [options] [recipe name/target …]

In the preceding example, we did not provide any option, as it was not required in the scenario we were building.

Now, issue BitBake with -h, as shown here from the build directory that we created in the first chapter:

$ bitbake -h 

We will skip the output here due to the length and...

Summary

In this chapter, we discussed a brief history of BitBake. You learned the goals and problem areas that BitBake has considered, thus making itself a unique option for Embedded Linux Development. You also learned how BitBake actually works. Finally, we went through different options of BitBake, using examples to illustrate the important ones.

In the next chapter, you will learn how to create a basic hello world recipe and discuss its different elements.

Left arrow icon Right arrow icon

Description

This book is ideal for system developers with knowledge and experience of embedded systems. Knowledge of BeagleBone Black is assumed, while no knowledge of Yocto Project build system is necessary.

Who is this book for?

This book is ideal for system developers with knowledge and experience of embedded systems. Knowledge of BeagleBone Black is assumed, while no knowledge of Yocto Project build system is necessary.

What you will learn

  • Develop a successful package or image with the help of the BitBake tool
  • Generate a recipe for some trendy consolebased games
  • Boot up BeagleBone using images created with Yocto Project
  • Customize the root file system using a custom layer
  • Create a home surveillance solution using a webcam attached to the BeagleBone USB port
  • Turn BeagleBone into a Wifi access point by attaching a USB dongle
  • Build different versions of the helloworld recipe
Estimated delivery fee Deliver to Lithuania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2015
Length: 144 pages
Edition : 1st
Language : English
ISBN-13 : 9781785289736
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Lithuania

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Jun 30, 2015
Length: 144 pages
Edition : 1st
Language : English
ISBN-13 : 9781785289736
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 99.97
Yocto for Raspberry Pi
€29.99
Learning Embedded Linux using the Yocto Project
€36.99
Using Yocto Project with BeagleBone Black
€32.99
Total 99.97 Stars icon
Banner background image

Table of Contents

9 Chapters
1. Welcome to Yocto Project and BeagleBone Black Chevron down icon Chevron up icon
2. What's BitBake All About? Chevron down icon Chevron up icon
3. Creating the helloworld Recipe Chevron down icon Chevron up icon
4. Adding Multimedia to Your Board Chevron down icon Chevron up icon
5. Creating and Exploring Layers Chevron down icon Chevron up icon
6. Your First Console Game Chevron down icon Chevron up icon
7. Turning BeagleBone into a Home Surveillance System Chevron down icon Chevron up icon
8. BeagleBone as a Wi-Fi Access Point Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2
(6 Ratings)
5 star 33.3%
4 star 16.7%
3 star 16.7%
2 star 0%
1 star 33.3%
Filter icon Filter
Top Reviews

Filter reviews by




DR F. Feb 25, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book
Amazon Verified review Amazon
TheLam Nguyen May 20, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
good book
Amazon Verified review Amazon
yet another reviewer Dec 27, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I really liked this book as it's the only Yocto project book that is dedicated to one specific board. Keep in mind this book is for beginners so you will learn the fundamentals from a practical point of view using real hardware. The only con I see about this book is that there's a lack of content for how much you are paying but overall it's a great way to jump into the yocto kernel.
Amazon Verified review Amazon
Pete M. Jan 29, 2019
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I've just started the book, only about 25% in, but so far I find it difficult to read due to errors in the text, and assumptions on the author's part. It seems like it was not proofread by someone of the target audience. By re-reading paragraphs you are able to tease out what the author was trying to convey, and you could argue that these inaccuracies force you to dig deeper on your own, thus instilling a deeper learning. Overall, I do not regret the purchase, but I would offer the following synopsis: "A decent set of notes related to building Linux for Beaglebone with Yocto."
Amazon Verified review Amazon
PaulArt Nov 04, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I have been trying to follow this book for the last 1 month on the packt site where I am a subscriber. Hopelessly out of date - uses scripts no longer present in current poky distributions. Don't waste your time. Also very badly written. Consider this:"Patch in our Git source from the latest commit, which can be created using the following steps:1. Modify the source file/files. (MODIFY WHAT?)2. Commit these changes: git add * and git commit -m "Custom patch".3. Executing the patch as git format-patch -n HEAD^ will give you the output as 001-Custom patch.patch.4. Rename the example.patch file to print.patch.5. Add the following code to it:Yocto makes a release every 6 months. What this means is, ANY book on the topic becomes obsolete pretty fast. I also have a sneaky suspicion that the High Priests in Yocto do this on purpose to keep their consultancy dollars flowing. I first started with Chris Simmons book, abandoned it and moved to this one and I am now abandoning this as well. I do not understand why the publishers do not force the authors to update the book or at least provide some kind of a website we can use to get the corrections. A very basic example, this book uses the yocto-layer script which has been obsoleted and replaced with bitbake-layers. How much effort does it take to provide an errata page online for this update? It took me several fruitless hours of googling and then finally a message to the stackoverflow site to get an answer from a kind person who directed me to use bitbake-layers instead of yocto-layers. This book should be removed from Amazon and also Packtpub and also every other book that claims to teach you Yocto linux but falls flat on its face because the Authors like Irfan and Simmons are busy collecting consulting dollars somewhere in Europe and have no time to either answer email or work with the publisher to provide updates.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela