summaryrefslogtreecommitdiffstats
path: root/documentation/adt-manual/adt-package.xml
blob: fc2a1a0cbad73ccf191d04f84dfc6a6af4117ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<chapter id='adt-package'>
<title>Optionally Customizing the Development Packages Installation</title>
    <para>
        Because the Yocto Project is suited for embedded Linux development it is 
        likely that you will need to customize your development packages installation.  
        For example, if you are developing a minimal image then you might not need 
        certain packages (e.g. graphics support packages).  
        Thus, you would like to be able to remove those packages from your sysroot.
    </para>

<section id='package-management-systems'>
    <title>Package Management Systems</title>
    <para>
        The Yocto Project supports the generation of root filesystem files using 
        three different Package Management Systems (PMS):
    <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 dpkg forms the base of the Debian PMS.  
            For information on dpkg see 
            <ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
    </itemizedlist>
    </para>
</section>

<section id='configuring-the-pms'>
    <title>Configuring the PMS</title>
    <para>
        Whichever PMS you are using you need to be sure that the 
        <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
        filesystem.
        Additional values specify additional formats for convenience or testing.  
        See the configuration file for details.
    </para>
    <para>
        As an example, consider a scenario where you are using OPKG and you want to add 
        the libglade package to sysroot.
    </para>
    <para>
        First, you should generate the ipk file for the libglade package and add it 
        into a working opkg repository.  
        Use these commands:
        <literallayout class='monospaced'>
     $ bitbake libglade
     $ bitbake package-index
        </literallayout>
    </para>
    <para>
        Next, source the environment setup script.  
        Follow that by setting up the installation destination to point to your 
        sysroot as <filename>&lt;sysroot dir&gt;</filename>.  
        Finally, have an opkg configuration file <filename>&lt;conf file&gt;</filename>
        that corresponds to the opkg repository you have just created. 
        The following command forms should now work:
        <literallayout class='monospaced'>
     $ opkg-cl –f &lt;conf file&gt; -o &lt;sysroot dir&gt; update
     $ opkg-cl –f &lt;conf file&gt;> -o &lt;sysroot dir&gt; --force-overwrite install libglade
     $ opkg-cl –f &lt;conf file&gt; -o &lt;sysroot dir&gt; --force-overwrite install libglade-dbg
     $ opkg-cl –f &lt;conf file&gt; -o &lt;sysroot dir&gt; --force-overwrite install libglade-dev
        </literallayout>
    </para>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4
-->