These steps get your layer set up for the build:
Create additional structure: Create the additional layer structure:
$ cd ~/poky/meta-mylayer $ mkdir conf $ mkdir recipes-kernel $ mkdir recipes-kernel/linux $ mkdir recipes-kernel/linux/linux-yocto
The conf
directory holds your configuration files, while the
recipes-kernel
directory holds your append file and
your patch file.
Create the layer configuration file:
Move to the meta-mylayer/conf
directory and create
the layer.conf
file as follows:
# We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" # We have recipes-* directories, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "mylayer" BBFILE_PATTERN_mylayer = "^${LAYERDIR}/" BBFILE_PRIORITY_mylayer = "5"
Notice mylayer
as part of the last three
statements.
Create the kernel recipe append file:
Move to the meta-mylayer/recipes-kernel/linux
directory and create
the linux-yocto_3.4.bbappend
file as follows:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-calibrate-Add-printk-example.patch" PRINC := "${@int(PRINC) + 1}"
The FILESEXTRAPATHS
and SRC_URI
statements enable the OpenEmbedded build system to find the patch file.
For more information on using append files, see the
"Using .bbappend Files"
section.
Put the patch file in your layer:
Move the 0001-calibrate-Add-printk-example.patch
file to
the meta-mylayer/recipes-kernel/linux/linux-yocto
directory.