diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:46:05 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:47:32 +0100 |
commit | 14b00ff23a912494edc7f146e668c40ca82b8508 (patch) | |
tree | f7f4e592ccb935bc312cfa0cfc3c0cbbe444970d /documentation/adt-manual/adt-package.xml | |
download | yocto-docs-14b00ff23a912494edc7f146e668c40ca82b8508.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'documentation/adt-manual/adt-package.xml')
-rw-r--r-- | documentation/adt-manual/adt-package.xml | 101 |
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..48edf0a --- /dev/null +++ b/documentation/adt-manual/adt-package.xml | |||
@@ -0,0 +1,101 @@ | |||
1 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" | ||
3 | [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] > | ||
4 | |||
5 | <chapter id='adt-package'> | ||
6 | <title>Optionally Customizing the Development Packages Installation</title> | ||
7 | |||
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> | ||
15 | |||
16 | <section id='package-management-systems'> | ||
17 | <title>Package Management Systems</title> | ||
18 | |||
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='http://en.wikipedia.org/wiki/Opkg'></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='http://en.wikipedia.org/wiki/RPM_Package_Manager'></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='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem> | ||
39 | </itemizedlist> | ||
40 | </para> | ||
41 | </section> | ||
42 | |||
43 | <section id='configuring-the-pms'> | ||
44 | <title>Configuring the PMS</title> | ||
45 | |||
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> | ||
56 | |||
57 | <note> | ||
58 | For build performance information related to the PMS, see the | ||
59 | "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" | ||
60 | section in the Yocto Project Reference Manual. | ||
61 | </note> | ||
62 | |||
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> | ||
67 | |||
68 | <para> | ||
69 | First, you should generate the <filename>ipk</filename> 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> | ||
78 | |||
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><sysroot_dir></filename>. | ||
84 | Finally, have an OPKG configuration file <filename><conf_file></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 <conf_file> -o <sysroot_dir> update | ||
89 | $ opkg-cl –f <cconf_file> -o <sysroot_dir> \ | ||
90 | --force-overwrite install libglade | ||
91 | $ opkg-cl –f <cconf_file> -o <sysroot_dir> \ | ||
92 | --force-overwrite install libglade-dbg | ||
93 | $ opkg-cl –f <conf_file> -o <sysroot_dir> \ | ||
94 | --force-overwrite install libglade-dev | ||
95 | </literallayout> | ||
96 | </para> | ||
97 | </section> | ||
98 | </chapter> | ||
99 | <!-- | ||
100 | vim: expandtab tw=80 ts=4 | ||
101 | --> | ||