documentation/dev-manual/dev-manual-common-tasks.xml: links fixed.
Moving the "Common Tasks" section from the YP Reference Manual into the YP Development Manual upset a bunch of links. I have corrected these links. (From yocto-docs rev: 69ee73c59958aaab6f6370231c65300d1d8c92f8) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
797758c0d4
commit
646bda0f1d
|
@ -23,7 +23,7 @@
|
||||||
variables.
|
variables.
|
||||||
For information on variables that are useful for recipes and for information about recipe naming
|
For information on variables that are useful for recipes and for information about recipe naming
|
||||||
issues, see the
|
issues, see the
|
||||||
<link linkend='ref-varlocality-recipe-required'>Required</link> section for recipe variables.
|
<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#ref-varlocality-recipe-required'>Required</ulink>" section of the Yocto Project Reference Manual.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -47,12 +47,14 @@
|
||||||
<para>
|
<para>
|
||||||
Building an application from a single file that is stored locally (e.g. under
|
Building an application from a single file that is stored locally (e.g. under
|
||||||
<filename>files/</filename>) requires a recipe that has the file listed in
|
<filename>files/</filename>) requires a recipe that has the file listed in
|
||||||
the <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> variable.
|
the
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> variable.
|
||||||
Additionally, you need to manually write the <filename>do_compile</filename> and
|
Additionally, you need to manually write the <filename>do_compile</filename> and
|
||||||
<filename>do_install</filename> tasks.
|
<filename>do_install</filename> tasks.
|
||||||
The <filename><link linkend='var-S'>S</link></filename> variable defines the
|
The <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> variable defines the
|
||||||
directory containing the source code, which is set to <filename><link linkend='var-WORKDIR'>
|
directory containing the source code, which is set to
|
||||||
WORKDIR</link></filename> in this case - the directory BitBake uses for the build.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'>
|
||||||
|
WORKDIR</ulink></filename> in this case - the directory BitBake uses for the build.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
DESCRIPTION = "Simple helloworld application"
|
DESCRIPTION = "Simple helloworld application"
|
||||||
SECTION = "examples"
|
SECTION = "examples"
|
||||||
|
@ -89,7 +91,7 @@
|
||||||
<para>
|
<para>
|
||||||
Applications that use Autotools such as <filename>autoconf</filename> and
|
Applications that use Autotools such as <filename>autoconf</filename> and
|
||||||
<filename>automake</filename> require a recipe that has a source archive listed in
|
<filename>automake</filename> require a recipe that has a source archive listed in
|
||||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> and
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> and
|
||||||
also inherits Autotools, which instructs BitBake to use the
|
also inherits Autotools, which instructs BitBake to use the
|
||||||
<filename>autotools.bbclass</filename> file, which contains the definitions of all the steps
|
<filename>autotools.bbclass</filename> file, which contains the definitions of all the steps
|
||||||
needed to build an Autotool-based application.
|
needed to build an Autotool-based application.
|
||||||
|
@ -111,10 +113,10 @@
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The variable <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
|
The variable
|
||||||
</filename> is used to track source license changes as described in the
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
|
||||||
<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</link>
|
is used to track source license changes as described in the
|
||||||
section.
|
"<ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</ulink>" section.
|
||||||
You can quickly create Autotool-based recipes in a manner similar to the previous example.
|
You can quickly create Autotool-based recipes in a manner similar to the previous example.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -124,11 +126,11 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Applications that use GNU <filename>make</filename> also require a recipe that has
|
Applications that use GNU <filename>make</filename> also require a recipe that has
|
||||||
the source archive listed in <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
|
the source archive listed in <filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>.
|
||||||
You do not need to add a <filename>do_compile</filename> step since by default BitBake
|
You do not need to add a <filename>do_compile</filename> step since by default BitBake
|
||||||
starts the <filename>make</filename> command to compile the application.
|
starts the <filename>make</filename> command to compile the application.
|
||||||
If you need additional <filename>make</filename> options you should store them in the
|
If you need additional <filename>make</filename> options you should store them in the
|
||||||
<filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-EXTRA_OEMAKE'>EXTRA_OEMAKE</ulink></filename> variable.
|
||||||
BitBake passes these options into the <filename>make</filename> GNU invocation.
|
BitBake passes these options into the <filename>make</filename> GNU invocation.
|
||||||
Note that a <filename>do_install</filename> task is still required.
|
Note that a <filename>do_install</filename> task is still required.
|
||||||
Otherwise BitBake runs an empty <filename>do_install</filename> task by default.
|
Otherwise BitBake runs an empty <filename>do_install</filename> task by default.
|
||||||
|
@ -137,8 +139,8 @@
|
||||||
<para>
|
<para>
|
||||||
Some applications might require extra parameters to be passed to the compiler.
|
Some applications might require extra parameters to be passed to the compiler.
|
||||||
For example, the application might need an additional header path.
|
For example, the application might need an additional header path.
|
||||||
You can accomplish this by adding to the <filename><link linkend='var-CFLAGS'>CFLAGS</link>
|
You can accomplish this by adding to the
|
||||||
</filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-CFLAGS'>CFLAGS</ulink></filename> variable.
|
||||||
The following example shows this:
|
The following example shows this:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
CFLAGS_prepend = "-I ${S}/include "
|
CFLAGS_prepend = "-I ${S}/include "
|
||||||
|
@ -179,8 +181,9 @@
|
||||||
<title>Splitting an Application into Multiple Packages</title>
|
<title>Splitting an Application into Multiple Packages</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can use the variables <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename> and
|
You can use the variables
|
||||||
<filename><link linkend='var-FILES'>FILES</link></filename> to split an application into
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink></filename> and
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-FILES'>FILES</ulink></filename> to split an application into
|
||||||
multiple packages.
|
multiple packages.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -211,14 +214,17 @@
|
||||||
In the previous example, we want to ship the <filename>sxpm</filename>
|
In the previous example, we want to ship the <filename>sxpm</filename>
|
||||||
and <filename>cxpm</filename> binaries in separate packages.
|
and <filename>cxpm</filename> binaries in separate packages.
|
||||||
Since <filename>bindir</filename> would be packaged into the main
|
Since <filename>bindir</filename> would be packaged into the main
|
||||||
<filename><link linkend='var-PN'>PN</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename>
|
||||||
package by default, we prepend the <filename><link linkend='var-PACKAGES'>PACKAGES</link>
|
package by default, we prepend the
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink>
|
||||||
</filename> variable so additional package names are added to the start of list.
|
</filename> variable so additional package names are added to the start of list.
|
||||||
This results in the extra <filename><link linkend='var-FILES'>FILES</link></filename>_*
|
This results in the extra
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-FILES'>FILES</ulink></filename>_*
|
||||||
variables then containing information that define which files and
|
variables then containing information that define which files and
|
||||||
directories go into which packages.
|
directories go into which packages.
|
||||||
Files included by earlier packages are skipped by latter packages.
|
Files included by earlier packages are skipped by latter packages.
|
||||||
Thus, the main <filename><link linkend='var-PN'>PN</link></filename> package
|
Thus, the main
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename> package
|
||||||
does not include the above listed files.
|
does not include the above listed files.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -284,8 +290,9 @@
|
||||||
</filename> function to the <filename>.bb</filename> file and use
|
</filename> function to the <filename>.bb</filename> file and use
|
||||||
<filename>PACKAGENAME</filename> as the name of the package you want to attach to the
|
<filename>PACKAGENAME</filename> as the name of the package you want to attach to the
|
||||||
<filename>postinst</filename> script.
|
<filename>postinst</filename> script.
|
||||||
Normally <filename><link linkend='var-PN'>PN</link></filename> can be used, which
|
Normally
|
||||||
automatically expands to PACKAGENAME.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PN'>PN</ulink></filename>
|
||||||
|
can be used, which automatically expands to PACKAGENAME.
|
||||||
A post-installation function has the following structure:
|
A post-installation function has the following structure:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
pkg_postinst_PACKAGENAME () {
|
pkg_postinst_PACKAGENAME () {
|
||||||
|
@ -323,7 +330,8 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The previous example delays execution until the image boots again because the
|
The previous example delays execution until the image boots again because the
|
||||||
<filename><link linkend='var-D'>D</link></filename> variable points
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-D'>D</ulink></filename>
|
||||||
|
variable points
|
||||||
to the directory containing the image when the root filesystem is created at build time but
|
to the directory containing the image when the root filesystem is created at build time but
|
||||||
is unset when executed on the first boot.
|
is unset when executed on the first boot.
|
||||||
</para>
|
</para>
|
||||||
|
@ -355,7 +363,7 @@
|
||||||
By creating a custom image, a developer has total control
|
By creating a custom image, a developer has total control
|
||||||
over the contents of the image.
|
over the contents of the image.
|
||||||
It is important to use the correct names of packages in the
|
It is important to use the correct names of packages in the
|
||||||
<filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename> variable.
|
||||||
You must use the OpenEmbedded notation and not the Debian notation for the names
|
You must use the OpenEmbedded notation and not the Debian notation for the names
|
||||||
(e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>).
|
(e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>).
|
||||||
</para>
|
</para>
|
||||||
|
@ -380,12 +388,14 @@
|
||||||
that is used to build the image or images.
|
that is used to build the image or images.
|
||||||
A good example of a tasks package is
|
A good example of a tasks package is
|
||||||
<filename>meta/recipes-sato/tasks/task-poky.bb</filename>.
|
<filename>meta/recipes-sato/tasks/task-poky.bb</filename>.
|
||||||
The <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
|
The
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGES'>PACKAGES</ulink></filename>
|
||||||
variable lists the task packages to build along with the complementary
|
variable lists the task packages to build along with the complementary
|
||||||
<filename>-dbg</filename> and <filename>-dev</filename> packages.
|
<filename>-dbg</filename> and <filename>-dev</filename> packages.
|
||||||
For each package added, you can use
|
For each package added, you can use
|
||||||
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-RDEPENDS'>RDEPENDS</ulink></filename>
|
||||||
and <filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
|
and
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename>
|
||||||
entries to provide a list of packages the parent task package should contain.
|
entries to provide a list of packages the parent task package should contain.
|
||||||
Following is an example:
|
Following is an example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
|
@ -423,7 +433,7 @@
|
||||||
To build an image using these task packages, you need to add
|
To build an image using these task packages, you need to add
|
||||||
<filename>task-custom-apps</filename> and/or
|
<filename>task-custom-apps</filename> and/or
|
||||||
<filename>task-custom-tools</filename> to
|
<filename>task-custom-tools</filename> to
|
||||||
<filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
|
||||||
For other forms of image dependencies see the other areas of this section.
|
For other forms of image dependencies see the other areas of this section.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -435,7 +445,7 @@
|
||||||
<para>
|
<para>
|
||||||
Ultimately users might want to add extra image features to the set used by
|
Ultimately users might want to add extra image features to the set used by
|
||||||
Yocto Project with the
|
Yocto Project with the
|
||||||
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename>
|
||||||
variable.
|
variable.
|
||||||
To create these features, the best reference is
|
To create these features, the best reference is
|
||||||
<filename>meta/classes/core-image.bbclass</filename>, which shows how the
|
<filename>meta/classes/core-image.bbclass</filename>, which shows how the
|
||||||
|
@ -444,12 +454,12 @@
|
||||||
<filename>IMAGE_FEATURES</filename>
|
<filename>IMAGE_FEATURES</filename>
|
||||||
variable and then maps that into a set of tasks or packages.
|
variable and then maps that into a set of tasks or packages.
|
||||||
Based on this information the
|
Based on this information the
|
||||||
<filename><link linkend='var-IMAGE_INSTALL'> IMAGE_INSTALL</link></filename> variable
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'> IMAGE_INSTALL</ulink></filename>
|
||||||
is generated automatically.
|
variable is generated automatically.
|
||||||
Users can add extra features by extending the class or creating a custom class for use
|
Users can add extra features by extending the class or creating a custom class for use
|
||||||
with specialized image <filename>.bb</filename> files.
|
with specialized image <filename>.bb</filename> files.
|
||||||
You can also add more features by configuring the
|
You can also add more features by configuring the
|
||||||
<filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</ulink></filename>
|
||||||
variable in the <filename>local.conf</filename> file found in the Yocto Project
|
variable in the <filename>local.conf</filename> file found in the Yocto Project
|
||||||
files located in the build directory.
|
files located in the build directory.
|
||||||
</para>
|
</para>
|
||||||
|
@ -486,7 +496,7 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The simplest way to add extra packages to all images is by using the
|
The simplest way to add extra packages to all images is by using the
|
||||||
<filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
|
||||||
variable with the <filename>_append</filename> operator:
|
variable with the <filename>_append</filename> operator:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
IMAGE_INSTALL_append = " strace"
|
IMAGE_INSTALL_append = " strace"
|
||||||
|
@ -521,7 +531,7 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can add packages using a similar approach through the
|
You can add packages using a similar approach through the
|
||||||
<filename><link linkend='var-POKY_EXTRA_INSTALL'>POKY_EXTRA_INSTALL</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-POKY_EXTRA_INSTALL'>POKY_EXTRA_INSTALL</ulink></filename>
|
||||||
variable.
|
variable.
|
||||||
If you use this variable, only <filename>core-image-*</filename> images are affected.
|
If you use this variable, only <filename>core-image-*</filename> images are affected.
|
||||||
</para>
|
</para>
|
||||||
|
@ -534,7 +544,8 @@
|
||||||
It is possible to filter or mask out recipe and recipe append files such that
|
It is possible to filter or mask out recipe and recipe append files such that
|
||||||
BitBake ignores them.
|
BitBake ignores them.
|
||||||
You can do this by providing an expression with the
|
You can do this by providing an expression with the
|
||||||
<filename><link linkend='var-BBMASK'>BBMASK</link></filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBMASK'>BBMASK</ulink></filename>
|
||||||
|
variable.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
BBMASK = ".*/meta-mymachine/recipes-maybe/"
|
BBMASK = ".*/meta-mymachine/recipes-maybe/"
|
||||||
|
@ -581,24 +592,24 @@
|
||||||
<para>
|
<para>
|
||||||
The most important variables to set in this file are as follows:
|
The most important variables to set in this file are as follows:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename><link linkend='var-TARGET_ARCH'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-TARGET_ARCH'>
|
||||||
TARGET_ARCH</link></filename> (e.g. "arm")</para></listitem>
|
TARGET_ARCH</ulink></filename> (e.g. "arm")</para></listitem>
|
||||||
<listitem><para><filename><link linkend='var-PREFERRED_PROVIDER'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PREFERRED_PROVIDER'>
|
||||||
PREFERRED_PROVIDER</link></filename>_virtual/kernel (see below)</para></listitem>
|
PREFERRED_PROVIDER</ulink></filename>_virtual/kernel (see below)</para></listitem>
|
||||||
<listitem><para><filename><link linkend='var-MACHINE_FEATURES'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-MACHINE_FEATURES'>
|
||||||
MACHINE_FEATURES</link></filename> (e.g. "kernel26 apm screen wifi")</para></listitem>
|
MACHINE_FEATURES</ulink></filename> (e.g. "kernel26 apm screen wifi")</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You might also need these variables:
|
You might also need these variables:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><filename><link linkend='var-SERIAL_CONSOLE'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SERIAL_CONSOLE'>
|
||||||
SERIAL_CONSOLE</link></filename> (e.g. "115200 ttyS0")</para></listitem>
|
SERIAL_CONSOLE</ulink></filename> (e.g. "115200 ttyS0")</para></listitem>
|
||||||
<listitem><para><filename><link linkend='var-KERNEL_IMAGETYPE'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-KERNEL_IMAGETYPE'>
|
||||||
KERNEL_IMAGETYPE</link></filename> (e.g. "zImage")</para></listitem>
|
KERNEL_IMAGETYPE</ulink></filename> (e.g. "zImage")</para></listitem>
|
||||||
<listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>
|
<listitem><para><filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-IMAGE_FSTYPES'>
|
||||||
IMAGE_FSTYPES</link></filename> (e.g. "tar.gz jffs2")</para></listitem>
|
IMAGE_FSTYPES</ulink></filename> (e.g. "tar.gz jffs2")</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -623,9 +634,10 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you are creating a new recipe, normal recipe-writing rules apply for setting
|
If you are creating a new recipe, normal recipe-writing rules apply for setting
|
||||||
up a <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
|
up a
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename>.
|
||||||
Thus, you need to specify any necessary patches and set
|
Thus, you need to specify any necessary patches and set
|
||||||
<filename><link linkend='var-S'>S</link></filename> to point at the source code.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> to point at the source code.
|
||||||
You need to create a <filename>configure</filename> task that configures the
|
You need to create a <filename>configure</filename> task that configures the
|
||||||
unpacked kernel with a defconfig.
|
unpacked kernel with a defconfig.
|
||||||
You can do this by using a <filename>make defconfig</filename> command or,
|
You can do this by using a <filename>make defconfig</filename> command or,
|
||||||
|
@ -643,7 +655,7 @@
|
||||||
used for other machines in a given kernel.
|
used for other machines in a given kernel.
|
||||||
A possible way to do this is by listing the file in the
|
A possible way to do this is by listing the file in the
|
||||||
<filename>SRC_URI</filename> and adding the machine to the expression in
|
<filename>SRC_URI</filename> and adding the machine to the expression in
|
||||||
<filename><link linkend='var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</link></filename>:
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
COMPATIBLE_MACHINE = '(qemux86|qemumips)'
|
COMPATIBLE_MACHINE = '(qemux86|qemumips)'
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
@ -698,20 +710,20 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During a build, source is available in the
|
During a build, source is available in the
|
||||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename> directory.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'>WORKDIR</ulink></filename> directory.
|
||||||
The actual location depends on the type of package and the architecture of the target device.
|
The actual location depends on the type of package and the architecture of the target device.
|
||||||
For a standard recipe not related to
|
For a standard recipe not related to
|
||||||
<filename><link linkend='var-MACHINE'>MACHINE</link></filename>, the location is
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-MACHINE'>MACHINE</ulink></filename>, the location is
|
||||||
<filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>.
|
<filename>tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/</filename>.
|
||||||
For target device-dependent packages, you should use the <filename>MACHINE</filename>
|
For target device-dependent packages, you should use the <filename>MACHINE</filename>
|
||||||
variable instead of
|
variable instead of
|
||||||
<filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PACKAGE_ARCH'>PACKAGE_ARCH</ulink></filename>
|
||||||
in the directory name.
|
in the directory name.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
Be sure the package recipe sets the
|
Be sure the package recipe sets the
|
||||||
<filename><link linkend='var-S'>S</link></filename> variable to something
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename> variable to something
|
||||||
other than the standard <filename>WORKDIR/PN-PV/</filename> value.
|
other than the standard <filename>WORKDIR/PN-PV/</filename> value.
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
|
@ -729,7 +741,7 @@
|
||||||
option forces re-execution of the specified task.
|
option forces re-execution of the specified task.
|
||||||
You can call other tasks this way as well.
|
You can call other tasks this way as well.
|
||||||
But note that all the modifications in
|
But note that all the modifications in
|
||||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-WORKDIR'>WORKDIR</ulink></filename>
|
||||||
are gone once you execute <filename>-c clean</filename> for a package.
|
are gone once you execute <filename>-c clean</filename> for a package.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
@ -770,9 +782,9 @@
|
||||||
<para>
|
<para>
|
||||||
You can find the resulting patch file in the
|
You can find the resulting patch file in the
|
||||||
<filename>patches/</filename> subdirectory of the source
|
<filename>patches/</filename> subdirectory of the source
|
||||||
(<filename><link linkend='var-S'>S</link></filename>) directory.
|
(<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-S'>S</ulink></filename>) directory.
|
||||||
For future builds, you should copy the patch into the Yocto Project metadata and add it into the
|
For future builds, you should copy the patch into the Yocto Project metadata and add it into the
|
||||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> of a recipe.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-SRC_URI'>SRC_URI</ulink></filename> of a recipe.
|
||||||
Here is an example:
|
Here is an example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
SRC_URI += "file://NAME-OF-PATCH.patch"
|
SRC_URI += "file://NAME-OF-PATCH.patch"
|
||||||
|
@ -781,8 +793,8 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Finally, don't forget to 'bump' the
|
Finally, don't forget to 'bump' the
|
||||||
<filename><link linkend='var-PR'>PR</link></filename> value in the same recipe since
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PR'>PR</ulink></filename>
|
||||||
the resulting packages have changed.
|
value in the same recipe since the resulting packages have changed.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -961,7 +973,8 @@
|
||||||
If the package exists under a different name in a different distribution, you get a
|
If the package exists under a different name in a different distribution, you get a
|
||||||
<filename>distro_check</filename> mismatch.
|
<filename>distro_check</filename> mismatch.
|
||||||
You can resolve this problem by defining a per-distro recipe name alias using the
|
You can resolve this problem by defining a per-distro recipe name alias using the
|
||||||
<filename><link linkend='var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</link></filename> variable.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</ulink></filename>
|
||||||
|
variable.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1029,7 +1042,8 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To enable a layer, you simply add the layer's path to the
|
To enable a layer, you simply add the layer's path to the
|
||||||
<filename><link linkend='var-BBLAYERS'>BBLAYERS</link></filename> variable in your
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBLAYERS'>BBLAYERS</ulink></filename>
|
||||||
|
variable in your
|
||||||
<filename>bblayers.conf</filename> file, which is found in the Yocto Project file's
|
<filename>bblayers.conf</filename> file, which is found in the Yocto Project file's
|
||||||
build directory.
|
build directory.
|
||||||
The following example shows how to enable the <filename>meta-rt</filename>:
|
The following example shows how to enable the <filename>meta-rt</filename>:
|
||||||
|
@ -1074,21 +1088,26 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In the previous example, the recipes for the layers are added to
|
In the previous example, the recipes for the layers are added to
|
||||||
<filename><link linkend='var-BBFILES'>BBFILES</link></filename>.
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILES'>BBFILES</ulink></filename>.
|
||||||
The <filename><link linkend='var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</link></filename>
|
The
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename>
|
||||||
variable is then appended with the layer name.
|
variable is then appended with the layer name.
|
||||||
The <filename><link linkend='var-BBFILE_PATTERN'>BBFILE_PATTERN</link></filename> variable
|
The
|
||||||
immediately expands with a regular expression used to match files from
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename>
|
||||||
|
variable immediately expands with a regular expression used to match files from
|
||||||
<filename>BBFILES</filename> into
|
<filename>BBFILES</filename> into
|
||||||
a particular layer, in this case by using the base pathname.
|
a particular layer, in this case by using the base pathname.
|
||||||
The <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename> variable
|
The
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename>
|
||||||
|
variable
|
||||||
then assigns different priorities to the files in different layers.
|
then assigns different priorities to the files in different layers.
|
||||||
Applying priorities is useful in situations where the same package might appear in multiple
|
Applying priorities is useful in situations where the same package might appear in multiple
|
||||||
layers and allows you to choose what layer should take precedence.
|
layers and allows you to choose what layer should take precedence.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note the use of the <filename><link linkend='var-LAYERDIR'>LAYERDIR</link></filename>
|
Note the use of the
|
||||||
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-LAYERDIR'>LAYERDIR</ulink></filename>
|
||||||
variable with the immediate expansion operator.
|
variable with the immediate expansion operator.
|
||||||
The <filename>LAYERDIR</filename> variable expands to the directory of the current layer and
|
The <filename>LAYERDIR</filename> variable expands to the directory of the current layer and
|
||||||
requires the immediate expansion operator so that BitBake does not wait to expand the variable
|
requires the immediate expansion operator so that BitBake does not wait to expand the variable
|
||||||
|
@ -1168,7 +1187,8 @@
|
||||||
<para>
|
<para>
|
||||||
If a committed change results in changing the package output,
|
If a committed change results in changing the package output,
|
||||||
then the value of the
|
then the value of the
|
||||||
<filename><link linkend='var-PR'>PR</link></filename> variable needs to be increased
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PR'>PR</ulink></filename>
|
||||||
|
variable needs to be increased
|
||||||
(or "bumped") as part of that commit.
|
(or "bumped") as part of that commit.
|
||||||
This means that for new recipes you must be sure to add the <filename>PR</filename>
|
This means that for new recipes you must be sure to add the <filename>PR</filename>
|
||||||
variable and set its initial value equal to "r0".
|
variable and set its initial value equal to "r0".
|
||||||
|
@ -1180,7 +1200,8 @@
|
||||||
<para>
|
<para>
|
||||||
If you are sharing a common <filename>.inc</filename> file with multiple recipes,
|
If you are sharing a common <filename>.inc</filename> file with multiple recipes,
|
||||||
you can also use the
|
you can also use the
|
||||||
<filename><link linkend='var-INC_PR'>INC_PR</link></filename> variable to ensure that
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-INC_PR'>INC_PR</ulink></filename>
|
||||||
|
variable to ensure that
|
||||||
the recipes sharing the <filename>.inc</filename> file are rebuilt when the
|
the recipes sharing the <filename>.inc</filename> file are rebuilt when the
|
||||||
<filename>.inc</filename> file itself is changed.
|
<filename>.inc</filename> file itself is changed.
|
||||||
The <filename>.inc</filename> file must set <filename>INC_PR</filename>
|
The <filename>.inc</filename> file must set <filename>INC_PR</filename>
|
||||||
|
@ -1192,8 +1213,8 @@
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When upgrading the version of a package, assuming the
|
When upgrading the version of a package, assuming the
|
||||||
<filename><link linkend='var-PV'>PV</link></filename> changes,
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PV'>PV</ulink></filename>
|
||||||
the <filename>PR</filename> variable should be reset to "r0"
|
changes, the <filename>PR</filename> variable should be reset to "r0"
|
||||||
(or "$(INC_PR).0" if you are using <filename>INC_PR</filename>).
|
(or "$(INC_PR).0" if you are using <filename>INC_PR</filename>).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -1201,7 +1222,8 @@
|
||||||
Usually, version increases occur only to packages.
|
Usually, version increases occur only to packages.
|
||||||
However, if for some reason <filename>PV</filename> changes but does not
|
However, if for some reason <filename>PV</filename> changes but does not
|
||||||
increase, you can increase the
|
increase, you can increase the
|
||||||
<filename><link linkend='var-PE'>PE</link></filename> variable (Package Epoch).
|
<filename><ulink url='http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-PE'>PE</ulink></filename>
|
||||||
|
variable (Package Epoch).
|
||||||
The <filename>PE</filename> variable defaults to "0".
|
The <filename>PE</filename> variable defaults to "0".
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue