<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.openmoko.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=Cfriedt&amp;feedformat=atom</id>
		<title>Openmoko - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.openmoko.org/api.php?action=feedcontributions&amp;user=Cfriedt&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Special:Contributions/Cfriedt"/>
		<updated>2013-05-25T18:15:08Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.6</generator>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions</id>
		<title>OpenEmbedded Torrent Instructions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions"/>
				<updated>2009-02-14T21:27:35Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After downloading an [[OpenEmbedded Torrent]], there are two variables that need to be exported in the shell environment. The MACHINE and OE_HOME. Examples are used below, but please set the variables appropriately for your scenario. Also, please ensure that there are several gigabytes of disk space available in OE_HOME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export MACHINE=om-gta02&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following three variables are set here for the purpose of generality. They should be included in the name of your torrent file. &lt;br /&gt;
&lt;br /&gt;
 DISTRO=angstrom-2008.1&lt;br /&gt;
 ARCH=x86_64-linux&lt;br /&gt;
 TIMESTAMP=20090214&lt;br /&gt;
 TARBALL_LOC=${HOME}&lt;br /&gt;
&lt;br /&gt;
Please follow the following instructions for preparing the pre-compiled OpenEmbedded build environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mkdir -p ${OE_HOME}&lt;br /&gt;
 tar xpjf ${TARBALL_LOC}/openmoko-${MACHINE}-${DISTRO}-${ARCH}-${TIMESTAMP}.tar.bz2 -C ${OE_HOME}&lt;br /&gt;
 cd ${OE_HOME}&lt;br /&gt;
 echo ${OE_HOME}/build-${MACHINE}/tmp &amp;gt; ${OE_HOME}/build-${MACHINE}/tmp&lt;br /&gt;
 source setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to rebuild non-portable packages required for native and cross compilation. All of such packages are pulled in as dependencies, when building the 'console-image' recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake console-image&lt;br /&gt;
&lt;br /&gt;
That's it! You are now ready to do system development or application development to your heart's content!&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:14:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB of data to download, but it might require another 16 GB to uncompress. '''It is suggested to have approximately 25GB of free disk space before continuing'''.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''How can I contribute a torrent of my OE environment, to help future OpenMoko developers jump-start their work?'''&lt;br /&gt;
&lt;br /&gt;
That is a very excellent question, and we are very happy that you asked! Please see [[OpenEmbedded Torrent Submission]] for more details.&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
== Contributing to the Pool of Torrents ==&lt;br /&gt;
&lt;br /&gt;
If you have noticed that the available torrents for your architecture, machine, and distro are few (or none), then we would love it if you would share your build environment for other OpenMoko developers to get up-to-speed fast!&lt;br /&gt;
&lt;br /&gt;
Please see [[OpenEmbedded Torrent Submission]] for more details. &lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:10:46Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB of data to download, but it might require another 16 GB to uncompress. '''It is suggested to have approximately 25GB of free disk space before continuing'''.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''How can I contribute a torrent of my OE environment, to help future OpenMoko developers jump-start their work?'''&lt;br /&gt;
&lt;br /&gt;
That is a very excellent question, and we are very happy that you asked! Please see [[OpenEmbedded Torrent Submission]] for more details.&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:09:06Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Available Torrents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB of data to download, but it might require another 16 GB to uncompress. '''It is suggested to have approximately 25GB of free disk space before continuing'''.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
(There are no torrents at this time)&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:07:30Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB of data to download, but it might require another 16 GB to uncompress. '''It is suggested to have approximately 25GB of free disk space before continuing'''.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:06:58Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB of data to download, but it might require another 16 GB to uncompress. It is suggested to have approximately 25GB of free disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T21:05:43Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, the compressed environment could be 3GB, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions</id>
		<title>OpenEmbedded Torrent Instructions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions"/>
				<updated>2009-02-14T21:04:00Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After downloading an [[OpenEmbedded Torrent]], there are two variables that need to be exported in the shell environment. The MACHINE and OE_HOME. Examples are used below, but please set the variables appropriately for your scenario. Also, please ensure that there are several gigabytes of disk space available in OE_HOME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export MACHINE=om-gta02&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following three variables are set here for the purpose of generality. They should be included in the name of your torrent file. &lt;br /&gt;
&lt;br /&gt;
 DISTRO=angstrom-2008.1&lt;br /&gt;
 ARCH=x86_64-linux&lt;br /&gt;
 TIMESTAMP=20090214&lt;br /&gt;
 TARBALL_LOC=${HOME}&lt;br /&gt;
&lt;br /&gt;
Please follow the following instructions for preparing the pre-compiled OpenEmbedded build environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mkdir -p ${OE_HOME}&lt;br /&gt;
 tar xpjf ${TARBALL_LOC}/openmoko-${MACHINE}-${DISTRO}-${ARCH}-${TIMESTAMP}.tar.bz2 -C ${OE_HOME}&lt;br /&gt;
 cd ${OE_HOME}&lt;br /&gt;
 echo ${OE_HOME}/build-${MACHINE}/tmp &amp;gt; ${OE_HOME}/build-${MACHINE}/tmp&lt;br /&gt;
 source setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to rebuild non-portable packages required for native and cross compilation. All of such packages are pulled in via dependency, when building the 'console-image' recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake console-image&lt;br /&gt;
&lt;br /&gt;
That's it! You are now ready to do system development or application development to your heart's content!&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions</id>
		<title>OpenEmbedded Torrent Instructions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions"/>
				<updated>2009-02-14T21:01:58Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After downloading an [[OpenEmbedded Torrent]], there are two variables that need to be exported in the shell environment. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export MACHINE=om-gta02&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following three variables are set here for the purpose of generality. They should be included in the name of your torrent file. &lt;br /&gt;
&lt;br /&gt;
 DISTRO=angstrom-2008.1&lt;br /&gt;
 ARCH=x86_64-linux&lt;br /&gt;
 TIMESTAMP=20090214&lt;br /&gt;
 TARBALL_LOC=${HOME}&lt;br /&gt;
&lt;br /&gt;
Please follow the following instructions for preparing the pre-compiled OpenEmbedded build environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mkdir -p ${OE_HOME}&lt;br /&gt;
 tar xpjf ${TARBALL_LOC}/openmoko-${MACHINE}-${DISTRO}-${ARCH}-${TIMESTAMP}.tar.bz2 -C ${OE_HOME}&lt;br /&gt;
 cd ${OE_HOME}&lt;br /&gt;
 echo ${OE_HOME}/build-${MACHINE}/tmp &amp;gt; ${OE_HOME}/build-${MACHINE}/tmp&lt;br /&gt;
 source setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to rebuild non-portable packages required for native and cross compilation. All of such packages are pulled in via dependency, when building the 'console-image' recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake console-image&lt;br /&gt;
&lt;br /&gt;
That's it! You are now ready to do system development or application development to your heart's content!&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions</id>
		<title>OpenEmbedded Torrent Instructions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions"/>
				<updated>2009-02-14T20:54:10Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Tcsh users should use &amp;quot;setenv VAR val&amp;quot; instead of &amp;quot;export VAR=val&amp;quot;, and &amp;quot;. file&amp;quot; instead of 'source file'.}}&lt;br /&gt;
&lt;br /&gt;
After downloading an [[OpenEmbedded Torrent]], there are two variables that need to be exported in the shell environment. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export MACHINE=om-gta02&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following three variables are set here for the purpose of generality. They should be included in the name of your torrent file. &lt;br /&gt;
&lt;br /&gt;
 DISTRO=angstrom-2008.1&lt;br /&gt;
 ARCH=x86_64-linux&lt;br /&gt;
 TIMESTAMP=20090214&lt;br /&gt;
 TARBALL_LOC=${HOME}&lt;br /&gt;
&lt;br /&gt;
Please follow the following instructions for preparing the pre-compiled OpenEmbedded build environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mkdir -p ${OE_HOME}&lt;br /&gt;
 tar xpjf ${TARBALL_LOC}/openmoko-${MACHINE}-${DISTRO}-${ARCH}-${TIMESTAMP}.tar.bz2 -C ${OE_HOME}&lt;br /&gt;
 cd ${OE_HOME}&lt;br /&gt;
 echo ${OE_HOME}/build-${MACHINE}/tmp &amp;gt; ${OE_HOME}/build-${MACHINE}/tmp&lt;br /&gt;
 source setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to rebuild non-portable packages required for native and cross compilation. All of such packages are pulled in via dependency, when building the 'console-image' recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake console-image&lt;br /&gt;
&lt;br /&gt;
That's it! You are now ready to do system development or application development to your heart's content!&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions</id>
		<title>OpenEmbedded Torrent Instructions</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions"/>
				<updated>2009-02-14T20:53:23Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: New page: {{Note|Tcsh users should use 'setenv VAR val' instead of 'export VAR=val', and '. file' instead of 'source file'.}}  After downloading an OpenEmbedded Torrent, there are two variables ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Note|Tcsh users should use 'setenv VAR val' instead of 'export VAR=val', and '. file' instead of 'source file'.}}&lt;br /&gt;
&lt;br /&gt;
After downloading an [[OpenEmbedded Torrent]], there are two variables that need to be exported in the shell environment. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export MACHINE=om-gta02&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following three variables are set here for the purpose of generality. They should be included in the name of your torrent file. &lt;br /&gt;
&lt;br /&gt;
 DISTRO=angstrom-2008.1&lt;br /&gt;
 ARCH=x86_64-linux&lt;br /&gt;
 TIMESTAMP=20090214&lt;br /&gt;
 TARBALL_LOC=${HOME}&lt;br /&gt;
&lt;br /&gt;
Please follow the following instructions for preparing the pre-compiled OpenEmbedded build environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mkdir -p ${OE_HOME}&lt;br /&gt;
 tar xpjf ${TARBALL_LOC}/openmoko-${MACHINE}-${DISTRO}-${ARCH}-${TIMESTAMP}.tar.bz2 -C ${OE_HOME}&lt;br /&gt;
 cd ${OE_HOME}&lt;br /&gt;
 echo ${OE_HOME}/build-${MACHINE}/tmp &amp;gt; ${OE_HOME}/build-${MACHINE}/tmp&lt;br /&gt;
 source setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to rebuild non-portable packages required for native and cross compilation. All of such packages are pulled in via dependency, when building the 'console-image' recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake console-image&lt;br /&gt;
&lt;br /&gt;
That's it! You are now ready to do system development or application development to your heart's content!&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:33:59Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, libtool-native, ... ?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:33:10Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* '''Why does my environment rebuild gcc-cross, binutils-cross, and libtool-cross?'''&lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:32:27Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
Why does my environment rebuild gcc-cross, binutils-cross, and libtool-cross &lt;br /&gt;
&lt;br /&gt;
If every end-user had the same username and the same OE_HOME, then the cross-toolchain would be completely portable. However, that is generally not the case. The toolchain has compiled-in paths that contain system libraries and headers. If those paths change, then there is a very high probability that [http://en.wikipedia.org/wiki/Gremlin gremlins] might attack you, your loved ones, and your town, possibly ruining Christmas for everyone.&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:21:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go! See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:20:43Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go!&lt;br /&gt;
&lt;br /&gt;
See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:20:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go!&lt;br /&gt;
&lt;br /&gt;
See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:20:00Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
{{Note|A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing.}}&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go!&lt;br /&gt;
&lt;br /&gt;
See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:17:11Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Available Torrents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing. &lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go!&lt;br /&gt;
&lt;br /&gt;
See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Linux users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for Mac OS X users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
Torrents for FreeBSD users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-14T20:15:02Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' A pre-compiled OE environment is several gigabytes in size. For example, an environment may be require 8GB to download and store, but it might require another 16 GB to uncompress. Please ensure that you have enough disk space before continuing. &lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], just follow these [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Instructions instructions], and go!&lt;br /&gt;
&lt;br /&gt;
See the list below for available torrents. &lt;br /&gt;
&lt;br /&gt;
== Available Torrents ==&lt;br /&gt;
&lt;br /&gt;
=== Linux Users ===&lt;br /&gt;
&lt;br /&gt;
* Torrents for [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_Linux Linux] users&lt;br /&gt;
&lt;br /&gt;
=== Mac OS X Users ===&lt;br /&gt;
&lt;br /&gt;
* Torrents for [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_MacOsX Mac OS X] users&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD Users ===&lt;br /&gt;
&lt;br /&gt;
* Torrents for [http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent_FreeBSD FreeBSD] users&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:57:30Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* BitBake Overlays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== local.conf ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left.&lt;br /&gt;
&lt;br /&gt;
=== setup-env ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean somepackage &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely related to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example of the setup-env script with multiple overlays and multiple build targets is below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
Next, observe the changes necessary for local.conf in order to use a specific overlay (in this case org.openmoko.dev).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream moko&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_moko = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_moko = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined in the local.conf file. It is possible to include more than one overlay. For each overlay, add a separate  BBFILES += statement, an entry in BBFILE_COLLECTIONS, a BBFILE_PATTERN, and BBFILE_PRIORITY. Remember to include at least one space (' ') between each BBFILES entry.&lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:51:52Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* BitBake Overlays */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== local.conf ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left.&lt;br /&gt;
&lt;br /&gt;
=== setup-env ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean somepackage &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely related to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority.&lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:47:55Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Build Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== local.conf ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left.&lt;br /&gt;
&lt;br /&gt;
=== setup-env ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean somepackage &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:47:32Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Build Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== local.conf ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left.&lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean somepackage &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:09:34Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Broken Builds and Bug Reporting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean somepackage &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:08:14Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Build Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays BitBake Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Build Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
See the section entitled [http://wiki.openmoko.org/wiki/OpenEmbedded#BitBake_Overlays] for an example of a more complicated setup-env script.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:05:19Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Synchronizing OpenEmbedded With Git */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree. Take a few moments to inspect the different types of BitBake files (.bbclass, .bb, .inc, etc). This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:02:51Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Building the OpenMoko Distribution with OpenEmbedded */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T19:01:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Setting the PREFERRED_VERSION for a package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
If a certain package is known to not build, and there is a less recent / more stable version of that package, then a good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. &lt;br /&gt;
&lt;br /&gt;
For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:59:50Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Tips &amp;amp; Tricks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the PREFERRED_VERSION for a package ===&lt;br /&gt;
&lt;br /&gt;
A good way to avoid repetitive encounters with known build failures is to use preferred versions of packages. For example, if building gcc-4.2.4 constantly failed, then it would be wise to edit local.conf and set PREFERRED_VERSION_gcc = &amp;quot;4.1.2&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:53:53Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Screen is Your Friend */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. A similar event could occur if your X server suddenly craches. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution.&lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T18:51:39Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: Please refer to the OpenEmbedded page for OE instructions and the BitBake_recipe page for BitBake instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]] and was originally used by the OpenHandhelds and OpenZaurus communities. &lt;br /&gt;
&lt;br /&gt;
[[BitBake recipe]]s are simple, declarative files.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:45:56Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Broken Builds and Bug Reporting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
** add PREFERRED_VERSION_somepackage = &amp;quot;0.1&amp;quot; to local.conf&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:45:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Broken Builds and Bug Reporting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
* If there is a similar, more stable version in ${OE_HOME}/org.openembedded.dev/packages, then try to use that instead&lt;br /&gt;
** bitbake -c clean package_name &amp;amp;&amp;amp; bitbake -b ${OE_HOME}/org.openembedded.dev/packages/somepackage/somepackage_0.1.bb&lt;br /&gt;
* Read the BitBake log, as well as config.log if it exists&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:41:20Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Quick Start: OpenEmbedded Torrent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
=== Quick Start: OpenEmbedded Torrent ===&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build and read the bitbake log, as well as config.log if it exists&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Simplified Instructions: MokoMakefile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
=== Simplified Instructions: MokoMakefile ===&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded.&lt;br /&gt;
&lt;br /&gt;
== Quick Start: OpenEmbedded Torrent ==&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build and read the bitbake log, as well as config.log if it exists&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:38:25Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Detailed Instructions: OpenEmbedded */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
== Simplified Instructions: MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded. &lt;br /&gt;
&lt;br /&gt;
== Quick Start: OpenEmbedded Torrent ==&lt;br /&gt;
&lt;br /&gt;
If you are a system developer and would like to get up-to-speed as quickly as possible, then download an [[OpenEmbedded Torrent]].&lt;br /&gt;
&lt;br /&gt;
== From Scratch: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build and read the bitbake log, as well as config.log if it exists&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-10T18:35:25Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following links are in place to provide developers with a pre-compiled [[OpenEmbedded]] build environment tailored to their workstation's architecture. In order to use BitTorrent files, it is necessary to install a [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client].&lt;br /&gt;
&lt;br /&gt;
The reason that these torrents are provided, is to decrease the amount of time it takes for system developers to have a fully functional build environment, allowing them to focus on more important tasks. A positive side effect of providing a pre-compiled environment, is that new developers do not feel overwhelmed or dissuaded by the time it takes to build an OE build environment from scratch.&lt;br /&gt;
&lt;br /&gt;
Once the environment is downloaded via [http://en.wikipedia.org/wiki/BitTorrent BitTorrent], simply untar the archive to a location of your choice with plenty of hard-disk space, export the environment variable OE_HOME, and go!&lt;br /&gt;
&lt;br /&gt;
== Linux Users ==&lt;br /&gt;
&lt;br /&gt;
* openmoko&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
* fso&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
* angstrom-2008.1&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
&lt;br /&gt;
== Mac OS X Users ==&lt;br /&gt;
&lt;br /&gt;
== FreeBSD Users ==&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T18:22:32Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Building the OpenMoko Distribution with OpenEmbedded */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build OpenEmbedded from scratch. For compiling simple applications with few library dependencies (including boot-loader and kernel), consider using our prebuilt [[Toolchain]]. For more complex applications with many library dependencies, download a prebuilt [[OpenEmbedded Torrent]] with your favourite [http://en.wikipedia.org/wiki/BitTorrent_client BitTorrent client]. &lt;br /&gt;
&lt;br /&gt;
Building OpenMoko from scratch is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
== Simplified Instructions: MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded. &lt;br /&gt;
&lt;br /&gt;
== Detailed Instructions: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build and read the bitbake log, as well as config.log if it exists&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent</id>
		<title>OpenEmbedded Torrent</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded_Torrent"/>
				<updated>2009-02-10T18:20:12Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: New page: List of torrents for downloading pre-compiled OpenEmbedded environments, organized by DISTRO, MACHINE and ARCH.  * openmoko ** gta01 *** x86 *** x86_64 ** gta02 *** x86 *** x86_64 * fso **...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of torrents for downloading pre-compiled OpenEmbedded environments, organized by DISTRO, MACHINE and ARCH.&lt;br /&gt;
&lt;br /&gt;
* openmoko&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
* fso&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
* angstrom-2008.1&lt;br /&gt;
** gta01&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;br /&gt;
** gta02&lt;br /&gt;
*** x86&lt;br /&gt;
*** x86_64&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/OpenEmbedded</id>
		<title>OpenEmbedded</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/OpenEmbedded"/>
				<updated>2009-02-10T17:51:01Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: changes made according to the devel list proposals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|OpenEmbedded}}&lt;br /&gt;
&lt;br /&gt;
Openmoko, our distribution, is built using OpenEmbedded.  OpenEmbedded will:&lt;br /&gt;
&lt;br /&gt;
* Generate (cross-compile) software packages for multiple embedded targets.&lt;br /&gt;
* Handle different hardware architectures, and support multiple releases across those architectures. &lt;br /&gt;
&lt;br /&gt;
For more information please see the [http://www.openembedded.org/ Open Embedded] website.&lt;br /&gt;
&lt;br /&gt;
== Building the OpenMoko Distribution with OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you are an application developer, you probably do not want to build Openmoko with OpenEmbedded. In that case, you should use our prebuilt [[Toolchain]]. Building OpenMoko is a time-, cpu- and diskspace-consuming process which should only be done if you are a system integrator and want to customize your OpenMoko distribution.&lt;br /&gt;
&lt;br /&gt;
== Simplified Instructions: MokoMakefile ==&lt;br /&gt;
&lt;br /&gt;
For beginners who wish to customize their OpenMoko distribution, the facility called [[MokoMakefile]] simplifies building OpenEmbedded. &lt;br /&gt;
&lt;br /&gt;
== Detailed Instructions: OpenEmbedded ==&lt;br /&gt;
&lt;br /&gt;
Beginner OpenMoko developers who would prefer to have full control over their OpenEmbedded build environment should follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
=== Preparations ===&lt;br /&gt;
&lt;br /&gt;
Several prerequisite software components are necessary in order to have a fully functional OpenEmbedded build environment. However, setup and installation varies depending on the operating system installed on your workstation. The [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] provides [http://wiki.openembedded.net/index.php/OEandYourDistro setup instructions] for FreeBSD, Mac OS X, and most major Linux distributions, of course.&lt;br /&gt;
&lt;br /&gt;
For OpenEmbedded installation instructions please refer to [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. &lt;br /&gt;
&lt;br /&gt;
=== ${OE_HOME} ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have installed all prerequisite software, you are now ready to create a directory for all of your OpenEmbedded (OE) related work. We will refer to OE_HOME in a generic way, but for argument's sake, assume that it is equal to ${HOME}/oe. You should expect ${OE_HOME} to grow tremendously in size, up to approximately 8GB or larger in some cases. Also be aware, that a full OE build could require several hours of constant building, which may inhibit the performance of your computer while performing other tasks. Replace ${HOME}/oe with your preferred location.&lt;br /&gt;
&lt;br /&gt;
For Bash users:&lt;br /&gt;
 export OE_HOME=${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
For Tcsh users:&lt;br /&gt;
 setenv OE_HOME ${HOME}/oe&lt;br /&gt;
&lt;br /&gt;
Next, run 'mkdir -p ${OE_HOME}' to create the directory. &lt;br /&gt;
&lt;br /&gt;
=== Synchronizing OpenEmbedded With Git ===&lt;br /&gt;
&lt;br /&gt;
Just like any tree, OpenEmbedded has several branches. In this case they are called 'development branches'. Some noteworthy ones include org.openembedded.dev (the default) and org.openembedded.stable . &lt;br /&gt;
&lt;br /&gt;
To syncronize the OpenEmbedded tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 git clone git://git.openembedded.net/openembedded ${OE_HOME}/org.openembedded.dev &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that last argument could be any directory name (git will create the directory if it doesn't exist). Sticking to 'good convention', the directory name was chosen to reflect the default development branch, org.openembedded.dev . See the [http://wiki.openembedded.net/index.php/GitPhraseBook OE GitPhraseBook] for more info on checking out different branches. &lt;br /&gt;
&lt;br /&gt;
To update the tree, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd ${OE_HOME}/org.openembedded.dev&lt;br /&gt;
 git pull&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For further information on Git, see [http://git-scm.com The Git Homepage].&lt;br /&gt;
&lt;br /&gt;
Also, please explore the directory structure of the OpenEmbedded build tree and take a moment to open and read one of the each type of BitBake file. This helps one to become familiar with recipe syntax and the inheritance system. Of particular note, please read the file 'local.conf.sample'. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 org.openembedded.dev&lt;br /&gt;
 |-- classes&lt;br /&gt;
 |   |-- rootfs_ipk.bbclass&lt;br /&gt;
 |   `-- xorg-module.bbclass&lt;br /&gt;
 |-- conf&lt;br /&gt;
 |   `-- local.conf.sample&lt;br /&gt;
 |   |-- distro&lt;br /&gt;
 |   |   `-- angstrom-2008.1.conf&lt;br /&gt;
 |   |-- machine&lt;br /&gt;
 |   |   |-- om-gta01.conf&lt;br /&gt;
 |   |   `-- om-gta02.conf&lt;br /&gt;
 `-- packages&lt;br /&gt;
     |-- tangogps&lt;br /&gt;
     |   |-- tangogps.inc&lt;br /&gt;
     |   `-- tangogps_0.9.3.bb&lt;br /&gt;
     `-- images&lt;br /&gt;
         |-- console-image.bb&lt;br /&gt;
         |-- fso-console-image.bb&lt;br /&gt;
         |-- fso-image.bb&lt;br /&gt;
         |-- openmoko-image.bb&lt;br /&gt;
         |-- opie-image.bb&lt;br /&gt;
         `-- x11-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Build Configuration ===&lt;br /&gt;
&lt;br /&gt;
If you explored local.conf.example, then you would be aware that there are some very important variables to be set like MACHINE, DISTRO, and BBFILES, among many others. This is done in a configuration file (local.conf) inside the build directory. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Using BitBake and OE for cross-compilation require that each target-distro combination is built in a separate directory, so that no version collisions occur. Concurrent builds may safely share the same DL_DIR though. This would suggest that a safe name for build directories is of the form ${OE_HOME}/build-${MACHINE}-${DISTRO}. Of course, if you don't plan on building for more than one machine-distro combination, then the naming of this directory is arbitrary. For the purpose of this example, we will use the convention ${OE_HOME}/build-${MACHINE} . &lt;br /&gt;
&lt;br /&gt;
Now, create the 'local.conf' configuration file. Notice that the CACHE and TMPDIR variables are neatly kept within the build directory while the DL_DIR variable is outside of the build directory, so that concurrent builds may reuse the same source packages. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 OE_HOME ?= &amp;quot;${HOME}/oe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;angstrom-2008.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 DL_DIR = &amp;quot;${OE_HOME}/downloads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 TMPDIR = &amp;quot;${OE_HOME}/build-${MACHINE}/tmp&amp;quot;&lt;br /&gt;
 CACHE = &amp;quot;${TMPDIR}/cache&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 ENABLE_BINARY_LOCALE_GENERATION = &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BBFILES variable is also of prime importance! It tells bitbake where to locate all available recipes for a build. The OpenEmbedded build environment is almost completely ready to go, with just one more minor step left. &lt;br /&gt;
&lt;br /&gt;
=== Build Environment ===&lt;br /&gt;
&lt;br /&gt;
For quick and easy initialization of the OpenEmbedded build environment, it is often suggested that the developer create a 'setup-env' script to source from the command line. This script can be called to initialize the most important of environment variables. Below is a very basic example of a setup-env script. &lt;br /&gt;
&lt;br /&gt;
setup-env for Bash users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
 export BBPATH=${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
setup-env for Tcsh users:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; setenv OE_HOME ${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; setenv MACHINE om-gta02&lt;br /&gt;
 setenv BBPATH ${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To invoke the setup-env script in bash, run 'source setup-env'. In tcsh, run '. setup-env'.&lt;br /&gt;
&lt;br /&gt;
=== Testing the OE Build Environment ===&lt;br /&gt;
&lt;br /&gt;
That's it! Now you should be prepared to bake your first BitBake recipe. &lt;br /&gt;
&lt;br /&gt;
 bitbake helloworld&lt;br /&gt;
&lt;br /&gt;
=== Building an Image ===&lt;br /&gt;
&lt;br /&gt;
There are several full filesystem images which can be built directly with OpenEmbedded using a single command. These include openmoko-image, fso-image, and so on. The image definitions can be found under ${OE_HOME}/org.openembedded.dev/packages/images&lt;br /&gt;
&lt;br /&gt;
A good place to start is with &lt;br /&gt;
&lt;br /&gt;
 bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
That concludes this introduction to BitBake and OpenEmbedded. Good luck!&lt;br /&gt;
&lt;br /&gt;
=== Other References ===&lt;br /&gt;
&lt;br /&gt;
Please feel free to refer to other online sources of information for [http://bitbake.berlios.de BitBake], [http://www.openembedded.org OpenEmbedded], and the [http://www.angstrom-distribution.org Angstrom Distribution] to name a few.&lt;br /&gt;
&lt;br /&gt;
== Broken Builds and Bug Reporting ==&lt;br /&gt;
&lt;br /&gt;
Using the org.openembedded.dev branch can often result in broken builds. For that reason, it is usually a good idea to limit synchronizing with the repository only after successfully building an image. Some may even want to archive the tree and build directory after an image is built.&lt;br /&gt;
&lt;br /&gt;
Now in the case that an image does not successfully build, it is not always necessarily a bug or a new bug. The problem might have to do with some conflicting software on the workstation, and it could be a bug that is already know and being fixed.&lt;br /&gt;
&lt;br /&gt;
Below are a few useful steps to follow when a build does not successfully complete:&lt;br /&gt;
&lt;br /&gt;
* Identify the package that failed to build and read the bitbake log, as well as config.log if it exists&lt;br /&gt;
** Find a line near the bottom of your output that matches &amp;quot;ERROR: ... failed&amp;quot; or &amp;quot;NOTE: ... failed&amp;quot;. The name of the package should be contained in the '...'&lt;br /&gt;
** Find the log file. There should be a line near the bottom of your output that matches &amp;quot;ERROR: see log in ...&amp;quot;, where '...' contains the log file name. These are usually of the form log.do_compile.12345 or log.do_configure.12345, etc. &lt;br /&gt;
* Try to identify the root cause of the error&lt;br /&gt;
** In many cases, if one examines log.do_configure, only the error is reported, but not the cause of the error&lt;br /&gt;
** Most packages that build with autotools will also have a config.log file that contains the exact cause of the error&lt;br /&gt;
* If you can fix the error, and the error is local to your workstation, and not really a bug, then fix the error yourself.&lt;br /&gt;
* Otherwise, check the [http://bugs.openembedded.net OpenEmbedded Bugzilla] to see if the error is known.&lt;br /&gt;
* If a solution is already available, then try it out. If you can fix the error, then do so. If your solution is correct, please post all relevent patches to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
=== Where to Report Bugs ===&lt;br /&gt;
&lt;br /&gt;
Authentic bugs should be reported to the [http://bugs.openembedded.net OpenEmbedded Bugzilla]&lt;br /&gt;
&lt;br /&gt;
== Tips &amp;amp; Tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Screen is Your Friend ===&lt;br /&gt;
&lt;br /&gt;
If you happen to be building all of your packages remotely on a server, using an ssh session, the session might occasionally be interrupted and the connection could be terminated. If in the process of building an image with bitbake, this means that the build process will terminate as well. &lt;br /&gt;
&lt;br /&gt;
In order to ensure that a build continues in the presence of communication failures, it is advisable to use the [http://www.gnu.org/software/screen GNU Screen] utility. Screen is also very useful when performing several concurrent OpenEmbedded builds for different machine-distro combinations.&lt;br /&gt;
&lt;br /&gt;
Screen installation varies with your OS and distribution. &lt;br /&gt;
&lt;br /&gt;
=== BitBake Overlays ===&lt;br /&gt;
&lt;br /&gt;
Bitbake overlays are useful for OpenEmbedded developers to eliminate bugs or package software without disturbiing the OpenEmbedded tree itself. Overlays are very similar in structure to the OpenEmbedded tree, but are usually only sparsely populated. Non-sparsely poplulated overlays are actually more closely relatedd to separate development branches. Good convention would suggest to always name the overlay appropriately. &lt;br /&gt;
&lt;br /&gt;
Below is an example of two overlays, three build directories, a setup-env script, and a local.conf where the developer has multiple build targets as well as multiple BitBake overlays.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 oe&lt;br /&gt;
 |-- build-beagleboard&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-om-gta02&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- build-ts72xx&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- local.conf&lt;br /&gt;
 |   `-- tmp&lt;br /&gt;
 |-- com.somecompany.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       |-- images&lt;br /&gt;
 |       |   `-- console-image.bb&lt;br /&gt;
 |       `-- rxtx&lt;br /&gt;
 |           |-- files&lt;br /&gt;
 |           |-- rxtx-fixes-from-debian.patch&lt;br /&gt;
 |           `-- rxtx_2.1-7r2.bb&lt;br /&gt;
 |-- org.openembedded.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- images&lt;br /&gt;
 |-- org.openmoko.dev&lt;br /&gt;
 |   |-- conf&lt;br /&gt;
 |   |   `-- machine&lt;br /&gt;
 |   `-- packages&lt;br /&gt;
 |       `-- tangogps&lt;br /&gt;
 |           |-- tangogps.inc&lt;br /&gt;
 |           `-- tangogps_0.9.3.bb&lt;br /&gt;
 `-- setup-env&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 [[ -z ${OE_HOME} ]] &amp;amp;&amp;amp; export OE_HOME=${HOME}/oe&lt;br /&gt;
 [[ -z ${MACHINE} ]] &amp;amp;&amp;amp; export MACHINE=om-gta02&lt;br /&gt;
&lt;br /&gt;
 unset BBPATH&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${MACHINE}&amp;quot; in&lt;br /&gt;
        &amp;quot;beagleboard&amp;quot; | &amp;quot;ts72xx&amp;quot; ) &lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/com.somecompany.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        &amp;quot;om-gta02&amp;quot;)&lt;br /&gt;
                BBPATH=&amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo -e &amp;quot;error: unsupported machine&amp;quot;&lt;br /&gt;
                 exit -1&lt;br /&gt;
         ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=${BBPATH}:${OE_HOME}/build-${MACHINE}:${OE_HOME}/org.openembedded.dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the overlay-specific BBPATH entry ''precedes'' the default BBPATH entries.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 BBFILES := &amp;quot;${OE_HOME}/org.openembedded.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BBFILES += &amp;quot; ${OE_HOME}/org.openmoko.dev/packages/*/*.bb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 BBFILE_COLLECTIONS = &amp;quot;upstream local&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_upstream = &amp;quot;${OE_HOME}/org.openembedded.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_upstream = &amp;quot;0&amp;quot;&lt;br /&gt;
 BBFILE_PATTERN_local = &amp;quot;${OE_HOME}/org.openmoko.dev&amp;quot;&lt;br /&gt;
 BBFILE_PRIORITY_local = &amp;quot;1&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order for the overlay to be detected by BitBake, the above variables need to be defined. It is possible to have more than one overlay and each one should be given a different priority. &lt;br /&gt;
&lt;br /&gt;
=== Useful BitBake Commands ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # list all of the tasks defined for a given package_name&lt;br /&gt;
 bitbake -c listtasks &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # clean the work directory for a specific package&lt;br /&gt;
 bitbake -c clean &amp;lt;package_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # build a specific recipe&lt;br /&gt;
 bitbake -b &amp;lt;path/to/some/recipe.bb&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
[[Category:System Developers]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T17:43:26Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get BitBake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. OpenMoko development is largely moving upstream to the main OpenEmbedded repository. To get started, please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[User:Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded Tree===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. To get started with OpenEmbedded, please follow the instructions under [[OpenEmbedded]]. -- [[User:Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake_recipe</id>
		<title>BitBake recipe</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake_recipe"/>
				<updated>2009-02-10T16:39:05Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Standard tasks in a recipe */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bitbake ==&lt;br /&gt;
BitBake is a build tool for executing tasks and managing metadata.It was inspired by Portage, the package management system used by the Gentoo Linux distribution. BitBake is the basis of the OpenEmbedded project, which is being used to build and maintain Openmoko. &lt;br /&gt;
&lt;br /&gt;
For the user guide of Bitbake, please visit the site : [http://bitbake.berlios.de/manual/] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bitbake Recipe ==&lt;br /&gt;
The literal meaning of a recipe is that it is a direction to making something. Similarly, a bitbake recipe tells bitbake how to build a particular package X.&lt;br /&gt;
It includes all the package dependencies, sources to fetch the source code from, configuration, compilation, build, install and remove instructions. Apart from this, it also stores the meta data for the package in certain standard variables.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some Standard Variables in a Bitbake recipe ===&lt;br /&gt;
&lt;br /&gt;
1. ''DESCRIPTION = &amp;quot;This application will print hello world on your screen&amp;quot;'' : &lt;br /&gt;
Gives the description of the application that you are developing&lt;br /&gt;
&lt;br /&gt;
2. ''AUTHOR = &amp;quot;Deepank Gupta&amp;quot;'' : &lt;br /&gt;
Gives name of the author of the package. Similar variables can be defined such as HOMEPAGE, LICENSE, SECTION etc.&lt;br /&gt;
&lt;br /&gt;
3.'' PN = &amp;quot;Helloworld&amp;quot;'' : &lt;br /&gt;
This specifies the package name of the package excluding the version number of the package. The version number is specified by '''PV''' and revision number by PR variable. &lt;br /&gt;
&lt;br /&gt;
4. ''DEPENDS = &amp;quot;X Y Z&amp;quot;'' : &lt;br /&gt;
With regard to dependencies, it expects the .bb to define a DEPENDS variable, which contains a space seperated list of “package names”. In the above example the package is dependent on X, Y and Z packages. The run-time dependencies of a package are specified by the variable RDEPENDS. &lt;br /&gt;
&lt;br /&gt;
5. ''PROVIDES += &amp;quot;virtual/package&amp;quot;'' : &lt;br /&gt;
This specifies the functionality provided by the bitbake recipe. &lt;br /&gt;
&lt;br /&gt;
6. ''PREFERRED_VERSION_a = &amp;quot;1.1&amp;quot;'' :&lt;br /&gt;
This specifies the preferred version of a package named a. This is used if there are more than 1 versions of a same package such as a-1.1.bb and a-1.2.bb&lt;br /&gt;
&lt;br /&gt;
7. ''SRC_URI = &amp;quot;file://myhelloworld.c&amp;quot;'' : &lt;br /&gt;
This specifies the source address from where to fetch the source files. It can fetch from local disk using file:// , websites using http:// , cvs and svn using cvs:// and svn:// and others like ftp, git etc.&lt;br /&gt;
&lt;br /&gt;
8. ''S = &amp;quot;${WORKDIR}/trunk&amp;quot;''&lt;br /&gt;
This might be used in order to specify which folder our package extracts to. Normally it looks like ${WORKDIR}/${PN}_${PV} if the package was generated by the autotools - which is the value this variable automatically points to when not set by the receipe. In the case this example shows it points to a folder named trunk - which might be useful for a reciepe that builds the last version from SVN.&lt;br /&gt;
&lt;br /&gt;
=== Some variables specific to Openmoko recipes ===&lt;br /&gt;
 $WORKDIR = $OMDIR/local/packages/&amp;lt;application directory&amp;gt;&lt;br /&gt;
 $bindir  = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/bin&lt;br /&gt;
 $docir   = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/share/doc&lt;br /&gt;
 $D       = $OMDIR/build/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Standard tasks in a recipe ===&lt;br /&gt;
1. do_fetch : Fetch the source files from the URI given in the SRC_URI. &lt;br /&gt;
&lt;br /&gt;
2. do_unpack : Unpack the source files into WORKDIR.&lt;br /&gt;
&lt;br /&gt;
3. do_patch : Patch the source code, if necessary, before configuration. &lt;br /&gt;
&lt;br /&gt;
4. do_configure : for doing the configuration&lt;br /&gt;
&lt;br /&gt;
5. do_compile : To compile the program(s) using a compiler specified by CC variable.&lt;br /&gt;
&lt;br /&gt;
6. do_build : To build the package including its build-time dependencies. &lt;br /&gt;
&lt;br /&gt;
7. do_install : To install the package on the filesystem i.e copy the binaries where required. &lt;br /&gt;
&lt;br /&gt;
You can define your own tasks (as many as you like) which can also be python functions. &lt;br /&gt;
eg. &lt;br /&gt;
&lt;br /&gt;
    do_mytask () {&lt;br /&gt;
            echo &amp;quot;Hello, world!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can list all tasks for a given recipe with 'bitbake -c listtasks &amp;lt;package_name&amp;gt;'.&lt;br /&gt;
&lt;br /&gt;
For packages that are built with autotools (automake, autoconf, etc), it is often only necessary to inherit autotools.bbclass, define SRC_URI, and sometimes define do_patch in the .bb file. All BitBake classes inherit from base.bbclass, where the default implementations for most tasks are defined.&lt;br /&gt;
&lt;br /&gt;
=== A Basic Bitbake Recipe [http://wiki.openmoko.org/wiki/Application_Development_Crash_Course#Filling_the_Files] ===&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake_recipe</id>
		<title>BitBake recipe</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake_recipe"/>
				<updated>2009-02-10T16:29:33Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Standard tasks in a recipe */  Added 'bitbake -c listtasks &amp;lt;package_name&amp;gt;'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bitbake ==&lt;br /&gt;
BitBake is a build tool for executing tasks and managing metadata.It was inspired by Portage, the package management system used by the Gentoo Linux distribution. BitBake is the basis of the OpenEmbedded project, which is being used to build and maintain Openmoko. &lt;br /&gt;
&lt;br /&gt;
For the user guide of Bitbake, please visit the site : [http://bitbake.berlios.de/manual/] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bitbake Recipe ==&lt;br /&gt;
The literal meaning of a recipe is that it is a direction to making something. Similarly, a bitbake recipe tells bitbake how to build a particular package X.&lt;br /&gt;
It includes all the package dependencies, sources to fetch the source code from, configuration, compilation, build, install and remove instructions. Apart from this, it also stores the meta data for the package in certain standard variables.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some Standard Variables in a Bitbake recipe ===&lt;br /&gt;
&lt;br /&gt;
1. ''DESCRIPTION = &amp;quot;This application will print hello world on your screen&amp;quot;'' : &lt;br /&gt;
Gives the description of the application that you are developing&lt;br /&gt;
&lt;br /&gt;
2. ''AUTHOR = &amp;quot;Deepank Gupta&amp;quot;'' : &lt;br /&gt;
Gives name of the author of the package. Similar variables can be defined such as HOMEPAGE, LICENSE, SECTION etc.&lt;br /&gt;
&lt;br /&gt;
3.'' PN = &amp;quot;Helloworld&amp;quot;'' : &lt;br /&gt;
This specifies the package name of the package excluding the version number of the package. The version number is specified by '''PV''' and revision number by PR variable. &lt;br /&gt;
&lt;br /&gt;
4. ''DEPENDS = &amp;quot;X Y Z&amp;quot;'' : &lt;br /&gt;
With regard to dependencies, it expects the .bb to define a DEPENDS variable, which contains a space seperated list of “package names”. In the above example the package is dependent on X, Y and Z packages. The run-time dependencies of a package are specified by the variable RDEPENDS. &lt;br /&gt;
&lt;br /&gt;
5. ''PROVIDES += &amp;quot;virtual/package&amp;quot;'' : &lt;br /&gt;
This specifies the functionality provided by the bitbake recipe. &lt;br /&gt;
&lt;br /&gt;
6. ''PREFERRED_VERSION_a = &amp;quot;1.1&amp;quot;'' :&lt;br /&gt;
This specifies the preferred version of a package named a. This is used if there are more than 1 versions of a same package such as a-1.1.bb and a-1.2.bb&lt;br /&gt;
&lt;br /&gt;
7. ''SRC_URI = &amp;quot;file://myhelloworld.c&amp;quot;'' : &lt;br /&gt;
This specifies the source address from where to fetch the source files. It can fetch from local disk using file:// , websites using http:// , cvs and svn using cvs:// and svn:// and others like ftp, git etc.&lt;br /&gt;
&lt;br /&gt;
8. ''S = &amp;quot;${WORKDIR}/trunk&amp;quot;''&lt;br /&gt;
This might be used in order to specify which folder our package extracts to. Normally it looks like ${WORKDIR}/${PN}_${PV} if the package was generated by the autotools - which is the value this variable automatically points to when not set by the receipe. In the case this example shows it points to a folder named trunk - which might be useful for a reciepe that builds the last version from SVN.&lt;br /&gt;
&lt;br /&gt;
=== Some variables specific to Openmoko recipes ===&lt;br /&gt;
 $WORKDIR = $OMDIR/local/packages/&amp;lt;application directory&amp;gt;&lt;br /&gt;
 $bindir  = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/bin&lt;br /&gt;
 $docir   = $OMDIR/build/tmp/work/armv4t-linux/&amp;lt;application directory&amp;gt;/image/usr/share/doc&lt;br /&gt;
 $D       = $OMDIR/build/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Standard tasks in a recipe ===&lt;br /&gt;
1. do_fetch : Fetch the source files from the URI given in the SRC_URI. &lt;br /&gt;
&lt;br /&gt;
2. do_configure : for doing the configuration&lt;br /&gt;
&lt;br /&gt;
3. do_compile : To compile the program(s) using a compiler specified by CC variable.&lt;br /&gt;
&lt;br /&gt;
4. do_build : To build the package including its build-time dependencies. &lt;br /&gt;
&lt;br /&gt;
5. do_install : To install the package on the filesystem i.e copy the binaries where required. &lt;br /&gt;
&lt;br /&gt;
You can define your own tasks (as many as you like) which can also be python functions. &lt;br /&gt;
eg. &lt;br /&gt;
&lt;br /&gt;
    do_mytask () {&lt;br /&gt;
            echo &amp;quot;Hello, world!&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can list all tasks for a given recipe with 'bitbake -c listtasks &amp;lt;package_name&amp;gt;'.&lt;br /&gt;
&lt;br /&gt;
=== A Basic Bitbake Recipe [http://wiki.openmoko.org/wiki/Application_Development_Crash_Course#Filling_the_Files] ===&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T02:46:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get OpenEmbedded Tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. OpenMoko development is largely moving upstream to the main OpenEmbedded repository. To get started, please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded Tree===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. To get started with OpenEmbedded, please follow the instructions under [[OpenEmbedded]]. -- [[User:Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T02:38:43Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get OpenEmbedded tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. OpenMoko development is largely moving upstream to the main OpenEmbedded repository. To get started, please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded Tree===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. To get started with OpenEmbedded, please follow the instructions under [OpenEmbedded]. -- [[User:Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T02:27:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get BitBake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. OpenMoko development is largely moving upstream to the main OpenEmbedded repository. To get started, please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded tree===&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T02:26:27Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get BitBake */  Updated instructions to reflect that most of the work is being done upstream in OE - see devel@lists.openmoko.org for more info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. Please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded tree===&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/BitBake</id>
		<title>BitBake</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/BitBake"/>
				<updated>2009-02-10T02:24:40Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Get bitbake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|BitBake}}&lt;br /&gt;
BitBake is the build tool used by [[OpenEmbedded]]. [[BitBake recipe]]s are simple, declarative files. Here is an example for the openmoko-calculator2 application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 DESCRIPTION = &amp;quot;A Calculator for Openmoko&amp;quot;&lt;br /&gt;
 SECTION = &amp;quot;openmoko/tools&amp;quot;&lt;br /&gt;
 DEPENDS = &amp;quot;libmokoui2&amp;quot;&lt;br /&gt;
 PV = &amp;quot;0.1.0+svnr${SRCREV}&amp;quot;&lt;br /&gt;
 PR = &amp;quot;r0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 inherit openmoko2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user manual is available at the [http://bitbake.berlios.de/manual/ BitBake berlios page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Application Developer]]&lt;br /&gt;
&lt;br /&gt;
==Set Bitbake building environment==&lt;br /&gt;
Basically, using bitbake to build your image is very easy.&lt;br /&gt;
* Get bitbake&lt;br /&gt;
* Get OpenEmbedded tree&lt;br /&gt;
* Set local configuare file&lt;br /&gt;
* Set building environment variables.&lt;br /&gt;
All you need is these four things. Lets assume you are using a account named '''build''', and you are working under directory '''moko'''.&lt;br /&gt;
&lt;br /&gt;
===Get BitBake===&lt;br /&gt;
&lt;br /&gt;
'''Note:'''' The instructions below are fairly out of date. It is not actually necessary to use bitbake-om. Any version of BitBake as recent or more recent than 1.8.12 (&amp;gt;=bitbake-1.8.12) is all that is necessary. Please follow the instructions available on the [http://wiki.openembedded.net/index.php OpenEmbedded Wiki] under [http://wiki.openembedded.net/index.php/OEandYourDistro OEandYourDistro]. -- [[Cfriedt]] 20090109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 $cd ~/moko  # Enter the directory&lt;br /&gt;
 $git clone git://git.openmoko.org/git/bitbake.git bitbake-om  # get the bitbake of openmoko.&lt;br /&gt;
&lt;br /&gt;
Bitbake come for OpenEmbedded, however Openmoko has its own bitbake, named [http://git.openmoko.org/?p=bitbake.git;a=summary bitbake-om]. After cloning the bitbake-om, you have the kitchen comprehensive. You also need recipes to tell you how to cook.&lt;br /&gt;
&lt;br /&gt;
===Get OpenEmbedded tree===&lt;br /&gt;
&lt;br /&gt;
 $git clone git://git.openmoko.org/git/openmoko.git openmoko&lt;br /&gt;
&lt;br /&gt;
It will clone an [http://git.openmoko.org/?p=openmoko.git;a=summary OE tree from Openmoko git server]. This is the recipes what tell bitbake how to cook. The cloning process spend little time, get a cup of coffee is a good idea when you are waiting.&lt;br /&gt;
&lt;br /&gt;
===Set Local configuare file===&lt;br /&gt;
&lt;br /&gt;
 $install -d /home/build/moko/local/conf #create the direcotry&lt;br /&gt;
 $vim local/conf/local.conf # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these line into the file&lt;br /&gt;
 ALLOW_EMPTY = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBFILES := &amp;quot;/home/build/moko/openmoko/packages/*/*.bb&amp;quot;&lt;br /&gt;
 BB_GIT_CLONE_FOR_SRCREV = &amp;quot;1&amp;quot;&lt;br /&gt;
 BBINCLUDELOGS = &amp;quot;yes&amp;quot;&lt;br /&gt;
 BBMASK = &amp;quot;&amp;quot;&lt;br /&gt;
 DISTRO = &amp;quot;openmoko&amp;quot;&lt;br /&gt;
 DL_DIR := &amp;quot;/home/build/moko/sources&amp;quot;&lt;br /&gt;
 EXTENDPE = &amp;quot;&amp;quot;&lt;br /&gt;
 GLIBC_GENERATE_LOCALES = &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
 IMAGE_FSTYPES = &amp;quot;jffs2 tar.gz&amp;quot;&lt;br /&gt;
 INHERIT += &amp;quot;om-utils&amp;quot;&lt;br /&gt;
 MACHINE = &amp;quot;om-gta02&amp;quot;&lt;br /&gt;
 PARALLEL_MAKE = &amp;quot;-j 4&amp;quot;&lt;br /&gt;
 QA_LOG = &amp;quot;1&amp;quot;&lt;br /&gt;
 TMPDIR := &amp;quot;/home/build/moko/build/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Let me explain the meanings of some variables.&lt;br /&gt;
*BBFILES: It tells bitbake where those recipes are.&lt;br /&gt;
*DL_DIR: Bitbake fetch source code and put them here.&lt;br /&gt;
*MACHINE: I build packages for gta02. If you are going to build for gta01, replace it with &amp;quot;om-gta01&amp;quot;&lt;br /&gt;
*PARALLEL_MAKE: Please read the manual of &amp;quot;make&amp;quot; and search the -j option.&lt;br /&gt;
*TMPDIR: All of your building result will place here.&lt;br /&gt;
&lt;br /&gt;
===Set building environment variables===&lt;br /&gt;
&lt;br /&gt;
 $vim build_env  # use your favorite editor&lt;br /&gt;
&lt;br /&gt;
Paste these lines into the file&lt;br /&gt;
&lt;br /&gt;
 export BBPATH=&amp;quot;/home/build/moko/local:/home/build/moko/openmoko&amp;quot;&lt;br /&gt;
 export PATH=/home/build/moko/bitbake-om/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
==Update environment==&lt;br /&gt;
bitbake-om won't change often. But the OE tree (/home/build/moko/openmoko) almost change everyday. Update them is important so you can get the latest fix.&lt;br /&gt;
&lt;br /&gt;
 $cd /home/build/moko/bitbake-om&lt;br /&gt;
 $git pull&lt;br /&gt;
 $cd /home/build/moko/openmoko&lt;br /&gt;
 $git pull&lt;br /&gt;
&lt;br /&gt;
==Starting use bitbake==&lt;br /&gt;
The first time you use bitbake will spend many hours. It have to fetch every source code what you need. To build the meta toolchain, and many basic libraries like glibc.&lt;br /&gt;
&lt;br /&gt;
 $source /home/build/moko/build_env  #read in the environment variables.&lt;br /&gt;
 $bitbake helloworld # build the simplest case.&lt;br /&gt;
 Playing video game for 5 hours, Watching movie for 3 hours and Sleeping for 8 hours.&lt;br /&gt;
&lt;br /&gt;
If you wanna try something like fso image, just ask bitbake to cook another food.&lt;br /&gt;
&lt;br /&gt;
 $bitbake fso-image&lt;br /&gt;
&lt;br /&gt;
All the recipe are placed in '''/home/build/moko/openmoko/packages'''. For example, fso-image recipe is placed in '''/home/build/moko/openmoko/packages/images/fso-image.bb'''.&lt;br /&gt;
&lt;br /&gt;
After the building process complete, the opk files are placed in '''/home/build/moko/build/deploy/glibc/opk''', and the image is in '''/home/build/moko/build/deploy/images'''.&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	<entry>
		<id>http://wiki.openmoko.org/wiki/Android</id>
		<title>Android</title>
		<link rel="alternate" type="text/html" href="http://wiki.openmoko.org/wiki/Android"/>
				<updated>2008-10-31T04:02:45Z</updated>
		
		<summary type="html">&lt;p&gt;Cfriedt: /* Source Files in Android that Use the ARMv5TE ISA */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Distributions|Android}}&lt;br /&gt;
&lt;br /&gt;
= Updates =&lt;br /&gt;
&lt;br /&gt;
* 20081021 [[User:Cfriedt]] Android -&amp;gt; FreeRunner updates on my [http://perpetual-notion.blogspot.com/search/label/android blog]&lt;br /&gt;
* 20081022 [[User:Cfriedt]] I was able to 'trivially' compile all of the Android source code without error for the ARMv4T architecture by removing v5TE instructions. Although it will definitely not run anything predictably, at least now that I know the build system will work with a few simple substitutions in build/core/combo/arm-linux.mk. At this point I am able to go ahead and re-implement v5TE instructions as v4T instruction sequences instead (or re-implement entire sections of assembly with hand-optimized v4T instructions).&lt;br /&gt;
* 20081023 [[User:Bricode]] To track the status of which parts of the Android source tree contain ARMv5 specific code, I've created a table of where it is contained, and the status of patches. It can be found at: http://spreadsheets.google.com/pub?key=pzDEXnU19gkeTjpD28t-7fw&lt;br /&gt;
* 20081029 [[User:Cfriedt]] [http://benno.id.au Benno] has modified Android's build system so that it will output a JFFS2 image instead of YAFFS . Unlike JFFS2, which [http://64.233.169.104/search?q=cache:e8czlAdKTn0J:gentoo-wiki.com/JFFS2/Mounting+gentoo+jffs2&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;cd=1&amp;amp;gl=ca&amp;amp;client=firefox-a can be mounted read-only from an image], mounting a YAFFS image is not possible unless it's already been written to flash (it complains about the block device being of type '1' and not 'NAND'). JFFS2 also has the benefit that it's a standard OpenMoko image format (See [[Flashing the Neo FreeRunner]] or [[Flashing the Neo 1973]])&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
This page is dedicated to porting the [http://www.android.com Android OS] to the [[Neo 1973]] and [[Neo FreeRunner]] handsets. Since the Android OS was [http://source.android.com/posts/opensource  publically released] on 20081021, [http://benno.id.au/blog/2007/11/21/android-neo1973 work] [http://perpetual-notion.blogspot.com/search/label/android is] [http://groups.google.com/group/android-porting currently underway] to port Android to the [[Neo1973 Hardware|Neo 1973]] and [[Neo_FreeRunner_GTA02_Hardware|FreeRunner]] handsets.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
# Systematically introduce patches for ARMv4T in the Android codebase&lt;br /&gt;
# Provide Neo1973 and Neo FreeRunner hardware-dependent patches in the Android codebase, leveraging the work already done by the Openmoko developers, without forcing Android-specific changes upstream&lt;br /&gt;
# Provide a useable Android filesystem and kernel on the [[Distributions]] page that conform to current Openmoko installation routines&lt;br /&gt;
&lt;br /&gt;
== Early Attempts ==&lt;br /&gt;
As [http://benno.id.au Ben Leslie] had pointed out on his [http://benno.id.au/blog/2007/11/21/android-neo1973 blog] far before the source code was released, [http://www.android.com Android] was originally designed to work with the ARMv5TE [http://en.wikipedia.org/wiki/Instruction_set_architecture instruction set architecture] (ISA), which allows for [http://en.wikipedia.org/wiki/ARM_architecture#DSP_Enhancement_Instructions DSP enhanced instructions]. Contrary to the ARMv5TE ISA, the Neo1973 and FreeRunner handsets both feature an arm920t core, which comply to the ARMv4T ISA.&lt;br /&gt;
&lt;br /&gt;
Before the source code was released, kernel trap handlers were implemented to 'emulate' the ARMv5TE ISA. Although the results worked in many cases, trapping is costly and performance suffered as a result. Moreover, without explicitly knowing which conditions were set by various instructions, such as Thumb Mode execution, the result became nondeterministic.&lt;br /&gt;
&lt;br /&gt;
== Current State ==&lt;br /&gt;
&lt;br /&gt;
With the release of the Android [http://source.android.com source code], the Open Source community is no longer limited to dealing with a binary-only product. The Open Handset Alliance (OHA) has let their source code become their product for everyone enrich and benefit from.&lt;br /&gt;
&lt;br /&gt;
Currently, porting efforts are underway in many circles. Patches should be submitted via the [http://source.android.com/submit-patches official Android channels].&lt;br /&gt;
&lt;br /&gt;
To track the status of which parts of the Android source tree contain ARMv5 specific code, I've created a table of where it is contained, and the status of patches. It can be found at: http://spreadsheets.google.com/pub?key=pzDEXnU19gkeTjpD28t-7fw [[User:Bricode]]&lt;br /&gt;
&lt;br /&gt;
[[User:Seanmcneil3|Sean McNeil]] said that he was able to get Androind running (including telephony) in his Freerunner [http://3v1n0.tuxfamily.org/tumblelog/post/368 source].&lt;br /&gt;
&lt;br /&gt;
Ben Leslie mentioned on the android-porting list that he was able to get the 'Android' logo to appear on his Neo 1973.&lt;br /&gt;
&lt;br /&gt;
= How to Help =&lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
You can start by following the instructions to download and build the Android source from scratch. Please see [http://source.android.com/download http://source.android.com/download] and follow the instructions for your architecture.&lt;br /&gt;
&lt;br /&gt;
== Publicize Your Efforts ==&lt;br /&gt;
&lt;br /&gt;
It's generally a good idea to make your efforts known via wiki systems, public mailing lists, forums, and publically open version control systems.&lt;br /&gt;
&lt;br /&gt;
Always take credit for your work but please don't do it in the form of comments. Some code is already hard enough to read without comments polluting the text. The best thing to do is to create a patch and put a header with your information at the top. Collaboration systems such as git might already do this for you (??).&lt;br /&gt;
&lt;br /&gt;
If you create something new and have the ability to designate the license for it, please consider license compatibility issues.&lt;br /&gt;
&lt;br /&gt;
== Porting Strategy ==&lt;br /&gt;
&lt;br /&gt;
* Analysis and leverage of the existing build system&lt;br /&gt;
** buid/core/combo/arm-linux.mk&lt;br /&gt;
*** -D__ARCH_ARM_4__ -D__ARCH_ARM_4T__&lt;br /&gt;
*** -march=armv4t -mcpu=arm920t&lt;br /&gt;
** fix various static references to 'armv5'&lt;br /&gt;
* Isolating ARMv5TE ISA dependent code&lt;br /&gt;
** e.g. grep -n -R -i &amp;quot;${armv5te_isa_pattern}&amp;quot; ~/android&lt;br /&gt;
* Abstracting&lt;br /&gt;
** ( C/C++ )&lt;br /&gt;
*** Use inlined functions / #ifdef statments to implement functions in a portable manner&lt;br /&gt;
*** For inlined assembler calls, it's acceptable for now to use generic C code instead, so long as later on we optimize it by hand.&lt;br /&gt;
** ( ASM )&lt;br /&gt;
*** Proprocessor statements based on ISA / architecture, e.g. #ifdef __ARCH_ARM_5__ ... #endif #ifdef __ARCH_ARM_4__ ... #endif&lt;br /&gt;
*** It's highly suggested that preprocessor statements should not be nested (i.e. make them mutually exclusive)&lt;br /&gt;
*** Some people have suggested that we should not do #ifdef's based on ARCH or ISA, but rather based on an AndroidConfig.h which would define macros like PLD(...) #ifdef HAVE_ARM_PLD pld #else ... #endif .&lt;br /&gt;
&lt;br /&gt;
For each ARMv5TE instruction, one could potentially&lt;br /&gt;
* Implement the instruction using general registers instead of DSP calls (i.e. eabi / softfloat)&lt;br /&gt;
* If that is a) nondeterministic, or b) slow, then sections of code need to be analyzed and hand-optimized for the ARMv4T isa&lt;br /&gt;
&lt;br /&gt;
== List of Unsupported Instructions ==&lt;br /&gt;
&lt;br /&gt;
This is a list of opcodes, extracted from the Android source, that are unsupported for ARMv4T compliant processors (specifically the arm920t). The opcodes represent instructions available for ARMv5, ARMv5T, and ARMv5TE architectures, which are not present in the ARMv4T ISA. The list was obtained by exhaustively editing the recompiling the Android source code until it compiled without error.&lt;br /&gt;
&lt;br /&gt;
Please keep in mind, that in some cases, translating these instructions into a sequence of ARMv4T instructions will be impossible and / or result in nondeterministic execution because of&lt;br /&gt;
* the requirement of additional context&lt;br /&gt;
* the tendencies of certain opcodes to change condition registers that may or may not be present in the arm920t core&lt;br /&gt;
&lt;br /&gt;
=== Opcodes ===&lt;br /&gt;
&lt;br /&gt;
{{scroll box|height=480px|text=&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Opcode&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Desription&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;[[http://www.arm.com/miscPDFs/14128.pdf PDF]] Page Number&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;C&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;ASM&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;BLX(1)&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Branch, Link, and Exchange&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;166&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;N/A (Unused in Android)&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;N/A (Unused in Android)&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;BLX(2)&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Branch, Link, and Exchange&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;168&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Remove from inline assembly with something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_BLX&lt;br /&gt;
... (inline asm) ...&lt;br /&gt;
#else&lt;br /&gt;
... (inline asm with equivalent blx code, as shown to the right) ...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Substitute with a macro reference such as&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_BLX&lt;br /&gt;
#define BLX(a) \&lt;br /&gt;
blx a&lt;br /&gt;
#else&lt;br /&gt;
#define BLX(a) \&lt;br /&gt;
mov pc,lr \&lt;br /&gt;
bx a&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;CLZ&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Count Leading Zeros&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;175&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Remove from inline assembly with something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_CLZ&lt;br /&gt;
... (inline asm) ...&lt;br /&gt;
#else&lt;br /&gt;
... (inline asm with equivalent clz code, as shown to the right) ...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081029&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_CLZ&lt;br /&gt;
#define CLZ(Rd,Rm) \&lt;br /&gt;
clz Rd,Rm&lt;br /&gt;
#else&lt;br /&gt;
#define CLZ(Rd,Rm) \&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
CLZ(Rd,Rm)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;LDRD&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Load Registers Doubleword&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;200&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Substitute different inline assembly code with something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_LDRD&lt;br /&gt;
... (inline asm) ...&lt;br /&gt;
#else&lt;br /&gt;
... (inline asm with ldrd substituted) ...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Substitute with a macro reference such as&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_LDRD&lt;br /&gt;
#define LDRD(a,b) \&lt;br /&gt;
ldrd a,b&lt;br /&gt;
#else&lt;br /&gt;
#define LDRD(a,b) \&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;PLD&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Preload Data&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;240&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Remove from inline assembly with something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_PLD&lt;br /&gt;
... (inline asm) ...&lt;br /&gt;
#else&lt;br /&gt;
... (inline asm with pld removed) ...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Remove or substitute with a macro reference such as&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_PLD&lt;br /&gt;
#define PLD(a,b) \&lt;br /&gt;
pld a,b&lt;br /&gt;
#else&lt;br /&gt;
#define PLD(a,b)&lt;br /&gt;
#endif&lt;br /&gt;
...&lt;br /&gt;
PLD(r0,#0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;SMLA&amp;amp;lt;x&amp;amp;gt;&amp;amp;lt;y&amp;amp;gt;&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Signed Multiply-Accumulate&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;291&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;SMLAL&amp;amp;lt;x&amp;amp;gt;&amp;amp;lt;y&amp;amp;gt;&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Signed Multiply Accumulate Long&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;298&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;SMLAW&amp;amp;lt;y&amp;amp;gt;&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Signed Multiply-Accumulate Word&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;302&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;SMUL&amp;amp;lt;x&amp;amp;gt;&amp;amp;lt;y&amp;amp;gt;&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Signed Multiply&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;316&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;SMULW&amp;amp;lt;y&amp;amp;gt;&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Signed Multiply Word&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;320&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;QADD&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Saturating Add&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;242&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;QDADD&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Saturating Double and Add&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;249&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;QDSUB&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Saturating Double and Subtract&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;251&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;QSUB&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Saturating Subtract&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;253&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH VALIGN=&amp;quot;TOP&amp;quot;&amp;gt;STRD&amp;lt;/TH&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;Store Registers Doubleword&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;349&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Substitute different inline assembly code with something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_STRD&lt;br /&gt;
... (inline asm) ...&lt;br /&gt;
#else&lt;br /&gt;
... (inline asm without strd) ...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;&lt;br /&gt;
[[User:Cfriedt]] 20081028&lt;br /&gt;
Substitute with a macro reference such as&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef HAVE_STRD&lt;br /&gt;
#define STRD(a,b) \&lt;br /&gt;
strd a,b&lt;br /&gt;
#else&lt;br /&gt;
#define STRD(a,b) \&lt;br /&gt;
...&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/TD&amp;gt;&lt;br /&gt;
&amp;lt;/TR&amp;gt;&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Scanning for Files That Use the ARMv5TE ISA ===&lt;br /&gt;
&lt;br /&gt;
Using the above list of opcodes, one can scan the Android source code for ARMv4T-incompatible instruction sequences.&lt;br /&gt;
&lt;br /&gt;
'''Code:'''&lt;br /&gt;
{{scroll box|height=240px|text=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# $1 is the android directory&lt;br /&gt;
&lt;br /&gt;
if [ $# -ne 1 ]; then&lt;br /&gt;
exit -1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
cd &amp;quot;${1}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
opcodes=&amp;quot;blx clz ldrd pld smlabb smlabt smlatt&lt;br /&gt;
smlal smlawb smlawt smulbb smulbt smultt smulwb&lt;br /&gt;
 smulwt qadd qdadd qdsub qsub strd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for op in ${opcodes}; do&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;* ${op} =====================================&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ ! -e .files.${op} ]; then&lt;br /&gt;
&lt;br /&gt;
files=&amp;quot;$(grep -R -i &amp;quot;${op} &amp;quot; * 2&amp;gt;/dev/null)&amp;quot;&lt;br /&gt;
files=&amp;quot;$(echo $files | grep -v &amp;quot;^Binary file&amp;quot; | sed -e 's/:.*//')&amp;quot;&lt;br /&gt;
files=&amp;quot;$(echo $files| grep -v &amp;quot;CREDIT\|README\|^\(kernel/\|.git/\)\|\(\.txt\)$&amp;quot; | sort -u)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;${files}&amp;quot; &amp;gt; .files.${op}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
files=&amp;quot;$(cat .files.${op})&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
for fil in ${files}; do&lt;br /&gt;
lines=&amp;quot;$(grep -n -i &amp;quot;${op} &amp;quot; ${fil} | sed -e 's/:.*//g' )&amp;quot;&lt;br /&gt;
lines=&amp;quot;$(echo $lines | sed -e 's/ /,/g')&amp;quot;&lt;br /&gt;
echo &amp;quot;** ${fil}: lines {${lines}}&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Source Files in Android that Use the ARMv5TE ISA ===&lt;br /&gt;
&lt;br /&gt;
The list of files below may or may not be complete. There might also be some assembly code that is generated with a python script (verification?).&lt;br /&gt;
&lt;br /&gt;
{{scroll box|height=150px|text=&lt;br /&gt;
* blx =====================================&lt;br /&gt;
** bionic/libc/tools/gensyscalls.py: lines {168,186}&lt;br /&gt;
** bootloader/legacy/nandwrite/init.S: lines {77}&lt;br /&gt;
** bootloader/legacy/usbloader/init.S: lines {95}&lt;br /&gt;
** dalvik/vm/arch/arm/CallEABI.S: lines {239}&lt;br /&gt;
** dalvik/vm/arch/arm/CallOldABI.S: lines {145}&lt;br /&gt;
** development/emulator/qtools/thumbdis.cpp: lines {187,265}&lt;br /&gt;
** external/qemu/target-arm/translate.c: lines {1151,1971,2444}&lt;br /&gt;
** external/qemu/trace.c: lines {774,1353,1358}&lt;br /&gt;
** system/core/libpixelflinger/codeflinger/disassem.c: lines {416}&lt;br /&gt;
* clz =====================================&lt;br /&gt;
** development/emulator/qtools/armdis.cpp: lines {654}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/pv_normalize.h: lines {67,84}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h: lines {137}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/normalize_amr_wb.h: lines {78,95}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/pvmp3_normalize.h: lines {67,84}&lt;br /&gt;
** external/opencore/codecs_v2/video/avc_h264/dec/src/vlc.cpp: lines {23}&lt;br /&gt;
** external/opencore/codecs_v2/video/m4v_h263/enc/src/vlc_encode_inline.h: lines {125,162,168,204,218}&lt;br /&gt;
** external/qemu/target-arm/translate.c: lines {1247}&lt;br /&gt;
** external/skia/libcorecg/Sk64.cpp: lines {340,341,343}&lt;br /&gt;
** external/skia/libcorecg/SkMatrix.cpp: lines {500,501}&lt;br /&gt;
** external/skia/libsgl/effects/SkColorMatrixFilter.cpp: lines {135}&lt;br /&gt;
** external/skia/libsgl/sgl/SkBitmap.cpp: lines {945,946,947}&lt;br /&gt;
** external/skia/libsgl/sgl/SkBitmapShader.cpp: lines {32,33,34}&lt;br /&gt;
** external/skia/libsgl/sgl/SkGraphics.cpp: lines {429,437}&lt;br /&gt;
* ldrd =====================================&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_AGET_WIDE.S: lines {28}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_IGET_WIDE.S: lines {37}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_IGET_WIDE_QUICK.S: lines {10}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_SGET_WIDE.S: lines {17}&lt;br /&gt;
** dalvik/vm/mterp/out/InterpAsm-armv5.S: lines {2653,7464,8318,8390}&lt;br /&gt;
** system/core/libpixelflinger/rotate90CW_4x4_16v6.S: lines {40,41,42,43}&lt;br /&gt;
* pld =====================================&lt;br /&gt;
** bionic/libc/arch-arm/bionic/memcmp.S: lines {37,44,45,56,57,107,108,195,196}&lt;br /&gt;
** bionic/libc/arch-arm/bionic/memcmp16.S: lines {37,44,45,67,68,116,117,198,199}&lt;br /&gt;
** bionic/libc/arch-arm/bionic/memcpy.S: lines {55,56,57,145,266,293,320}&lt;br /&gt;
** bionic/libc/arch-arm/bionic/strlen.c: lines {59,65}&lt;br /&gt;
** bionic/libc/kernel/arch-arm/asm/arch/irqs.h: lines {162}&lt;br /&gt;
** external/elfutils/src/Makefile: lines {243}&lt;br /&gt;
** external/elfutils/src/Makefile.am: lines {32}&lt;br /&gt;
** external/elfutils/src/Makefile.in: lines {243}&lt;br /&gt;
** external/jpeg/jidctfst.S: lines {69,235,247}&lt;br /&gt;
** external/qemu/target-arm/translate.c: lines {1149}&lt;br /&gt;
** system/core/libpixelflinger/codeflinger/ARMAssembler.cpp: lines {368}&lt;br /&gt;
** system/core/libpixelflinger/codeflinger/ARMAssemblerInterface.cpp: lines {104,108,117}&lt;br /&gt;
** system/core/libpixelflinger/t32cb16blend.S: lines {111,112,134,143}&lt;br /&gt;
* smlabb =====================================&lt;br /&gt;
** external/jpeg/jidctfst.S: lines {110,115,155,156}&lt;br /&gt;
** external/neven/Embedded/common/src/b_BasicEm/Math.c: lines {584,589}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {147,166}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {120,129}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {514,533}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {418,429}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {202}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {250}&lt;br /&gt;
** external/opencore/codecs_v2/video/m4v_h263/enc/src/dct_inline.h: lines {119,155,167,278,326,341}&lt;br /&gt;
** external/opencore/codecs_v2/video/m4v_h263/enc/src/fastquant_inline.h: lines {178,225,437,517}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {405,436}&lt;br /&gt;
* smlabt =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {184}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {138}&lt;br /&gt;
** external/opencore/codecs_v2/video/m4v_h263/enc/src/dct_inline.h: lines {131,143,294,310}&lt;br /&gt;
* smlatt =====================================&lt;br /&gt;
** external/neven/Embedded/common/src/b_BasicEm/Math.c: lines {585,590}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {157}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {441}&lt;br /&gt;
* smlal =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v4.h: lines {179,223,236,257,267}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v4_gcc.h: lines {264,341}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {178,188,198}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_dct_9.s: lines {84,90,96,101,109,114,116,118,121,132,138,150,163,165,167,174,176,178}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_dct_9_gcc.s: lines {73,79,86,90,98,103,105,107,110,121,127,139,152,154,156,163,165,167}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18.asm: lines {143,162,178,188,192,199,207,217,225,231,237,241,244}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18.s: lines {145,164,180,190,194,201,209,219,227,233,239,243,246}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_mdct_18_gcc.s: lines {143,162,178,188,192,199,207,217,225,231,237,241,244}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window.asm: lines {62,63,66,72,76,77,81,82,85,90,94,97,99,100,103,108,113,114,118,119,122,129,136,137,176,179,183,187,190,193}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window.s: lines {67,68,71,77,81,82,86,87,90,95,99,102,104,105,108,113,118,119,123,124,127,134,141,142,181,184,188,192,195,198}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/asm/pvmp3_polyphase_filter_window_gcc.s: lines {65,66,69,75,79,80,84,85,88,93,97,100,102,103,106,111,116,117,121,122,125,132,139,140,179,182,186,190,193,196}&lt;br /&gt;
** external/opencore/codecs_v2/audio/mp3/dec/src/pv_mp3dec_fxd_op_arm.h: lines {148}&lt;br /&gt;
** external/qemu/trace.c: lines {813}&lt;br /&gt;
** frameworks/base/opengl/libagl/iterators.S: lines {66,67}&lt;br /&gt;
** frameworks/base/opengl/libagl/matrix.h: lines {67,68,96,126,127,282,283,314,315,316}&lt;br /&gt;
* smlawb =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {203,259}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {166,416}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {93,109}&lt;br /&gt;
** frameworks/base/opengl/libagl/matrix.h: lines {163,203}&lt;br /&gt;
* smlawt =====================================&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {114}&lt;br /&gt;
** frameworks/base/opengl/libagl/matrix.h: lines {162,202,243,244}&lt;br /&gt;
* smulbb =====================================&lt;br /&gt;
** external/jpeg/jidctfst.S: lines {109,114,151,153}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {79}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {71,81}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {207,251,297,348,361,375,427,440,487}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {199,234,274,314,316,326,367,369,404}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mac.h: lines {121,137}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_msu.h: lines {123,142}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mult.h: lines {122,140}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32.h: lines {132,134,138,164,177,191}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h: lines {127,129,150,163}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mult.h: lines {121,141}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {115,139,151,163,189,190,212}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {112,113,164,183,201,218,265}&lt;br /&gt;
** external/opencore/codecs_v2/video/m4v_h263/enc/src/fastquant_inline.h: lines {250,457,531}&lt;br /&gt;
** external/skia/include/corecg/SkMath.h: lines {170}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {420,462}&lt;br /&gt;
** system/core/libpixelflinger/t32cb16blend.S: lines {39,66,74,82}&lt;br /&gt;
* smulbt =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {115}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {109}&lt;br /&gt;
** system/core/libpixelflinger/codeflinger/texturing.cpp: lines {1091}&lt;br /&gt;
** system/core/libpixelflinger/t32cb16blend.S: lines {47,55}&lt;br /&gt;
* smultt =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {131}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {100}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioMixer.cpp: lines {467}&lt;br /&gt;
** frameworks/base/libs/audioflinger/AudioResamplerSinc.cpp: lines {73}&lt;br /&gt;
* smulwb =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {221}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {373}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {222}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {283}&lt;br /&gt;
** external/opencore/codecs_v2/audio/sbc/enc/src/sbcenc_filter.h: lines {33}&lt;br /&gt;
** frameworks/base/opengl/libagl/matrix.h: lines {161,201,242}&lt;br /&gt;
* smulwt =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {202,240}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {385,415}&lt;br /&gt;
* qadd =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_gcc.h: lines {64}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/fxp_mul32_arm_v5.h: lines {60}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {130,256}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {128,235}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_add.h: lines {122,137}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mult.h: lines {123,145}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {71,102,152,176,192}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {91,115,148,202,234}&lt;br /&gt;
** external/openssl/crypto/bn/bn_prime.c: lines {454,455}&lt;br /&gt;
* qdadd =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/calc_sbr_synfilterbank.cpp: lines {116,162}&lt;br /&gt;
** external/opencore/codecs_v2/audio/aac/dec/src/trans4m_freq_2_time_fxp.cpp: lines {472,494}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {212,356,370,385,435,449}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {200,315,321,331,368,371}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_mac.h: lines {122,142}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32.h: lines {133,136,140,172,186,201}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h: lines {128,131,158,172}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {116}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {184}&lt;br /&gt;
* qdsub =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {302}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {275}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_msu.h: lines {124,147}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {140}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {165}&lt;br /&gt;
* qsub =====================================&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_gcc_v5.h: lines {167}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h: lines {162}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/l_sub.h: lines {121,138}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h: lines {88,127}&lt;br /&gt;
** external/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_gcc_armv5.h: lines {70,133}&lt;br /&gt;
* strd =====================================&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_APUT_WIDE.S: lines {31}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_IPUT_WIDE.S: lines {39}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_IPUT_WIDE_QUICK.S: lines {14}&lt;br /&gt;
** dalvik/vm/mterp/armv5/OP_SPUT_WIDE.S: lines {21}&lt;br /&gt;
** dalvik/vm/mterp/out/InterpAsm-armv5.S: lines {2834,7530,8331,8542}&lt;br /&gt;
** dalvik/vm/oo/Object.h: lines {589}&lt;br /&gt;
** external/opencore/fileformats/avi/parser/include/pv_avifile_streamlist.h: lines {179}&lt;br /&gt;
** external/opencore/fileformats/avi/parser/src/pv_avifile_streamlist.cpp: lines {153}&lt;br /&gt;
** system/core/libpixelflinger/rotate90CW_4x4_16v6.S: lines {47,52,56,60}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Discussion ===&lt;br /&gt;
=== Notes ===&lt;br /&gt;
The file &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
system/core/libpixelflinger/codeflinger/ARMAssembler.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will need special attention. It's responsible for dynamic generation of DSP code.&lt;br /&gt;
&lt;br /&gt;
== Suggestions ==&lt;br /&gt;
* [[User:Cfriedt]] 20081024 I'm not sure how feasible this is, given that the [http://wiki.openmoko.org/wiki/Neo_FreeRunner_Hardware_Issues#SMedia_3362_Documentation_.26_OpenGL_ES_Drivers SMedia 3362 is heavily NDA'd]. However, since the arm920t lacks a floating-point unit / DSP core, is it possible to use the SMedia chip for general-purpose math? This would help in the Android platform, at least, for things like audio and video codecs. Aside from an OpenGL ES driver, OpenMoko documentation for the SMedia would be highly appreciated.&lt;br /&gt;
&lt;br /&gt;
= Important Links =&lt;br /&gt;
(Please Update Me)&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
* [http://source.android.com/documentation Android Documentation]&lt;br /&gt;
* [http://www.arm.com/documentation/ ARM Documentation], (keywords: armv4t, armv5t, armv5te, arm920t, arm926ej-s)&lt;br /&gt;
* [http://www.arm.com/miscPDFs/9658.pdf ARM Assembly Language Programming]&lt;br /&gt;
* [http://www.cse.unsw.edu.au/~cs3221/labs/assembler-intro.pdf An Introduction to the GNU Assembler]&lt;br /&gt;
* [http://www.heyrick.co.uk/assembler/apcsintro.html ARM Procedure Call Standard], [http://en.wikipedia.org/wiki/Calling_convention#ARM ARM Calling Conventions]&lt;br /&gt;
&lt;br /&gt;
== Instruction Set References ==&lt;br /&gt;
* [http://www.arm.com/miscPDFs/14128.pdf ARM Architecture Reference Manual], The definitive ISA documentation&lt;br /&gt;
* [http://www.simplemachines.it/doc/QRC0001H_rvct_v2.1_arm.pdf ARM Instruction Set Quick Reference Card]&lt;br /&gt;
* [http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf ARM and Thumb -2 Instruction Set Quick Reference Card]&lt;br /&gt;
* [http://infocenter.arm.com/help/topic/com.arm.doc.dvi0025b/DVI0025.pdf ARMv4T] (See section 1.4.13)&lt;br /&gt;
* [http://infocenter.arm.com/help/topic/com.arm.doc.dvi0014a/DVI0014A_ARM10T_PO.pdf ARMv5T] (See section 4.16)&lt;br /&gt;
* [http://www.arm.com/pdfs/ARM-DSP.pdf ARM DSP Enhanced Instruction Set]&lt;br /&gt;
* [http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042c/IHI0042C_aapcs.pdf Procedure Call Standard for the ARM Architecture]&lt;br /&gt;
&lt;br /&gt;
== Hardware Reference ==&lt;br /&gt;
&lt;br /&gt;
* [[Neo1973 Hardware]]&lt;br /&gt;
* [[Neo FreeRunner GTA02 Hardware]]&lt;br /&gt;
&lt;br /&gt;
== Communities ==&lt;br /&gt;
* [http://source.android.com/discuss Android Public Mailing Lists]&lt;br /&gt;
** Specifically, [http://groups.google.com/group/android-porting android-porting]&lt;br /&gt;
* [http://lists.openmoko.org/mailman/listinfo OpenMoko Mailing Lists]&lt;br /&gt;
** Specifically, [http://lists.openmoko.org/mailman/listinfo/openmoko-kernel openmoko-kernel]&lt;br /&gt;
* [http://forum.koolu.org/viewforum.php?f=10 Android on FreeRunner] at KoolU.com&lt;br /&gt;
* [[Openmoko Local Groups]]&lt;br /&gt;
* [[Openmoko:Community_Portal]]&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [[Debug_Board]]&lt;br /&gt;
&lt;br /&gt;
= External Links =&lt;br /&gt;
&lt;br /&gt;
[[Category:Distributions]]&lt;/div&gt;</summary>
		<author><name>Cfriedt</name></author>	</entry>

	</feed>