Contact Us
EnglishRussianGreek
Home Wiki

FLOW Build Environment

From GizmoForYou Wiki

Jump to: navigation, search

Contents

Overview

The OpenEmbedded (OE) system consists of a collection of BitBake "recipes". These recipes contain the source URL of the package, dependencies and compile and install options. OE uses the information in these receipes to track dependencies, cross-compile the package, and create binary packages.It will also create complete images including boot loaders, kernel, and root file system. As a first step the framework will build a cross-compiler toolchain for the target platform.

We shall explain here how to setup the OpenEmbedded environment and build the images that we include in the Android Micro-SD which can be found in our shop. Also these images can be found in the Files section of the project.

These steps are also described in more detail on the Gumstix website and further explanation can be found there. Another very good tutorial, can be found here: http://pixhawk.ethz.ch/tutorials/omap/openembedded_bitbake_installation , use it if you encounter some problems during omap3-console-image compilation.

Prerequisites

Your build machine should be running a fairly recent Linux distribution. The distribution we are using is Fedora 11 but other distributions should also work. Most common of which are:

  • Ubuntu 7.04, 7.10, 8.04, 9.04
  • Debian
  • SuSe
  • Gentoo
  • Centos 5

Depending on your distribution, it is likely you will need to install additional software. If while installing Fedora 11 you have selected the packages for a Development Machine then the only additional packages you should need are: texi2html and help2man If not then likely you might need to install the packages from the following list which includes most of the necessary ones:

  • git
  • subversion
  • gcc
  • patch (this and gcc are often bundled with other developer tools in the build-essential package)
  • help2man (Centos 5 package available from atrpms repository)
  • diffstat
  • texi2html (texinfo on SUSE)
  • makeinfo (texinfo on Ubuntu)
  • ncurses-devel (libncurses5-dev on Ubuntu)
  • cvs
  • gawk
  • python-dev
  • python-pysqlite2 (python-sqlite2 on SUSE)

If you are using Ubuntu the the easiest way to install these packages is to issue the command:

sudo apt-get install git subversion gcc patch help2man diffstat
sudo apt-get install texinfo libncurses5-dev cvs git-core texi2html
sudo apt-get install gawk python-dev python-pysqlite2 g++

// recent packages required by oe
sudo aptitude 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

If using Fedora then the easiest way is to issue the command:

yum install ''your packages here''

Note 1: If you are using an Ubuntu distribution, it is likely that /bin/sh is linked to /bin/dash. If this is the case, then you will need to change /bin/sh to link to /bin/bash. Neglecting to do this will cause target system init file corruption and your build image will not boot! Run:

sudo dpkg-reconfigure dash

Answer NO when asked whether you want to install dash as /bin/sh.

Note 2: If you are using Ubuntu 8.04 you will also need to edit /etc/sysctl.conf and set 'vm.vdso_enabled = 0' and 'vm.mmap_min_addr = 0'. In Ubuntu 9.04 you will only need to set 'vm.mmap_min_addr = 0'. Afterwards run:

sudo sysctl -p

Preparing the Build Environment

Before we setup the environment for the FLOW hardware, we have to initially setup the Build environment it self. The steps below are the typical steps required to create the MLO, u-Boot and Kernel images as well as the console image or the palmtop depending on your requirements.

As mentioned earlier, these files can also be downloaded prebuilt for testing or other purposes from the Files section of the project.

Build system checkout

These instructions will assume that you are installing the build system in your home directory under "overo-oe". If you decide to put it elsewhere you will need to make appropriate alterations.

First we will create the "overo-oe" directory and cd into it:

mkdir -p ~/overo-oe
cd ~/overo-oe

Now we will install the OE metatdata, and check out the overo branch (you can safely ignore the warnings you will get from the git commands):

git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev
cd org.openembedded.dev
git checkout --track -b overo origin/overo

If you have an error like

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

, add this command before the first command:

git clone git://gitorious.org/gumstix-oe/mainline.git

Install Bitbake:

cd ~/overo-oe
git clone git://git.openembedded.net/bitbake bitbake
cd bitbake
git checkout 1.8.18

OpenEmbedded config files and profile

Create a profile script and the configuration files required to tailor OE to our needs:

cd ~/overo-oe
cp -r org.openembedded.dev/contrib/gumstix/build .

OpenEmbedded requires some environment setup in order to function properly:

cp ~/.bashrc ~/bashrc.bak
cat ~/overo-oe/build/profile >> ~/.bashrc

Building the images and File system

After all is setup we recommend that you close the terminal window and reopen it for the changes to take effect. Even better would be for you to restart the computer :)

Before going any further we need to set the default (or preferred) Linux Kernel to be the 2.6.29. The reason for this is that later on we shall cover how to setup Android on the FLOW and the Kernel version used there is 2.6.29:

gedit ~/overo-oe/build/conf/local.conf

Add the following line to the file and save it:

PREFERRED_PROVIDER_linux-omap3 = "2.6.29"

Now let's build the images required for the Basic functionality of the FLOW. Firstly let's build the MLO, u-Boot and Kernel images for the first partition of our Micro-SD card starting with the MLO image:

cd ~/overo-oe
bitbake x-load

Now let's build the u-boot:

bitbake u-boot-omap3

And finally the Kernel and the file system, for this example we chose the omap3-console-image:

bitbake omap3-console-image

Setting up the Kernel for the FLOW

After all the compilations are complete you can find the files which were built in ~/overo-oe/tmp/deploy/glibc/images/overo. But before copying everything to the Micro-SD card we firstly must configure the Kernel to support the SHARP LCD for the FLOW.

We have to initially enable the SHARP LCD support in the Kernel configurations and disable the Samsung which is set by default:

bitbake -c menuconfig linux-omap3-2.6.29

In the configuration window that pops up navigate to Device Drivers -> Graphics Support -> OMAP2/3 Display Subsystem Support (Experimental) -> OMAP2/3 Display Device Drivers

Here you will see the LCD options available. Disable the Samsung LTE430WQ-F0C LCD Panle and enable the Sharp LS037V7DW01. Exit by saving the changes.

Now navigate to ~/overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.29-r51/git. Press Ctrl + H on your Keyboard to unhide all the files. Copy the .config file to ~/overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.29/overo and replace the defconfig file with the one you just copied by renaming it.

One more thing left to do. You need to edit the dss2.patch file located in ~/overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.29 Apply the following patch to the file:

diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 0a5a77e..254a09c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -578,8 +578,8 @@ static void overo_panel_disable_lcd(struct omap_display *display)
 static struct omap_dss_display_config overo_display_data_lcd = {
 	.type = OMAP_DISPLAY_TYPE_DPI,
 	.name = "lcd43",
-	.panel_name = "samsung-lte430wq-f0c",
-	.u.dpi.data_lines = 24,
+	.panel_name = "sharp-ls037v7dw01",
+	.u.dpi.data_lines = 16,
 	.panel_enable = overo_panel_enable_lcd,
 	.panel_disable = overo_panel_disable_lcd,
  };

or change manually in dss2.patch "panel_name" and "u.dpi.data_lines" values (lines 6311 & 6312).

Alternatively you can simply download the FLOW Files which already include all these changes in the ""user.collection""

Now clean the old Kernel build and rebuild it:

bitbake -c clean linux-omap3-2.6.29
bitbake -c rebuild linux-omap3-2.6.29

Now you have a complete set of files for booting FLOW. Optionally you can build the omap3-palmtop-image by issuing the command:

bitbake omap3-palmtop-image

Navigate to ~/overo-oe/tmp/deploy/glibc/images/overo to find all the files you just built and copy them to the Micro-SD as described in the Setting up the microSD section of this Wiki.

Did you know?

Banner