<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.gumstix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Akohlsmith</id>
		<title>Gumstix User Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.gumstix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Akohlsmith"/>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php/Special:Contributions/Akohlsmith"/>
		<updated>2026-05-17T05:07:03Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3952</id>
		<title>Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3952"/>
				<updated>2009-11-06T03:51:10Z</updated>
		
		<summary type="html">&lt;p&gt;Akohlsmith: use pre tag instead of nowiki tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is based on the set-up for Ubuntu 8.10 with file modifications as described [http://www.nabble.com/Ubuntu-8.10-and-Open-Embeded-td21136352.html on this thread]. gumstix-oe version is 318.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has also been tested and found to work with Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
== Setup Build Environment ==&lt;br /&gt;
1) Get Ubuntu linux 9.04, and install it on your computer; you can install a vmware version of Ubuntu too, but it will be slow during the building process.&lt;br /&gt;
&lt;br /&gt;
Reconfigure sh to point to bash, not dash:&lt;br /&gt;
&lt;br /&gt;
  sudo dpkg-reconfigure dash&lt;br /&gt;
&lt;br /&gt;
Answer no when asked whether you want to install dash as /bin/sh. &lt;br /&gt;
&lt;br /&gt;
2) Install (build-essential, help2man, diffstat, texi2html, texinfo, libncurses5-dev, cvs, gawk, python-dev, python-pysqlite2, python-psyco, ckermit, lrzsz, subversion) by using apt-get. i.e:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk &lt;br /&gt;
 sudo apt-get install python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion&lt;br /&gt;
&lt;br /&gt;
See [[Bitbake_on_Ubuntu|Bitbake On Ubuntu]] for directions on how to setup Bitbake.&lt;br /&gt;
&lt;br /&gt;
3) Download the source from svn, caching the source code&lt;br /&gt;
 mkdir ~/gumstix &lt;br /&gt;
 cd ~/gumstix &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 cat gumstix-oe/extras/profile &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 sudo groupadd oe&lt;br /&gt;
 sudo usermod -a -G oe YOUR_CURRENT_USERNAME&lt;br /&gt;
 sudo mkdir /usr/share/sources&lt;br /&gt;
 sudo chgrp oe /usr/share/sources&lt;br /&gt;
 sudo chmod 0775 /usr/share/sources&lt;br /&gt;
 sudo chmod ug+s /usr/share/sources&lt;br /&gt;
&lt;br /&gt;
3.5) Modify classes/base.bbclass to correct a common SIGPIPE error (fix is in OE trunk, but not yet in gumstix-oe). basically we are adding a small function called subprocess_setup() which removes the SIGPIPE handler and then modifying oe_unpack_file() to call the function instead of system():&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;--- a/classes/base.bbclass&lt;br /&gt;
+++ b/classes/base.bbclass&lt;br /&gt;
@@ -728,9 +728,14 @@&lt;br /&gt;
 	:&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
+def subprocess_setup():&lt;br /&gt;
+	import signal, subprocess&lt;br /&gt;
+	# Python installs a SIGPIPE handler by default. This is usually not what&lt;br /&gt;
+	# non-Python subprocesses expect.&lt;br /&gt;
+	signal.signal(signal.SIGPIPE, signal.SIG_DFL)&lt;br /&gt;
 &lt;br /&gt;
 def oe_unpack_file(file, data, url = None):&lt;br /&gt;
-	import bb, os&lt;br /&gt;
+	import bb, os, signal, subprocess&lt;br /&gt;
 	if not url:&lt;br /&gt;
 		url = &amp;quot;file://%s&amp;quot; % file&lt;br /&gt;
 	dots = file.split(&amp;quot;.&amp;quot;)&lt;br /&gt;
@@ -799,7 +804,7 @@&lt;br /&gt;
 &lt;br /&gt;
 	cmd = &amp;quot;PATH=\&amp;quot;%s\&amp;quot; %s&amp;quot; % (bb.data.getVar('PATH', data, 1), cmd)&lt;br /&gt;
 	bb.note(&amp;quot;Unpacking %s to %s/&amp;quot; % (base_path_out(file, data), base_path_out(os.getcwd(), data)))&lt;br /&gt;
-	ret = os.system(cmd)&lt;br /&gt;
+	ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)&lt;br /&gt;
 &lt;br /&gt;
 	os.chdir(save_cwd)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(source: kergoth on #oe on irc.freenode.net. [http://gitorious.org/gumstix-oe/mainline/commit/f73c64e7295be1e1065f898b49f50a02e812161c original commit])&lt;br /&gt;
&lt;br /&gt;
4) Downgrade to gcc-4.1 and g++-4.1 and change the links:&lt;br /&gt;
&lt;br /&gt;
 sudo aptitude install gcc-4.1 g++-4.1&lt;br /&gt;
 sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc&lt;br /&gt;
 sudo ln -sf /usr/bin/g++-4.1 /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
Check the links are correct using:&lt;br /&gt;
&lt;br /&gt;
 ls -l /usr/bin/gcc&lt;br /&gt;
 ls -l /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
5) Log out and log in again.&lt;br /&gt;
&lt;br /&gt;
6) Build the basic image, it will fail with an error in dbus:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/i686-linux/dbus-native-1.0.1-r0/dbus-1.0.1/dbus/dbus-sysdeps-unix.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this struct,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ucred { &lt;br /&gt;
   unsigned int pid; &lt;br /&gt;
   unsigned int uid; &lt;br /&gt;
   unsigned int gid; &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after the macros.&lt;br /&gt;
&lt;br /&gt;
7) Build the basic image, it will fail with an error in sumversion:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this line, &lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;limits.h&amp;gt; &lt;br /&gt;
&lt;br /&gt;
after all of the other includes.&lt;br /&gt;
&lt;br /&gt;
8) Build the basic image again. If it fails with an error in gconf-dbus, do the following:&lt;br /&gt;
&lt;br /&gt;
a. download file http://download.gnome.org/sources/GConf-dbus/2.16/GConf-dbus-2.16.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
b. move and rename this file to:&lt;br /&gt;
 /usr/share/sources/trunk_developer.imendio.com_.svn.gconf-dbus_606_.tar.gz&lt;br /&gt;
&lt;br /&gt;
9) Build the basic image again, this time it should work:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
10) If everything builds ok, it could be a good idea to modify the dbus-sysdeps-unix.c and sumversion.c files in their respective packages in /usr/share/sources as otherwise everytime you do a rebuild they will be wiped. Note that dbus-sysdeps-unix.c is found in package dbus-1.0.1.tar.gz, and sumversion.c is found in package linux-2.6.21.tar.bz2. &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
[[Category:How_to_-_Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Akohlsmith</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3951</id>
		<title>Build Environment Ubuntu 9.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Build_Environment_Ubuntu_9.04&amp;diff=3951"/>
				<updated>2009-11-06T03:48:55Z</updated>
		
		<summary type="html">&lt;p&gt;Akohlsmith: Add 9.10 blessing and SIGPIPE fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is based on the set-up for Ubuntu 8.10 with file modifications as described [http://www.nabble.com/Ubuntu-8.10-and-Open-Embeded-td21136352.html on this thread]. gumstix-oe version is 318.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has also been tested and found to work with Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
== Setup Build Environment ==&lt;br /&gt;
1) Get Ubuntu linux 9.04, and install it on your computer; you can install a vmware version of Ubuntu too, but it will be slow during the building process.&lt;br /&gt;
&lt;br /&gt;
Reconfigure sh to point to bash, not dash:&lt;br /&gt;
&lt;br /&gt;
  sudo dpkg-reconfigure dash&lt;br /&gt;
&lt;br /&gt;
Answer no when asked whether you want to install dash as /bin/sh. &lt;br /&gt;
&lt;br /&gt;
2) Install (build-essential, help2man, diffstat, texi2html, texinfo, libncurses5-dev, cvs, gawk, python-dev, python-pysqlite2, python-psyco, ckermit, lrzsz, subversion) by using apt-get. i.e:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk &lt;br /&gt;
 sudo apt-get install python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion&lt;br /&gt;
&lt;br /&gt;
See [[Bitbake_on_Ubuntu|Bitbake On Ubuntu]] for directions on how to setup Bitbake.&lt;br /&gt;
&lt;br /&gt;
3) Download the source from svn, caching the source code&lt;br /&gt;
 mkdir ~/gumstix &lt;br /&gt;
 cd ~/gumstix &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 cat gumstix-oe/extras/profile &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
 sudo groupadd oe&lt;br /&gt;
 sudo usermod -a -G oe YOUR_CURRENT_USERNAME&lt;br /&gt;
 sudo mkdir /usr/share/sources&lt;br /&gt;
 sudo chgrp oe /usr/share/sources&lt;br /&gt;
 sudo chmod 0775 /usr/share/sources&lt;br /&gt;
 sudo chmod ug+s /usr/share/sources&lt;br /&gt;
&lt;br /&gt;
3.5) Modify classes/base.bbclass to correct a common SIGPIPE error (fix is in OE trunk, but not yet in gumstix-oe). basically we are adding a small function called subprocess_setup() which removes the SIGPIPE handler and then modifying oe_unpack_file() to call the function instead of system():&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;--- a/classes/base.bbclass&lt;br /&gt;
+++ b/classes/base.bbclass&lt;br /&gt;
@@ -728,9 +728,14 @@&lt;br /&gt;
 	:&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
+def subprocess_setup():&lt;br /&gt;
+	import signal, subprocess&lt;br /&gt;
+	# Python installs a SIGPIPE handler by default. This is usually not what&lt;br /&gt;
+	# non-Python subprocesses expect.&lt;br /&gt;
+	signal.signal(signal.SIGPIPE, signal.SIG_DFL)&lt;br /&gt;
 &lt;br /&gt;
 def oe_unpack_file(file, data, url = None):&lt;br /&gt;
-	import bb, os&lt;br /&gt;
+	import bb, os, signal, subprocess&lt;br /&gt;
 	if not url:&lt;br /&gt;
 		url = &amp;quot;file://%s&amp;quot; % file&lt;br /&gt;
 	dots = file.split(&amp;quot;.&amp;quot;)&lt;br /&gt;
@@ -799,7 +804,7 @@&lt;br /&gt;
 &lt;br /&gt;
 	cmd = &amp;quot;PATH=\&amp;quot;%s\&amp;quot; %s&amp;quot; % (bb.data.getVar('PATH', data, 1), cmd)&lt;br /&gt;
 	bb.note(&amp;quot;Unpacking %s to %s/&amp;quot; % (base_path_out(file, data), base_path_out(os.getcwd(), data)))&lt;br /&gt;
-	ret = os.system(cmd)&lt;br /&gt;
+	ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)&lt;br /&gt;
 &lt;br /&gt;
 	os.chdir(save_cwd)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(source kergoth on #oe on irc.freenode.net. [http://gitorious.org/gumstix-oe/mainline/commit/f73c64e7295be1e1065f898b49f50a02e812161c original commit])&lt;br /&gt;
&lt;br /&gt;
4) Downgrade to gcc-4.1 and g++-4.1 and change the links:&lt;br /&gt;
&lt;br /&gt;
 sudo aptitude install gcc-4.1 g++-4.1&lt;br /&gt;
 sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc&lt;br /&gt;
 sudo ln -sf /usr/bin/g++-4.1 /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
Check the links are correct using:&lt;br /&gt;
&lt;br /&gt;
 ls -l /usr/bin/gcc&lt;br /&gt;
 ls -l /usr/bin/g++&lt;br /&gt;
&lt;br /&gt;
5) Log out and log in again.&lt;br /&gt;
&lt;br /&gt;
6) Build the basic image, it will fail with an error in dbus:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/i686-linux/dbus-native-1.0.1-r0/dbus-1.0.1/dbus/dbus-sysdeps-unix.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this struct,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
struct ucred { &lt;br /&gt;
   unsigned int pid; &lt;br /&gt;
   unsigned int uid; &lt;br /&gt;
   unsigned int gid; &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after the macros.&lt;br /&gt;
&lt;br /&gt;
7) Build the basic image, it will fail with an error in sumversion:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;gumstix/gumstix-oe/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this line, &lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;limits.h&amp;gt; &lt;br /&gt;
&lt;br /&gt;
after all of the other includes.&lt;br /&gt;
&lt;br /&gt;
8) Build the basic image again. If it fails with an error in gconf-dbus, do the following:&lt;br /&gt;
&lt;br /&gt;
a. download file http://download.gnome.org/sources/GConf-dbus/2.16/GConf-dbus-2.16.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
b. move and rename this file to:&lt;br /&gt;
 /usr/share/sources/trunk_developer.imendio.com_.svn.gconf-dbus_606_.tar.gz&lt;br /&gt;
&lt;br /&gt;
9) Build the basic image again, this time it should work:&lt;br /&gt;
&lt;br /&gt;
 bitbake gumstix-basic-image&lt;br /&gt;
&lt;br /&gt;
10) If everything builds ok, it could be a good idea to modify the dbus-sysdeps-unix.c and sumversion.c files in their respective packages in /usr/share/sources as otherwise everytime you do a rebuild they will be wiped. Note that dbus-sysdeps-unix.c is found in package dbus-1.0.1.tar.gz, and sumversion.c is found in package linux-2.6.21.tar.bz2. &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
[[Category:How_to_-_Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Akohlsmith</name></author>	</entry>

	</feed>