From 4999f788740b5cb2c4490c86e44ab5eac7b3dfe0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 15 Oct 2010 15:14:06 +0100 Subject: documentation/pokt-ref-manual: Update with Yocto branding Signed-off-by: Richard Purdie --- documentation/poky-ref-manual/Makefile | 2 +- documentation/poky-ref-manual/development.xml | 410 ++++++++++++--------- .../figures/cropped-yocto-project-bw.png | Bin 0 -> 5453 bytes .../figures/yocto-project-transp.png | Bin 0 -> 8626 bytes documentation/poky-ref-manual/introduction.xml | 258 ++----------- documentation/poky-ref-manual/poky-ref-manual.xml | 13 +- documentation/poky-ref-manual/style.css | 9 +- .../poky-ref-manual/white-on-black-yp.png | Bin 0 -> 9584 bytes 8 files changed, 281 insertions(+), 411 deletions(-) create mode 100755 documentation/poky-ref-manual/figures/cropped-yocto-project-bw.png create mode 100755 documentation/poky-ref-manual/figures/yocto-project-transp.png create mode 100755 documentation/poky-ref-manual/white-on-black-yp.png (limited to 'documentation/poky-ref-manual') diff --git a/documentation/poky-ref-manual/Makefile b/documentation/poky-ref-manual/Makefile index 22913e155..dfd44efd3 100644 --- a/documentation/poky-ref-manual/Makefile +++ b/documentation/poky-ref-manual/Makefile @@ -23,7 +23,7 @@ html: xsltproc $(XSLTOPTS) -o bsp-guide.html $(XSL_XHTML_URI) bsp-guide.xml tarball: html - tar -cvzf poky-ref-manual.tgz poky-ref-manual.html style.css screenshots/ss-sato.png poky-beaver.png poky-ref-manual.png + tar -cvzf poky-ref-manual.tgz poky-ref-manual.html style.css figures/yocto-project-transp.png validate: xmllint --postvalid --xinclude --noout poky-ref-manual.xml diff --git a/documentation/poky-ref-manual/development.xml b/documentation/poky-ref-manual/development.xml index 921943c15..60fb984e4 100644 --- a/documentation/poky-ref-manual/development.xml +++ b/documentation/poky-ref-manual/development.xml @@ -41,181 +41,253 @@ -
- Developing externally using the Anjuta plugin - - - An Anjuta IDE plugin exists to make developing software within the Poky framework - easier for the application developer. It presents a graphical IDE from which the - developer can cross compile an application then deploy and execute the output in a QEMU - emulation session. It also supports cross debugging and profiling. - - - - To use the plugin, a toolchain and SDK built by Poky is required along with Anjuta it's development - headers and the Anjuta plugin. The Poky Anjuta plugin is available to download as a tarball at the - OpenedHand labs page or - directly from the Poky Git repository located at git://git.pokylinux.org/anjuta-poky; a web interface - to the repository can be accessed at . - +
+ Using the Eclipse and Anjuta Plug-ins - See the README file contained in the project for more information on dependencies and building - the plugin. If you want to disable remote gdb debugging, please pass --diable-gdb-integration - switch when doing configure. + Yocto Project supports both Anjuta and Eclipse IDE plug-ins to make developing software + 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 + 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. -
- Setting up the Anjuta plugin - - Extract the tarball for the toolchain into / as root. The - toolchain will be installed into - /opt/poky. - - To use the plugin, first open or create an existing - project. If 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 plugin go to - EditPreferences, - then choose General from the left hand side. Choose the - Installed plugins tab, scroll down to Poky - SDK and check the - box. The plugin is now activated but first it must be - configured. -
- -
- Configuring the Anjuta plugin - - The configuration options for the SDK can be found by choosing - the Poky SDK icon from the left hand side. The following options - need to be set: - - - - SDK root: If we use external toolchain, we 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 directories named like "bin", - "include", "var", etc. under your selected target architecture subdirectory - /opt/poky/sysroot/i586-poky-linux/. Needed cross compile tools are under - /opt/poky/sysroot/i586-pokysdk-linux/ - - - Poky root: If we have local poky build tree, we need to set the Poky root. - this 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/. - - - Target Architecture: this is the cross compile - triplet, e.g. "i586-poky-linux". This target triplet is the prefix extracted from - the set up script file name. For examle, "i586-poky-linux" is extracted from set up script file - /opt/poky/environment-setup-i586-poky-linux - - - Kernel: use the file chooser to select the kernel - to use with QEMU - - Root filesystem: use the file chooser to select - the root filesystem directory, this is the directory where you use "poky-extract-sdk" command to - extract the poky-image-sdk tarball. - - +
+ 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). + 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). + + + If you want to download the source code for the plug-in you can find it in the Poky + git repository, which has a web interface, and is located at + . + + +
+ Installing and Setting up the Eclipse IDE + + If you don't have the Eclipse IDE (Helios 3.6) 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: + + Java.lang.OutOfMemoryError: PermGen space + + This error causes the applications to hang. + + + 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 + + + + The Eclipse plug-in depends several Eclipse projects plug-ins: + Eclipse C/C++ Development Tools (CDT), Autotools support for CDT (Incubation) and Target + Management (RSE). + + + After installing Eclipse and bringing up the IDE for the first + time you need to be sure the following four sites are available by adding them. + + + CDT - http://download.eclipse.org/tools/cdt/releases/helios + Helios - http://download.eclipse.org/releases/helios + Target Management + 3.2 Updates - http://download.eclipse.org/dsdp/tm/updates/3.2 + The Eclipse Project Updates - + http://download.eclipse.org/eclipse/updates/3.6 + + + Once these sites are available do the following: + + Use the "Work with:" drop down list and + select "All Available Sites--" + For CDT and Autotools support: Expand the + "Programming Languages" list and select "Autotools support for CDT + (Incubation)" and "C/C++ Development Tools". Click "Next" and complete + the update. + For RSE support: Select "TM and + RSE Main Features". Click "Next" and complete the update. + + +
+
+ Installing the Yocto Plug-in + + Once you have the Eclipse IDE installed and configure 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). + 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 + architecture with which you will be working. Start by selecting "Preferences" + from the "Window" menu and then selecting "Yocto SDK". + + + If you normally will use an installed Yocto + 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/. + + + Now 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) + + + Save all your settings and they become your defaults for every new Yocto project + created using the Eclipse IDE. + +
+ +
+ 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 + the image, start QEMU, and then debug. + + + 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. + +
+ +
+ Using Yocto Eclipse plug-in Remote Tools Suite + + Remote tools let you do things like perform system profiling, kernel tracing, + examine power consumption, and so forth. To see and access the remote tools use the + 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" + + + 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 + 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. + + 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. + + + "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". + + "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 + + + latencytop and perf: The 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 + entire screen to display results while they run. + + +
-
- Using the Anjuta plugin - - As an example, cross-compiling a project, deploying it into - QEMU and running a debugger against it and then doing a system - wide profile. - - Choose BuildRun - Configure or - BuildRun - Autogenerate to run "configure" - (or to run "autogen") for the project. This passes command line - arguments to instruct it to cross-compile. - - Next do - BuildBuild - Project to build and compile the - project. If you have previously built the project in the same - tree without using the cross-compiler you may find that your - project fails to link. Simply do - BuildClean - Project to remove the old - binaries. You may then try building again. - - Next start QEMU by using - ToolsStart - QEMU, this will start QEMU and - will show any error messages in the message view. Once Poky has - fully booted within QEMU you may now deploy into it. - - Once built and QEMU is running, choose - ToolsDeploy, - this will install the package into a temporary directory and - then copy using rsync over SSH into the target. Progress and - messages will be shown in the message view. - - To debug a program installed into onto the target choose - ToolsDebug - remote. This prompts 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 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 find - symbols. This gdb will connect to the target and load in - various libraries and the target program. You should setup any - breakpoints or watchpoints now since you might not be able to - interrupt the execution later. You may stop - the debugger on the target using - ToolsStop - 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 - ToolsRun - remote to do this. This will open - a terminal with the SSH command inside. - - To do a system wide profile against the system running in - QEMU choose - ToolsProfile - remote. This will start up - OProfileUI with the appropriate parameters to connect to the - server running inside QEMU and will also supply the path to the - debug information necessary to get a useful profile. - +
+ External Development Using 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.) +
diff --git a/documentation/poky-ref-manual/figures/cropped-yocto-project-bw.png b/documentation/poky-ref-manual/figures/cropped-yocto-project-bw.png new file mode 100755 index 000000000..561333b14 Binary files /dev/null and b/documentation/poky-ref-manual/figures/cropped-yocto-project-bw.png differ diff --git a/documentation/poky-ref-manual/figures/yocto-project-transp.png b/documentation/poky-ref-manual/figures/yocto-project-transp.png new file mode 100755 index 000000000..31d2b147f Binary files /dev/null and b/documentation/poky-ref-manual/figures/yocto-project-transp.png differ diff --git a/documentation/poky-ref-manual/introduction.xml b/documentation/poky-ref-manual/introduction.xml index 2683d01f2..301086a82 100644 --- a/documentation/poky-ref-manual/introduction.xml +++ b/documentation/poky-ref-manual/introduction.xml @@ -4,43 +4,39 @@ Introduction -
- What is Poky? +
+ Welcome to Poky! + Poky is the the build tool in Yocto Project. + It is at the heart of Yocto Project. + You use Poky within Yocto Project to build the images (kernel software) for targeted hardware. + - Poky is an open source platform build tool. It is a complete - software development environment for the creation of Linux - devices. It aids the design, development, building, debugging, - simulation and testing of complete modern software stacks - using Linux, the X Window System and GNOME Mobile - based application frameworks. It is based on OpenEmbedded but has - been customised with a particular focus. - + + Before jumping into Poky you should have an understanding of Yokto Project. + Be sure you are familiar with the information in the Yocto Project Quick Start. + You can find this documentation on the public Yocto Project Website. +
- Poky was setup to: +
+ What is Poky? - - - Provide an open source Linux, X11, Matchbox, GTK+, Pimlico, Clutter, and other GNOME Mobile technologies based full platform build and development tool. - - - Create a focused, stable, subset of OpenEmbedded that can be easily and reliably built and developed upon. - - - Fully support a wide range of x86, ARM, MIPS, PowerPC hardware and device virtulisation - - + + Poky provides an open source Linux, X11, Matchbox, GTK+, Pimlico, Clutter, and other GNOME Mobile technologies based full platform build tool within Yocto Project. + It creates a focused, stable, subset of OpenEmbedded that can be easily and reliably built and developed upon. + Poky fully supports a wide range of x86 ARM, MIPS and PowerPC hardware and device virtulisation. + Poky is primarily a platform builder which generates filesystem images based on open source software such as the Kdrive X server, the Matchbox window manager, the GTK+ toolkit and the D-Bus message bus system. Images for many kinds of devices can be generated, however the standard example - machines target QEMU full system emulation(x86, ARM, MIPS and PowerPC) and the ARM based - Sharp Zaurus series of devices. Poky's ability to boot inside a QEMU + machines target QEMU full system emulation(x86, ARM, MIPS and PowerPC) and + real reference boards for each of these architectures. + Poky's ability to boot inside a QEMU emulator makes it particularly suitable as a test platform for development of embedded software. @@ -76,222 +72,32 @@
Documentation Overview - - The handbook is split into sections covering different aspects of Poky. - The 'Using Poky' section gives an overview - of the components that make up Poky followed by information about using and - debugging the Poky build system. The 'Extending Poky' section - gives information about how to extend and customise Poky along with advice - on how to manage these changes. - The 'Board Support Packages (BSP) - Developers Guide' section - gives information about how to develop BSP such as the common layout, the - software hardware configuration options etc. - The 'Platform Development with Poky' - section gives information about interaction between Poky and target - hardware for common platform development tasks such as software development, - debugging and profiling. The rest of the manual - consists of several reference sections each giving details on a specific - section of Poky functionality. + The Poky User Guide is split into sections covering different aspects of Poky. + The 'Using Poky' section gives an overview of the components that make up Poky followed by information about using Poky and debugging images created in Yocto Project. + The 'Extending Poky' section gives information about how to extend and customise Poky along with advice on how to manage these changes. + The 'Platform Development with Poky' section gives information about interaction between Poky and target hardware for common platform development tasks such as software development, debugging and profiling. + The rest of the manual consists of several reference sections each giving details on a specific section of Poky functionality. This manual applies to Poky Release 3.3 (Green). -
System Requirements - We recommend Debian-based distributions, in particular a recent Ubuntu release (10.04 or newer), as the host system for Poky. Nothing in Poky is - distribution specific and - other distributions will most likely work as long as the appropriate - prerequisites are installed - we know of Poky being used successfully on Redhat, - SUSE, Gentoo and Slackware host systems. + distribution specific and other distributions will most likely work as long + as the appropriate prerequisites are installed - we know of Poky being used + successfully on Redhat, SUSE, Gentoo and Slackware host systems. + For information on what you need to develop images using Yocto Project and Poky + you should see the Yocto Project Quick Start on the public + Yocto Project Website. - - On a Debian-based system, you need the following packages installed: - - - - build-essential - - - python (version 2.6 or later) - - - diffstat - - - texinfo - - - texi2html - - - cvs - - - subversion - - - wget - - - gawk - - - help2man - - - chrpath - - - mercurial - - - Furthermore if you wish to run an emulated Poky image using QEMU (as in the quickstart below) you will need the following packages installed: - - - libgl1-mesa-dev - - - libglu1-mesa-dev - - - libsdl1.2-dev - - - bochsbios (only to run qemux86 images) - - - - - Debian users can add debian.o-hand.com to their APT sources (See - - for instructions on doing this) and then run - "apt-get install qemu poky-depends poky-scripts" which will - automatically install all these dependencies. Virtualisation images with - Poky and all dependencies can also easily be built if required. - - - - Poky can use a system provided QEMU or build its own depending on how it's - configured. See the options in local.conf for more details. - -
- -
- Quick Start - -
- Building and Running an Image - - - If you want to try Poky, you can do so in a few commands. The example below - checks out the Poky source code, sets up a build environment, builds an - image and then runs that image under the QEMU emulator in x86 system emulation mode: - - - - -$ wget http://pokylinux.org/releases/poky-green-3.3.tar.bz2 -$ tar xjvf poky-green-3.3.tar.bz2 -$ cd green-3.3/ -$ source poky-init-build-env -$ bitbake poky-image-sato -$ bitbake qemu-native -$ runqemu qemux86 - - - - - - This process will need Internet access, about 20 GB of disk space - available, and you should expect the build to take about 4 - 5 hours since - it is building an entire Linux system from source including the toolchain! - - - - - To build for other machines see the MACHINE variable in build/conf/local.conf. - This file contains other useful configuration information and the default version - has examples of common setup needs and is worth - reading. To take advantage of multiple processor cores to speed up builds for example, set the - BB_NUMBER_THREADS - and PARALLEL_MAKE variables. - - The images/kernels built by Poky are placed in the tmp/deploy/images - directory. - - - - You could also run "poky-qemu zImage-qemuarm.bin poky-image-sato-qemuarm.ext2" - within the images directory if you have the poky-scripts Debian package - installed from debian.o-hand.com. This allows the QEMU images to be used standalone - outside the Poky build environment. - - - To setup networking within QEMU see the - QEMU/USB networking with IP masquerading section. - - -
-
- Downloading and Using Prebuilt Images - - - Prebuilt images from Poky are also available if you just want to run the system - under QEMU. To use these you need to: - - - - - - Add debian.o-hand.com to your APT sources (See - for instructions on doing this) - - - - Install patched QEMU and poky-scripts: - - -$ apt-get install qemu poky-scripts - - - - - - - Download a Poky QEMU release kernel (*zImage*qemu*.bin) and compressed - filesystem image (poky-image-*-qemu*.ext2.bz2) which - you'll need to decompress with 'bzip2 -d'. These are available from the - last release - or from the autobuilder. - - - - Start the image: - - -$ poky-qemu <kernel> <image> - - - - - - - A patched version of QEMU is required at present. A suitable version is available from - , it can be built - by poky (bitbake qemu-native) or can be downloaded/built as part of the toolchain/SDK tarballs. - - -
diff --git a/documentation/poky-ref-manual/poky-ref-manual.xml b/documentation/poky-ref-manual/poky-ref-manual.xml index 952b5d602..a6f095c9c 100644 --- a/documentation/poky-ref-manual/poky-ref-manual.xml +++ b/documentation/poky-ref-manual/poky-ref-manual.xml @@ -6,17 +6,10 @@ xmlns="http://docbook.org/ns/docbook" > - - - - - - - Poky Reference Manual - A Guide and Reference to Poky + A Guide and Reference to Poky + diff --git a/documentation/poky-ref-manual/style.css b/documentation/poky-ref-manual/style.css index b5019bbee..cb2db8b27 100644 --- a/documentation/poky-ref-manual/style.css +++ b/documentation/poky-ref-manual/style.css @@ -118,14 +118,13 @@ h6 { background-color: transparent; background-repeat: no-repeat; padding-top: 256px; - background-image: url("poky-beaver.png"); - background-position: right top; - float: right; + background-image: url("white-on-black-50.png"); + background-position: top; margin-top: -256px; padding-right: 50px; margin-left: 50px; - text-align: right; - width: 200px; + text-align: center; + width: 600px; } h3.author { diff --git a/documentation/poky-ref-manual/white-on-black-yp.png b/documentation/poky-ref-manual/white-on-black-yp.png new file mode 100755 index 000000000..81f801d0e Binary files /dev/null and b/documentation/poky-ref-manual/white-on-black-yp.png differ -- cgit v1.2.3