From 8268a69c409f504a5cbdb8acd116ae0b99976cf4 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 22 Feb 2012 12:17:02 -0600 Subject: documentation/dev-manual/dev-manual-common-tasks.xml: review comments Implemented Paul Eggleton's latest set of review comments to the "Modifying Temporary Source Code" section. (From yocto-docs rev: cd43c642308ba7c049e6ba79befa471673c078e7) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 43 ++++++++++------------ 1 file changed, 19 insertions(+), 24 deletions(-) (limited to 'documentation/dev-manual') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 893c9e55e4..cecfc95e8b 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -780,6 +780,9 @@ so that there are some definite steps on how to do this. I need more detail her S = ${WORKDIR}/${BP} + You should be aware that many recipes override the S variable. + For example, recipes that fetch their source from Git usually set + S to ${WORKDIR}/git. BP represents the "Base Package", which is the base package name and the package version: @@ -790,39 +793,31 @@ so that there are some definite steps on how to do this. I need more detail her - The actual location within the build directory for the temporary source code - depends on the package name and the architecture of the target device, - which are part of the - WORKDIR variable's definition. - - - - Here is the temporary source code location for packages whose targets are not - device-dependent. - This location comprises WORKDIR: + The path to the work directory for the recipe + (WORKDIR) depends + on the package name and the architecture of the target device. + For example, here is the work directory for packages whose targets are not device-dependent: ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}-${PV}-${PR} - Let's look at an example. + Let's look at an example without variables. Assuming a Yocto Project Files top-level directory named poky and a default Yocto Project build directory of poky/build, - the following is the temporary source code location for the - acl package: + the following is the work directory for the acl package: ~/poky/build/tmp/work/i586-poky-linux/acl-2.2.51-r3 - If your package is dependent on the target device, the temporary - source code location varies slightly: + If your package is dependent on the target device, the work directory varies slightly: ${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}-${PV}-${PR} Again, assuming a Yocto Project Files top-level directory named poky and a default Yocto Project build directory of poky/build, the - following is the temporary source code location for the - acl package that is being built for a MIPS-based device: + following is the work directory for the acl package that is being + built for a MIPS-based device: ~/poky/build/tmp/work/mips-poky-linux/acl-2.2.51-r2 @@ -844,7 +839,7 @@ so that there are some definite steps on how to do this. I need more detail her - Now that you know where to locate the temporary source files, you can use a + Now that you know where to locate the work directory, you can use a Quilt or Git workflow to make your edits, test the changes, and preserve the changes in the form of patches. @@ -869,10 +864,10 @@ so that there are some definite steps on how to do this. I need more detail her Yocto Project build directory. See the "Finding the Temporary Source Code" - section to learn how to locate temporary source code for a + section to learn how to locate the work directory for a particular package. Change Your Working Directory: - You need to be in the directory that has the temporary source code. + You need to be in the work directory that has the source code. That directory is defined by the S variable. @@ -965,16 +960,16 @@ so that there are some definite steps on how to do this. I need more detail her Yocto Project build directory. See the "Finding the Temporary Source Code" - section to learn how to locate temporary source code for a + section to learn how to locate the work directory for a particular package. Change Your Working Directory: - You need to be in the directory that has the temporary source code. + You need to be in the work directory. That directory is defined by the S variable. Initialize a Git Repository: Use the git init command to initialize a new local repository - that is based on your source code directory: + that is based on the work directory: $ git init @@ -986,7 +981,7 @@ so that there are some definite steps on how to do this. I need more detail her Commit the Source Files: Use the git commit command to initially commit all the files in - the source code directory: + the work directory: $ git commit -- cgit v1.2.3-54-g00ecf