Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Embedded Linux Development using Yocto Projects - Second Edition

You're reading from  Embedded Linux Development using Yocto Projects - Second Edition

Product type Book
Published in Nov 2017
Publisher
ISBN-13 9781788470469
Pages 162 pages
Edition 2nd Edition
Languages
Authors (2):
Otavio Salvador Otavio Salvador
Profile icon Otavio Salvador
Daiane Angolini Daiane Angolini
Profile icon Daiane Angolini
View More author details

Table of Contents (22) Chapters

Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Meeting the Yocto Project Baking Our Poky-Based System Using Toaster to Bake an Image Grasping the BitBake Tool Detailing the Temporary Build Directory Assimilating Packaging Support Diving into BitBake Metadata Developing with the Yocto Project Debugging with the Yocto Project Exploring External Layers Creating Custom Layers Customizing Existing Recipes Achieving GPL Compliance Booting Our Custom Embedded Linux Index

Adding a package recipe


A package recipe is how we can instruct BitBake to fetch, unpack, compile, and install our application, kernel module, or any software provided by a project. Poky includes several classes that abstract the process for the most common development tools as projects based on Autotools, CMake, and QMake. A list of classes included in Poky can be seen in the following reference manual: http://www.yoctoproject.org/docs/2.4/ref-manual/ref-manual.html.

One simple recipe that executes the compile and install tasks explicitly is provided as follows:

DESCRIPTION = "Simple helloworld application"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0b
cf8506ecda2f7b4f302"
SRC_URI = "file://helloworld.c"
S = "${WORKDIR}"
do_compile() {
    ${CC} helloworld.c -o helloworld
}
do_install() {
    install -d ${D}${bindir}
    install -m 0755 helloworld ${D}${bindir}
}

The do_compile and do_install code blocks provide the Shell Scripting...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}