Difference between revisions of "Build Environment openSUSE 11.0"

From Gumstix User Wiki
Jump to: navigation, search
 
Line 101: Line 101:
 
  $ bitbake gumstix-basic-image
 
  $ bitbake gumstix-basic-image
  
''This article is not complete guide yet.''
+
The following files will be available in ~/gumstix/gumstix-oe/tmp/deploy/uclibc/images/gumstix-custom-verdex:
 +
$ ls
 +
Angstrom-gumstix-basic-image-uclibc-ipk-2007.9-test-20091005-gumstix-custom-verdex.rootfs.jffs2
 +
Angstrom-gumstix-basic-image-uclibc-ipk-2007.9-test-20091005-gumstix-custom-verdex.rootfs.tar.gz
 +
gumstix-basic-image-gumstix-custom-verdex.jffs2
 +
gumstix-basic-image-gumstix-custom-verdex.tar.gz
 +
modules-2.6.21-r1-gumstix-custom-verdex.tgz
 +
uImage-2.6.21-r1-gumstix-custom-verdex.bin
 +
 
 +
Note: ''Actually there will be two files. Two of them (gumstix-basic-image-gumstix-custom-verdex.jffs2,gumstix-basic-image-gumstix-custom-verdex.tar.gz) are symlinks.''

Latest revision as of 03:17, 5 October 2009

Be sure that the followings are installed on your system:

  • gcc
  • patch
  • help2man
  • diffstat
  • texinfo
  • ncurses-devel
  • cvs
  • gawk
  • sqlite3
  • sqlite3-devel

openSUSE 11.0 and above comes with Python 2.6+ installed. So you'll need to remove it and install an older version of Python.

$ mkdir python
$ cd python
$ wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
$ tar xzfv Python-2.5.4.tgz
$ cd Python-2.5.4
$ ./configure
$ make
$ make install

Install pysqlite:

$ wget http://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/pysqlite-2.4.1.tar.gz
$ tar xzfv pysqlite-2.4.1.tar.gz
$ cd pysqlite-2.4.1
$ python setup.py build
$ python setup.py install


Now you're ready for building gumstix-oe pack. Checkuot the sources from svn:

$ mkdir ~/gumstix 
$ cd ~/gumstix 
$ svn co http://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe


Gumstix OE requires some environment setup in order to function properly. There are a couple of ways to handle this requirement.

$ cat gumstix-oe/extras/profile >> ~/.bashrc

First we create a new group called oe and add your login account to the oe group. In the second command be sure to substitute your login user name where your_username is indicated.

$ sudo groupadd oe
$ sudo usermod -G oe your_username

Next we create the directory for the source code cache, set the group owner to the newly created oe group, and finally set permissions on the directory:

$ sudo mkdir /usr/share/sources
$ sudo chgrp oe /usr/share/sources
$ sudo chmod 0775 /usr/share/sources
$ sudo chmod ug+s /usr/share/sources

Now relogin for letting the profile take effect.

Suse users may experience some fails on building the image. So you'll need do some custom modifications:

$ cd ~/gumstix/gumstix-oe/com.gumstix.collection/packages/
$ wget http://www.klc.net.nz/images/dbus.tar.gz
$ wget http://www.klc.net.nz/images/gmp.tar.gz
$ tar xzfv dbus.tar.gz
$ tar xzfv gmp.tar.gz

Now edit the file ~/gumstix/gumstix-oe/org.openembedded.snapshot/conf/bitbake.conf. Find the line like this:

STAGING_ETCDIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/etc"
STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include"
STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share"
STAGING_LOADER_DIR = "${STAGING_DIR}/${HOST_SYS}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR}/${HOST_SYS}/firmware"
STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"  

Add the following line after STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share"

STAGING_DATADIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/share"

Edit the file ~/gumstix/gumstix-oe/com.gumstix.collection/conf/machine/include/gumstix.inc. Find the following fragment:

PREFERRED_PROVIDER_bluez-utils-dbus = "bluez-utils"
PREFERRED_PROVIDER_gsmd="libgsmd"

PREFERRED_VERSION_gumstix-kernel = "2.6.21"
PREFERRED_VERSION_udev = "118"
PREFERRED_VERSION_gnuplot = "4.0.0" 

Add these after PREFERRED_PROVIDER_gsmd="libgsmd"

PREFERRED_VERSION_gmp = "4.2.2"
PREFERRED_VERSION_gmp-native = "4.2.2"

PREFERRED_VERSION_dbus = "1.2.1"
PREFERRED_VERSION_dbus-native = "1.2.1"


Add #include <limits.h> to the following files:

~/gumstix/gumstix-oe/tmp/staging/gumstix-custom-verdex-angstrom-linux-uclibcgnueabi/kernel/scripts/mod/sumversion.c
~/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-uclibcgnueabi/linux-libc-headers-2.6.20-r7/linux-2.6.20/scripts/mod/sumversion.c
~/gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-uclibcgnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c
~/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/linux-libc-headers-2.6.20-r7/linux-2.6.20/scripts/mod/sumversion.c

Note: These might be unnecessary. I have read it one of the messages on mailing list. Probably will work without doing it. Test it, if it works without adding limits.h then write here note.


Build the OE gumstix image:

$ bitbake gumstix-basic-image

The following files will be available in ~/gumstix/gumstix-oe/tmp/deploy/uclibc/images/gumstix-custom-verdex:

$ ls
Angstrom-gumstix-basic-image-uclibc-ipk-2007.9-test-20091005-gumstix-custom-verdex.rootfs.jffs2
Angstrom-gumstix-basic-image-uclibc-ipk-2007.9-test-20091005-gumstix-custom-verdex.rootfs.tar.gz
gumstix-basic-image-gumstix-custom-verdex.jffs2
gumstix-basic-image-gumstix-custom-verdex.tar.gz
modules-2.6.21-r1-gumstix-custom-verdex.tgz
uImage-2.6.21-r1-gumstix-custom-verdex.bin

Note: Actually there will be two files. Two of them (gumstix-basic-image-gumstix-custom-verdex.jffs2,gumstix-basic-image-gumstix-custom-verdex.tar.gz) are symlinks.