Skip to Content
Embedded Linux Development Using Yocto Project Cookbook - Second Edition
book

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

by Alex González
January 2018
Intermediate to advanced content levelIntermediate to advanced
456 pages
12h 49m
English
Packt Publishing
Content preview from Embedded Linux Development Using Yocto Project Cookbook - Second Edition

How to do it...

Once we know how to compile the module externally, we are ready to prepare a Linux kernel module Yocto recipe for it:

  1. We place the module source file and Makefile in recipes-kernel/hello-world/files/ inside our meta-bsp-custom layer.
  2. We then create a recipes-kernel/hello-world/hello-world.bb file with the following content:
# Copyright (C) 2017 Packt Publishing. SUMMARY = "Simplest hello world kernel module." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" inherit module SRC_URI = " \ file://hello_world.c \ file://Makefile \ " S = "${WORKDIR}" COMPATIBLE_MACHINE = "(wandboard)" 

The recipe defines the source directory and the two module files after inheriting ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Embedded Linux Development using Yocto Projects - Second Edition

Embedded Linux Development using Yocto Projects - Second Edition

Otavio Salvador, Daiane Angolini

Publisher Resources

ISBN: 9781788399210Supplemental Content