path: root/documentation/adt-manual/adt-package.xml
diff options
Diffstat (limited to 'documentation/adt-manual/adt-package.xml')
1 files changed, 101 insertions, 0 deletions
diff --git a/documentation/adt-manual/adt-package.xml b/documentation/adt-manual/adt-package.xml
new file mode 100644
index 0000000..da032ee
--- /dev/null
+++ b/documentation/adt-manual/adt-package.xml
@@ -0,0 +1,101 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
5<chapter id='adt-package'>
6<title>Optionally Customizing the Development Packages Installation</title>
8 <para>
9 Because the Yocto Project is suited for embedded Linux development, it is
10 likely that you will need to customize your development packages installation.
11 For example, if you are developing a minimal image, then you might not need
12 certain packages (e.g. graphics support packages).
13 Thus, you would like to be able to remove those packages from your target sysroot.
14 </para>
16<section id='package-management-systems'>
17 <title>Package Management Systems</title>
19 <para>
20 The OpenEmbedded build system supports the generation of sysroot files using
21 three different Package Management Systems (PMS):
22 <itemizedlist>
23 <listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
24 originated in the OpenEmbedded and OpenWrt embedded Linux projects.
25 This PMS works with files packaged in an <filename>.ipk</filename> format.
26 See <ulink url=''></ulink> for more
27 information about OPKG.</para></listitem>
28 <listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
29 distributions.
30 This PMS works with files packaged in an <filename>.rms</filename> format.
31 The build system currently installs through this PMS by default.
32 See <ulink url=''></ulink>
33 for more information about RPM.</para></listitem>
34 <listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
35 is built on many PMS tools.
36 The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
37 For information on dpkg see
38 <ulink url=''></ulink>.</para></listitem>
39 </itemizedlist>
40 </para>
43<section id='configuring-the-pms'>
44 <title>Configuring the PMS</title>
46 <para>
47 Whichever PMS you are using, you need to be sure that the
48 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
49 variable in the <filename>conf/local.conf</filename>
50 file is set to reflect that system.
51 The first value you choose for the variable specifies the package file format for the root
52 filesystem at sysroot.
53 Additional values specify additional formats for convenience or testing.
54 See the configuration file for details.
55 </para>
57 <note>
58 For build performance information related to the PMS, see the
59 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package.bbclass</filename></ulink>"
60 section in the Yocto Project Reference Manual.
61 </note>
63 <para>
64 As an example, consider a scenario where you are using OPKG and you want to add
65 the <filename>libglade</filename> package to the target sysroot.
66 </para>
68 <para>
69 First, you should generate the IPK file for the
70 <filename>libglade</filename> package and add it
71 into a working <filename>opkg</filename> repository.
72 Use these commands:
73 <literallayout class='monospaced'>
74 $ bitbake libglade
75 $ bitbake package-index
76 </literallayout>
77 </para>
79 <para>
80 Next, source the environment setup script found in the
81 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
82 Follow that by setting up the installation destination to point to your
83 sysroot as <filename>&lt;sysroot_dir&gt;</filename>.
84 Finally, have an OPKG configuration file <filename>&lt;conf_file&gt;</filename>
85 that corresponds to the <filename>opkg</filename> repository you have just created.
86 The following command forms should now work:
87 <literallayout class='monospaced'>
88 $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; update
89 $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
90 --force-overwrite install libglade
91 $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
92 --force-overwrite install libglade-dbg
93 $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; \
94 --force-overwrite install libglade-dev
95 </literallayout>
96 </para>
100vim: expandtab tw=80 ts=4