Difference between revisions of "Yocto Project my own quick start"

From KoanSoftware Wiki
Jump to: navigation, search
Line 18: Line 18:
 
     g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
 
     g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
 
     mercurial autoconf automake groff libtool xterm
 
     mercurial autoconf automake groff libtool xterm
 +
 +
 +
== Development Code ==
 +
 +
Yocto Project code can be found in the Yocto Project Source Repositories.
 +
To check out current development code using git:
 +
 +
    $ git clone git://git.yoctoproject.org/poky.git
  
  

Revision as of 08:19, 31 October 2012

This page is an excerpt from Yocto Project Quick Start Copyright © 2010-2012 Linux Foundation


The Packages

Packages and package installation vary depending on your development system. In general, you need to have root access and then install the required packages. The next few sections show you how to get set up with the right packages for Ubuntu, Fedora, and openSUSE. Ubuntu

If your distribution is Ubuntu, you need to be running the bash shell. You can be sure you are running this shell by entering the following command and selecting "No" at the prompt:

    $ sudo dpkg-reconfigure dash                

The packages you need for a supported Ubuntu distribution are shown in the following command:

    $ sudo apt-get install sed wget cvs subversion git-core coreutils \
    unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk \
    python-pysqlite2 diffstat help2man make gcc build-essential \
    g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
    mercurial autoconf automake groff libtool xterm


Development Code

Yocto Project code can be found in the Yocto Project Source Repositories. To check out current development code using git:

    $ git clone git://git.yoctoproject.org/poky.git


Initializing the Build Environment

From the parent directory your Source Directory, initialize your environment and provide a meaningful Build Directory name:

    $ source poky/oe-init-build-env mybuilds

At this point, the mybuilds directory has been created for you and it is now your current working directory. If you don't provide your own directory name it defaults to build, which is inside the Source Directory.


Building the Image

At this point, you need to select an image to build for the BeagleBoard xM. If this is your first build using the Yocto Project, you should try the smallest and simplest image:

    $ bitbake core-image-minimal  

Now you just wait for the build to finish.


Starting the QEMU Emulator

Before you start the QEMU emulator, be sure you have already to set up the emulation environment.

The following commands setup the emulation environment and launch QEMU. This example assumes the root filesystem (.ext3 file) and the pre-built kernel image file both reside in your home directory. The kernel and filesystem are for a 32-bit target architecture.

    $ runqemu qemux86 tmp/deploy/images/bzImage-qemux86.bin tmp/deploy/images/core-image-minimal-qemux86.ext3

The environment in which QEMU launches varies depending on the filesystem image and on the target architecture. For example, if you source the environment for the ARM target architecture and then boot the minimal QEMU image, the emulator comes up in a new shell in command-line mode. However, if you boot the SDK image, QEMU comes up with a GUI.