From 00e061b56455e8bc6ab937a8114386f921f53fa5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 15 Oct 2010 15:08:01 +0100 Subject: documentation: Add Yocto quickstart guide Signed-off-by: Richard Purdie --- .../yocto-project-qs/yocto-project-qs.xml | 307 +++++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 documentation/yocto-project-qs/yocto-project-qs.xml (limited to 'documentation/yocto-project-qs/yocto-project-qs.xml') diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml new file mode 100644 index 0000000000..d67ff41edc --- /dev/null +++ b/documentation/yocto-project-qs/yocto-project-qs.xml @@ -0,0 +1,307 @@ + + +
+ + +
+ Yocto Project Quick Start +
+ +
+ Welcome! + + Welcome to the Yocto Project! + The Yocto Project is an open-source Linux development environment. + This short document will give you some basic information about the environment as well as let you experience it in its simplest form. + After reading this document you will have a basic understanding of what the Yocto Project is and how to work within it. + This document also steps you through a simple example showing you how to build a small image and run it using the QEMU emulator. + + + For complete information on the Yocto Project you should check out the Public Yocto Website. + You can find the latest builds, breaking news, full development documentation, and a rich Yocto Project Development Community into which you can tap. + +
+ +
+ Introducing the Yocto Project Development Environment + + + Yocto Project is an open source development environment that creates Linux-based images suitable for many types of devices (large or small) based on architectures such as x86, x86-64, Xeon, ARM, and MIPS as well as PowerPC and device emulation. + You can use Yocto Project to design, develop, build, debug, simulate, and test the complete software stack using Linux, the X Window System, GNOME Mobile-based application frameworks, and Qt frameworks. + + + + + + + + + + + The Yocto Project Development Environment + + + + + Yocto Project: + + + + + Provides an open source Linux kernel along with a set of system commands and libraries suitable for the embedded environment. + + + Makes available system components such as X11, Matchbox, GTK+, Pimlico, Clutter, and Qt (among others) so you can create a richer user interface experience on devices that use displays or have a GUI. +For devices that don't have a GUI or display you simply would not employ these components. + + + Creates a focused and stable subset of OpenEmbedded on which you can easily and reliably build and develop. + + + Fully supports a wide range of hardware and device emulation through the QEMU Emulator or other supported emulators. + + + + + Yocto Project generates file system 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. + Yocto Project can generate images for many kinds of devices. + However, the standard example machines target QEMU full system emulation for x86, ARM, MIPS, and PPC based architectures as well as specific hardware such as the Intel Desktop Board DH55TC. + Because an image developed with Yocto Project can boot inside a QEMU emulator, the development environment works nicely as a test platform for developing embedded software. + + + + Another important Yocto Project feature is the Sato component. + The optional Sato component, a GNOME mobile-based user interface environment well suited for devices with restricted screen sizes, sits neatly on top of any device using the GNOME Mobile Stack providing a well defined user experience. + +
+ +
+ What You Need and How You Get It + + + You need these things to develop in the Yocto Project environment: + + + + + A host system running a supported Linux distribution. + For information on distributions on which you can use Yocto Project refer to the information found at http://wiki.openembedded.net/index.php/OEandYourDistro. + + + The right packages. + + + A release of Yocto Project. + + + +
+ The Linux Distribution + + + While this document assumes a Debian-based host system you can develop in the Yocto Linux environment using many other Linux distributions. + For Debian-based systems we recommend you use the Ubuntu Release 10.04 or later. + +
+ +
+ The Packages + + + The packages you need for a Debian-based host are shown in the following command: + + + + Sudo apt-get install sed wget cvs subversion git-core coreutils + unzip texi2html texinfo libsdll.2-dev docbook-utils gawk + python-pysqlite2 diffstat help2man make gcc build-essential + g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev + libsdl1.2-dev + + + + NOTE: Packages vary in number and name for other Linux distributions. + For package requirements on other Linux distributions refer to the information found at http://wiki.openembedded.net/index.php/OEandYourDistro. + +
+ +
+ Yocto Project Release + + + The latest releases for Yocto Project are kept at http://yoctoproject.org/releases. + Nightly and developmental builds are also maintained. However, for this document a released version of Yocto Project is used. + +
+
+ +
+ A Quick Test Run + + + Now that you have your system requirements in order you can give Yocto Project a try. + This section presents some steps that let you do the following: + + + + + Build an image and run it in the emulator + + + Or, use a pre-built image and run it in the emulator + + + +
+ Building an Image + + + In the development environment you will need to build an image whenever you change hardware support, add or change system libraries, or add or change services that have dependencies. + + + + + + + + Building an Image + + + + + Use the following commands from a shell on your Debian-based host to build your image. + The build creates an entire Linux system including the Toolchain from the source. + + + NOTE: The build process using Sato currently consumes 50GB of disk space. + To allow for vbariations in the build process and for future package expansion we recommend 100GB of free disk space. + + + + + $ wget http://pokylinux.org/releases/poky-green-3.3.tar.bz2 + $ tar xjvf poky-green-3.3.tar.bz2 + $ cd green-3.3-build + $ source green-3.3/poky-init-build-env green-3.3-build + $ bitbake qemu-native + $ bitbake poky-image-sato + $ poky-qemu qemux86 + + + + + Here is some explanation for these commands: + + + + + + The first two commands extract the Yocto Project files from the release area and place them into your build area (green-3.3-build in this example). + + + + + After changing to the build directory the source command sets up the Yocto Project build environment. + The build directory contains all the object files used during the build. + The default build directory is poky-dir/build. + + + + + The two bitbake commands build the OS image and the emulator for the target. + Here poky-image-sato is the name of the target. The qemu-native target is the customized QEMU Emulator. + + + + Finally, the poky-qemu command launches the customized QEMU. + + + +
+ +
+ Using a Pre-Built Linux Kernel for QEMU + + If hardware, libraries and services are stable you can use a pre-built image of the kernel and just run it on the target using the emulator QEMU. + This situation is perfect for developing application software. + + + + + + + + + + + + Using a Pre-Built Image + + + + + For this scenario you need to do three things: + + + + + + Install the Yocto Project Scripts + + + + + Download the pre-built kernel that will run on QEMU. + You need to be sure to get the QEMU image that matches your target machine’s architecture (e.g. x86, ARM, etc.). + + + + + Download and decompress the file image system. + + + + + + Use this command to install the patched Yocto Project QEMU scripts: + + + + + $ apt-get install qemu poky-scripts + + + + + You can download the pre-built Linux kernel and the file image system from . + The kernel and file image system have the following forms, respectively: + + + + *zImage*qemu*.bin + poky-image-*-qemu*.ext2.bz2 + + + + You must decompress the file image system using the following command: + + + + $ bzip2 -d + + + + You can now start the emulator using this command: + + + + $ poky-qemu <kernel> <image> + +
+
+ +
+ -- cgit v1.2.3-54-g00ecf