diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 1c89550c01..fa50832284 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -749,20 +749,50 @@ so that there are some definite steps on how to do this. I need more detail her
Modifying Package Source Code - Although the Yocto Project is usually used to build software, you can use it to modify software. + Although the Yocto Project is typically used to build software, you might + find it helpful during development to modify the temporary package source code + found within the + Yocto Project's Build Directory. + For example, suppose you are developing a patch and you need to experiment a bit + to figure out your solution. + After you have initially built the package, you can iteratively tweak the + source code, which is located in the Yocto Project build directory, and then + you can force a re-compile and test your altered code. + Once you settle on a solution, you can then copy the updated source code + to its more permanent location. - During a build, source is available in the - WORKDIR directory. - The actual location depends on the type of package and the architecture of the target device. - For a standard recipe not related to - MACHINE, the location is - tmp/work/PACKAGE_ARCH-poky-TARGET_OS/PN-PV-PR/. - For target device-dependent packages, you should use the MACHINE - variable instead of - PACKAGE_ARCH - in the directory name. + During a build, this temporary source code is available in the Yocto + Project build directory, which is defined by the TMPDIR variable. + The actual location within the build directory + for the package source code depends on the package name and + the architecture of the target device. + Here is the source code location for packages that are not target device-dependent: + + ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}-${PV}-${PR} + + Assuming a Yocto Project Files top-level directory named poky + and a default Yocto Project build directory of poky/build, here + is an example temporary package source code location for the + v86d package: + + ~/poky/build/tmp/work/qemux86-poky-linux/v86-01.9-r0 + + + + + If your package is target device-dependent, the source code location 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, here + is an example temporary package source code location for the + acl package that is dependent upon a MIPS-based device: + + ~/poky/build/tmp/work/mips-poky-linux/acl-2.2.51-r2 + @@ -772,21 +802,19 @@ so that there are some definite steps on how to do this. I need more detail her - After building a package, you can modify the package source code without problems. - The easiest way to test your changes is by calling the - compile task as shown in the following example: + Once you have modified the package source code, the easiest way to test your changes + is by calling the compile task as shown in the following example: - $ bitbake -c compile -f NAME_OF_PACKAGE + $ bitbake -c compile -f <name_of_package> The -f or --force option forces re-execution of the specified task. - You can call other tasks this way as well. - But note that all the modifications in - WORKDIR - are gone once you execute -c clean for a package. + You can call other tasks this way as well. + All the modifications you make to the temporary package source code + disappear once you -c clean for the package.