diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 05d1e95bdf..a8ef2d1576 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -1320,7 +1320,7 @@
Functions:
Functions provide a series of actions to be performed.
You usually use functions to override the default
- implementation of a task function or to compliment
+ implementation of a task function or to complement
a default function (i.e. append or prepend to an
existing function).
Standard functions use sh shell
@@ -1332,12 +1332,13 @@
do_install () {
autotools_do_install
install -d ${D}${base_bindir}
- mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+ rmdir ${D}${bindir}/
}
It is also possible to implement new functions that
are called between existing tasks as long as the
- new functions are not replacing or complimenting the
+ new functions are not replacing or complementing the
default functions.
You can implement functions in Python
instead of shell.
@@ -1488,7 +1489,6 @@
Use the _prepend operator to
prepend values to existing variables.
This operator does not add any additional space.
- This operator does not add any additional space.
Also, the operator is applied after all the
+=, and
=+ operators have been applied and
@@ -1506,12 +1506,12 @@
only being performed for the specified target or
machine:
- CFLAGS_prepend_sh4 = " file://fix-makefile.patch"
+ CFLAGS_prepend_sh4 = "-I${S}/myincludes "
Overrides: -
You can use overrides to set a value conditionally,
- typically on how the recipe is being built.
+ typically based on how the recipe is being built.
For example, to set the
KBRANCH
variable's value to "standard/base" for any target
@@ -1528,7 +1528,7 @@
For example, when setting variables such as
FILES
and
- RDEPENDS,
+ RDEPENDS
that are specific to individual packages produced by
a recipe, you should always use an override that
specifies the name of the package.
@@ -1577,7 +1577,7 @@
Creating a new recipe is usually an iterative process that
requires using BitBake to process the recipe multiple times in
order to progressively discover and add information to the
- recipe.
+ recipe file.
@@ -1599,17 +1599,18 @@
During the build, the OpenEmbedded build system creates a
- temporary work directory for the recipe
+ temporary work directory for each recipe
(${WORKDIR})
where it keeps extracted source files, log files, intermediate
compilation and packaging files, and so forth.
- The temporary work directory is constructed as follows and
+ The per-recipe temporary work directory is constructed as follows and
depends on several factors:
- ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
+ BASE_WORKDIR ?= "${TMPDIR}/work"
+ WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
As an example, assume a Source Directory top-level folder named
poky, a default Build Directory at
@@ -1687,7 +1688,7 @@
The
do_fetch
task uses the prefix of each entry in the
- SRC_URI variable value to determine what
+ SRC_URI variable value to determine which
fetcher to use to get your source files.
It is the SRC_URI variable that triggers
the fetcher.
@@ -1717,7 +1718,7 @@
Here is a simple example from the
- meta/recipes-devtools/cdrtools/cdrtools-native_3.01a17.bb
+ meta/recipes-devtools/cdrtools/cdrtools-native_3.01a20.bb
recipe where the source comes from a single tarball.
Notice the use of the
PV
@@ -1824,7 +1825,7 @@
This final example is a bit more complicated and is from the
- meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.19.bb
+ meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb
recipe.
The example's SRC_URI statement identifies
multiple files as the source files for the recipe: a tarball, a
@@ -1844,8 +1845,8 @@
The path is relative to the
FILESPATH
variable and searches specific directories in a certain order:
- ${BPN},
${BP},
+ ${BPN},
and files.
The directories are assumed to be subdirectories of the
directory in which the recipe or append file resides.
@@ -2434,7 +2435,7 @@
needs to inherit the
systemd
class.
- See the systemd.class file
+ See the systemd.bbclass file
located in your
Source Directory.
section for more information.
@@ -2606,7 +2607,7 @@
A post-installation function has the following structure:
- pkg_postinst_PACKAGENAME () {
+ pkg_postinst_PACKAGENAME() {
#!/bin/sh -e
# Commands to carry out
}
@@ -2629,7 +2630,7 @@
To delay script execution until boot time, use the following
structure in the post-installation script:
- pkg_postinst_PACKAGENAME () {
+ pkg_postinst_PACKAGENAME() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
# Actions to carry out on the device go here
@@ -2811,33 +2812,36 @@
In the following example, mtd-utils is a makefile-based package:
- SUMMARY = "Tools for managing memory technology devices."
+ SUMMARY = "Tools for managing memory technology devices"
SECTION = "base"
DEPENDS = "zlib lzo e2fsprogs util-linux"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
- file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
+ file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
- SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=995cfe51b0a3cf32f381c140bf72b21bf91cef1b \
- file://add-exclusion-to-mkfs-jffs2-git-2.patch"
+ # Use the latest version at 26 Oct, 2013
+ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+ SRC_URI = "git://git.infradead.org/mtd-utils.git \
+ file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+ "
+
+ PV = "1.5.1+git${SRCPV}"
S = "${WORKDIR}/git/"
- PR = "r1"
-
- EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' \
- 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
+ EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
do_install () {
- oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
- INCLUDEDIR=${includedir}
- install -d ${D}${includedir}/mtd/
- for f in ${S}/include/mtd/*.h; do
- install -m 0644 $f ${D}${includedir}/mtd/
- done
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
}
+ PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+
+ FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
+ FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
+ FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+
PARALLEL_MAKE = ""
BBCLASSEXTEND = "native"