Difference between revisions of "Build Environment openSUSE 11.0"

From Gumstix User Wiki
Jump to: navigation, search
(Created page with '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 an…')
 
Line 14: Line 14:
 
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.  
 
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
+
  $ mkdir python
  cd python
+
  $ cd python
  wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
+
  $ wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
  tar xzfv Python-2.5.4.tgz
+
  $ tar xzfv Python-2.5.4.tgz
  cd Python-2.5.4
+
  $ cd Python-2.5.4
  ./configure
+
  $ ./configure
  make
+
  $ make
  make install
+
  $ make install
  
 
Install pysqlite:
 
Install pysqlite:
  wget http://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/pysqlite-2.4.1.tar.gz
+
  $ 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
+
  $ tar xzfv pysqlite-2.4.1.tar.gz
  cd pysqlite-2.4.1
+
  $ cd pysqlite-2.4.1
  python setup.py build
+
  $ python setup.py build
  python setup.py install
+
  $ python setup.py install
  
  
Line 55: Line 55:
  
 
Now relogin for letting the profile take effect.
 
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"
 +
 +
Edit '''~/gumstix/gumstix-oe/com.gumstix.collection/packages/linux/gumstix-kernel_2.6.21.bb''' . Find the following fragment:
 +
        file://pxafb-18bpp-mode.patch;patch=1 \
 +
        file://smc911x-fixup.patch;patch=1 \
 +
        file://smc91x-fail-if-no-chip.patch;patch=1 \
 +
 +
        file://one-wire.patch;patch=1 \
 +
        ${@base_contains('MACHINE_FEATURES', 'rgb16','file://pxafb-backto16.patch;patch=1', '',d)} \
 +
 +
Add this line after '''''file://smc91x-fail-if-no-chip.patch;patch=1 \'''''
 +
        file://sumversion.patch;patch=1 \       
  
 
Build the OE gumstix image:
 
Build the OE gumstix image:
 
  $ bitbake gumstix-basic-image
 
  $ bitbake gumstix-basic-image

Revision as of 03:49, 2 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"

Edit ~/gumstix/gumstix-oe/com.gumstix.collection/packages/linux/gumstix-kernel_2.6.21.bb . Find the following fragment:

       file://pxafb-18bpp-mode.patch;patch=1 \
       file://smc911x-fixup.patch;patch=1 \
       file://smc91x-fail-if-no-chip.patch;patch=1 \
       file://one-wire.patch;patch=1 \
       ${@base_contains('MACHINE_FEATURES', 'rgb16','file://pxafb-backto16.patch;patch=1', ,d)} \

Add this line after file://smc91x-fail-if-no-chip.patch;patch=1 \

       file://sumversion.patch;patch=1 \        

Build the OE gumstix image:

$ bitbake gumstix-basic-image