2011-03-14 20:19:44 +00:00
< !DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
2011-03-14 21:27:51 +00:00
<chapter id= 'adt-package' >
2011-03-15 14:08:29 +00:00
<title > Optionally Customizing the Development Packages Installation</title>
2011-09-01 16:18:33 +00:00
2011-03-15 14:08:29 +00:00
<para >
2011-08-15 14:42:38 +00:00
Because the Yocto Project is suited for embedded Linux development, it is
2011-03-15 14:08:29 +00:00
likely that you will need to customize your development packages installation.
2011-08-15 14:42:38 +00:00
For example, if you are developing a minimal image, then you might not need
2011-03-15 14:08:29 +00:00
certain packages (e.g. graphics support packages).
2011-06-23 16:58:35 +00:00
Thus, you would like to be able to remove those packages from your target sysroot.
2011-03-15 14:08:29 +00:00
</para>
2011-03-14 20:19:44 +00:00
2011-03-15 14:08:29 +00:00
<section id= 'package-management-systems' >
<title > Package Management Systems</title>
2011-09-01 16:18:33 +00:00
2011-03-15 14:08:29 +00:00
<para >
2011-06-23 16:10:11 +00:00
The Yocto Project supports the generation of sysroot files using
2011-03-15 14:08:29 +00:00
three different Package Management Systems (PMS):
2011-09-01 16:18:33 +00:00
<itemizedlist >
<listitem > <para > <emphasis > OPKG:</emphasis> A less well known PMS whose use
originated in the OpenEmbedded and OpenWrt embedded Linux projects.
This PMS works with files packaged in an <filename > .ipk</filename> format.
See <ulink url= 'http://en.wikipedia.org/wiki/Opkg' > </ulink> for more
information about OPKG.</para> </listitem>
<listitem > <para > <emphasis > RPM:</emphasis> A more widely known PMS intended for GNU/Linux
distributions.
This PMS works with files packaged in an <filename > .rms</filename> format.
The Yocto Project currently installs through this PMS by default.
See <ulink url= 'http://en.wikipedia.org/wiki/RPM_Package_Manager' > </ulink>
for more information about RPM.</para> </listitem>
<listitem > <para > <emphasis > Debian:</emphasis> The PMS for Debian-based systems
is built on many PMS tools.
The lower-level PMS tool <filename > dpkg</filename> forms the base of the Debian PMS.
For information on dpkg see
<ulink url= 'http://en.wikipedia.org/wiki/Dpkg' > </ulink> .</para> </listitem>
</itemizedlist>
2011-03-15 14:08:29 +00:00
</para>
</section>
2011-03-14 20:19:44 +00:00
2011-03-15 14:08:29 +00:00
<section id= 'configuring-the-pms' >
<title > Configuring the PMS</title>
2011-09-01 16:18:33 +00:00
2011-03-15 14:08:29 +00:00
<para >
2011-08-15 14:42:38 +00:00
Whichever PMS you are using, you need to be sure that the
2011-03-15 14:08:29 +00:00
<filename > PACKAGE_CLASSES</filename> variable in the <filename > conf/local.conf</filename>
file is set to reflect that system.
The first value you choose for the variable specifies the package file format for the root
2011-06-23 16:58:35 +00:00
filesystem at sysroot.
2011-03-15 14:08:29 +00:00
Additional values specify additional formats for convenience or testing.
See the configuration file for details.
</para>
2011-09-01 16:18:33 +00:00
2011-09-02 18:54:20 +00:00
<note >
For build performance information related to the PMS, see
2012-01-19 18:59:00 +00:00
<ulink url= 'http://www.yoctoproject.org/docs/1.1.1/poky-ref-manual/poky-ref-manual.html#ref-classes-package' > Packaging - <filename > package*.bbclass</filename> </ulink> in The Yocto Project Reference Manual.
2011-09-02 18:54:20 +00:00
</note>
2011-03-14 20:19:44 +00:00
<para >
2011-03-15 14:08:29 +00:00
As an example, consider a scenario where you are using OPKG and you want to add
2011-06-23 16:58:35 +00:00
the <filename > libglade</filename> package to the target sysroot.
2011-03-14 20:19:44 +00:00
</para>
2011-09-01 16:18:33 +00:00
2011-03-14 20:19:44 +00:00
<para >
2011-08-15 14:42:38 +00:00
First, you should generate the <filename > ipk</filename> file for the
<filename > libglade</filename> package and add it
into a working <filename > opkg</filename> repository.
2011-03-15 14:08:29 +00:00
Use these commands:
<literallayout class= 'monospaced' >
$ bitbake libglade
$ bitbake package-index
</literallayout>
2011-03-14 20:19:44 +00:00
</para>
2011-09-01 16:18:33 +00:00
2011-03-14 20:19:44 +00:00
<para >
2011-08-15 14:42:38 +00:00
Next, source the environment setup script found in the Yocto Project files.
2011-03-15 14:08:29 +00:00
Follow that by setting up the installation destination to point to your
2011-06-23 16:58:35 +00:00
sysroot as <filename > < sysroot_dir> </filename> .
2011-09-01 16:18:33 +00:00
Finally, have an OPKG configuration file <filename > < conf_file> </filename>
2011-08-15 14:42:38 +00:00
that corresponds to the <filename > opkg</filename> repository you have just created.
2011-03-15 14:08:29 +00:00
The following command forms should now work:
<literallayout class= 'monospaced' >
2011-09-01 16:18:33 +00:00
$ opkg-cl – f < conf_file> -o < sysroot_dir> update
$ opkg-cl – f < cconf_file> -o < sysroot_dir> \
2011-08-16 13:06:51 +00:00
--force-overwrite install libglade
2011-09-01 16:18:33 +00:00
$ opkg-cl – f < cconf_file> -o < sysroot_dir> \
2011-08-16 13:06:51 +00:00
--force-overwrite install libglade-dbg
2011-09-01 16:18:33 +00:00
$ opkg-cl – f < conf_file> -o < sysroot_dir> \
2011-08-16 13:06:51 +00:00
--force-overwrite install libglade-dev
2011-03-15 14:08:29 +00:00
</literallayout>
2011-03-14 20:19:44 +00:00
</para>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
-->