From 62f93ac42de38f58028542d2b6d44d5677ac557b Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 12 Nov 2010 15:41:35 -0800 Subject: Poky Reference Manual: General edits up to the "Debugging with GDB Remotely" section. Signed-off-by: Scott Rifenbark --- documentation/poky-ref-manual/development.xml | 519 ++++++++++++++------------ 1 file changed, 274 insertions(+), 245 deletions(-) (limited to 'documentation/poky-ref-manual') diff --git a/documentation/poky-ref-manual/development.xml b/documentation/poky-ref-manual/development.xml index 67badce777..0eda1e9a88 100644 --- a/documentation/poky-ref-manual/development.xml +++ b/documentation/poky-ref-manual/development.xml @@ -14,22 +14,26 @@
External Development Using the Poky SDK - The meta-toolchain and meta-toolchain-sdk targets (see - the images section) build tarballs that contain toolchains and - libraries suitable for application development outside of Poky. These tarballs - unpack into the + The meta-toolchain and meta-toolchain-sdk targets build tarballs that contain toolchains and + libraries suitable for application development outside of Poky. + For information on these targets see the Reference: Images + appendix. + + + These tarballs unpack into the /opt/poky directory and contain a setup script (e.g. - /opt/poky/environment-setup-i586-poky-linux, which - you can source to initialize a suitable environment. Sourcing these adds the + /opt/poky/environment-setup-i586-poky-linux), from which + you can source to initialize a suitable environment. Sourcing these files adds the compiler, QEMU scripts, QEMU binary, a special version of pkgconfig and other useful utilities to the PATH variable. Variables to assist pkgconfig and - autotools are also set so that, for example, configure can find pre-generated test + autotools are also defined so that, for example, configure can find pre-generated test results for tests that need target hardware on which to run. Using the toolchain with autotool-enabled packages is straightforward - just pass the - appropriate host option to configure as in the following example: + appropriate host option to configure. + Following is an example: $ ./configure --host=arm-poky-linux-gnueabi @@ -47,7 +51,7 @@ easier for the application developer. The plug-ins provide capability extensions to the graphical IDE allowing for cross compilation, deployment and execution of the output in a QEMU emulation session. - Support of these plug-ins also supports cross debugging and + Support of these plug-ins also allows for cross debugging and profiling. Additionally, the Eclipse plug-in provides a suite of tools that allows the developer to perform remote profiling, tracing, collection of power data, collection of latency data and collection of performance data. @@ -57,13 +61,13 @@ The Eclipse Plug-in To use the Eclipse plug-in, a toolchain and SDK built by Poky is required along with - the Eclipse Framework (Helios 3.6). + the Eclipse Framework (Helios 3.6.1). To install the plug-in you need to be in the Eclipse IDE and select the following menu: Help -> Install New Software - Specify the target URL as http://yocto./download (real link needed). + Specify the target URL as . If you want to download the source code for the plug-in you can find it in the Poky @@ -74,23 +78,25 @@
Installing and Setting up the Eclipse IDE - If you don't have the Eclipse IDE (Helios 3.6) on your system you need to + If you don't have the Eclipse IDE (Helios 3.6.1) on your system you need to download and install it from . Choose the Eclipse Classic, which contains the Eclipse Platform, Java Development Tools (JDT), and the Plug-in Development Environment. - - NOTE: Due to the Java Virtual Machine's garbage collection (GC) process the - permanent generation space (PermGen) is not cleaned up. This space is used - to store meta-data descriptions of classes. The default value is set too small - and it could trigger an out of memory error like the following: + + + Due to the Java Virtual Machine's garbage collection (GC) process the + permanent generation space (PermGen) is not cleaned up. This space stores + meta-data descriptions of classes. The default value is set too small + and it could trigger an out-of-memory error like the following: Java.lang.OutOfMemoryError: PermGen space This error causes the applications to hang. - + + - To fix this issue you can use the -vmargs + To fix this issue you can use the -vmargs option when you start Eclipse to increase the size of the permenant generation space: Eclipse -vmargs -XX:PermSize=256M @@ -101,149 +107,173 @@
Installing the Yocto Plug-in - Once you have the Eclipse IDE installed and configure you need to install the + Once you have the Eclipse IDE installed and configured you need to install the Yocto plug-in. You do this similar to installing the Eclipse plug-ins in the previous section. Do the following to install the Yocto plug-in into the Eclipse IDE: - + Select the "Help -> Install New Software" item. In the "Work with:" area click "Add..." and enter the URL for - the Yocto plug-in (we need to supply this URL). + the Yocto plug-in, which is + Finish out the installation of the update similar to any other Eclipse plug-in. - +
Configuring Yocto Eclipse plug-in - To configure the Yocto Eclipse plug-in you need to select the mode and then the + To configure the Yocto Eclipse plug-in you need to select the mode and the architecture with which you will be working. Start by selecting "Preferences" - from the "Window" menu and then selecting "Yocto SDK". + from the "Window" menu and then select "Yocto SDK". If you normally will use an installed Yocto - SDK (under /opt/poky) select “SDK Root Mode”. Otherwise, if your crosstool chain + SDK (under /opt/poky) select “SDK Root Mode”. Otherwise, if your crosstool chain and sysroot are within your poky tree, select “Poky Tree Mode”. - If you are in SDK Root Mode you will need to provide your poky tree path, for - example, $<Poky_tree>/build/. + If you are in SDK Root Mode you need to provide your poky tree path, for + example, $<Poky_tree>/build/. - Now you need to select the architecture. + Next, you need to select the architecture. Use the drop down list and select the architecture that you’ll be primarily working against. For target option, select your typical target QEMU vs External HW. If you choose QEMU, you’ll need to specify your QEMU kernel file with full path and the - rootfs mount point. Yocto QEMU boots off user mode NFS, Please refer to QEMU - section for how to set it up. (Section TBD) + rootfs mount point. Yocto QEMU boots off user mode NFS. + See the Developing Externally in QEMU section for + how to set it up. - Save all your settings and they become your defaults for every new Yocto project - created using the Eclipse IDE. + To make your settings the defaults for every new Yocto project created using + the Eclipse IDE, simply save the settings.
Using the Yocto Eclipse Plug-in - As an example, this section shows you how to cross-compile a Yocto C autotools - based project, deploy it into QEMU, and then run the debugger against it. - You need to configure the project, trigger autogen.sh, build + As an example, this section shows you how to cross-compile a Yocto C project that + is autotools-based, deploy the project into QEMU, and then run the debugger against it. + You need to configure the project, trigger the autogen.sh, build the image, start QEMU, and then debug. + + The following steps show how to create a Yocto autotools-based project using a given template: + - Creating a Yocto Autotools Based Project Using a Template: - Get to the Wizard selection by selecting the File -> New -> Project - menu. Expand "C/C++" and select "C Project". Click "Next" and select a template - to start with, for example "Hello World ANSI C Project". Complete the steps - to create a new Yocto autotools based project using this template. - Specify Specific Toolchain Configurations: By default the project - uses the Yocto preferences settings as defined using the procedure in - the previous section. - If there are any specific setup requirements for the newly created project - you need to reconfigure the Yocto plug-in through the menu selection - Project -> Invoke Yocto Tools -> Reconfigure Yocto. Use this dialogue - to specify specific toolchain and QEMU setups for the project. - Building the Project: Trigger autogen.sh through - Project -> Reconfigure Project. Then build the project using - Project -> Build. - Starting QEMU: Use the Run -> External Tools menu and see if there is - a QEMU instance for the desired target. If there is click on the instance - to start QEMU. If your target is not there then click "External Tools - Configuration". You should find an instance of QEMU for your architecture - under the entry under "Program". After the boot completes you are ready to - deploy the image into QEMU. - Debugging: To bring up your remote debugging configuration in the - right-hand window highlight your project in “Project Explorer”, select - the Run -> Debug Configurations menu item and expand “C/C++ Remote Application”. - Next, select projectname_ gdb_target-poky-linux. - You need to be sure that there is an - entry for the remote target you want to deploy and cross debug with. If there - is no entry then click "New..." to bring up the wizard. Using the wizard - select TCF and enter the IP address of you remote target in the - “Host name:” field. Back in the remote debug configure window, - you need to specify the absolute path for the program on the remote target - in the “Remote Absolute File Path for C/C++ Application” field. By default, - the program deploys into the remote target. If you don't want this then check - “Skip download to target path”. Finally, click "Debug” to start the remote - debugging session. + Select "File -> New -> Project" to start the wizard. + Expand "C/C++" and select "C Project". + Click "Next" and select a template (e.g. "Hello World ANSI C Project"). + Complete the steps to create the new Yocto autotools-based project using + your chosen template. + + + By default, the project uses the Yocto preferences settings as defined using the procedure in + the previous section. + If there are any specific setup requirements for the newly created project + you need to reconfigure the Yocto plug-in through the menu selection by doing the following: + + + Select the "Project -> Invoke Yocto Tools -> Reconfigure Yocto" menu item. + Complete the dialogue to specify the specific toolchain and QEMU setup information. + + + To build the project follow these steps: + + + Select "Project -> Reconfigure Project" to trigger the + autogen.sh command. + Select "Project -> Build" to build the project. + + + To start QEMU follow these steps: + + + Select "Run -> External Tools" and see if there is + a QEMU instance for the desired target. + If one exists, click on the instance to start QEMU. + If your target does not exist, click "External Tools Configuration" and + you should find an instance of QEMU for your architecture + under the entry under "Program". + Wait for the boot to complete. + + + To deploy your project and start debugging follow these steps: + + + Highlight your project in the project explorer. + Select "Run -> Debug Configurations" to bring up your remote debugging configuration + in the right-hand window. + Expand “C/C++ Remote Application”. + Select "projectname_ gdb_target-poky-linux". + You need to be sure there is an entry for the remote target. + If no entry exists, click "New..." to bring up the wizard. + Use the wizard to select TCF and enter the IP address of you remote target in the + “Host name:” field. + Back in the Remote Debug Configure window, specify in the + “Remote Absolute File Path for C/C++ Application” field the absolute path for the program on + the remote target. + By default, the program deploys into the remote target. + If you don't want this behavior then check “Skip download to target path”. + Click "Debug” to start the remote debugging session.
Using Yocto Eclipse plug-in Remote Tools Suite - Remote tools let you do things like perform system profiling, kernel tracing, + Remote tools allow you to perform system profiling, kernel tracing, examine power consumption, and so forth. To see and access the remote tools use the - Window -> YoctoTools menu. + "Window -> YoctoTools" menu. Once you pick a tool you need to configure it for the remote target. Every tool - needs to have the connection configured. You have to select an existing TCF-based - RSE connection to the remote target. If one does not exist you need to create one - by clicking "New" + needs to have the connection configured. You must select an existing TCF-based + RSE connection to the remote target. If one does not exist, click "New" to create one. Here are some specifics about the remote tools: Oprofile: Selecting this tool causes the oprofile-server on the remote - target to launch on the local host machine. To use the oprofile the oprofile-viewer + target to launch on the local host machine. The oprofile-viewer must be installed on the local host machine and the oprofile-server must be - installed on the remote target. - lttng: Selecting this tool runs ustrace on the remote target, transfers - the output data back to the local host machine and uses lttv-gui to graphically - display the output. To use this tool the lttv-gui must be installed on the - local host machine. See - for information on how to use lttng to trace an - application. + installed on the remote target, respectively, in order to use . + lttng: Selecting this tool runs "ustrace" on the remote target, transfers + the output data back to the local host machine and uses "lttv-gui" to graphically + display the output. The "lttv-gui" must be installed on the + local host machine to use this tool. + For information on how to use "lttng" to trace an + application, see . - For "Application" you must supply the absolute path name to the application to - be traced by user mode lttng. For example, typing /path/to/foo" - triggers usttrace /path/to/foo on the - remote target to trace the program /path/to/foo. + For "Application" you must supply the absolute path name of the application to + be traced by user mode lttng. For example, typing /path/to/foo" + triggers "usttrace /path/to/foo" on the + remote target to trace the program /path/to/foo. "Argument" is passed to "usttrace" running on the remote target. - powertop: Selecting this tool runs powertop on the - remote target machine and displays the result in a new view called "powertop". + powertop: Selecting this tool runs "powertop" on the + remote target machine and displays the results in a new view called "powertop". "Time to gather data(sec):" is the time passed in seconds before data is gathered from the remote target for analysis. - "show pids in wakeups list:" corresponds to the -p - argument passed to powertop + "show pids in wakeups list:" corresponds to the -p + argument passed to "powertop". - latencytop and perf: The latencytop identifies - system latency, while perf monitors the system's performance + latencytop and perf: "latencytop" identifies + system latency, while "perf" monitors the system's performance counter registers. Selecting either of these tools causes an RSE - terminal view to appear in which you can run the tools. Both tools refresh the + terminal view to appear from which you can run the tools. Both tools refresh the entire screen to display results while they run. @@ -252,25 +282,24 @@
The Anjuta Plug-in - - Note: We will stop Anjuta plug-in support after - Yocto project 0.9 release. Its source - code can be downloaded from git respository listed below, and free for the community to - continue supporting it moving forward. - + + + Support for the Anjuta plug-in ends after Yocto project 0.9 release. + However, the source code can be downloaded from the git repository listed later in + this section. + The community is free to continue supporting it post 0.9 release. + + An Anjuta IDE plugin exists to make developing software within the Poky framework - easier for the application developer. - It presents a graphical IDE with which you can cross compile an application - then deploy and execute the output in a - QEMU emulation session. - It also supports cross debugging and profiling. + easier for the application developer familiar with that environment. + The plug-in presents a graphical IDE that allows you to cross-compile, cross-debug, + profile, deploy, and execute an application. - To use the plugin, a toolchain and SDK built by Poky is required, - Anjuta, it's development headers and the Anjuta plugin. - The Poky Anjuta plugin is available to download as a tarball at the - OpenedHand + To use the plugin, a toolchain and SDK built by Poky, Anjuta, it's development headers and the Anjuta + Plug-in are all required. + The Poky Anjuta Plug-in is available to download as a tarball at the OpenedHand labs page or directly from the Poky Git repository located at . @@ -279,10 +308,9 @@ See the README file contained in the project for more information on - Anjuta dependencies and building the plugin. - If you want to disable remote gdb debugging, - please pass the --diable-gdb-integration switch when doing - configure. + Anjuta dependencies and building the plug-in. + If you want to disable remote gdb debugging, pass the "--diable-gdb-integration" switch when + you configure the plug-in.
Setting Up the Anjuta Plug-in @@ -290,18 +318,17 @@ Follow these steps to set up the plug-in: Extract the tarball for the toolchain into / as root. - The toolchain will be installed into /opt/poky. + The toolchain will be installed into /opt/poky. To use the plug-in, first open or create an existing project. If you are creating a new project, the "C GTK+" project type will allow itself to be cross-compiled. - However you should be aware that this uses glade for the UI. - To activate the plug-in go to Edit -> Preferences, then choose - General from the left hand side. - Choose the Installed plug-ins tab, scroll down to Poky SDK and + However, you should be aware that this type uses "glade" for the UI. + To activate the plug-in, select "Edit -> Preferences" and then choose + "General" from the left hand side. + Choose the "Installed plug-ins" tab, scroll down to "Poky SDK" and check the box. The plug-in is now activated but not configured. - See the next section to learn how to configure it.
@@ -309,89 +336,82 @@ You can find the configuration options for the SDK by choosing the Poky SDK icon from the left hand side. - You need to set the following options: + You need to define the following options: SDK root: If you use an external toolchain you need to set - SDK root. This is the root directory of the - SDK's sysroot. - For an i586 SDK this will be /opt/poky/. - This directory will contain bin, include - , var and so forth under your + SDK root, which is the root directory of the SDK's sysroot. + For an i586 SDK directory is /opt/poky/. + This directory will contain "bin", "include", "var" and so forth under your selected target architecture subdirectory - /opt/poky/sysroot/i586-poky-linux/. - The cross comple tools you need are in - /opt/poky/sysroot/i586-pokysdk-linux/. - Poky root: If you have a local poky build tree, you need to - set the Poky root. - This is the root directory of the poky build tree. + /opt/poky/sysroot/i586-poky-linux/. + The cross-compile tools you need are in + /opt/poky/sysroot/i586-pokysdk-linux/. + Poky root: If you have a local Poky build tree, you need to + set the Poky root, which is the root directory of the poky build tree. If you build your i586 target architecture under the subdirectory of - build_x86 within your poky tree, the Poky root directory - should be $<poky_tree>/build_x86/. + build_x86 within your Poky tree, the Poky root directory + should be $<poky_tree>/build_x86/. Target Architecture: This is the cross compile triplet, for example, "i586-poky-linux". - This target triplet is the prefix extracted from the set up script file - name. - For example, "i586-poky-linux" is extracted from the - set up script file - /opt/poky/environment-setup-i586-poky-linux. - Kernel: Use the file chooser to select the kernel to use - with QEMU. + This target triplet is the prefix extracted from the set up script file's name. + For example, if the script file name is + /opt/poky/environment-setup-i586-poky-linux then the extracted target + triplet is "i586-poky-linux". + Kernel: Use the file chooser to select the kernel used with QEMU. Root filesystem: Use the file chooser to select the root - filesystem directory. This directory is where you use the - poky-extract-sdk to extract the poky-image-sdk - tarball. + filesystem directory. This directory is where you use "poky-extract-sdk" to extract the + poky-image-sdk tarball.
Using the Anjuta Plug-in - This section uses an example that cross-compiles a project, deploys it into - QEMU, runs a debugger against it and then does a system wide profile. + The steps in this section show how to cross-compile a project, deploy it into + QEMU, run a debugger against it and then perform a system-wide profile. - Choose Build -> Run Configure or Build -> Run Autogenerate to run - "configure" or autogen, respectively for the project. + Choose "Build -> Run Configure" or "Build -> Run Autogenerate" to run + "configure" or "autogen", respectively for the project. Either command passes command-line arguments to instruct the cross-compile. - Select Build -> Build Project to build and compile the project. + Choose "Build -> Build Project" to build and compile the project. If you have previously built the project in the same tree without using the cross-compiler you might find that your project fails to link. - If this is the case, simply select Build -> Clean Project to remove the + If this is the case, simply select "Build -> Clean Project" to remove the old binaries. After you clean the project you can then try building it again. - Start QEMU by selecting Tools -> Start QEMU. This menu selection - starts QEMU and will show any error messages in the message view. - Once Poky has fully booted within QEMU you can now deploy the project + Choose "Tools -> Start QEMU" to start QEMU. + After QEMU starts any error messages will appear in the message view. + Once Poky has fully booted within QEMU you can deploy the project into it. Once the project is built and you have QEMU running choose - Tools -> Deploy. - This selection installs the package into a temporary - directory and then copies using rsync over SSH into the target. - Progress and messages appear in the message view. + "Tools -> Deploy" to install the package into a temporary + directory and then copy it using "rsync" over SSH into the target. + A progress bar and appropriate messages appear in the message view. To debug a program installed onto the target choose - Tools -> Debug remote. - This selection prompts you for the local binary to debug and also the - command line to run on the target. - The command line to run should include the full path to the to binary + "Tools -> Debug remote". + Choosing this menu item causes prompts to appear to define the local binary + for debugging and also for the command line used to run on the target. + When you provide the command line be sure to include the full path to the to binary installed in the target. - This will start a gdbserver over SSH on the target and also an instance - of a cross-gdb in a local terminal. - This will be preloaded to connect to the server and use the SDK root to + When the command line runs a "gdbserver" over SSH is started on the target and + an instance of "cross-gdb" starts in a local terminal. + The instance of "cross-gdb" will be preloaded to connect to the server and use the SDK root to find symbols. - This gdb will connect to the target and load in various libraries and the + It also connects to the target and loads in various libraries as well as the target program. - You should setup any breakpoints or watchpoints now since you might not + You should define any breakpoints or watchpoints at this point in the process since you might not be able to interrupt the execution later. - You can stop the debugger on the target using Tools -> Stop debugger. - It is also possible to execute a command in the target over SSH, - the appropriate environment will be be set for the execution. - Choose Tools -> Run remote to do this. + To stop the debugger on the target choose "Tools -> Stop debugger". + It is also possible to execute a command in the target over SSH. + Doing so causes the appropriate environment to be established for execution. + To execute a command choose "Choose Tools -> Run remote". This selection opens a terminal with the SSH command inside. - To do a system wide profile against the system running in QEMU choose - Tools -> Profile remote. - This selection starts up OProfileUI with the appropriate parameters to + To perform a system-wide profile against the system running in QEMU choose + "Tools -> Profile remote". + This choice starts up "OProfileUI" with the appropriate parameters to connect to the server running inside QEMU and also supplies the path - to the debug information necessary to get a useful profile. + for debug information necessary to get a useful profile.
@@ -399,7 +419,7 @@
- Developing externally in QEMU + Developing Externally in QEMU Running Poky QEMU images is covered in the @@ -407,35 +427,36 @@ Poky's QEMU images contain a complete native toolchain. This means - that applications can be developed within QEMU in the same was as a - normal system. Using qemux86 on an x86 machine is fast since the - guest and host architectures match, qemuarm is slower but gives - faithful emulation of ARM specific issues. To speed things up these - images support using distcc to call a cross-compiler outside the - emulated system too. If runqemu was used to start - QEMU, and distccd is present on the host system, any bitbake cross - compiling toolchain available from the build system will automatically - be used from within qemu simply by calling distcc - (export CC="distcc" can be set in the enviroment). + you can develop applications within QEMU similar to the way you would in a normal system. + Using qemux86 on an x86 machine is fast since the + guest and host architectures match. + On the other hand, using qemuarm can be slower but gives + faithful emulation of ARM-specific issues. To speed things up, these + images support using "distcc" to call a cross-compiler outside the + emulated system. If "runqemu" was used to start + QEMU, and "distccd" is present on the host system, any Bitbake cross-compiling + toolchain available from the build system is automatically + used from within QEMU simply by calling "distcc". You can accomplish this by defining the + cross-compiler variable (e.g. export CC="distcc"). Alterntatively, if a suitable SDK/toolchain is present in - /opt/poky it will also + /opt/poky it is also automatically be used. There are several options for connecting into the emulated system. - QEMU provides a framebuffer interface which has standard consoles - available. There is also a serial connection available which has a - console to the system running on it and IP networking as standard. + QEMU provides a framebuffer interface that has standard consoles + available. There is also a serial connection available that has a + console to the system running on it and uses standard IP networking. The images have a dropbear ssh server running with the root password - disabled allowing standard ssh and scp commands to work. The images - also contain an NFS server exporting the guest's root filesystem - allowing that to be made available to the host. + disabled to allow standard ssh and scp commands to work. The images + also contain an NFS server that exports the guest's root filesystem, which + allows it to be made available to the host.
- Developing in Poky directly + Developing in Poky Directly Working directly in Poky is a fast and effective development technique. The idea is that you can directly edit files in @@ -448,36 +469,36 @@ -$ bitbake matchbox-desktop -$ sh -$ cd tmp/work/armv5te-poky-linux-gnueabi/matchbox-desktop-2.0+svnr1708-r0/ -$ cd matchbox-desktop-2 -$ vi src/main.c -$ exit -$ bitbake matchbox-desktop -c compile -f -$ bitbake matchbox-desktop - + $ bitbake matchbox-desktop + $ sh + $ cd tmp/work/armv5te-poky-linux-gnueabi/matchbox-desktop-2.0+svnr1708-r0/ + $ cd matchbox-desktop-2 + $ vi src/main.c + $ exit + $ bitbake matchbox-desktop -c compile -f + $ bitbake matchbox-desktop + - Here, we build the package, change into the work directory for the package, - change a file, then recompile the package. Instead of using sh like this, - you can also use two different terminals. The risk with working like this - is that a command like unpack could wipe out the changes you've made to the - work directory so you need to work carefully. + This example builds the package, changes into the work directory for the package, + changes a file, then recompiles the package. Instead of using "sh" as it is in the example, + you can also use two different terminals. However, the risk of using two terminals + is that a command like "unpack" could destroy the changes you've made to the + work directory. Consequently, you need to work carefully. It is useful when making changes directly to the work directory files to do - so using quilt as detailed in the - modifying packages with quilt section. The resulting patches can be copied - into the recipe directory and used directly in the + modifying packages with quilt section. You can copy the resulting patches + into the recipe directory and use them directly in the SRC_URI. - For a review of the skills used in this section see Sections 2.1.1 and 2.4.2. + For a review of the skills used in this section see the Bitbake and Running Specific Tasks Sections.
@@ -485,67 +506,75 @@ $ bitbake matchbox-desktop Developing with 'devshell' - When debugging certain commands or even to just edit packages, the - 'devshell' can be a useful tool. To start it you run a command like: + When debugging certain commands or even when just editing packages, the + 'devshell' can be a useful tool. + Use a command like the following to start this tool. -$ bitbake matchbox-desktop -c devshell - + $ bitbake matchbox-desktop -c devshell + - which will open a terminal with a shell prompt within the Poky - environment. This means PATH is setup to include the cross toolchain, - the pkgconfig variables are setup to find the right .pc files, - configure will be able to find the Poky site files etc. Within this - environment, you can run configure or compile command as if they - were being run by Poky itself. You are also changed into the - source (S) - directory automatically. When finished with the shell just exit it - or close the terminal window. + This command opens a terminal with a shell prompt within the Poky + environment. Consequently, the following occurs: + + The PATH variable includes the cross toolchain. + The pkgconfig variables find the correct .pc files. + "configure" finds the Poky 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 Poky itself. + The working directory also automatically changes to the (S) + directory. + When you are finished, you just exit the shell or close the terminal window. - The default shell used by devshell is the gnome-terminal. Other - forms of terminal can also be used by setting the + The default shell used by "devshell" is the gnome-terminal. + You can use other forms of terminal can by setting the TERMCMD and TERMCMDRUN variables - in local.conf. For examples of the other options available, see - meta/conf/bitbake.conf. An external shell is - launched rather than opening directly into the original terminal - window to make interaction with bitbakes multiple threads easier - and also allow a client/server split of bitbake in the future - (devshell will still work over X11 forwarding or similar). + in local.conf. + For examples of the other options available, see + meta/conf/bitbake.conf. + + + An external shell is launched rather than opening directly into the original terminal + window. + This allows easier interaction with Bitbake's multiple threads as well as + for a future client/server split. + Note that "devshell" will still work over X11 forwarding or similar situations. - It is worth remembering that inside devshell you need to use the full - compiler name such as arm-poky-linux-gnueabi-gcc - instead of just gcc and the same applies to other - applications from gcc, bintuils, libtool etc. Poky will have setup - environmental variables such as CC to assist applications, such as make, + It is worth remembering that inside "devshell" you need to use the full + compiler name such as arm-poky-linux-gnueabi-gcc + instead of just gcc. + The same applies to other applications such as gcc, bintuils, libtool and so forth. + Poky will have setup environmental variables such as CC to assist applications, such as make, find the correct tools.
- Developing within Poky with an external SCM based package + Developing within Poky with an External SCM-based Package - If you're working on a recipe which pulls from an external SCM it + If you're working on a recipe that pulls from an external SCM it is possible to have Poky notice new changes added to the - SCM and then build the latest version. This only works for SCMs - where its possible to get a sensible revision number for changes. + SCM and then build the latest version using them. + This only works for SCMs from which it is possible to get a sensible revision number for changes. Currently it works for svn, git and bzr repositories. - To enable this behaviour it is simply a case of adding + To enable this behavior simply add SRCREV_pn- PN = "${AUTOREV}" to - local.conf where PN + local.conf, where PN is the name of the package for which you want to enable automatic source revision updating. -- cgit v1.2.3