summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-07-30 08:40:59 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-02 10:00:24 +0100
commit1a825210d8e629129a00ae6fc7ad7f359eb76132 (patch)
tree386379ff1705d7353a9eec9b7b9dcd356aa7b155 /documentation
parent4560e2fc923df917fec294b7ad45c235539f6c83 (diff)
downloadpoky-1a825210d8e629129a00ae6fc7ad7f359eb76132.tar.gz
dev-manual: Updates to the creating partitioned images section.
Fixes [YOCTO #6511] Added a new example to this section that shows how to package up binaries so that you can add them to an image. (From yocto-docs rev: e52acc444c8f142d0469d7274fb936b5242306ec) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml91
1 files changed, 91 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index d33cef6d89..be95c0f405 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -2668,6 +2668,7 @@
2668 <listitem><para>Using an Autotooled package</para></listitem> 2668 <listitem><para>Using an Autotooled package</para></listitem>
2669 <listitem><para>Using a Makefile-based package</para></listitem> 2669 <listitem><para>Using a Makefile-based package</para></listitem>
2670 <listitem><para>Splitting an application into multiple packages</para></listitem> 2670 <listitem><para>Splitting an application into multiple packages</para></listitem>
2671 <listitem><para>Adding binaries to an image</para></listitem>
2671 </itemizedlist> 2672 </itemizedlist>
2672 </para> 2673 </para>
2673 2674
@@ -2868,6 +2869,96 @@
2868 does not include the above listed files. 2869 does not include the above listed files.
2869 </para> 2870 </para>
2870 </section> 2871 </section>
2872
2873 <section id='packaging-externally-produced-binaries'>
2874 <title>Packaging Externally Produced Binaries</title>
2875
2876 <para>
2877 Sometimes, you need to add pre-compiled binaries to an
2878 image.
2879 For example, suppose that binaries for proprietary code
2880 exist, which are created by a particular division of a
2881 company.
2882 Your part of the company needs to use those binaries as
2883 part of an image that you are building using the
2884 OpenEmbedded build system.
2885 Since you only have the binaries and not the source code,
2886 you cannot use a typical recipe that expects to fetch the
2887 source specified in
2888 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
2889 and then compile it.
2890 </para>
2891
2892 <para>
2893 One method is to package the binaries and then install them
2894 as part of the image.
2895 Generally, it is not a good idea to package binaries
2896 since, among other things, it can hinder the ability to
2897 reproduce builds and could lead to compatibility problems
2898 with ABI in the future.
2899 However, sometimes you have no choice.
2900 </para>
2901
2902 <para>
2903 The easiest solution is to create a recipe that uses
2904 the
2905 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-bin-package'><filename>bin_package</filename></ulink>
2906 class and to be sure that you are using default locations
2907 for build artifacts.
2908 In most cases, the <filename>bin_package</filename> class
2909 handles "skipping" the configure and compile steps as well
2910 as sets things up to grab packages from the appropriate
2911 area.
2912 In particular, this class sets <filename>noexec</filename>
2913 on both the
2914 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
2915 and
2916 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
2917 tasks, sets
2918 <filename>FILES_${PN}</filename> to "/" so that it picks
2919 up all files, and sets up a
2920 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
2921 task, which effectively copies all files from
2922 <filename>${S}</filename> to <filename>${D}</filename>.
2923 For more information on these variables, see the
2924 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>,
2925 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
2926 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>,
2927 and
2928 <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
2929 variables in the Yocto Project Reference Manual's variable
2930 glossary.
2931 </para>
2932
2933 <para>
2934 If you can't use the <filename>bin_package</filename>
2935 class, you need to be sure you are doing the following:
2936 <itemizedlist>
2937 <listitem><para>Create a recipe where the
2938 <filename>do_configure</filename> and
2939 <filename>do_compile</filename> tasks do nothing:
2940 <literallayout class='monospaced'>
2941 do_configure[noexec] = "1"
2942 do_compile[noexec] = "1"
2943 </literallayout>
2944 Alternatively, you can make these tasks an empty
2945 function.
2946 </para></listitem>
2947 <listitem><para>make sure your
2948 <filename>do_install</filename> task installs the
2949 binaries appropriately.
2950 </para></listitem>
2951 <listitem><para>Ensure that you set up
2952 <filename>FILES</filename> (usually
2953 <filename>FILES_${PN}</filename>) to point to the
2954 files you have installed, which of course depends
2955 on where you have installed them and whether
2956 those files are in different locations than the
2957 defaults.
2958 </para></listitem>
2959 </itemizedlist>
2960 </para>
2961 </section>
2871 </section> 2962 </section>
2872 </section> 2963 </section>
2873 2964