From 56f7ed979c94f7b6ce3e2602d0c0395ece805b30 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 23 Sep 2011 08:07:41 -0700 Subject: [PATCH] documentation/dev-manual/dev-manual-model.xml: edit pass These changes are the second edit pass for the new section. There are some minor changes. (From yocto-docs rev: 6c81617a2782d2f02d4900a68dd4e8c6eeb70fa1) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/dev-manual/dev-manual-model.xml | 304 +++++++++++------- 1 file changed, 179 insertions(+), 125 deletions(-) diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml index a63d590c78..fa8c79f29d 100644 --- a/documentation/dev-manual/dev-manual-model.xml +++ b/documentation/dev-manual/dev-manual-model.xml @@ -21,7 +21,8 @@ see the "BSP Development Example" appendix and the "Kernel Modification Example" appendix. - For a user-space application development example that uses the Eclipse IDE, + For a user-space application development example that uses the + Eclipse IDE, see the The Yocto Project Application Development Toolkit (ADT) User's Guide. @@ -364,7 +365,8 @@ - + @@ -480,137 +482,189 @@ Application development involves creation of an application that you want to be able to run on your target hardware, which is running a Linux Yocto image. - Much of this process involves standard application development practices that are - not covered in detail in this manual. - However, the Yocto Project provides an application development environment that - facilitates quick integration of your application into its run-time environment. - For example, you can employ cross-development toolchains designed for your target hardware + The Yocto Project provides an Application Development Toolkit (ADT) that + facilitates quick development and integration of your application into its run-time environment. + Using the ADT you can employ cross-development toolchains designed for your target hardware to compile and link your application. - You can deploy your application to the actual hardware or to the QEMU emulator for testing. - You can even develop, deploy, and test your application all from within the popular - Eclipse IDE. + You can then deploy your application to the actual hardware or to the QEMU emulator for testing. + If you are familiar with the popular Eclipse IDE, you can use an Eclipse Yocto Plug-in to + allow you to develop, deploy, and test your application all from within Eclipse. - To help you understand how application development works in the Yocto Project, this section - provides an overview of the general development process. - If you want to see a detailed example of the process as it is used from within the Eclipse - IDE, see - - The Application Development Toolkit (ADT) User's Manual. + While we strongly suggest using the Yocto Project ADT to develop your application, you might + not want to. + If this is the case, you can still use pieces of the Yocto Project for your development process. + However, because the process can vary greatly, this manual does not provide detail on the process. - - This illustration and the following list summarizes the application development general workflow. - +
+ Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark> - - - + + To help you understand how application development works in the Yocto Project ADT + environment, this section + provides an overview of the general development process. + If you want to see a detailed example of the process as it is used from within the Eclipse + IDE, see + + The Application Development Toolkit (ADT) User's Manual. + - - - Set up your host development system to support - development using the Yocto Project: See - "The Linux Distributions" and - "The Packages" sections both - in the Yocto Project Quick Start for requirements. - Establish a local copy of the Yocto Project files on your - system: Having the Yocto Project files on your system gives you access to - the build process and tools you need. - For information on how to get these files, see the bulleted item - "Yocto Project Release" earlier in this manual. - - Set up the poky-extras Git - repository: This repository is the area for your configuration - fragments, new kernel recipes, and the kernel .bbappend - file used during the build. - It is good practice to set this repository up inside the local Yocto - Project files Git repository. - For information on how to get these files, see the bulleted item - "The poky-extras Git Repository" - earlier in this manual. - Establish a local copy of the Linux Yocto kernel files on your - system: In order to make modifications to the kernel you need two things: - a bare clone of the Linux Yocto kernel you are modifying and - a copy of that bare clone. - The bare clone is required by the build process and is the area to which you - push your kernel source changes (pulling does not work with bare clones). - The copy of the bare clone is a local Git repository that contains all the kernel's - source files. - You make your changes to the files in this copy of the bare clone. - For information on how to set these two items up, see the bulleted item - "Linux Yocto Kernel" - earlier in this manual. - Make changes to the kernel source code if - applicable: Modifying the kernel does not always mean directly - changing source files. - However, if you have to do this, you make the changes in the local - Git repository you set up to hold the source files (i.e. the copy of the - bare clone). - Once the changes are made, you need to use Git commands to commit the changes - and then push them to the bare clone. - Make kernel configuration changes - to your local kernel layer if applicable: - If your situation calls for changing the kernel's configuration, you can - use menuconfig - to enable and disable kernel configurations. - Using menuconfig allows you to interactively develop and test the - configuration changes you are making to the kernel. - When saved, changes using menuconfig update the kernel's - .config. - As an alternative method to changing the kernel's configuration, you can simply - edit the .config found in the Yocto Project build - directory at tmp/sysroots/<machine-name>/kernel - directly. - Add new kernel recipes if applicable: The standard - layer structure organizes recipe files inside the - meta-kernel-dev layer that is within the - poky-extras Git repository. - If you need to add new kernel recipes, you add them within this layer. - Also within this area, you will find the .bbappend - file that appends information to the kernel's recipe file used during the - build. - - Prepare for the build: Once you have made all the - changes to your kernel (configurations, source code changes, recipe additions, - or recipe changes), there remains a few things - you need to do in order for the Yocto Project build system to create your image. - If you have not done so, you need to get the build environment ready by sourcing - the environment setup script described earlier. - You also need to be sure two key configuration files - (local.conf and bblayers.conf) - are configured appropriately. - The entire process for building an image is overviewed in the - "Building an Image" section of the Yocto Project Quick Start. - You might want to reference this information. - Also, you should look at the detailed examples found in the appendices at - at the end of this manual. - Build the image: The Yocto Project - build system Poky uses the BitBake - tool to build images based on the type of image you want to create. - You can find more information on BitBake - here. - The build process supports several types of images to satisfy different needs. - See the appendix - "Reference: Images" in the - - Yocto Project Reference Manual for information on supported - images. - Make your configuration changes available - in the kernel layer: Up to this point, all the configuration changes to the - kernel have been done and tested iteratively. - Once they are tested and ready to go, you can move them into the kernel layer, - which allows you to distribute the layer. - If applicable, share your in-tree changes: - If the changes you made - are suited for all Linux Yocto users, you might want to push the changes to a - contribution area for the Linux Yocto Git repository. - Once the changes are pushed, you can request that they - be pulled into the master branch of the kernel tree. - Doing so makes them available to everyone using the kernel. - - + + This illustration and the following list summarizes the application development general workflow. + + + + + + + + + Prepare the Host System for the Yocto Project: + See + "The Linux Distributions" and + "The Packages" sections both + in the Yocto Project Quick Start for requirements. + + + + Secure the Linux Yocto Kernel Target Image: + You must have a target kernel image that has been built using the Yocto Project. + Depending on whether the Yocto Project has a pre-built image that matches your target + architecture and where you are going to run the image while you develop your application + (QEMU or real hardware), the area you get the image from differs. + + Download the image from + + machines if your target architecture is supported + and you are going to develop and test your application on actual hardware. + + Download the image from the + + machines/qemu if your target architecture is supported + and you are going to develop and test your application using the QEMU + emulator. + Build your image if you cannot find a pre-built image that matches + your target architecture. + If your target architecture is similar to a supported architecture, you can + modify the kernel image before you build it. + See the + "Kernel Modification Workflow" + section earlier in this manual for information on how to create a modified + Linux Yocto kernel. + + For information on pre-built kernel image naming schemes for images + that can run on the QEMU emulator, see the + "Using Pre-Built Binaries and QEMU" + section in + + The Yocto Project Quick Start. + Install the ADT: + The ADT provides a target-specific cross-development toolchain, the root filesystem, + the QEMU emulator, and other tools that can help you develop your application. + While it is possible to get these pieces separately, the Yocto Project provides an + easy method. + You can get these pieces by running an ADT installer script, which is configurable. + For information on how to install the ADT, see the + "Using the ADT Installer" section in + The Yocto Project + Application Development (ADT) User's Manual. + If Applicable, Secure the Target Root Filesystem: + If you choose not to install the ADT using the ADT Installer, + you need to find and download the + appropriate root filesystems. + You can find these tarballs in the same areas used for the kernel images. + Depending on the type of image you are running, the root filesystem you need differs. + For example, if you are developing an application that runs on an image that + supports Sato, you need to get root filesystem that supports Sato. + + Create and Build your Application: + At this point, you need to have source files for your application. + Once you have the files, you can use the Eclipse IDE to import them and build the + project. + If you are not using Eclipse, you need to use the cross-development tools you have + installed to create the image. + Deploy the Image with the Application: + If you are using the Eclipse IDE, you can deploy your image to the hardware or to + QEMU through the project's preferences. + If you are not using the Eclipse IDE, then you need to deploy the application using + other methods to the hardware. + Or, if you are using QEMU, you need to use that tool and load your image in for testing. + + Test and Debug the Application: + Once your application is deployed, you need to test it. + Within the Eclipse IDE, you can use the debubbing environment along with the + set of user-space tools installed along with the ADT to debug your application. + Of course, the same user-space tools are available separately to use if you choose + not to use the Eclipse IDE. + + +
+ +
+ Workflow Without ADT + + + If you want to develop an application outside of the Yocto Project ADT environment, you + can still employ the cross-development toolchain, the QEMU emulator, and a number of supported + target image files. + You just need to follow these general steps: + + Install the cross-development toolchain for your target hardware: + For information on how to install the toolchain, see the + "Using a Cross-Toolchain Tarball" section in + The Yocto Project + Application Development (ADT) User's Manual. + Download the Target Image: The Yocto Project supports + several target architectures and has many pre-built kernel images and root filesystem + images. + If you are going to develop your application on hardware, go to the + + machines download area and choose a target machine area + from which to download the kernel image and root filesystem. + This download area could have several files in it that support development using + actual hardware. + For example, the area might contain .hddimg files that combine the + kernel image with the filesystem, boot loaders, etc. + Be sure to get the files you need for your particular development process. + If you are going to develop your application and then run and test it using the QEMU + emulator, go to the + + machines/qemu download area. + From this area, go down into the directory for your target architecture + (e.g. qemux86_64 for an + Intel-based 64-bit architecture). + Download kernel, root filesystem, and any other files you need for your process. + In order to use the root filesystem in QEMU, you need to extract it. + See the + "Extracting the Root Filesystem" section for information on how to extract the + root filesystem. + Develop and Test your Application: At this point, + you have the tools to develop your application. + If you need to separately install and use the QEMU emulator, you can go to + QEMU Home Page to download and learn about the + emulator. + + +