blob: a722453ec4c54d79be560899cc9f8a4aceb654aa [file] [log] [blame]
Andrew Geissleraf5e4ef2020-10-16 10:22:50 -05001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3************************************************************
4Optionally Customizing the Development Packages Installation
5************************************************************
6
7Because the Yocto Project is suited for embedded Linux development, it
8is likely that you will need to customize your development packages
9installation. For example, if you are developing a minimal image, then
10you might not need certain packages (e.g. graphics support packages).
11Thus, you would like to be able to remove those packages from your
12target sysroot.
13
14Package Management Systems
15==========================
16
17The OpenEmbedded build system supports the generation of sysroot files
18using three different Package Management Systems (PMS):
19
20- *OPKG:* A less well known PMS whose use originated in the
21 OpenEmbedded and OpenWrt embedded Linux projects. This PMS works with
22 files packaged in an ``.ipk`` format. See
23 http://en.wikipedia.org/wiki/Opkg for more information about
24 OPKG.
25
26- *RPM:* A more widely known PMS intended for GNU/Linux distributions.
27 This PMS works with files packaged in an ``.rpm`` format. The build
28 system currently installs through this PMS by default. See
29 http://en.wikipedia.org/wiki/RPM_Package_Manager for more
30 information about RPM.
31
32- *Debian:* The PMS for Debian-based systems is built on many PMS
33 tools. The lower-level PMS tool ``dpkg`` forms the base of the Debian
34 PMS. For information on dpkg see
35 http://en.wikipedia.org/wiki/Dpkg.
36
37Configuring the PMS
38===================
39
40Whichever PMS you are using, you need to be sure that the
41:term:`PACKAGE_CLASSES`
42variable in the ``conf/local.conf`` file is set to reflect that system.
43The first value you choose for the variable specifies the package file
44format for the root filesystem at sysroot. Additional values specify
45additional formats for convenience or testing. See the
46``conf/local.conf`` configuration file for details.
47
48.. note::
49
50 For build performance information related to the PMS, see the "
51 package.bbclass
52 " section in the Yocto Project Reference Manual.
53
54As an example, consider a scenario where you are using OPKG and you want
55to add the ``libglade`` package to the target sysroot.
56
57First, you should generate the IPK file for the ``libglade`` package and
58add it into a working ``opkg`` repository. Use these commands: $ bitbake
59libglade $ bitbake package-index
60
61Next, source the cross-toolchain environment setup script found in the
62:term:`Source Directory`. Follow
63that by setting up the installation destination to point to your sysroot
64as sysroot_dir. Finally, have an OPKG configuration file conf_file that
65corresponds to the ``opkg`` repository you have just created. The
66following command forms should now work: $ opkg-cl f conf_file -o
67sysroot_dir update $ opkg-cl f cconf_file -o sysroot_dir \\
68--force-overwrite install libglade $ opkg-cl f cconf_file -o
69sysroot_dir \\ --force-overwrite install libglade-dbg $ opkg-cl f
70conf_file> -osysroot_dir> \\ --force-overwrite install libglade-dev