diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 413 | ||||
-rw-r--r-- | documentation/ref-manual/ref-classes.xml | 2 |
2 files changed, 244 insertions, 171 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 7b4d638dfa..1f49cb24f4 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
@@ -3064,7 +3064,7 @@ | |||
3064 | </para></listitem> | 3064 | </para></listitem> |
3065 | <listitem><para>Handling optional module packaging | 3065 | <listitem><para>Handling optional module packaging |
3066 | </para></listitem> | 3066 | </para></listitem> |
3067 | <listitem><para>Setting up Runtime Package Management | 3067 | <listitem><para>Using Runtime Package Management |
3068 | </para></listitem> | 3068 | </para></listitem> |
3069 | <listitem><para>Setting up and running package test | 3069 | <listitem><para>Setting up and running package test |
3070 | (ptest) | 3070 | (ptest) |
@@ -3605,161 +3605,208 @@ | |||
3605 | </section> | 3605 | </section> |
3606 | </section> | 3606 | </section> |
3607 | 3607 | ||
3608 | <section id='runtime-package-management'> | 3608 | <section id='using-runtime-package-management'> |
3609 | <title>Runtime Package Management</title> | 3609 | <title>Using Runtime Package Management</title> |
3610 | <para> | 3610 | |
3611 | Regardless of anything else, during a build bitbake will | 3611 | <para> |
3612 | transform a recipe into one or more packages. For example, | 3612 | During a build, BitBake always transforms a recipe into one or |
3613 | the <filename>bash</filename> recipe currently produces the | 3613 | more packages. |
3614 | following packages: <filename>bash-dbg bash-staticdev bash-dev | 3614 | For example, BitBake takes the <filename>bash</filename> recipe |
3615 | bash-doc bash-locale bash</filename>. Not all generated | 3615 | and currently produces the <filename>bash-dbg</filename>, |
3616 | packages will be included in an image. | 3616 | <filename>bash-staticdev</filename>, |
3617 | </para><para> | 3617 | <filename>bash-dev</filename>, <filename>bash-doc</filename>, |
3618 | In several situations you might want to have the ability to | 3618 | <filename>bash-locale</filename>, and |
3619 | update, add, remove, query, etc the packages on a target | 3619 | <filename>bash</filename> packages. |
3620 | device at runtime (i.e. without having to generate a new | 3620 | Not all generated packages are included in an image. |
3621 | image). Examples of such situations include: | 3621 | </para> |
3622 | |||
3623 | <para> | ||
3624 | In several situations, you might need to update, add, remove, | ||
3625 | or query the packages on a target device at runtime | ||
3626 | (i.e. without having to generate a new image). | ||
3627 | Examples of such situations include: | ||
3622 | <itemizedlist> | 3628 | <itemizedlist> |
3623 | <listitem><para> | 3629 | <listitem><para> |
3624 | You want to provide in-the-field updates to deployed | 3630 | You want to provide in-the-field updates to deployed |
3625 | devices (e.g. for security updates). | 3631 | devices (e.g. security updates). |
3626 | </para></listitem> | 3632 | </para></listitem> |
3627 | <listitem><para> | 3633 | <listitem><para> |
3628 | You want to have a fast turn-around development cycle | 3634 | You want to have a fast turn-around development cycle |
3629 | for one or more applications which run on your device. | 3635 | for one or more applications that run on your device. |
3630 | </para></listitem> | 3636 | </para></listitem> |
3631 | <listitem><para> | 3637 | <listitem><para> |
3632 | You want to temporarily install the "debug" packages | 3638 | You want to temporarily install the "debug" packages |
3633 | of various applications on your device so that | 3639 | of various applications on your device so that |
3634 | debugging can be greatly improved (access to symbols, | 3640 | debugging can be greatly improved by allowing |
3635 | source debugging, etc). | 3641 | access to symbols and source debugging. |
3636 | </para></listitem> | 3642 | </para></listitem> |
3637 | <listitem><para> | 3643 | <listitem><para> |
3638 | You want to deploy a more minimal package selection of | 3644 | You want to deploy a more minimal package selection of |
3639 | your device but allow in-the-field updates to add a | 3645 | your device but allow in-the-field updates to add a |
3640 | larger selection for customization. | 3646 | larger selection for customization. |
3641 | </para></listitem> | 3647 | </para></listitem> |
3642 | </itemizedlist> | 3648 | </itemizedlist> |
3643 | </para><para> | 3649 | </para> |
3644 | In all these situations you have something similar to a more | 3650 | |
3651 | <para> | ||
3652 | In all these situations, you have something similar to a more | ||
3645 | traditional Linux distribution in that in-field devices | 3653 | traditional Linux distribution in that in-field devices |
3646 | are able to grab pre-compiled packages from a server for | 3654 | are able to receive pre-compiled packages from a server for |
3647 | installation/update. This is what is termed "runtime package | 3655 | installation or update. |
3648 | management". In order to use runtime package management you | 3656 | Being able to install these packages on a running, |
3649 | need a host/server machine which serves up the pre-compiled | 3657 | in-field device is what is termed "runtime package |
3650 | packages plus the required meta data, and you need package | 3658 | management". |
3651 | manipulation tools on the target. Note that the build machine | 3659 | </para> |
3652 | is a likely candidate to act as the server, but the build | 3660 | |
3653 | machine doesn't necessarily have to be the package server; | 3661 | <para> |
3654 | the build machine could push its artifacts to another (e.g. | 3662 | In order to use runtime package management, you |
3655 | Internet-facing) machine which acts as the server. | 3663 | need a host/server machine that serves up the pre-compiled |
3656 | </para><para> | 3664 | packages plus the required metadata. |
3657 | A simple build which targets just one device will produce | 3665 | You also need package manipulation tools on the target. |
3658 | more than one package database. In other words, the packages | 3666 | The build machine is a likely candidate to act as the server. |
3659 | produced by a build will be separated out into a couple of | 3667 | However, that machine does not necessarily have to be the |
3660 | different package groupings based on criteria such as the | 3668 | package server. |
3661 | target's CPU architecture, the target board, or the C library | 3669 | The build machine could push its artifacts to another machine |
3662 | used on the target. For example, a build targetting the | 3670 | that acts as the server (e.g. Internet-facing). |
3663 | <filename>qemuarm</filename> device will produce the following | 3671 | </para> |
3664 | 3 package databases: <filename>all</filename>, | 3672 | |
3665 | <filename>armv5te</filename>, and | 3673 | <para> |
3666 | <filename>qemuarm</filename>. If I wanted my | 3674 | A simple build that targets just one device produces |
3667 | <filename>qemuarm</filename> device to be aware of all the | 3675 | more than one package database. |
3668 | packages which were available to it, I would need to point it | 3676 | In other words, the packages produced by a build are separated |
3669 | to each of these databases individually. In a similar way, a | 3677 | out into a couple of different package groupings based on |
3670 | traditional Linux distribution usually is configured to be | 3678 | criteria such as the target's CPU architecture, the target |
3671 | aware of a number of software repositories from which it | 3679 | board, or the C library used on the target. |
3672 | will retrieve packages. | 3680 | For example, a build targeting the <filename>qemuarm</filename> |
3673 | </para><para><note> | 3681 | device produces the following three package databases: |
3682 | <filename>all</filename>, <filename>armv5te</filename>, and | ||
3683 | <filename>qemuarm</filename>. | ||
3684 | If you wanted your <filename>qemuarm</filename> device to be | ||
3685 | aware of all the packages that were available to it, | ||
3686 | you would need to point it to each of these databases | ||
3687 | individually. | ||
3688 | In a similar way, a traditional Linux distribution usually is | ||
3689 | configured to be aware of a number of software repositories | ||
3690 | from which it retrieves packages. | ||
3691 | </para> | ||
3692 | |||
3693 | <para> | ||
3674 | Using runtime package management is completely optional and | 3694 | Using runtime package management is completely optional and |
3675 | not required for a successful build or deployment in any way. | 3695 | not required for a successful build or deployment in any |
3676 | But if you want to make use of runtime package management | 3696 | way. |
3677 | you'll need to do a couple things above and beyond the basics. | 3697 | But if you want to make use of runtime package management, |
3678 | </note></para> | 3698 | you need to do a couple things above and beyond the basics. |
3699 | The remainder of this section describes what you need to do. | ||
3700 | </para> | ||
3679 | 3701 | ||
3680 | <section id='runtime-package-management-build'> | 3702 | <section id='runtime-package-management-build'> |
3681 | <title>Build Considerations</title> | 3703 | <title>Build Considerations</title> |
3704 | |||
3682 | <para> | 3705 | <para> |
3683 | In order to provide support for runtime package management | 3706 | This section describes build considerations that you need |
3684 | there are some build considerations of which to be aware. | 3707 | to be aware of in order to provide support for runtime |
3685 | </para><para> | 3708 | package management. |
3686 | When bitbake generates packages it needs to know in | 3709 | </para> |
3687 | which format(s) you want the packages to be generated. | 3710 | |
3688 | In your configuration this is handled by the | 3711 | <para> |
3712 | When BitBake generates packages it needs to know | ||
3713 | what format(s) to use. | ||
3714 | In your configuration, you use the | ||
3689 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink> | 3715 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink> |
3690 | variable. Note that you can choose to have more than one, | 3716 | variable to specify the format. |
3691 | but at least one is required. | 3717 | <note> |
3692 | </para><para> | 3718 | You can choose to have more than one format but you must |
3719 | provide at least one. | ||
3720 | </note> | ||
3721 | </para> | ||
3722 | |||
3723 | <para> | ||
3693 | If you would like your image to start off with a basic | 3724 | If you would like your image to start off with a basic |
3694 | package database of the packages in your current build | 3725 | package database of the packages in your current build |
3695 | as well as having the relevant tools available on the | 3726 | as well as have the relevant tools available on the |
3696 | target for runtime package management, you can include | 3727 | target for runtime package management, you can include |
3697 | "package-management" in the | 3728 | "package-management" in the |
3698 | <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink> | 3729 | <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink> |
3699 | variable. Including "package-management" in this | 3730 | variable. |
3731 | Including "package-management" in this | ||
3700 | configuration variable ensures that when the image | 3732 | configuration variable ensures that when the image |
3701 | is assembled for your target it will include | 3733 | is assembled for your target, the image includes |
3702 | the currently-known package databases as well as | 3734 | the currently-known package databases as well as |
3703 | the target-specific tools required for runtime | 3735 | the target-specific tools required for runtime |
3704 | package management to be performed on the target. | 3736 | package management to be performed on the target. |
3705 | Note, however, this isn't strictly necessary. | 3737 | However, this is not strictly necessary. |
3706 | You could start your image off without any databases | 3738 | You could start your image off without any databases |
3707 | but only include the required on-target package | 3739 | but only include the required on-target package |
3708 | tool(s) (for example you would include "opkg" in your | 3740 | tool(s). |
3741 | As an example, you could include "opkg" in your | ||
3709 | <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink> | 3742 | <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink> |
3710 | variable if you are using the IPK package format). You can | 3743 | variable if you are using the IPK package format. |
3711 | then initialize your target's package database(s) later, | 3744 | You can then initialize your target's package database(s) |
3712 | once your image is up and running. | 3745 | later once your image is up and running. |
3713 | </para><para> | 3746 | </para> |
3714 | Whenever you perform any sort of build step which can | 3747 | |
3748 | <para> | ||
3749 | Whenever you perform any sort of build step that can | ||
3715 | potentially generate a package or modify an existing | 3750 | potentially generate a package or modify an existing |
3716 | package, it is always a good idea to re-generate the | 3751 | package, it is always a good idea to re-generate the |
3717 | package index with: | 3752 | package index with: |
3718 | <literallayout class='monospaced'> | 3753 | <literallayout class='monospaced'> |
3719 | $ bitbake package-index | 3754 | $ bitbake package-index |
3720 | </literallayout> | 3755 | </literallayout> |
3721 | Note that it is not sufficient to simply do: | 3756 | Realize that it is not sufficient to simply do the |
3757 | following: | ||
3722 | <literallayout class='monospaced'> | 3758 | <literallayout class='monospaced'> |
3723 | $ bitbake <some-package> package-index | 3759 | $ bitbake <some-package> package-index |
3724 | </literallayout> | 3760 | </literallayout> |
3725 | since bitbake won't properly schedule the | 3761 | This is because BitBake does not properly schedule the |
3726 | <filename>package-index</filename> target fully after any | 3762 | <filename>package-index</filename> target fully after any |
3727 | other target has completed. Therefore, be sure to run the | 3763 | other target has completed. |
3728 | package update step separately. | 3764 | Thus, be sure to run the package update step separately. |
3729 | </para><para> | 3765 | </para> |
3766 | |||
3767 | <para> | ||
3730 | As described below in the | 3768 | As described below in the |
3731 | <link linkend='runtime-package-management-target-ipk'>Using IPK</link> | 3769 | "<link linkend='runtime-package-management-target-ipk'>Using IPK</link>" |
3732 | section, if you are using IPK as your package format, you | 3770 | section, if you are using IPK as your package format, you |
3733 | can make use of the | 3771 | can make use of the |
3734 | <filename>distro-feed-configs</filename> recipe provided | 3772 | <filename>distro-feed-configs</filename> recipe provided |
3735 | by <filename>meta-oe</filename> in order to configure your | 3773 | by <filename>meta-oe</filename> in order to configure your |
3736 | target to use your IPK databases. | 3774 | target to use your IPK databases. |
3737 | </para><para> | 3775 | </para> |
3738 | When your build is complete your packages will show up in | 3776 | |
3739 | the | 3777 | <para> |
3778 | When your build is complete, your packages reside in the | ||
3740 | <filename>${TMPDIR}/deploy/<package-format></filename> | 3779 | <filename>${TMPDIR}/deploy/<package-format></filename> |
3741 | directory. For example, if <filename>${TMPDIR}</filename> | 3780 | directory. |
3781 | For example, if <filename>${TMPDIR}</filename> | ||
3742 | is <filename>tmp</filename> and your selected package type | 3782 | is <filename>tmp</filename> and your selected package type |
3743 | is IPK, then your IPK packages will be available in | 3783 | is IPK, then your IPK packages are available in |
3744 | <filename>tmp/deploy/ipk</filename>. | 3784 | <filename>tmp/deploy/ipk</filename>. |
3745 | </para> | 3785 | </para> |
3746 | </section> | 3786 | </section> |
3747 | 3787 | ||
3748 | <section id='runtime-package-management-server'> | 3788 | <section id='runtime-package-management-server'> |
3749 | <title>Host or Server Machine Setup</title> | 3789 | <title>Host or Server Machine Setup</title> |
3790 | |||
3750 | <para> | 3791 | <para> |
3751 | Typically packages are served from a server via HTTP, but | 3792 | Typically, packages are served from a server using |
3752 | other protocols are possible. If we assume you want to | 3793 | HTTP. |
3753 | use HTTP, then you would need to setup and configure a | 3794 | However, other protocols are possible. |
3795 | If you want to use HTTP, then setup and configure a | ||
3754 | web server, such as Apache 2 or lighttpd, on the machine | 3796 | web server, such as Apache 2 or lighttpd, on the machine |
3755 | serving the packages. As mentioned above, the build | 3797 | serving the packages. |
3756 | machine can act as the package server; in the following | 3798 | </para> |
3757 | server machine setups it is assumed the build machine is | 3799 | |
3758 | also the server. | 3800 | <para> |
3801 | As previously mentioned, the build machine can act as the | ||
3802 | package server. | ||
3803 | In the following sections that describe server machine | ||
3804 | setups, the build machine is assumed to also be the server. | ||
3759 | </para> | 3805 | </para> |
3760 | 3806 | ||
3761 | <section id='package-server-apache'> | 3807 | <section id='package-server-apache'> |
3762 | <title>Serving Packages via Apache 2</title> | 3808 | <title>Serving Packages via Apache 2</title> |
3809 | |||
3763 | <para> | 3810 | <para> |
3764 | This example assumes you are using the Apache 2 | 3811 | This example assumes you are using the Apache 2 |
3765 | server: | 3812 | server: |
@@ -3769,14 +3816,14 @@ | |||
3769 | configuration, which you can find at | 3816 | configuration, which you can find at |
3770 | <filename>/etc/httpd/conf/httpd.conf</filename>. | 3817 | <filename>/etc/httpd/conf/httpd.conf</filename>. |
3771 | Use commands similar to these on the | 3818 | Use commands similar to these on the |
3772 | development system. These example | 3819 | development system. |
3773 | commands assume a top-level | 3820 | These example commands assume a top-level |
3774 | <link linkend='source-directory'>Source Directory</link> | 3821 | <link linkend='source-directory'>Source Directory</link> |
3775 | named <filename>poky</filename> in your home | 3822 | named <filename>poky</filename> in your home |
3776 | directory. The example also assumes an RPM | 3823 | directory. |
3777 | package type. If you are using a different | 3824 | The example also assumes an RPM package type. |
3778 | package type, such as IPK, use "ipk" in the | 3825 | If you are using a different package type, such |
3779 | pathnames: | 3826 | as IPK, use "ipk" in the pathnames: |
3780 | <literallayout class='monospaced'> | 3827 | <literallayout class='monospaced'> |
3781 | <VirtualHost *:80> | 3828 | <VirtualHost *:80> |
3782 | .... | 3829 | .... |
@@ -3785,68 +3832,75 @@ | |||
3785 | Options +Indexes | 3832 | Options +Indexes |
3786 | </Directory> | 3833 | </Directory> |
3787 | </VirtualHost> | 3834 | </VirtualHost> |
3788 | </literallayout> | 3835 | </literallayout></para></listitem> |
3789 | </para></listitem> | ||
3790 | <listitem><para> | 3836 | <listitem><para> |
3791 | Reload the Apache configuration as follows. | 3837 | Reload the Apache configuration as described |
3838 | in this step. | ||
3792 | For all commands, be sure you have root | 3839 | For all commands, be sure you have root |
3793 | privileges. | 3840 | privileges. |
3794 | </para><para> | 3841 | </para> |
3842 | |||
3843 | <para> | ||
3795 | If your development system is using Fedora or | 3844 | If your development system is using Fedora or |
3796 | CentOS, use the following: | 3845 | CentOS, use the following: |
3797 | <literallayout class='monospaced'> | 3846 | <literallayout class='monospaced'> |
3798 | # service httpd reload | 3847 | $ service httpd reload |
3799 | </literallayout> | 3848 | </literallayout> |
3800 | For Ubuntu and Debian, use the following: | 3849 | For Ubuntu and Debian, use the following: |
3801 | <literallayout class='monospaced'> | 3850 | <literallayout class='monospaced'> |
3802 | # /etc/init.d/apache2 reload | 3851 | $ /etc/init.d/apache2 reload |
3803 | </literallayout> | 3852 | </literallayout> |
3804 | For OpenSUSE, use the following: | 3853 | For OpenSUSE, use the following: |
3805 | <literallayout class='monospaced'> | 3854 | <literallayout class='monospaced'> |
3806 | # /etc/init.d/apache2 reload | 3855 | $ /etc/init.d/apache2 reload |
3807 | </literallayout> | 3856 | </literallayout></para></listitem> |
3808 | </para></listitem> | ||
3809 | <listitem><para> | 3857 | <listitem><para> |
3810 | If you are using Security-Enhanced Linux | 3858 | If you are using Security-Enhanced Linux |
3811 | (SELinux), you need to label the files as | 3859 | (SELinux), you need to label the files as |
3812 | being accessible through Apache. Use the | 3860 | being accessible through Apache. |
3813 | following command from the development host | 3861 | Use the following command from the development |
3814 | (this example assumes RPM package types): | 3862 | host. |
3863 | This example assumes RPM package types: | ||
3815 | <literallayout class='monospaced'> | 3864 | <literallayout class='monospaced'> |
3816 | # chcon -R -h -t httpd_sys_content_t tmp/deploy/rpm | 3865 | $ chcon -R -h -t httpd_sys_content_t tmp/deploy/rpm |
3817 | </literallayout> | 3866 | </literallayout></para></listitem> |
3818 | </para></listitem> | ||
3819 | </orderedlist> | 3867 | </orderedlist> |
3820 | </para> | 3868 | </para> |
3821 | </section> | 3869 | </section> |
3822 | 3870 | ||
3823 | <section id='package-server-lighttpd'> | 3871 | <section id='package-server-lighttpd'> |
3824 | <title>Serving Packages via lighttpd</title> | 3872 | <title>Serving Packages via lighttpd</title> |
3873 | |||
3825 | <para> | 3874 | <para> |
3826 | If you are using lighttpd all you need | 3875 | If you are using lighttpd, all you need |
3827 | to do is to provide a link from your | 3876 | to do is to provide a link from your |
3828 | ${TMPDIR}/deploy/<package-format> directory to | 3877 | <filename>${TMPDIR}/deploy/<package-format></filename> |
3829 | lighttpd's document-root. You can determine the | 3878 | directory to lighttpd's document-root. |
3830 | specifics of your lighttpd installation by looking | 3879 | You can determine the specifics of your lighttpd |
3831 | through its configuration file which is usually found | 3880 | installation by looking through its configuration file, |
3832 | at: <filename>/etc/lighttpd/lighttpd.conf</filename>. | 3881 | which is usually found at: |
3833 | </para><para> | 3882 | <filename>/etc/lighttpd/lighttpd.conf</filename>. |
3834 | For example, if you are using IPK, if | 3883 | </para> |
3835 | lighttpd's document-root is set to | 3884 | |
3836 | <filename>/var/www/lighttpd</filename>, and if you had | 3885 | <para> |
3837 | packages for a target named "BOARD" | 3886 | For example, if you are using IPK, lighttpd's |
3887 | document-root is set to | ||
3888 | <filename>/var/www/lighttpd</filename>, and you had | ||
3889 | packages for a target named "BOARD", | ||
3838 | then you might create a link from your build location | 3890 | then you might create a link from your build location |
3839 | to lighttpd's document-root as follows: | 3891 | to lighttpd's document-root as follows: |
3840 | <literallayout class='monospaced'> | 3892 | <literallayout class='monospaced'> |
3841 | # ln -s $(PWD)/tmp/deploy/ipk /var/www/lighttpd/BOARD-dir | 3893 | $ ln -s $(PWD)/tmp/deploy/ipk /var/www/lighttpd/BOARD-dir |
3842 | </literallayout> | 3894 | </literallayout> |
3843 | </para><para> | 3895 | </para> |
3844 | At this point you need to start the lighttpd server. | 3896 | |
3845 | The way in which you start the server will vary by | 3897 | <para> |
3846 | distribution, but one basic way to start it by hand | 3898 | At this point, you need to start the lighttpd server. |
3847 | would be: | 3899 | The method used to start the server varies by |
3900 | distribution. | ||
3901 | However, one basic method that starts it by hand is: | ||
3848 | <literallayout class='monospaced'> | 3902 | <literallayout class='monospaced'> |
3849 | # lighttpd -f /etc/lighttpd/lighttpd.conf | 3903 | $ lighttpd -f /etc/lighttpd/lighttpd.conf |
3850 | </literallayout> | 3904 | </literallayout> |
3851 | </para> | 3905 | </para> |
3852 | </section> | 3906 | </section> |
@@ -3855,30 +3909,41 @@ | |||
3855 | <section id='runtime-package-management-target'> | 3909 | <section id='runtime-package-management-target'> |
3856 | <title>Target Setup</title> | 3910 | <title>Target Setup</title> |
3857 | 3911 | ||
3912 | <para> | ||
3913 | Setting up the target differs depending on the | ||
3914 | package management system. | ||
3915 | This section provides information for RPM and IPK. | ||
3916 | </para> | ||
3917 | |||
3858 | <section id='runtime-package-management-target-rpm'> | 3918 | <section id='runtime-package-management-target-rpm'> |
3859 | <title>Using RPM</title> | 3919 | <title>Using RPM</title> |
3920 | |||
3860 | <para> | 3921 | <para> |
3861 | The application for performing runtime package | 3922 | The application for performing runtime package |
3862 | management of RPM packages on the target is called | 3923 | management of RPM packages on the target is called |
3863 | <filename>smart</filename>. | 3924 | <filename>smart</filename>. |
3864 | </para><para> | 3925 | </para> |
3926 | |||
3927 | <para> | ||
3865 | On the target machine, you need to inform | 3928 | On the target machine, you need to inform |
3866 | <filename>smart</filename> of every package database | 3929 | <filename>smart</filename> of every package database |
3867 | you wish to use. As an example, suppose your target | 3930 | you want to use. |
3868 | device can use the following 3 package databases from | 3931 | As an example, suppose your target device can use the |
3869 | a server named <filename>server.name</filename>: | 3932 | following three package databases from a server named |
3933 | <filename>server.name</filename>: | ||
3870 | <filename>all</filename>, <filename>i586</filename>, | 3934 | <filename>all</filename>, <filename>i586</filename>, |
3871 | and <filename>qemux86</filename>. Given this example, | 3935 | and <filename>qemux86</filename>. |
3872 | issue the following commands on the target: | 3936 | Given this example, issue the following commands on the |
3937 | target: | ||
3873 | <literallayout class='monospaced'> | 3938 | <literallayout class='monospaced'> |
3874 | # smart channel --add all type=rpm-md baseurl=http://server.name/rpm/all | 3939 | $ smart channel --add all type=rpm-md baseurl=http://server.name/rpm/all |
3875 | # smart channel --add i585 type=rpm-md baseurl=http://server.name/rpm/i586 | 3940 | $ smart channel --add i585 type=rpm-md baseurl=http://server.name/rpm/i586 |
3876 | # smart channel --add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86 | 3941 | $ smart channel --add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86 |
3877 | </literallayout> | 3942 | </literallayout> |
3878 | Also from the target machine, fetch the repository | 3943 | Also from the target machine, fetch the repository |
3879 | information using this command: | 3944 | information using this command: |
3880 | <literallayout class='monospaced'> | 3945 | <literallayout class='monospaced'> |
3881 | # smart update | 3946 | $ smart update |
3882 | </literallayout> | 3947 | </literallayout> |
3883 | You can now use the <filename>smart query</filename> | 3948 | You can now use the <filename>smart query</filename> |
3884 | and <filename>smart install</filename> commands to | 3949 | and <filename>smart install</filename> commands to |
@@ -3888,23 +3953,28 @@ | |||
3888 | 3953 | ||
3889 | <section id='runtime-package-management-target-ipk'> | 3954 | <section id='runtime-package-management-target-ipk'> |
3890 | <title>Using IPK</title> | 3955 | <title>Using IPK</title> |
3956 | |||
3891 | <para> | 3957 | <para> |
3892 | The application for performing runtime package | 3958 | The application for performing runtime package |
3893 | management of IPK packages on the target is called | 3959 | management of IPK packages on the target is called |
3894 | <filename>opkg</filename>. | 3960 | <filename>opkg</filename>. |
3895 | </para><para> | 3961 | </para> |
3962 | |||
3963 | <para> | ||
3896 | In order to inform <filename>opkg</filename> of the | 3964 | In order to inform <filename>opkg</filename> of the |
3897 | package databases you wish to use, simply create one | 3965 | package databases you want to use, simply create one |
3898 | or more <filename>*.conf</filename> files in the | 3966 | or more <filename>*.conf</filename> files in the |
3899 | <filename>/etc/opkg</filename> directory on the target | 3967 | <filename>/etc/opkg</filename> directory on the target. |
3900 | and <filename>opkg</filename> will use them to find | 3968 | The <filename>opkg</filename> application uses them |
3901 | its available package databases. As an example if you | 3969 | to find its available package databases. |
3902 | configured your HTTP server on your machine named | 3970 | As an example, suppose you configured your HTTP server |
3971 | on your machine named | ||
3903 | <filename>www.mysite.com</filename> to serve files | 3972 | <filename>www.mysite.com</filename> to serve files |
3904 | from a <filename>BOARD-dir</filename> directory under | 3973 | from a <filename>BOARD-dir</filename> directory under |
3905 | its document-root you might create a configuration | 3974 | its document-root. |
3975 | In this case, you might create a configuration | ||
3906 | file on the target called | 3976 | file on the target called |
3907 | <filename>/etc/opkg/base-feeds.conf</filename> which | 3977 | <filename>/etc/opkg/base-feeds.conf</filename> that |
3908 | contains: | 3978 | contains: |
3909 | <literallayout class='monospaced'> | 3979 | <literallayout class='monospaced'> |
3910 | src/gz all http://www.mysite.com/BOARD-dir/all | 3980 | src/gz all http://www.mysite.com/BOARD-dir/all |
@@ -3912,43 +3982,46 @@ | |||
3912 | src/gz beagleboard http://www.mysite.com/BOARD-dir/beagleboard | 3982 | src/gz beagleboard http://www.mysite.com/BOARD-dir/beagleboard |
3913 | </literallayout> | 3983 | </literallayout> |
3914 | </para> | 3984 | </para> |
3915 | <note> | 3985 | |
3986 | <para> | ||
3916 | As a way of making it easier to generate and make | 3987 | As a way of making it easier to generate and make |
3917 | these IPK configuration files available on your | 3988 | these IPK configuration files available on your |
3918 | target, the <filename>meta-oe</filename> layer | 3989 | target, the <filename>meta-oe</filename> layer |
3919 | provides a recipe called | 3990 | provides a recipe called |
3920 | <filename>distro-feed-configs</filename> (which | 3991 | <filename>distro-feed-configs</filename>, which |
3921 | provides a package by the same name). When you | 3992 | provides a package by the same name. |
3922 | include this package into your image, it will | 3993 | When you include this package into your image, it will |
3923 | automatically generate and include a set of | 3994 | automatically generate and include a set of |
3924 | <filename>*.conf</filename> files in the image's | 3995 | <filename>*.conf</filename> files in the image's |
3925 | <filename>/etc/opkg</filename> directory which will | 3996 | <filename>/etc/opkg</filename> directory that will |
3926 | provide your target's opkg tool with any and all | 3997 | provide your target's <filename>opkg</filename> |
3927 | package databases your build will generate. The only | 3998 | tool with any and all package databases your build will |
3928 | catch is that this recipe can't possibly imagine your | 3999 | generate. |
3929 | server's DNS name/IP address, so somewhere in your | 4000 | The only catch is that this recipe cannot possibly |
3930 | configuration you need to set a variable called | 4001 | imagine your server's DNS name/IP address. |
3931 | <filename>DISTRO_FEED_URI</filename> which will point | 4002 | Consequently, somewhere in your configuration you need |
4003 | to set a variable called | ||
4004 | <filename>DISTRO_FEED_URI</filename> to point | ||
3932 | to your server and the location within the | 4005 | to your server and the location within the |
3933 | document-root which contains the databases. For | 4006 | document-root that contains the databases. |
3934 | example: if you are serving your packages over HTTP, | 4007 | For example: if you are serving your packages over HTTP, |
3935 | your server's IP address is 192.168.7.1, and your | 4008 | your server's IP address is 192.168.7.1, and your |
3936 | databases are located in a directory called | 4009 | databases are located in a directory called |
3937 | <filename>BOARD-dir</filename> underneath your HTTP | 4010 | <filename>BOARD-dir</filename> underneath your HTTP |
3938 | server's document-root then set | 4011 | server's document-root, you need to set |
3939 | <filename>DISTRO_FEED_URI</filename> to | 4012 | <filename>DISTRO_FEED_URI</filename> to |
3940 | <filename>http://192.168.7.1/BOARD-dir</filename>. | 4013 | <filename>http://192.168.7.1/BOARD-dir</filename>. |
3941 | </note> | 4014 | </para> |
4015 | |||
3942 | <para> | 4016 | <para> |
3943 | On the target machine, fetch (or refresh) the | 4017 | On the target machine, fetch (or refresh) the |
3944 | repository information using this command: | 4018 | repository information using this command: |
3945 | <literallayout class='monospaced'> | 4019 | <literallayout class='monospaced'> |
3946 | # opkg update | 4020 | $ opkg update |
3947 | </literallayout> | 4021 | </literallayout> |
3948 | You can now use the <filename>opkg list</filename> and | 4022 | You can now use the <filename>opkg list</filename> and |
3949 | <filename>opkg install</filename> commands to find and | 4023 | <filename>opkg install</filename> commands to find and |
3950 | install packages from the repositories. | 4024 | install packages from the repositories. |
3951 | </para><para> | ||
3952 | </para> | 4025 | </para> |
3953 | </section> | 4026 | </section> |
3954 | </section> | 4027 | </section> |
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml index e394122abe..27edfde33d 100644 --- a/documentation/ref-manual/ref-classes.xml +++ b/documentation/ref-manual/ref-classes.xml | |||
@@ -342,7 +342,7 @@ | |||
342 | install packages from the feed while you are running the image | 342 | install packages from the feed while you are running the image |
343 | on the target (i.e. runtime installation of packages). | 343 | on the target (i.e. runtime installation of packages). |
344 | For more information, see the | 344 | For more information, see the |
345 | "<ulink url='&YOCTO_DOCS_DEV_URL;#runtime-package-management'>Runtime Package Management</ulink>" | 345 | "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>" |
346 | section in the Yocto Project Development Manual. | 346 | section in the Yocto Project Development Manual. |
347 | </para> | 347 | </para> |
348 | 348 | ||