diff options
| author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-07-13 13:43:30 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-17 10:54:09 +0100 |
| commit | c6c2ebacb9fc1a70610246189dd77a775b2c1317 (patch) | |
| tree | b915d44a73098466921baf39b4c1c1c687be1c34 /documentation/dev-manual | |
| parent | 402383637b9a20614bc56221f86ff5b9013519d2 (diff) | |
| download | poky-c6c2ebacb9fc1a70610246189dd77a775b2c1317.tar.gz | |
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 <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-model.xml | 77 |
1 files changed, 77 insertions, 0 deletions
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 @@ | |||
| 36 | You can use the <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob</ulink> to build | 36 | You can use the <ulink url='&YOCTO_HOME_URL;/projects/hob'>Hob</ulink> to build |
| 37 | custom operating system images within the build environment. | 37 | custom operating system images within the build environment. |
| 38 | Hob provides an efficient interface to the OpenEmbedded build system.</para></listitem> | 38 | Hob provides an efficient interface to the OpenEmbedded build system.</para></listitem> |
| 39 | <listitem><para><emphasis>Using a Development Shell:</emphasis> | ||
| 40 | You can use a <filename>devshell</filename> to efficiently debug commands or simply | ||
| 41 | edit packages. | ||
| 42 | Working inside a development shell is a quick way to set up the OpenEmbedded build | ||
| 43 | environment to work on parts of a project.</para></listitem> | ||
| 39 | </itemizedlist> | 44 | </itemizedlist> |
| 40 | </para> | 45 | </para> |
| 41 | 46 | ||
| @@ -1040,6 +1045,78 @@ | |||
| 1040 | </para> | 1045 | </para> |
| 1041 | </section> | 1046 | </section> |
| 1042 | 1047 | ||
| 1048 | <section id="platdev-appdev-devshell"> | ||
| 1049 | <title>Using a Development Shell</title> | ||
| 1050 | |||
| 1051 | <para> | ||
| 1052 | When debugging certain commands or even when just editing packages, | ||
| 1053 | <filename>devshell</filename> can be a useful tool. | ||
| 1054 | When you invoke <filename>devshell</filename>, source files are | ||
| 1055 | extracted into your working directory and patches are applied. | ||
| 1056 | Then, a new terminal is opened and you are placed in the working directory. | ||
| 1057 | In the new terminal, all the OpenEmbedded build-related environment variables are | ||
| 1058 | still defined so you can use commands such as <filename>configure</filename> and | ||
| 1059 | <filename>make</filename>. | ||
| 1060 | The commands execute just as if the OpenEmbedded build system were executing them. | ||
| 1061 | Consequently, working this way can be helpful when debugging a build or preparing | ||
| 1062 | software to be used with the OpenEmbedded build system. | ||
| 1063 | </para> | ||
| 1064 | |||
| 1065 | <para> | ||
| 1066 | Following is an example that uses <filename>devshell</filename> on a target named | ||
| 1067 | <filename>matchbox-desktop</filename>: | ||
| 1068 | <literallayout class='monospaced'> | ||
| 1069 | $ bitbake matchbox-desktop -c devshell | ||
| 1070 | </literallayout> | ||
| 1071 | </para> | ||
| 1072 | |||
| 1073 | <para> | ||
| 1074 | This command opens a terminal with a shell prompt within the OpenEmbedded build environment. | ||
| 1075 | The default shell is xterm. | ||
| 1076 | The following occurs: | ||
| 1077 | <itemizedlist> | ||
| 1078 | <listitem><para>The <filename>PATH</filename> variable includes the | ||
| 1079 | cross-toolchain.</para></listitem> | ||
| 1080 | <listitem><para>The <filename>pkgconfig</filename> variables find the correct | ||
| 1081 | <filename>.pc</filename> files.</para></listitem> | ||
| 1082 | <listitem><para>The <filename>configure</filename> command finds the | ||
| 1083 | Yocto Project site files as well as any other necessary files.</para></listitem> | ||
| 1084 | </itemizedlist> | ||
| 1085 | Within this environment, you can run <filename>configure</filename> | ||
| 1086 | or <filename>compile</filename> commands as if they were being run by | ||
| 1087 | the OpenEmbedded build system itself. | ||
| 1088 | As noted earlier, the working directory also automatically changes to the | ||
| 1089 | source directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>). | ||
| 1090 | </para> | ||
| 1091 | |||
| 1092 | <para> | ||
| 1093 | When you are finished, you just exit the shell or close the terminal window. | ||
| 1094 | </para> | ||
| 1095 | |||
| 1096 | <para> | ||
| 1097 | Because an external shell is launched rather than opening directly into the | ||
| 1098 | original terminal window, it allows easier interaction with BitBake's multiple | ||
| 1099 | threads as well as accomodates a future client/server split. | ||
| 1100 | </para> | ||
| 1101 | |||
| 1102 | <note> | ||
| 1103 | <para> | ||
| 1104 | It is worth remembering that when using <filename>devshell</filename> | ||
| 1105 | you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename> | ||
| 1106 | instead of just using <filename>gcc</filename>. | ||
| 1107 | The same applies to other applications such as <filename>binutils</filename>, | ||
| 1108 | <filename>libtool</filename> and so forth. | ||
| 1109 | BitBake sets up environment variables such as <filename>CC</filename> | ||
| 1110 | to assist applications, such as <filename>make</filename> to find the correct tools. | ||
| 1111 | </para> | ||
| 1112 | |||
| 1113 | <para> | ||
| 1114 | It is also worth noting that <filename>devshell</filename> still works over | ||
| 1115 | X11 forwarding and similar situations | ||
| 1116 | </para> | ||
| 1117 | </note> | ||
| 1118 | </section> | ||
| 1119 | |||
| 1043 | </chapter> | 1120 | </chapter> |
| 1044 | <!-- | 1121 | <!-- |
| 1045 | vim: expandtab tw=80 ts=4 | 1122 | vim: expandtab tw=80 ts=4 |
