Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Embedded Linux Development with Yocto Project

You're reading from   Embedded Linux Development with Yocto Project Develop fascinating Linux-based projects using the groundbreaking Yocto Project tools

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781783282333
Length 142 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Preface 1. Meeting the Yocto Project FREE CHAPTER 2. Baking Our Poky-based System 3. Using Hob to Bake an Image 4. Grasping the BitBake Tool 5. Detailing the Temporary Build Directory 6. Assimilating Packaging Support 7. Diving into BitBake Metadata 8. Developing with the Yocto Project 9. Debugging with the Yocto Project 10. Exploring External Layers 11. Creating Custom Layers 12. Customizing Existing Recipes 13. Achieving GPL Compliance 14. Booting Our Custom Embedded Linux A. References
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 Yocto Project Reference Manual.

One simple recipe that does 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=0835ade698e0bcf8506ecda2f7b4f302" 

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 commands to build and install the...

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 $19.99/month. Cancel anytime