Build Yocto on Ubuntu 10.04 64bit

Yocto 1.1 was just released one week ago, time to try it out.
Updated to Yocto 1.2 on 5/6/2012.

First make sure you have the needed packages installed, I'm running Ubuntu 10.04 64bit.

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 ia32-libs

Now let's check out the release using git, or you can download the release directly at http://www.downloads.yoctoproject.org/releases/yocto/yocto-1.1/poky-edis...

git clone git://git.yoctoproject.org/poky
cd poky
git tag -l
git checkout -b denzil700 denzil-7.0.0
cd ..

Set up the build directory:

source poky/oe-init-build-env

After the above step you're inside the build directory, I customise the conf/local.conf by doing:

vi conf/local.conf
  BB_NUMBER_THREADS = "4"
  PARALLEL_MAKE = "-j 4"
  PACKAGE_CLASSES ?= "package_ipk"

You will need modify BB_NUMBER_THREADS and PARALLEL_MAKE based on your own build machine, I simply used 2x CPU cores.

It's almost ready to go, but I like to download all packages before the final build(make sure you're still under build directory:

bitbake world -c fetchall

This will download all packages to build/downloads. After that it's recommended to move downloads somewhere else then create a symlink to it, this way multiple builds can share one download repository in the future:

mv downloads ~
ln -s ~/downloads .

Finally, let's build the whole image. I'm using a minimal image for PowerPC 8315:

time bitbake core-image-sato
#run it after the build completes, this takes 1.5 hours on my machine to build
runqemu qemux86