From 3b908ee6a8fb920b73ea1974ba62693fb575b7bd Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 18 Dec 2013 15:06:05 -0600 Subject: dev-manual: Re-wrote the installation part of "Writing a Recipe" (From yocto-docs rev: 7d99f9346a0747d2d1cb978ea10d1a681e70a98f) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 88 +++++++++++++++++++--- 1 file changed, 77 insertions(+), 11 deletions(-) (limited to 'documentation') 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. Installing - install: for autotools/cmake recipes, if the recipe passes through do_install -successfully, nothing needs to be done (at this stage). If not, diagnose the -failure. For non-autotools recipes you need to define your own do_install -(which may well just run "oe_runmake install"). + During installation, files your recipe builds are copied from + locations where work is being done to locations on the target + device. + The installation process moves the + ${S}, + ${B}, + and + ${WORKDIR} + to the + ${D} + to create the structure as it should appear on the target + system. + + During the installation process, some of the files might also + be modified to suit the target layout as well. + + + + + How your software is built affects what you must do to be + sure your software is installed correctly. + The following list describes what you must do for installation + depending on how your recipe builds your software: + + Autotools and cmake: + If the software your recipe is building uses Autotools + or cmake, the OpenEmbedded build + system understands how to install the software. + Consequently, you do not have to have a + do_install task as part of your + recipe. + You just need to make sure the install portion of the + build completes with no issues. + make install: + You need to define a + do_install function in your + recipe. + The function should call + oe_runmake install and will likely + need to pass in the destination directory as well. + How you pass that path is dependent on how the + Makefile being run is written + (e.g. DESTDIR=${D}, + PREFIX=${D}, + INSTALLROOT=${D}, and so forth). + + install: + You need to define a + do_install function in your + recipe. + The function must first use + install -d to create the + directories. + Once the directories exist, your function can use + install to manually install the + built software into the directories. + You can find more information on + install at + . + + + + + + For the scenarios that do not use Autotools or + cmake, you need to track the installation + and diagnose and fix any issues until everything installs + correctly. + You need to look in the default location of + ${D}, which is + ${WORKDIR}/image, to be sure your + files have been installed correctly. @@ -1418,20 +1486,18 @@ section though. If you are adding services and the service initialization script or the service file itself is not installed, you must - provide for that installation in your recipe. + provide for that installation in your recipe using a + do_install_append function. If your recipe already has a do_install - function, you will need to create a - do_install_append function to handle the - installation of your services. - - - + function, you will need to be sure to change it so that it + handles the installation of your services. When you create the installation for your services, you need to accomplish what is normally done by "make install". In other words, make sure your installation puts the output in a layout that is similar to how they will be laid out on the target system. +
-- cgit v1.2.3-54-g00ecf