From cb4b0aa3289e873f020d2758deb4982e7b40f7ad Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 16 Mar 2012 17:05:26 -0600 Subject: documentation/yocto-project-qs/yocto-project-qs.xml: new expert section Added a new "expert" section at the end of the QS. I reference the section right up front. This new section is an attempt to divert the expert user away from most of the QS. The information was formed from Robert P. J. Day's wiki at his crashcourse.com site. Reported-by: Robert P. J. Day (From yocto-docs rev: b2981e9fcdd083e15194f520a4160938b02b1275) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../yocto-project-qs/yocto-project-qs.xml | 154 +++++++++++++++++++++ 1 file changed, 154 insertions(+) (limited to 'documentation/yocto-project-qs') diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml index e7b83b2f64..785707fe5d 100644 --- a/documentation/yocto-project-qs/yocto-project-qs.xml +++ b/documentation/yocto-project-qs/yocto-project-qs.xml @@ -19,6 +19,15 @@ Amongst other things, the Yocto Project uses the Poky build system to construct complete Linux images. + + + If you know all about open-source development, Linux development environments, Git source + repositories and the like and you just want some quick information that lets you try out + the Yocto Project, skip right to the "Super User" section at + the end of this quick start. + Otherwise, keep reading... + + This short document will give you some basic information about the environment and let you experience it in its simplest form. @@ -27,6 +36,7 @@ This document steps you through a simple example showing you how to build a small image and run it using the QEMU emulator. + For more detailed information on the Yocto Project, you should check out these resources: @@ -670,6 +680,150 @@ +
+ Super User + + + + This section + + + Kudos and thanks to Robert P. J. Day of + CrashCourse for providing the basis + for this "expert" section with information from one of his + wiki + pages. + + + gives you a very fast description of how to use the Yocto Project to build images + for a BeagleBoard xM starting from scratch. + The steps were performed on a 64-bit Ubuntu 10.04 system. + + +
+ Getting the Yocto Project + + + Get the Yocto Project Files + one of two ways: + + Tarball: + Use if you want the latest stable release: + + $ wget &YOCTO_RELEASE_DL_URL;.&YOCTO_POKY_TARBALL; + $ tar xvjf &YOCTO_POKY_TARBALL; + + Git Repository: + Use if you want to work with cutting edge development content: + + $ git clone &YOCTO_GIT_URL;.poky.git + + + The remainder of the section assumes the Git repository method. + +
+ +
+ Setting Up Your Host + + + You need some packages for everything to work. + Rather than duplicate them here, look at the "The Packages" + section earlier in this quick start. + +
+ +
+ Initializing the Build Environment + + + From the parent directory of the Yocto Project Files, initialize your environment + and provide a meaningful + Yocto Project Build Directory + name: + + $ source git/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. + +
+ +
+ Configuring the local.conf File + + + Initializing the build environment creates a local.conf configuration file + in the build directory. + You need to manually edit this file to specify the machine you are building and to optimize + your build time. + Here are the minimal changes to make: + + BB_NUMBER_THREADS = "8" + PARALLEL_MAKE = "-j 8" + MACHINE ?= "beagleboard" + + Briefly, set BB_NUMBER_THREADS + and PARALLEL_MAKE to + twice your host processor's number of cores. + + + + A good deal that goes into a Yocto Project build is simply downloading all of the source + tarballs. + Maybe you have been working with another build system (OpenEmbedded, Angstrom, etc) for which + you've built up a sizable directory of source tarballs. + Or perhaps someone else has such a directory for which you have read access. + If so, you can save time by adding the PREMIRRORS + statement to your configuration file so that local directories are first checked for existing + tarballs before running out to the net: + + PREMIRRORS_prepend = "\ + git://.*/.* file:///home/you/dl/ \n \ + svn://.*/.* file:///home/you/dl/ \n \ + cvs://.*/.* file:///home/you/dl/ \n \ + ftp://.*/.* file:///home/you/dl/ \n \ + http://.*/.* file:///home/you/dl/ \n \ + https://.*/.* file:///home/you/dl/ \n" + + +
+ +
+ 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. + + + + Here are some variations on the build process that could be helpful: + + Fetch all the necessary sources without starting the build: + + $ bitbake -c fetchall core-image-minimal + + This variation guarantees that you have all the sources for that BitBake target + should you to disconnect from the net and want to do the build later offline. + + Specify to continue the build even if BitBake encounters an error. + By default, BitBake aborts the build when it encounters an error. + This command keeps a faulty build going: + + $ bitbake -k core-image-minimal + + + +
+
+