summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-12-18 15:06:05 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-02 13:16:11 +0000
commit3b908ee6a8fb920b73ea1974ba62693fb575b7bd (patch)
tree748d6382a33b91efaa115a8fc94792de117cf206 /documentation/dev-manual
parentb55ffe73568e6cf0f07b6212a75b78a5d5a011f1 (diff)
downloadpoky-3b908ee6a8fb920b73ea1974ba62693fb575b7bd.tar.gz
dev-manual: Re-wrote the installation part of "Writing a Recipe"
(From yocto-docs rev: 7d99f9346a0747d2d1cb978ea10d1a681e70a98f) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml88
1 files changed, 77 insertions, 11 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 9fb2b1c550..2356b9fc36 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -1397,10 +1397,78 @@ the target, etc.
1397 <title>Installing</title> 1397 <title>Installing</title>
1398 1398
1399 <para> 1399 <para>
1400 install: for autotools/cmake recipes, if the recipe passes through do_install 1400 During installation, files your recipe builds are copied from
1401successfully, nothing needs to be done (at this stage). If not, diagnose the 1401 locations where work is being done to locations on the target
1402failure. For non-autotools recipes you need to define your own do_install 1402 device.
1403(which may well just run "oe_runmake install"). 1403 The installation process moves the
1404 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
1405 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink><filename>}</filename>,
1406 and
1407 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>
1408 to the
1409 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
1410 to create the structure as it should appear on the target
1411 system.
1412 <note>
1413 During the installation process, some of the files might also
1414 be modified to suit the target layout as well.
1415 </note>
1416 </para>
1417
1418 <para>
1419 How your software is built affects what you must do to be
1420 sure your software is installed correctly.
1421 The following list describes what you must do for installation
1422 depending on how your recipe builds your software:
1423 <itemizedlist>
1424 <listitem><para><emphasis>Autotools and <filename>cmake</filename>:</emphasis>
1425 If the software your recipe is building uses Autotools
1426 or <filename>cmake</filename>, the OpenEmbedded build
1427 system understands how to install the software.
1428 Consequently, you do not have to have a
1429 <filename>do_install</filename> task as part of your
1430 recipe.
1431 You just need to make sure the install portion of the
1432 build completes with no issues.</para></listitem>
1433 <listitem><para><emphasis><filename>make install</filename>:</emphasis>
1434 You need to define a
1435 <filename>do_install</filename> function in your
1436 recipe.
1437 The function should call
1438 <filename>oe_runmake install</filename> and will likely
1439 need to pass in the destination directory as well.
1440 How you pass that path is dependent on how the
1441 <filename>Makefile</filename> being run is written
1442 (e.g. <filename>DESTDIR=${D}</filename>,
1443 <filename>PREFIX=${D}</filename>,
1444 <filename>INSTALLROOT=${D}</filename>, and so forth).
1445 </para></listitem>
1446 <listitem><para><emphasis><filename>install</filename>:</emphasis>
1447 You need to define a
1448 <filename>do_install</filename> function in your
1449 recipe.
1450 The function must first use
1451 <filename>install -d</filename> to create the
1452 directories.
1453 Once the directories exist, your function can use
1454 <filename>install</filename> to manually install the
1455 built software into the directories.</para>
1456 <para>You can find more information on
1457 <filename>install</filename> at
1458 <ulink url='http://www.gnu.org/software/coreutils/manual/html_node/install-invocation.html'></ulink>.
1459 </para></listitem>
1460 </itemizedlist>
1461 </para>
1462
1463 <para>
1464 For the scenarios that do not use Autotools or
1465 <filename>cmake</filename>, you need to track the installation
1466 and diagnose and fix any issues until everything installs
1467 correctly.
1468 You need to look in the default location of
1469 <filename>${D}</filename>, which is
1470 <filename>${WORKDIR}/image</filename>, to be sure your
1471 files have been installed correctly.
1404 </para> 1472 </para>
1405 </section> 1473 </section>
1406 1474
@@ -1418,20 +1486,18 @@ section though.
1418 <para> 1486 <para>
1419 If you are adding services and the service initialization 1487 If you are adding services and the service initialization
1420 script or the service file itself is not installed, you must 1488 script or the service file itself is not installed, you must
1421 provide for that installation in your recipe. 1489 provide for that installation in your recipe using a
1490 <filename>do_install_append</filename> function.
1422 If your recipe already has a <filename>do_install</filename> 1491 If your recipe already has a <filename>do_install</filename>
1423 function, you will need to create a 1492 function, you will need to be sure to change it so that it
1424 <filename>do_install_append</filename> function to handle the 1493 handles the installation of your services.
1425 installation of your services.
1426 </para>
1427
1428 <para>
1429 When you create the installation for your services, you need 1494 When you create the installation for your services, you need
1430 to accomplish what is normally done by "make install". 1495 to accomplish what is normally done by "make install".
1431 In other words, make sure your installation puts the output 1496 In other words, make sure your installation puts the output
1432 in a layout that is similar to how they will be laid out on the 1497 in a layout that is similar to how they will be laid out on the
1433 target system. 1498 target system.
1434 </para> 1499 </para>
1500
1435 </section> 1501 </section>
1436 1502
1437 <section id='new-recipe-packaging'> 1503 <section id='new-recipe-packaging'>