Setting Up Build Environment

For the original (and potentially more up-to-date) information, please reference this Gumstix Developer Site page.

Please note that the following guide was written for Ubuntu.

WARNING: You need a good amount of hard drive space available for this. I recommend over 50GB, or you will quickly run out of space.

Prerequisites

  1. The first step is to install prerequisite software:
    • Git (package "git-core")
    • Subversion (package "subversion")
    • GCC and Patch (package "build-essential")
    • libtool (package "libtool")
    • libz (package "libz-dev")
    • help2man (package "help2man")
    • diffstat (package "diffstat")
    • texi2html (package "texi2html")
    • makeinfo (package "texinfo")
    • NCurses development files (package "libncurses5-dev")
    • CVS (package "cvs")
    • GNU Awk (package "gawk")
    • Python development files (package "python-dev")
    • Python SQLite bindings (package "python-pysqlite2")
    • unzip (package "unzip")
    • Psyco JIT compiler for Python (package "python-psyco"). This isn't necessary but it will make things go faster.
       
  2. Re-link /bin/sh to bash (rather than dash):
    $ sudo dpkg-reconfigure dash

    Answer "no" when asked if you'd like /bin/sh to point to dash.
     
  3. Edit /etc/sysctl.conf:
    Set "vm.vdso_enabled = 0" and "vm.mmap_min_addr = 0" (without quotes). If these variables are not already present simply add them at the bottom of the file. Afterwards run:
    $ sudo sysctl -p

Building

These instructions assume you're building in ~/overo-oe. If that is not the case, make appropriate adjustments.

  1. Make the ~/overo-oe directory and cd into it.
    $ mkdir ~/overo-oe
    $ cd ~/overo-oe
     
  2. Install OpenEmbedded metadata and check out overo branch (specifically for our Gumstix). The first step below will take some time, depending on the internet connection.
    $ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev
    $ cd org.openembedded.dev
    $ git checkout --track -b overo origin/overo
     
  3. Install BitBake.
    $ cd ~/overo-oe
    $ git clone git://git.openembedded.net/bitbake bitbake
    $ cd bitbake
    $ git checkout 1.8.18
     
  4. Create OpenEmbedded configuration files and profile.
    $ cd ~/overo-oe
    $ cp -r org.openembedded.dev/contrib/gumstix/build .
    $ cp ~/.bashrc ~/bashrc.bak
    $ cat ~/overo-oe/build/profile >> ~/.bashrc
     
  5. Build the console image. WARNING: This will take forever. Go to bed and check on it tomorrow. Or the next day. Seriously.
    $ bitbake omap3-console-image

    This will ensure that you most of the necessary packages already downloaded and installed before trying to build your own recipes.