From c6c2ebacb9fc1a70610246189dd77a775b2c1317 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 13 Jul 2012 13:43:30 -0700 Subject: documentation/dev-manual/dev-manual-model.xml: Added devshell section I inserted the section "Using a Development Shell" into the "Common Development Models" chapter. This information was formerly in the YP Reference Manual and is being moved out to help the ref manual become a truer reference manual. (From yocto-docs rev: f4ca1c567afcebbae119f21c147e3c38c7ffd54e) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/dev-manual/dev-manual-model.xml | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) (limited to 'documentation') diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml index 87e10318a7..ef5c64b678 100644 --- a/documentation/dev-manual/dev-manual-model.xml +++ b/documentation/dev-manual/dev-manual-model.xml @@ -36,6 +36,11 @@ You can use the Hob to build custom operating system images within the build environment. Hob provides an efficient interface to the OpenEmbedded build system. + Using a Development Shell: + You can use a devshell to efficiently debug commands or simply + edit packages. + Working inside a development shell is a quick way to set up the OpenEmbedded build + environment to work on parts of a project. @@ -1040,6 +1045,78 @@ +
+ Using a Development Shell + + + When debugging certain commands or even when just editing packages, + devshell can be a useful tool. + When you invoke devshell, source files are + extracted into your working directory and patches are applied. + Then, a new terminal is opened and you are placed in the working directory. + In the new terminal, all the OpenEmbedded build-related environment variables are + still defined so you can use commands such as configure and + make. + The commands execute just as if the OpenEmbedded build system were executing them. + Consequently, working this way can be helpful when debugging a build or preparing + software to be used with the OpenEmbedded build system. + + + + Following is an example that uses devshell on a target named + matchbox-desktop: + + $ bitbake matchbox-desktop -c devshell + + + + + This command opens a terminal with a shell prompt within the OpenEmbedded build environment. + The default shell is xterm. + The following occurs: + + The PATH variable includes the + cross-toolchain. + The pkgconfig variables find the correct + .pc files. + The configure command finds the + Yocto Project site files as well as any other necessary files. + + Within this environment, you can run configure + or compile commands as if they were being run by + the OpenEmbedded build system itself. + As noted earlier, the working directory also automatically changes to the + source directory (S). + + + + When you are finished, you just exit the shell or close the terminal window. + + + + Because an external shell is launched rather than opening directly into the + original terminal window, it allows easier interaction with BitBake's multiple + threads as well as accomodates a future client/server split. + + + + + It is worth remembering that when using devshell + you need to use the full compiler name such as arm-poky-linux-gnueabi-gcc + instead of just using gcc. + The same applies to other applications such as binutils, + libtool and so forth. + BitBake sets up environment variables such as CC + to assist applications, such as make to find the correct tools. + + + + It is also worth noting that devshell still works over + X11 forwarding and similar situations + + +
+