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

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=SyntroLCam_for_streaming_video_from_Overos_and_Duoveros&amp;diff=6010</id>
		<title>SyntroLCam for streaming video from Overos and Duoveros</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=SyntroLCam_for_streaming_video_from_Overos_and_Duoveros&amp;diff=6010"/>
				<updated>2013-07-20T14:22:47Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Add some external links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SyntroLCam is an open-source [http://qt-project.org/ Qt] application from&lt;br /&gt;
[http://www.pansenti.com Pansenti] that can be used to &lt;br /&gt;
stream USB webcam video from a Gumstix to a network where it can be viewed &lt;br /&gt;
by multiple remote systems. &lt;br /&gt;
&lt;br /&gt;
With SyntroLCam the multiplexing of the video feed happens in the Syntro cloud so there &lt;br /&gt;
is no additional load on the Gumstix to support multiple viewers.&lt;br /&gt;
&lt;br /&gt;
Some [http://pansenti.wordpress.com/2013/06/08/gumstix-rpis-beagles-action/ screenshots]&lt;br /&gt;
of a running system with multiple Gumstix boards and multiple remote viewers.&lt;br /&gt;
&lt;br /&gt;
Here are the Github repositories for &lt;br /&gt;
[https://github.com/Syntro/SyntroCore SyntroCore],&lt;br /&gt;
[https://github.com/Syntro/SyntroLCam SyntroLCam] and &lt;br /&gt;
[https://github.com/Syntro/SyntroView SyntroView].&lt;br /&gt;
&lt;br /&gt;
The instructions for building Syntro applications on any Linux system &lt;br /&gt;
with Qt4 or Qt5 developer headers and libraries installed is the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	qmake &amp;amp;&amp;amp; make [-j&amp;lt;n&amp;gt;] &amp;amp;&amp;amp; [sudo] make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are some [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=85&amp;amp;Itemid=97 instructions] &lt;br /&gt;
for building a compatible O/S for Overos or Duoveros using the [http://www.yoctoproject.org Yocto Project]&lt;br /&gt;
build system. &lt;br /&gt;
&lt;br /&gt;
The pansenti-qte-image from this layer will run SyntroLCam on startup automatically.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/Pansenti/meta-pansenti meta-pansenti] layer has bitbake recipes &lt;br /&gt;
for [https://github.com/Pansenti/meta-pansenti/tree/master/recipes-pansenti/syntrocore syntrocore.bb]&lt;br /&gt;
and [https://github.com/Pansenti/meta-pansenti/tree/master/recipes-pansenti/syntrolcam syntrolcam.bb]&lt;br /&gt;
if you want to include them in another O/S image.&lt;br /&gt;
&lt;br /&gt;
[[Category:How to - webcams]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_webcams&amp;diff=6009</id>
		<title>Category:How to - webcams</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_webcams&amp;diff=6009"/>
				<updated>2013-07-18T14:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Remove page link now that it shows up under categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=SyntroLCam_for_streaming_video_from_Overos_and_Duoveros&amp;diff=6008</id>
		<title>SyntroLCam for streaming video from Overos and Duoveros</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=SyntroLCam_for_streaming_video_from_Overos_and_Duoveros&amp;diff=6008"/>
				<updated>2013-07-18T14:51:02Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: New page on SyntroLCam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SyntroLCam is a [http://qt-project.org/ Qt] application that can be used to &lt;br /&gt;
stream USB webcam video from a Gumstix to a network where it can be viewed &lt;br /&gt;
by multiple remote systems. &lt;br /&gt;
&lt;br /&gt;
With SyntroLCam the multiplexing of the video feed happens in the Syntro cloud so there &lt;br /&gt;
is no additional load on the Gumstix to support multiple viewers.&lt;br /&gt;
&lt;br /&gt;
Some [http://pansenti.wordpress.com/2013/06/08/gumstix-rpis-beagles-action/ screenshots]&lt;br /&gt;
of a running system with multiple Gumstix boards and multiple remote viewers.&lt;br /&gt;
&lt;br /&gt;
Here are the Github repositories for &lt;br /&gt;
[https://github.com/Syntro/SyntroCore SyntroCore],&lt;br /&gt;
[https://github.com/Syntro/SyntroLCam SyntroLCam] and &lt;br /&gt;
[https://github.com/Syntro/SyntroView SyntroView].&lt;br /&gt;
&lt;br /&gt;
The instructions for building Syntro applications on any Linux system &lt;br /&gt;
with Qt4 or Qt5 developer headers and libraries installed is the same: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	qmake &amp;amp;&amp;amp; make [-j&amp;lt;n&amp;gt;] &amp;amp;&amp;amp; [sudo] make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are some [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=85&amp;amp;Itemid=97 instructions] &lt;br /&gt;
for building a compatible O/S for Overos or Duoveros using the Yocto Project build system. &lt;br /&gt;
&lt;br /&gt;
The pansenti-qte-image from this layer will run SyntroLCam on startup automatically.&lt;br /&gt;
&lt;br /&gt;
The [https://github.com/Pansenti/meta-pansenti meta-pansenti] layer has bitbake recipes &lt;br /&gt;
for [https://github.com/Pansenti/meta-pansenti/tree/master/recipes-pansenti/syntrocore syntrocore.bb]&lt;br /&gt;
and [https://github.com/Pansenti/meta-pansenti/tree/master/recipes-pansenti/syntrolcam syntrolcam.bb]&lt;br /&gt;
if you want to include them in another O/S image.&lt;br /&gt;
&lt;br /&gt;
[[Category:How to - webcams]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_webcams&amp;diff=6007</id>
		<title>Category:How to - webcams</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_webcams&amp;diff=6007"/>
				<updated>2013-07-18T14:50:00Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Add link to new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[SyntroLCam for streaming video from Overos and Duoveros]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Installing_Ubuntu_10.04_on_Gumstix_Overo&amp;diff=5693</id>
		<title>Installing Ubuntu 10.04 on Gumstix Overo</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Installing_Ubuntu_10.04_on_Gumstix_Overo&amp;diff=5693"/>
				<updated>2011-10-13T23:40:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: build-essential without the 's'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ubuntu on Overo COM ==&lt;br /&gt;
Constructing an Ubuntu root file system for the Gumstix Overo COM is surprisingly easy with the rootstock utility.  Since Ubuntu (particularly a version including a graphical desktop) likes lots of RAM, Gumstix recommends using an Overo COM with at least 512MB RAM, such as the [http://www.gumstix.com/store/catalog/product_info.php?products_id=257 Overo Tide COM]. You can install Ubuntu on an Overo with 256MB RAM and the familiarity of Ubuntu for some users may outweigh occasional sluggishness.  These instructions were tested on an Ubuntu 10.04 desktop machine; they should work for any recent Debian-based flavour of Linux. These instructions also work for Ubuntu 11.04 Natty Narwhal with a few things to keep in mind.&lt;br /&gt;
&lt;br /&gt;
== Make a MicroSD card ==&lt;br /&gt;
The rootstock utility builds a root file system inside a virtual arm machine supplied by qemu.  First, install the required packages.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo apt-get install rootstock qemu&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;note:&amp;lt;/b&amp;gt; To create a rootFS image for Ubuntu 11.04 you need to make sure that the machine creating the image has qemu-arm-static version 14.x or better. Ubuntu 11.04 has this but 10.04 for instance does not and segfaults during rootFS image creation.&lt;br /&gt;
&lt;br /&gt;
Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options.  Note: this will take an hour or two.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo rootstock --serial ttyS2 -d lucid -f &amp;quot;gumstix&amp;quot; --seed lxde,gdm,openssh-server,x11vnc &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04). In the case of Ubuntu Natty (11.04) use &amp;quot;natty&amp;quot;.&lt;br /&gt;
* the '--seed' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh &amp;amp; VNC servers so we can connect remotely.&lt;br /&gt;
* the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information.&lt;br /&gt;
&lt;br /&gt;
To create a rootFS image for a headless server you can use the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo rootstock --serial ttyS2 -d lucid -f &amp;quot;gumstix&amp;quot; --seed build-essential,openssh-server &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel.&lt;br /&gt;
&lt;br /&gt;
Format a microSD card as per [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/109.html usual]; you should copy a [http://www.sakoman.com/feeds/omap3/glibc/images/overo/201009091145/ recent] MLO, u-boot, and uImage to the boot partition.  Extract the generated root file system to the second partition of the microSD card.&lt;br /&gt;
&lt;br /&gt;
Finally, the loadable modules in the file system should match the kernel.  For users that don't want to build a kernel, you can use this [http://dl.dropbox.com/u/211887/Ubuntu/uImage-2.6.34-r88-overo.bin 2.6.34 kernel] and the associated [http://dl.dropbox.com/u/211887/Ubuntu/modules-2.6.34-r88-overo.tgz modules] tarball; this is approximately the Gumstix Overo kernel from September 9th, 2010.  Extract the modules file into the second partition over top of the root file system. E.g. for a root partition mounted at /media/rootfs:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 sudo tar xaf modules-2.6.34-r88-overo.tgz -C /media/rootfs&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;note:&amp;lt;/b&amp;gt; For Ubuntu 11.04 the compatible kernel version should be 2.6.38. However, the current version of openembedded (&amp;quot;bitbake virtual/kernel&amp;quot;) at most yields a kernel version 2.6.36. The 2.6.36 was tested with the Ubuntu 11.04 rootFS image and seems to be working fine. Only some system messages about TWI2C, which should only concern you if you plan to use I2C on you Overo. Everything else seems to be working fine.&lt;br /&gt;
&lt;br /&gt;
== Configuring Ubuntu ==&lt;br /&gt;
The ''rootstock'' utility doesn't make passwords properly.  For now, it is easiest to remove the root password, boot your system to create new users and choose a new root password.  To do this, open the ''/etc/shadow'' file on the second partition and delete the '*' for the root entry. E.g.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo gedit /path/to/second/partition/etc/shadow&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Note: remember to put the ‘*’ back after you have created a user so someone can’t login as root and screw up your system&lt;br /&gt;
&lt;br /&gt;
For Overo expansion boards with an Ethernet interface, it is nice to have Ethernet working right off the bat without having to have Network Manager installed. Open the ''/etc/network/interfaces'' file on the second partition.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo gedit /path/to/second/partition/etc/network/interfaces&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Add the following code to the bottom:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet dhcp&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
You can now unmount the microSD card, place it in the Gumstix and boot to it.&lt;br /&gt;
&lt;br /&gt;
Login using serial console using these [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Getting-started/109.html instructions] or you can plug an Ethernet card in and jump in via ssh.&lt;br /&gt;
&lt;br /&gt;
Once you are logged in, you might make some other tweaks:&lt;br /&gt;
* login as root and then create a user for yourself and give yourself sudo&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo adduser youruser&lt;br /&gt;
 $ sudo adduser youruser sudo&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* edit /etc/shadow and add the ‘*’ back in that we removed earlier. E.g.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ nano /etc/shadow&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add some useful package repositories if they're not already present. Edit /etc/apt/sources.list and add these lines:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main&lt;br /&gt;
 $ deb http://ports.ubuntu.com/ubuntu-ports lucid-security main&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
* get up-to-date:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 $ sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Have fun!&lt;br /&gt;
&lt;br /&gt;
== Related Links ==&lt;br /&gt;
Here are some links I found useful when putting this post together:&lt;br /&gt;
* https://wiki.ubuntu.com/ARM/RootfsFromScratch&lt;br /&gt;
* http://labs.igep.es/index.php/How_to_get_the_Ubuntu_distribution&lt;br /&gt;
* https://wiki.ubuntu.com/ARM/RootfsFromScratch&lt;br /&gt;
* http://free-electrons.com/blog/ubuntu-1004-igepv2/&lt;br /&gt;
* http://omapzoom.org/wiki/Ubuntu_rootfs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4938</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4938"/>
				<updated>2011-01-20T15:53:40Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added some muxing notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
SPI pins for the OMAP3 are multi-functional and need to be multiplexed for SPI use. The SPI bus 1 MOSI, SIMO, CLK, CS0 and CS1 brought out on the Overo expansion boards are correctly setup for SPI use. This configuration is done in the bootloader U-Boot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need to use the SPI system on Linux.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps that need to happen.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# A protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the protocol driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver submits the SPI messages to the controller driver's I/O queue. These messages are then processed asynchronously by the controller driver in FIFO order. As each message finishes, the controller notifies the protocol driver via a callback function. &lt;br /&gt;
&lt;br /&gt;
There are some synchronous helper functions exposed by the interface to simplify the asynchronous behaviour of the Linux SPI system for protocol driver writers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device(s) you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is already built into the standard Overo kernels. &lt;br /&gt;
&lt;br /&gt;
Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
As you can see from the above patch, the standard Overo kernels already have devices registering for SPI bus 1 CS0 (ADS7846 touchscreen controller) and SPI bus 1 CS1 (LGPHILIPS LB035Q02 display driver). You will have to disable one or both of these drivers in your kernel config if you want to use those respective CS lines.&lt;br /&gt;
&lt;br /&gt;
If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
There are more detailed instructions for getting spidev working on an Overo at the 'Writing a Linux SPI driver' link below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Additional Links ===&lt;br /&gt;
&lt;br /&gt;
[http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver] - A series of articles using Gumstix Overo in the examples&lt;br /&gt;
&lt;br /&gt;
[http://elinux.org/BeagleBoard/SPI BeagleBoard/SPI] - Beagleboard SPI section on eLinux.org&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus Serial Peripheral Interface Bus] - Wikipedia SPI article&lt;br /&gt;
&lt;br /&gt;
[http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4937</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4937"/>
				<updated>2011-01-20T15:39:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Minor wording changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need to use the SPI system on Linux.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps that need to happen.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# A protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the protocol driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue. These messages are then processed asynchronously by the controller driver in FIFO order. As each message finishes, the controller notifies the protocol driver via a callback function. &lt;br /&gt;
&lt;br /&gt;
There are some synchronous helper functions exposed by the interface to simplify the asynchronous behaviour of the Linux SPI system for protocol driver writers.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device(s) you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is already built into the standard Overo kernels. &lt;br /&gt;
&lt;br /&gt;
Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
As you can see from the above patch, the standard Overo kernels already have devices registering for SPI bus 1 CS0 (ADS7846 touchscreen controller) and SPI bus 1 CS1 (LGPHILIPS LB035Q02 display driver). You will have to disable one or both of these drivers in your kernel config if you want to use those respective CS lines.&lt;br /&gt;
&lt;br /&gt;
If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
There are more detailed instructions for getting spidev working on an Overo at the 'Writing a Linux SPI driver' link below.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Custom Driver ===&lt;br /&gt;
&lt;br /&gt;
Here is an article that can get you started writing your own custom SPI driver for Linux using Gumstix Overos as the example board - [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4936</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4936"/>
				<updated>2011-01-20T13:46:45Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: More details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need to use the SPI system on Linux.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps that need to happen.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# A protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the protocol driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue. These messages are then processed asynchronously by the controller driver in FIFO order. As each message finishes, the controller notifies the protocol driver via a callback function. &lt;br /&gt;
&lt;br /&gt;
There are some synchronous helper functions exposed by the interface to simplify the asynchronous behaviour of the Linux SPI system for protocol driver writers.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is built in to the standard Overo kernels. &lt;br /&gt;
&lt;br /&gt;
Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
As you can see from the above patch, the standard Overo kernels already have devices registering for SPI bus 1 CS0 (ADS7846 touchscreen controller) and SPI bus 1 CS1 (LGPHILIPS LB035Q02 display driver). You will have to disable one or both of these drivers in your kernel config if you want to use that respective CS line.&lt;br /&gt;
&lt;br /&gt;
If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
There are more detailed instructions for getting spidev working on an Overo on the 'Writing a Linux SPI driver' link below.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Custom Driver ===&lt;br /&gt;
&lt;br /&gt;
Here is an article that can get you started writing your own custom SPI driver for Linux using Gumstix Overos as the example board - [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4935</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4935"/>
				<updated>2011-01-20T13:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Remove old board patch link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need to use the SPI system on Linux.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps that need to happen.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# A protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the protocol driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue. These messages are then processed asynchronously by the controller driver in FIFO order. As each message finishes, the controller notifies the protocol driver via a callback function. &lt;br /&gt;
&lt;br /&gt;
There are some synchronous helper functions exposed by the interface to simplify the asynchronous behaviour of the Linux SPI system for protocol driver writers.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is built in to the standard Overo kernels. If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
As you can see from the above patch, the standard Overo kernels already have devices registering for SPI bus 1 CS0 (ADS7846 touchscreen controller) and SPI bus 1 CS1 (LGPHILIPS LB035Q02 display driver). You will have to disable one or both of these drivers in your kernel config if you want to use that respective CS line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Custom Driver ===&lt;br /&gt;
&lt;br /&gt;
Here is an article that can get you started writing your own custom SPI driver for Linux using Gumstix Overos as the example board - [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4934</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4934"/>
				<updated>2011-01-20T13:29:02Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Better wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need to use the SPI system on Linux.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps that need to happen.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# A protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the protocol driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue. These messages are then processed asynchronously by the controller driver in FIFO order. As each message finishes, the controller notifies the protocol driver via a callback function. &lt;br /&gt;
&lt;br /&gt;
There are some synchronous helper functions exposed by the interface to simplify the asynchronous behaviour of the Linux SPI system for protocol driver writers.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland via sysfs.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is built in to the standard Overo kernels. If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
As you can see from the patch, the standard Overo kernels already occupy the SPI bus 1 chip select lines 0 and 1 if either the ADS7846 touchscreen controller (CS0) or the LGPHILIPS LB035Q02 display driver (CS1) are enabled. You will have to disable these drivers in your kernel config if you want to connect your device to either of these lines. Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
Here's one Gumstix [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 mailing list thread] posted on 7/21/09, where some users have successfully used spidev with the Overos.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Custom Driver ===&lt;br /&gt;
&lt;br /&gt;
Here is an article that can get you started writing your own custom SPI driver for Linux using Gumstix Overos as the example board - [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4933</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4933"/>
				<updated>2011-01-20T12:11:16Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Clean up SPI description and add link for writing a driver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework can be found in the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX and is already built into standard Gumstix Overo kernels.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration.&lt;br /&gt;
&lt;br /&gt;
Gumstix brings out SPI bus 1 chip select pins 0 and 1 on most of the Overo expansion boards.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
&lt;br /&gt;
A protocol driver is what you need if you want to use the SPI system.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps every SPI protocol driver needs to follow.&lt;br /&gt;
&lt;br /&gt;
# Slave devices must be registered for each SPI bus and chip select position used.&lt;br /&gt;
# The SPI protocol driver needs to be registered with the system using the same name as the devices it will be handling so the kernel can link the two. &lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order these steps are performed. Most existing SPI drivers do the device registration completely outside the driver code in a board file. If you are writing your own driver, it is probably more convenient to do it in the driver code itself. When both device and driver registration are completed, the probe() function for the driver will be called and SPI communications can start.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue with calls to spi_async(). These messages are processed in FIFO order asynchronously by the controller driver. As each message finishes, the controller notifies the protocol driver via 'completion' callbacks. The protocol driver can then process the raw data as necessary.&lt;br /&gt;
&lt;br /&gt;
There are some simple synchronous functions exposed by the spi.h/spi.c interface to simplify the asynchronous behaviour of the Linux SPI system for protocol drivers.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a standard Linux module that implements a generic SPI protocol driver while exposing a char device interface to userland via sysfs.&lt;br /&gt;
&lt;br /&gt;
The documentation for spidev can be found here - [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
The spidev driver does not register devices so a board file patch like this one [https://github.com/scottellis/spike/blob/0d633a22da47022073abd9224ec8709c5b9db932/patches/spidev-enable.patch spidev-enable.patch] is required to use spidev with the Overos. You should customize that patch for the particular device you are using. Things you might want to change are the bus speed and the mode.&lt;br /&gt;
&lt;br /&gt;
The spidev driver is built in to the standard Overo kernels. If you are using OE, apply the board patch by copying it to the org.openembedded.dev/recipes/linux/linux-omap3-2.6.xx/ directory and then adding a line to include the patch in your kernel recipe org.openembedded.dev/recipes/linux/linux-omap3_2.6.xx.bb&lt;br /&gt;
&lt;br /&gt;
As you can see from the patch, the standard Overo kernels already occupy the SPI bus 1 chip select lines 0 and 1 if either the ADS7846 touchscreen controller (CS0) or the LGPHILIPS LB035Q02 display driver (CS1) are enabled. You will have to disable these drivers in your kernel config if you want to connect your device to either of these lines. Only one protocol driver at a time can manage a particular CS line on a given SPI bus.&lt;br /&gt;
&lt;br /&gt;
Here's one Gumstix [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 mailing list thread] posted on 7/21/09, where some users have successfully used spidev with the Overos.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Custom Driver ===&lt;br /&gt;
&lt;br /&gt;
Here is an article that can get you started writing your own custom SPI driver for Linux using Gumstix Overos as the example board - [http://www.jumpnowtek.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=57:gumstix-spi-driver-part1&amp;amp;catid=35:gumstix&amp;amp;Itemid=62 Writing a Linux SPI driver]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4597</id>
		<title>Kernel Reconfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4597"/>
				<updated>2010-08-30T09:21:14Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Removed redundant cd command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:How_to_-_linux]]&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
There are several possible work flows for modifying the kernel:&lt;br /&gt;
[[http://blogs.elphel.com/2009/12/openembeddedangstrom-kernel-workflow/ Using bitbake]]&lt;br /&gt;
[[http://bec-systems.com/site/521/best-practices-for-kernel-development-with-openembedded Using kernel tools]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overo==&lt;br /&gt;
&lt;br /&gt;
These instructions assume you are using the default gumstix-oe kernel which is declared here&lt;br /&gt;
  &lt;br /&gt;
 $ cd $OVEROTOP&lt;br /&gt;
 $ grep linux org.openembedded/conf/machine/overo.conf&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And the current revision as defined here&lt;br /&gt;
&lt;br /&gt;
 $ bitbake --show-versions | grep linux-omap3&lt;br /&gt;
 linux-omap3                            0:2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
So the rest of the example will assume linux-omap3-2.6.32 revision 51. This is the kernel that will be built when we use the reference 'virtual/kernel' in bitbake commands.&lt;br /&gt;
&lt;br /&gt;
Substitute the kernel version and revision your system is using in the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First build the kernel normally with bitbake. If you have built an image, then it's already done. &lt;br /&gt;
&lt;br /&gt;
If not run this command&lt;br /&gt;
&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
&lt;br /&gt;
This will create a source directory in the ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi directory.&lt;br /&gt;
In this case it will be &lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
To modify the kernel configuration, run menuconfig via bitbake. Make your changes and save the configuration.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -c menuconfig virtual/linux&lt;br /&gt;
&lt;br /&gt;
The new kernel configuration file you created can be found here.&lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/git/.config&lt;br /&gt;
&lt;br /&gt;
Copy that file to where the bitbake recipe for the kernel will use it.&lt;br /&gt;
&lt;br /&gt;
 $ cp ${OVEROTOP}/tmp/work/overo-angstrom-linux/gnueabi/linux-omap3-2.6.32-r51/git/.config \&lt;br /&gt;
    ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/defconfig&lt;br /&gt;
&lt;br /&gt;
Then rebuild the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -c clean virtual/kernel&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
&lt;br /&gt;
Then rebuild the rootfs to get the modules installed correctly. &lt;br /&gt;
&lt;br /&gt;
Substitute the image you are using, the example if you are using the omap3-console-image.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Finally, install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;br /&gt;
&lt;br /&gt;
==Verdex==&lt;br /&gt;
&lt;br /&gt;
To reconfigure the kernel with the current state of Gumstix's OE things, you will need ''gnome-terminal''. Run this command: '''bitbake gumstix-kernel -c menuconfig'''&lt;br /&gt;
&lt;br /&gt;
NOTE: You have to have ncurses and ncurses-dev installed in order for the MENUCONFIG to actually work.&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: If a screen flashes infront of you and dissapears edit $OE_HOME/org.openembedded.snapshot/conf/bitbake.conf to the following &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: If you don't have gnome-terminal installed and wish to use xterm instead, use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMD = 'gnome-terminal --disable-factory -t &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMD = 'xterm -title &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -e ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel config information is kept in&amp;lt;br&amp;gt; &lt;br /&gt;
''$OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.XX/gumstix-custom-YYYYY/defconfig''&amp;lt;br&amp;gt;&lt;br /&gt;
where XX is the current default kernel version for your bitbake environment.  That nugget is set in the&lt;br /&gt;
''$OE_HOME/com.gumstix.collection/conf/machine/include/gumstix.inc'' file, under the PREFERRED_VERSION_gumstix-kernel&lt;br /&gt;
and YYYYY is usually one of connex/basix/verdex.  That nugget comes from&amp;lt;br&amp;gt;&lt;br /&gt;
''$OE_HOME/build/conf/auto.conf''&lt;br /&gt;
&lt;br /&gt;
After running menuconfig, running &amp;quot;bitbake -c rebuild gumstix-kernel&amp;quot; will blow away the customizations just made.  There is probably a better way to do this, but in order to preserve the customizations, you can copy the new config file and replace the default config.  For example, to preserve a verdex board's config, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cp \&lt;br /&gt;
 $OE_HOME/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/.config \&lt;br /&gt;
 $OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have replaced the default config, the following commands will rebuild and repackage the new kernel and create new images for you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake -c rebuild gumstix-kernel&lt;br /&gt;
bitbake -c rebuild task-base-gumstix&lt;br /&gt;
bitbake gumstix-basic-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other notes==&lt;br /&gt;
Totally lost inside of menuconfig?  Press '/' to search for appropriate options.&lt;br /&gt;
&lt;br /&gt;
Want to know more about the kernel?  I found the 'Linux Kernel in a Nutshell' book (not to be confused with the 'Linux in a Nutshell' book) quite helpful.  The book is freely available online here (http://www.kroah.com/lkn/); Chapter 4 (Configuring and Building) and Chapter 6 (Upgrading a Kernel) as well as the first bit of Chapter 7 (Customizing a Kernel) and the last bit of Chapter 8 (Kernel Configuration: Kernel Debugging) have useful notes about kernel configuration.&lt;br /&gt;
&lt;br /&gt;
Your kernel is now larger than the 1MB originally specified so do_sizecheck() fails?&lt;br /&gt;
You'll probably want to edit the ~/verdex-oe/org.openembedded.dev/conf/machine/include and change the maximum image size to, say, 2MB, i.e. KERNEL_IMAGE_MAXSIZE = &amp;quot;2097153&amp;quot;.  Actually, you should really do this in the user.collections directory to keep the original source tree clean.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4596</id>
		<title>Kernel Reconfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4596"/>
				<updated>2010-08-30T09:18:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Use virtual/kernel in bitbake commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:How_to_-_linux]]&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
There are several possible work flows for modifying the kernel:&lt;br /&gt;
[[http://blogs.elphel.com/2009/12/openembeddedangstrom-kernel-workflow/ Using bitbake]]&lt;br /&gt;
[[http://bec-systems.com/site/521/best-practices-for-kernel-development-with-openembedded Using kernel tools]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overo==&lt;br /&gt;
&lt;br /&gt;
These instructions assume you are using the default gumstix-oe kernel which is declared here&lt;br /&gt;
  &lt;br /&gt;
 $ cd $OVEROTOP&lt;br /&gt;
 $ grep linux org.openembedded/conf/machine/overo.conf&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And the current revision as defined here&lt;br /&gt;
&lt;br /&gt;
 $ bitbake --show-versions | grep linux-omap3&lt;br /&gt;
 linux-omap3                            0:2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
So the rest of the example will assume linux-omap3-2.6.32 revision 51. This is the kernel that will be built when we use the reference 'virtual/kernel' in bitbake commands.&lt;br /&gt;
&lt;br /&gt;
Substitute the kernel version and revision your system is using in the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First build the kernel normally with bitbake. If you have built an image, then it's already done. &lt;br /&gt;
&lt;br /&gt;
If not run this command&lt;br /&gt;
&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
&lt;br /&gt;
This will create a source directory in the ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi directory.&lt;br /&gt;
In this case it will be &lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
To modify the kernel configuration, run menuconfig via bitbake. Make your changes and save the configuration.&lt;br /&gt;
&lt;br /&gt;
 $ cd $OVEROTOP&lt;br /&gt;
 $ bitbake -c menuconfig virtual/linux&lt;br /&gt;
&lt;br /&gt;
The new kernel configuration file you created can be found here.&lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/git/.config&lt;br /&gt;
&lt;br /&gt;
Copy that file to where the bitbake recipe for the kernel will use it.&lt;br /&gt;
&lt;br /&gt;
 $ cp ${OVEROTOP}/tmp/work/overo-angstrom-linux/gnueabi/linux-omap3-2.6.32-r51/git/.config \&lt;br /&gt;
    ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/defconfig&lt;br /&gt;
&lt;br /&gt;
Then rebuild the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -c clean virtual/kernel&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
&lt;br /&gt;
Then rebuild the rootfs to get the modules installed correctly. &lt;br /&gt;
&lt;br /&gt;
Substitute the image you are using, the example assumes the omap3-console-image.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Finally, install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;br /&gt;
&lt;br /&gt;
==Verdex==&lt;br /&gt;
&lt;br /&gt;
To reconfigure the kernel with the current state of Gumstix's OE things, you will need ''gnome-terminal''. Run this command: '''bitbake gumstix-kernel -c menuconfig'''&lt;br /&gt;
&lt;br /&gt;
NOTE: You have to have ncurses and ncurses-dev installed in order for the MENUCONFIG to actually work.&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: If a screen flashes infront of you and dissapears edit $OE_HOME/org.openembedded.snapshot/conf/bitbake.conf to the following &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: If you don't have gnome-terminal installed and wish to use xterm instead, use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMD = 'gnome-terminal --disable-factory -t &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMD = 'xterm -title &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -e ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel config information is kept in&amp;lt;br&amp;gt; &lt;br /&gt;
''$OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.XX/gumstix-custom-YYYYY/defconfig''&amp;lt;br&amp;gt;&lt;br /&gt;
where XX is the current default kernel version for your bitbake environment.  That nugget is set in the&lt;br /&gt;
''$OE_HOME/com.gumstix.collection/conf/machine/include/gumstix.inc'' file, under the PREFERRED_VERSION_gumstix-kernel&lt;br /&gt;
and YYYYY is usually one of connex/basix/verdex.  That nugget comes from&amp;lt;br&amp;gt;&lt;br /&gt;
''$OE_HOME/build/conf/auto.conf''&lt;br /&gt;
&lt;br /&gt;
After running menuconfig, running &amp;quot;bitbake -c rebuild gumstix-kernel&amp;quot; will blow away the customizations just made.  There is probably a better way to do this, but in order to preserve the customizations, you can copy the new config file and replace the default config.  For example, to preserve a verdex board's config, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cp \&lt;br /&gt;
 $OE_HOME/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/.config \&lt;br /&gt;
 $OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have replaced the default config, the following commands will rebuild and repackage the new kernel and create new images for you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake -c rebuild gumstix-kernel&lt;br /&gt;
bitbake -c rebuild task-base-gumstix&lt;br /&gt;
bitbake gumstix-basic-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other notes==&lt;br /&gt;
Totally lost inside of menuconfig?  Press '/' to search for appropriate options.&lt;br /&gt;
&lt;br /&gt;
Want to know more about the kernel?  I found the 'Linux Kernel in a Nutshell' book (not to be confused with the 'Linux in a Nutshell' book) quite helpful.  The book is freely available online here (http://www.kroah.com/lkn/); Chapter 4 (Configuring and Building) and Chapter 6 (Upgrading a Kernel) as well as the first bit of Chapter 7 (Customizing a Kernel) and the last bit of Chapter 8 (Kernel Configuration: Kernel Debugging) have useful notes about kernel configuration.&lt;br /&gt;
&lt;br /&gt;
Your kernel is now larger than the 1MB originally specified so do_sizecheck() fails?&lt;br /&gt;
You'll probably want to edit the ~/verdex-oe/org.openembedded.dev/conf/machine/include and change the maximum image size to, say, 2MB, i.e. KERNEL_IMAGE_MAXSIZE = &amp;quot;2097153&amp;quot;.  Actually, you should really do this in the user.collections directory to keep the original source tree clean.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4593</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4593"/>
				<updated>2010-08-25T23:00:41Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: A little clarity on the -s switch.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: if you have issues with USB not resuming properly after a suspend on Overo, please see [http://old.nabble.com/Update-on-Overo-EHCI-issues-td27617583.html#a27617583 this] forum post.&lt;br /&gt;
==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or greater.&lt;br /&gt;
&lt;br /&gt;
The gumstix recipes for these kernels have a variable that allows you to specify how the OTG usb port is configured.&lt;br /&gt;
&lt;br /&gt;
Gumstix Overos use the linux-omap3 kernels by default. You can check which kernel version you'll be working with this way:&lt;br /&gt;
&lt;br /&gt;
 $ cd ${OVEROTOP}&lt;br /&gt;
 $ bitbake --show-versions | grep linux-omap3&lt;br /&gt;
 linux-omap3                            0:2.6.34-r81 &lt;br /&gt;
&lt;br /&gt;
So the recipe file in this case would be ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.34.bb. &lt;br /&gt;
&lt;br /&gt;
You'll see a line in there&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are three valid values for MUSB_MODE: &amp;quot;host&amp;quot;, &amp;quot;peripheral&amp;quot; or &amp;quot;otg&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You could change the MUSB_MODE assignment directly in the recipe, but a better way to do this is to modify your local.conf file and add a MUSB_MODE variable.&lt;br /&gt;
&lt;br /&gt;
The ?= assignment means &amp;quot;host&amp;quot; will be assigned to MUSB_MODE only if it does not already have a value which it will if you give it one in local.conf.&lt;br /&gt;
&lt;br /&gt;
The local.conf file is found here ${OVEROTOP}/build/conf/local.conf.&lt;br /&gt;
&lt;br /&gt;
Add the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;peripheral&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;otg&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
depending on your preference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 $ cd ${OVEROTOP}&lt;br /&gt;
 $ bitbake -c clean linux-omap3&lt;br /&gt;
 $ bitbake linux-omap3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs since the drivers available in /lib/modules will have changed.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
 &lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4580</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4580"/>
				<updated>2010-08-14T14:08:00Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Fixed some whitespace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but NOT USING the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
For an alternative method USING the bitbake/recipe framework, a series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
After you have built an image, the cross-tools will be installed on your workstation.&lt;br /&gt;
&lt;br /&gt;
You can now create a standard makefile for your project pointing to this cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 # There were some OE toolchain path changes recently&lt;br /&gt;
    &lt;br /&gt;
 # OE prior to around 30July2010 &lt;br /&gt;
 # TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 # STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
    &lt;br /&gt;
 # OE after 30July2010&lt;br /&gt;
 TOOLDIR = ${OETMP}/sysroots/`uname -m`-linux/usr/armv7a/bin&lt;br /&gt;
 STAGEDIR = ${OETMP}/sysroots/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
After building with make, copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
Here are some alternatives.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;br /&gt;
&lt;br /&gt;
==Only the Tools==&lt;br /&gt;
&lt;br /&gt;
You don't need to build a complete image to get the cross-tools.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
You can use OE to selectively build additional cross-compiled libraries as needed. Look around in the OE recipes folder.&lt;br /&gt;
&lt;br /&gt;
If you build a complete image, then most of the cross-build tools and libraries will get installed as as side-effect. That is probably the easiest way to setup your workstation the first time.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4579</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4579"/>
				<updated>2010-08-14T14:01:13Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Update for latest OE toolchain changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but NOT USING the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
For an alternative method USING the bitbake/recipe framework, a series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
After you have built an image, the cross-tools will be installed on your workstation.&lt;br /&gt;
&lt;br /&gt;
You can now create a standard makefile for your project pointing to this cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 # OE prior to around 30July2010 &lt;br /&gt;
 # TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 # STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
&lt;br /&gt;
 # OE after 30July2010, the multi-machine safe toolchain patches&lt;br /&gt;
 TOOLDIR = ${OETMP}/sysroots/`uname -m`-linux/usr/armv7a/bin&lt;br /&gt;
 STAGEDIR = ${OETMP}/sysroots/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
After building with make, copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
Here are some alternatives.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;br /&gt;
&lt;br /&gt;
==Only the Tools==&lt;br /&gt;
&lt;br /&gt;
You don't need to build a complete image to get the cross-tools.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
You can use OE to selectively build additional cross-compiled libraries as needed. Look around in the OE recipes folder.&lt;br /&gt;
&lt;br /&gt;
If you build a complete image, then most of the cross-build tools and libraries will get installed as as side-effect. That is probably the easiest way to setup your workstation the first time.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4578</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4578"/>
				<updated>2010-08-12T20:52:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Remove the Further Information section since the link dest has no content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly different ways to do the same thing so a very similar serial communications method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
== I2C with Gumstix Overo ==&lt;br /&gt;
&lt;br /&gt;
There are several i2c buses available on the overo board.&lt;br /&gt;
&lt;br /&gt;
The bus accessible from most of the 40 pin expansion board headers is i2c-3.&lt;br /&gt;
&lt;br /&gt;
Refer to the board [http://pubs.gumstix.com/boards/ schematics] to find whether the board you are using exposes the i2c lines.&lt;br /&gt;
&lt;br /&gt;
You are looking for GPIO184_SCL3 and GPIO185_SDA3.&lt;br /&gt;
&lt;br /&gt;
For many of the boards, pin 23 is SCL and pin 24 is SDA. &lt;br /&gt;
&lt;br /&gt;
The voltage levels are 1.8v, so a voltage level shifter is required to connect to 3.3 or 5 volt slave devices. &lt;br /&gt;
A good explanation can be found [http://www.nxp.com/documents/application_note/AN10441.pdf here.]&lt;br /&gt;
&lt;br /&gt;
The overo main board already has pullup resistors for SCL and SDA.&lt;br /&gt;
&lt;br /&gt;
The default gumstix kernels set the i2c-3 bus speed to 400 kHz. &lt;br /&gt;
&lt;br /&gt;
This can be changed to 100 kHz with a kernel command line parameter in u-boot.&lt;br /&gt;
&lt;br /&gt;
 i2c_bus=3,100&lt;br /&gt;
&lt;br /&gt;
The i2c-3 bus appears as a character device under /dev&lt;br /&gt;
&lt;br /&gt;
 root@overo:/dev# ls -all i2c*&lt;br /&gt;
 crw-rw---- 1 root root 89, 1 Jan  1  2000 i2c-1&lt;br /&gt;
 crw-rw---- 1 root root 89, 3 Jan  1  2000 i2c-3&lt;br /&gt;
&lt;br /&gt;
Programmers can access devices on the bus using standard unix file i/o.&lt;br /&gt;
&lt;br /&gt;
You must set the slave address with an ioctl() call prior to communicating with a slave device. &lt;br /&gt;
&lt;br /&gt;
The driver takes care of shifting the slave address one bit and appending the R/W bit in the first byte of the transfer. &lt;br /&gt;
&lt;br /&gt;
Here's a C example minus any error checking.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 #include &amp;lt;stdint.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/i2c-dev.h&amp;gt; /* for I2C_SLAVE */&lt;br /&gt;
   ...&lt;br /&gt;
 &lt;br /&gt;
 int fh;&lt;br /&gt;
 uint8_t data[4];&lt;br /&gt;
 &lt;br /&gt;
 fh = open(&amp;quot;/dev/i2c-3&amp;quot;, O_RDWR);&lt;br /&gt;
 &lt;br /&gt;
 /* tell the driver we want the device with address 0x20 on the I2C bus */&lt;br /&gt;
 ioctl(fh, I2C_SLAVE, 0x20);&lt;br /&gt;
 &lt;br /&gt;
 /* write two bytes */&lt;br /&gt;
 data[0] = 0x05;&lt;br /&gt;
 data[1] = 0x08;&lt;br /&gt;
 write(fh, data, 2);&lt;br /&gt;
 &lt;br /&gt;
 /* read 4 bytes */&lt;br /&gt;
 read(fh, data, 4);&lt;br /&gt;
 &lt;br /&gt;
 close(fh);&lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
Here is a small project showing how to write Overo I2C userland code to communicate with an I/O expander as the slave device. It includes a schematic for the voltage level conversion of the I2C lines that's required.&lt;br /&gt;
&lt;br /&gt;
[http://github.com/scottellis/overo-mcp23017 overo-mcp23017]&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4285</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4285"/>
				<updated>2010-07-24T13:34:37Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Simplified, remove kernel version numbers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: if you have issues with USB not resuming properly after a suspend on Overo, please see [http://old.nabble.com/Update-on-Overo-EHCI-issues-td27617583.html#a27617583 this] forum post.&lt;br /&gt;
==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or greater.&lt;br /&gt;
&lt;br /&gt;
The gumstix recipes for these kernels has a variable that allows you to specify how the OTG usb port is configured.&lt;br /&gt;
&lt;br /&gt;
You can check which kernel you'll be working with like this.&lt;br /&gt;
&lt;br /&gt;
 $ cd ${OVEROTOP}&lt;br /&gt;
 $ bitbake -s | grep linux-omap3&lt;br /&gt;
 linux-omap3                            0:2.6.34-r81 &lt;br /&gt;
&lt;br /&gt;
So the recipe file in this case would be ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.34.bb. &lt;br /&gt;
&lt;br /&gt;
You'll see a line in there&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are three valid values for MUSB_MODE: &amp;quot;host&amp;quot;, &amp;quot;peripheral&amp;quot; or &amp;quot;otg&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You could change the MUSB_MODE assignment directly in the recipe, but a better way to do this is to modify your local.conf file and add a MUSB_MODE variable.&lt;br /&gt;
&lt;br /&gt;
The ?= assignment means &amp;quot;host&amp;quot; will be assigned to MUSB_MODE only if it does not already have a value which it will if you give it one in local.conf.&lt;br /&gt;
&lt;br /&gt;
The local.conf file is found here ${OVEROTOP}/build/conf/local.conf.&lt;br /&gt;
&lt;br /&gt;
Add the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;peripheral&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;otg&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
depending on your preference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 $ cd ${OVEROTOP}&lt;br /&gt;
 $ bitbake -c clean linux-omap3&lt;br /&gt;
 $ bitbake linux-omap3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs since the drivers available in /lib/modules will have changed.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
 &lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4267</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4267"/>
				<updated>2010-07-21T12:32:42Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: linux-libc-headers already gets built with gcc-cross. Bad example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but NOT USING the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
For an alternative method USING the bitbake/recipe framework, a series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
After you have built an image, the cross-tools will be installed on your workstation.&lt;br /&gt;
&lt;br /&gt;
You can now create a standard makefile for your project pointing to this cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 &lt;br /&gt;
 STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
After building with make, copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
Here are some alternatives.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;br /&gt;
&lt;br /&gt;
==Only the Tools==&lt;br /&gt;
&lt;br /&gt;
You don't need to build a complete image to get the cross-tools.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
You can use OE to selectively build additional cross-compiled libraries as needed. Look around in the OE recipes folder.&lt;br /&gt;
&lt;br /&gt;
If you build a complete image, then most of the cross-build tools and libraries will get installed as as side-effect. That is probably the easiest way to setup your workstation the first time.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

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

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4203</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4203"/>
				<updated>2010-06-14T09:45:08Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but NOT USING the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
For an alternative method USING the bitbake/recipe framework, a series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
After you have built an image, the cross-tools will be installed on your workstation.&lt;br /&gt;
&lt;br /&gt;
You can now create a standard makefile for your project pointing to this cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 &lt;br /&gt;
 STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
After building with make, copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
Here are some alternatives.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;br /&gt;
&lt;br /&gt;
==Only the Tools==&lt;br /&gt;
&lt;br /&gt;
You don't need to build a complete image to get the cross-tools.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
You can use OE to selectively build additional cross-compiled libraries as needed. Look around in the OE recipes folder.&lt;br /&gt;
&lt;br /&gt;
For example, if you needed the kernel headers too...&lt;br /&gt;
&lt;br /&gt;
 bitbake linux-libc-headers&lt;br /&gt;
&lt;br /&gt;
If you build a complete image, then most of the cross-build tools and libraries will get installed as as side-effect. That is probably the easiest way to setup your workstation the first time.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4202</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4202"/>
				<updated>2010-06-14T09:22:10Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Be explicit that the Hello World recipe link is an alternative to this page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but NOT USING the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
For an alternative method USING the bitbake/recipe framework, a series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
After you have built an image, the cross-tools will be installed on your workstation.&lt;br /&gt;
&lt;br /&gt;
You can now create a standard makefile for your project pointing to this cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 &lt;br /&gt;
 STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
Copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;br /&gt;
&lt;br /&gt;
==Only the Tools==&lt;br /&gt;
&lt;br /&gt;
You don't need to build a complete image to get the cross-tools.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
You can use OE to selectively build additional cross-compiled libraries as needed. Look around in the OE recipes folder.&lt;br /&gt;
&lt;br /&gt;
For example, if you needed the kernel headers too...&lt;br /&gt;
&lt;br /&gt;
 bitbake linux-libc-headers&lt;br /&gt;
&lt;br /&gt;
If you build a complete image, then most of the cross-build tools and libraries will get installed as as side-effect. That is probably the easiest way to setup your workstation the first time.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4174</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4174"/>
				<updated>2010-05-03T14:25:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Ubuntu 10.04 tftpd-hpa config file format change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. This procedure&lt;br /&gt;
also works for Verdex-Pro boards although all the text and links&lt;br /&gt;
refer to Overo.&lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
A workstation running Ubuntu 9.10 is used for the example.&lt;br /&gt;
&lt;br /&gt;
The names of the packages will be different if you are using another &lt;br /&gt;
distribution.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This is just one method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo rootfs on the workstation. &lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server==&lt;br /&gt;
&lt;br /&gt;
Disable inetd control of tftpd which is the default for Ubuntu. Either comment the line in /etc/inetd.conf that references tftpd by adding a # to the start of the tftp line&lt;br /&gt;
&lt;br /&gt;
 # tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/int.tftpd -s /var/lib/tftpboot&lt;br /&gt;
&lt;br /&gt;
or if you don't need inetd for any other service, which a Ubuntu desktop install typically doesn't, disable inetd completely this way&lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20openbsd-inetd /etc/rc2.d/K20openbsd-inetd &lt;br /&gt;
&lt;br /&gt;
See the NOTES(1) section.&lt;br /&gt;
&lt;br /&gt;
The tftpd-hpa configuration file format changed between Ubuntu 9.10 and 10.04.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa (for 9.10)&lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa (for 10.04)&lt;br /&gt;
&lt;br /&gt;
 TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
 TFTP_DIRECTORY=&amp;quot;/exports/overo/boot&amp;quot;&lt;br /&gt;
 TFTP_ADDRESS=&amp;quot;192.168.4.4:69&amp;quot;&lt;br /&gt;
 TFTP_OPTIONS=&amp;quot;-s&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing is pointing the tftp daemon at the Gumstix root filesystem we created above so that it will find the uImage kernel that sits there. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use &amp;lt;b&amp;gt;man exports&amp;lt;/b&amp;gt; to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables are used by default, so the boot behavior is still unchanged.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
If you get the following error&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:00:00:00:00:00&lt;br /&gt;
 *** ERROR: `ethaddr' not set&lt;br /&gt;
&lt;br /&gt;
see Note 12 below.&lt;br /&gt;
 &lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct. The format of the &amp;lt;b&amp;gt;ip&amp;lt;/b&amp;gt; kernel command line argument is found in the kernel documentation under  [http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt filesystems/nfsroot.txt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. tftp and inetd. You can use inetd to run tftp if you want. Just edit the -s option for tftp appropriately in  /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
 tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/in.tftpd -s /exports/overo/boot&lt;br /&gt;
&lt;br /&gt;
and instead of this restart command&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
&lt;br /&gt;
use this one&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/openbsd-inetd restart&lt;br /&gt;
&lt;br /&gt;
And finally, prevent tftpd-hpa from starting by &lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20tftpd-hpa /etc/rc2.d/s20tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The default u-boot environment variables for the overo are defined in the u-boot source tree under &amp;lt;b&amp;gt;include/configs/omap3-overo.h&amp;lt;/b&amp;gt; if you wanted to customize or go back to defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
[http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt Documentation/filesystems/nfsroot.txt]&lt;br /&gt;
and [http://www.kernel.org/doc/Documentation/kernel-parameters.txt Documentation/kernel-parameters.txt.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11. If the gumstix seems unwilling to connect to your NFS server, ensure you've enabled NFS options in your kernel.&lt;br /&gt;
You'll need to include (directly, not as modules) CONFIG_NFS_FS, CONFIG_ROOT_NFS, CONFIG_NET_ETHERNET,&lt;br /&gt;
and, the appropriate Ethernet chip driver, in my case, CONFIG_SMC911X.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12. Older gumstix ethernet boards did not come with an EEPROM specifying a MAC address and so the ethernet controller's reset value of FF:FF:FF:FF:FF:FF was being used by U-Boot. Older versions of U-Boot didn't complain about this, but newer versions do. So if you are in the situation with an older gumstix ethernet board running a newer U-Boot, you must specify an ethaddr U-Boot environment variable manually if you want to tftp boot. Newer U-Boot still allows FF:FF:FF:FF:FF:FF when set from the environment, though that's just an oversight that might get fixed anytime. &lt;br /&gt;
&lt;br /&gt;
This works for now. &lt;br /&gt;
&lt;br /&gt;
 setenv ethaddr FF:FF:FF:FF:FF:FF&lt;br /&gt;
&lt;br /&gt;
If U-Boot starts checking more thoroughly, you may have to use another value. &lt;br /&gt;
&lt;br /&gt;
This is not a problem once Linux is booted. The Linux driver will assign a random MAC if it detects FF:FF:FF:FF:FF:FF.&lt;br /&gt;
&lt;br /&gt;
Again this is a problem that is going away and shouldn't affect any new gumstix owners.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4161</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4161"/>
				<updated>2010-04-03T16:35:05Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Seems this was confusing people combining lib path with libs. Just show lib path now.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but not using the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
A series of sample recipes can be found [[HelloWorld Examples | here]].&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
While you don't necessarily need to build a complete image to get the cross-tools for a C program, as a practical matter, successfully building an image is a good test that the cross-tools are correctly installed.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
And if you need the kernel headers too...&lt;br /&gt;
&lt;br /&gt;
 bitbake linux-libc-headers&lt;br /&gt;
&lt;br /&gt;
There is no time lost building only these recipes, since both are dependencies of a full image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
For instance, putting TMPDIR on a faster disk can speed your build.&lt;br /&gt;
&lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
Create a makefile for your project pointing to the cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple one for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 &lt;br /&gt;
 STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
  &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} -L ${LIBDIR} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
Copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you have a kermit console session, use the kermit SEND command.&lt;br /&gt;
&lt;br /&gt;
4. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4157</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4157"/>
				<updated>2010-04-01T18:07:42Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added links for how to use the new kernel and rootfs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: if you have issues with USB not resuming properly after a suspend on Overo, please see [http://old.nabble.com/Update-on-Overo-EHCI-issues-td27617583.html#a27617583 this] forum post.&lt;br /&gt;
==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
The gumstix recipes for either of these kernels has a variable that allows you to specify how the OTG usb port is configured.&lt;br /&gt;
&lt;br /&gt;
Kernel version 2.6.31 is used for the example. Substitute 2.6.32 if that's the kernel you are using.&lt;br /&gt;
 &lt;br /&gt;
To get started, look at the recipe file ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.31.bb. You'll see a line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are three valid values for MUSB_MODE: &amp;quot;host&amp;quot;, &amp;quot;peripheral&amp;quot; or &amp;quot;otg&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You could change the MUSB_MODE assignment directly in the recipe, but a better way to do this is to modify your local.conf file and add a MUSB_MODE variable.&lt;br /&gt;
&lt;br /&gt;
The ?= assignment means &amp;quot;host&amp;quot; will be assigned to MUSB_MODE only if it does not already have a value which it will if you give it one in local.conf.&lt;br /&gt;
&lt;br /&gt;
The local.conf file is found here ${OVEROTOP}/build/conf/local.conf.&lt;br /&gt;
&lt;br /&gt;
Add the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;peripheral&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;otg&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
depending on your preference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 cd ${OVEROTOP}&lt;br /&gt;
 bitbake -c clean linux-omap3-2.6.31&lt;br /&gt;
 bitbake -c rebuild linux-omap3-2.6.31&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs since the drivers available in /lib/modules will have changed.&lt;br /&gt;
&lt;br /&gt;
 bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
 &lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4144</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4144"/>
				<updated>2010-03-13T22:08:02Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Switched order of sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework is excellent and should be your starting point. You can find it under the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration. There are some new checkins to the kernel code indicating that SPI slave functionality might be coming.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
A protocol driver is probably what you want to write.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps you need to follow in writing a SPI protocol driver.&lt;br /&gt;
&lt;br /&gt;
# You need to tell the SPI subsystem about the slave device(s) on each SPI bus that you want to use. This gets passed along to the controller driver when it's needed. You can do this during kernel init in a board file like board-overo.c or it can be done at run time in module code.  A device name (modalias) is specified as a key part of this process.&lt;br /&gt;
# You need to register a SPI protocol driver. This driver should have the same name (modalias) as was specified above. You register a spi_device using the spi_register_driver() call. When this internal mapping connection is made by the SPI subsystem, the result is a probe() call to your protocol driver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order you perform these steps. But after both are completed and your probe() function returns success, your driver will be ready for SPI communication. You are given a spi_device in the probe() function that you need to hang onto.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue with calls to spi_async(). These messages are processed in FIFO order asynchronously by the controller driver. As each message finishes, the controller notifies the protocol driver via 'completion' callbacks. The protocol driver can then process the raw data as necessary.&lt;br /&gt;
&lt;br /&gt;
There is also a simple synchronous interface exposed by spi.h/spi.c. Here the SPI framework puts the caller, a protocol driver, to sleep while the same asynchronous interface to the controller driver is used behind the scenes. When the controller is done, the protocol driver is woken up and can then proceed to process the data. &lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a stock linux module that implements a generic SPI protocol driver while exposing a char device interface to userland via sysfs.&lt;br /&gt;
&lt;br /&gt;
The documentation can be found in the linux source tree. Here is a link [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
Spidev is not designed to dynamically register itself with the SPI subsystem. You will need to add code to do this in either a kernel module or more likely in the board file, board-overo.c, so registration takes place during boot. &lt;br /&gt;
&lt;br /&gt;
Spidev implements its own synchronous interface to the SPI system. &lt;br /&gt;
&lt;br /&gt;
Here's one Gumstix [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 mailing list thread] posted on 7/21/09, where some users have successfully used spidev with the Overos.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
=== Another Example Driver ===&lt;br /&gt;
&lt;br /&gt;
A simpler OMAP3 linux SPI driver can be found [http://www.github.com/scottellis/overo-adc-mcp3002 here]. &lt;br /&gt;
&lt;br /&gt;
Two inexpensive ADC's are used as the slave devices. The protocol for these devices is sufficiently simple that other devices could be easily swapped in place of them and the code modified appropriately.  &lt;br /&gt;
&lt;br /&gt;
This driver demonstrates how to add SPI devices to a SPI bus at runtime instead of at boot time, which can simplify development. &lt;br /&gt;
&lt;br /&gt;
The driver also demonstrates how to handle asynchronous I/O with the SPI controller. &lt;br /&gt;
&lt;br /&gt;
There is no attempt to do anything useful with the ADC data. The driver is just intended to be used to explore the linux SPI framework. &lt;br /&gt;
&lt;br /&gt;
The driver also exposes a simple character device interface to interact with userland.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4143</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4143"/>
				<updated>2010-03-13T21:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added spidev doc link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo SPI ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework is excellent and should be your starting point. You can find it under the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration. There are some new checkins to the kernel code indicating that SPI slave functionality might be coming.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
A protocol driver is probably what you want to write.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps you need to follow in writing a SPI protocol driver.&lt;br /&gt;
&lt;br /&gt;
# You need to tell the SPI subsystem about the slave device(s) on each SPI bus that you want to use. This gets passed along to the controller driver when it's needed. You can do this during kernel init in a board file like board-overo.c or it can be done at run time in module code.  A device name (modalias) is specified as a key part of this process.&lt;br /&gt;
# You need to register a SPI protocol driver. This driver should have the same name (modalias) as was specified above. You register a spi_device using the spi_register_driver() call. When this internal mapping connection is made by the SPI subsystem, the result is a probe() call to your protocol driver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order you perform these steps. But after both are completed and your probe() function returns success, your driver will be ready for SPI communication. You are given a spi_device in the probe() function that you need to hang onto.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue with calls to spi_async(). These messages are processed in FIFO order asynchronously by the controller driver. As each message finishes, the controller notifies the protocol driver via 'completion' callbacks. The protocol driver can then process the raw data as necessary.&lt;br /&gt;
&lt;br /&gt;
There is also a simple synchronous interface exposed by spi.h/spi.c. Here the SPI framework puts the caller, a protocol driver, to sleep while the same asynchronous interface to the controller driver is used behind the scenes. When the controller is done, the protocol driver is woken up and can then proceed to process the data. &lt;br /&gt;
&lt;br /&gt;
=== Example Driver ===&lt;br /&gt;
&lt;br /&gt;
A sample OMAP3 Linux SPI driver can be found [http://www.github.com/scottellis/overo-adc-mcp3002 here]. &lt;br /&gt;
&lt;br /&gt;
The adc.c driver demonstrates how to add SPI devices at runtime instead of at boot time in order to simplify development. It also demonstrates how to handle asynchronous I/O with the SPI controller. &lt;br /&gt;
&lt;br /&gt;
There is no attempt to do anything useful with the data, a couple of ADC slaves, it's just for testing out the SPI framework. &lt;br /&gt;
&lt;br /&gt;
The driver exposes a simple character device interface to interact with userland.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a stock linux module that implements a generic SPI protocol driver while exposing a char device interface to userland via sysfs.&lt;br /&gt;
&lt;br /&gt;
The documentation can be found in the linux source tree. Here is a link [http://www.mjmwired.net/kernel/Documentation/spi/spidev Documentation/spi/spidev]. &lt;br /&gt;
&lt;br /&gt;
Spidev is not designed to dynamically register itself with the SPI subsystem. You will need to add code to do this in either a kernel module or more likely in the board file, board-overo.c, so registration takes place during boot. &lt;br /&gt;
&lt;br /&gt;
Spidev implements its own synchronous interface to the SPI system. &lt;br /&gt;
&lt;br /&gt;
Here's one Gumstix [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 mailing list thread] posted on 7/21/09, where some users have successfully used spidev with the Overos.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4142</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4142"/>
				<updated>2010-03-13T21:51:33Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: spidev notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework is excellent and should be your starting point. You can find it under the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration. There are some new checkins to the kernel code indicating that SPI slave functionality might be coming.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
A protocol driver is probably what you want to write.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps you need to follow in writing a SPI protocol driver.&lt;br /&gt;
&lt;br /&gt;
# You need to tell the SPI subsystem about the slave device(s) on each SPI bus that you want to use. This gets passed along to the controller driver when it's needed. You can do this during kernel init in a board file like board-overo.c or it can be done at run time in module code.  A device name (modalias) is specified as a key part of this process.&lt;br /&gt;
# You need to register a SPI protocol driver. This driver should have the same name (modalias) as was specified above. You register a spi_device using the spi_register_driver() call. When this internal mapping connection is made by the SPI subsystem, the result is a probe() call to your protocol driver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order you perform these steps. But after both are completed and your probe() function returns success, your driver will be ready for SPI communication. You are given a spi_device in the probe() function that you need to hang onto.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages in the protocol driver. The protocol driver then submits the SPI messages to the controller driver's I/O queue with calls to spi_async(). These messages are processed in FIFO order asynchronously by the controller driver. As each message finishes, the controller notifies the protocol driver via 'completion' callbacks. The protocol driver can then process the raw data as necessary.&lt;br /&gt;
&lt;br /&gt;
There is also a simple synchronous interface exposed by spi.h/spi.c. Here the SPI framework puts the caller, a protocol driver, to sleep while the same asynchronous interface to the controller driver is used behind the scenes. When the controller is done, the protocol driver is woken up and can then proceed to process the data. &lt;br /&gt;
&lt;br /&gt;
=== Example Driver ===&lt;br /&gt;
&lt;br /&gt;
A sample OMAP3 Linux SPI driver can be found [http://www.github.com/scottellis/overo-adc-mcp3002 here]. &lt;br /&gt;
&lt;br /&gt;
The adc.c driver demonstrates how to add SPI devices at runtime instead of at boot time in order to simplify development. It also demonstrates how to handle asynchronous I/O with the SPI controller. &lt;br /&gt;
&lt;br /&gt;
There is no attempt to do anything useful with the data, a couple of ADC slaves, it's just for testing out the SPI framework. &lt;br /&gt;
&lt;br /&gt;
The driver exposes a simple character device interface to interact with userland.&lt;br /&gt;
&lt;br /&gt;
=== Spidev ===&lt;br /&gt;
&lt;br /&gt;
Spidev is a stock linux module that implements a generic SPI protocol driver while exposing a char device interface to userland via sysfs.&lt;br /&gt;
&lt;br /&gt;
Spidev is not designed to dynamically register itself with the SPI subsystem. You will need to add code to do this in either a kernel module or more likely in the board file, board-overo.c, so registration takes place during boot. &lt;br /&gt;
&lt;br /&gt;
Spidev implements its own synchronous interface to the SPI system. &lt;br /&gt;
&lt;br /&gt;
(This is just from reading the code. I have never tried to use spidev. Maybe someone who has can elaborate.)&lt;br /&gt;
&lt;br /&gt;
Here's one Gumstix [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 mailing list thread] posted on 7/21/09, where some users have successfully used spidev with the Overos.&lt;br /&gt;
&lt;br /&gt;
You can also search the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4141</id>
		<title>Category:SPI</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:SPI&amp;diff=4141"/>
				<updated>2010-03-13T15:50:59Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added some documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Kernel documentation for the SPI framework is excellent and should be your starting point. You can find it under the Documentation directory of your linux source tree or here [http://www.kernel.org/doc/Documentation/spi/spi-summary Documentation/spi/spi-summary].&lt;br /&gt;
&lt;br /&gt;
Linux SPI drivers are broken into two parts. A controller driver that handles direct communication with the hardware and a protocol driver to handle the details of the data for a particular device. The interface defined in spi.c/spi.h is the bridge between the two.&lt;br /&gt;
&lt;br /&gt;
For the OMAP3's, the controller driver is omap2_mcspi.c. The OMAP3's have 4 SPI busses which the omap2_mcspi driver handles. The kernel config option to include the omap2_mcspi driver is CONFIG_SPI_OMAP24XX.&lt;br /&gt;
&lt;br /&gt;
The OMAP3 SPI controller has the ability to act as either a SPI master or SPI slave, but the current kernel code only supports the SPI master configuration. There are some new checkins to the kernel code indicating that SPI slave functionality might be coming.&lt;br /&gt;
&lt;br /&gt;
=== Protocol Drivers ===&lt;br /&gt;
A protocol driver is probably what you want to write.&lt;br /&gt;
&lt;br /&gt;
There are a couple of steps you need to follow in writing a SPI protocol driver.&lt;br /&gt;
&lt;br /&gt;
# You need to tell the SPI subsystem about the slave device(s) on each SPI bus that you want to use. This gets passed along to the controller driver when it's needed. You can do this during kernel init in a board file like board-overo.c or it can be done at run time in module code.  A device name (modalias) is specified as a key part of this process.&lt;br /&gt;
# You need to register a SPI protocol driver. This driver should have the same name (modalias) as was specified above. You register a spi_device using the spi_register_driver() call. When this internal mapping connection is made by the SPI subsystem, the result is a probe() call to your protocol driver.&lt;br /&gt;
&lt;br /&gt;
It doesn't matter which order you perform these steps. But after both are completed and your probe() function returns success, your driver will be ready for SPI communication. You are given a spi_device in the probe() function that you need to hang onto.&lt;br /&gt;
&lt;br /&gt;
SPI data communication happens using I/O queues. One or more SPI transfers are bundled up into SPI messages by you in your driver. You then submit your messages to the controller driver's I/O queue with calls to spi_async(). These messages are processed in FIFO order asynchronously by the controller and your driver is notified via completion callbacks as each message finishes. You can then process the raw data in your driver.&lt;br /&gt;
&lt;br /&gt;
There is also a simple synchronous interface exposed by spi.h/spi.c that just halts your driver while the same asynchronous interface to the controller driver is used behind the scenes.&lt;br /&gt;
&lt;br /&gt;
=== Example Driver ===&lt;br /&gt;
&lt;br /&gt;
A sample OMAP3 Linux SPI driver can be found [http://www.github.com/scottellis/overo-adc-mcp3002 here]. &lt;br /&gt;
&lt;br /&gt;
The adc.c driver demonstrates how to add SPI devices at runtime instead of at boot time in order to simplify development. It also demonstrates how to handle asynchronous I/O with the SPI controller. &lt;br /&gt;
&lt;br /&gt;
There is no attempt to do anything useful with the data, a couple of ADC slaves, it's just for testing out the SPI framework. &lt;br /&gt;
&lt;br /&gt;
The driver exposes a simple character device interface to interact with userland.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Spidev ==&lt;br /&gt;
&lt;br /&gt;
Check the [http://www.nabble.com/forum/Search.jtp?query=spidev&amp;amp;sort=date&amp;amp;local=y&amp;amp;forum=22543 Gumstix mailing list archives for spidev]&lt;br /&gt;
&lt;br /&gt;
In particular, [http://www.nabble.com/SPI%2C-spidev%2C-et.-al-to24588398.html#a24594755 this article on spidev] posted on 7/21/09.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4107</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4107"/>
				<updated>2010-02-19T16:00:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added ethaddr error note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. This procedure&lt;br /&gt;
also works for Verdex-Pro boards although all the text and links&lt;br /&gt;
refer to Overo.&lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
A workstation running Ubuntu 9.10 is used for the example.&lt;br /&gt;
&lt;br /&gt;
The names of the packages will be different if you are using another &lt;br /&gt;
distribution.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This is just one method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo rootfs on the workstation. &lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server==&lt;br /&gt;
&lt;br /&gt;
Disable inetd control of tftpd which is the default for Ubuntu. Either comment the line in /etc/inetd.conf that references tftpd by adding a # to the start of the tftp line&lt;br /&gt;
&lt;br /&gt;
 # tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/int.tftpd -s /var/lib/tftpboot&lt;br /&gt;
&lt;br /&gt;
or if you don't need inetd for any other service, which a Ubuntu desktop install typically doesn't, disable inetd completely this way&lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20openbsd-inetd /etc/rc2.d/s20openbsd-inetd &lt;br /&gt;
&lt;br /&gt;
See the NOTES(1) section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing is pointing the tftp daemon at the Gumstix root filesystem we created above so that it will find the uImage kernel that sits there. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use &amp;lt;b&amp;gt;man exports&amp;lt;/b&amp;gt; to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables are used by default, so the boot behavior is still unchanged.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
If you get the following error&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:00:00:00:00:00&lt;br /&gt;
 *** ERROR: `ethaddr' not set&lt;br /&gt;
&lt;br /&gt;
see Note 12 below.&lt;br /&gt;
 &lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct. The format of the &amp;lt;b&amp;gt;ip&amp;lt;/b&amp;gt; kernel command line argument is found in the kernel documentation under  [http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt filesystems/nfsroot.txt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. tftp and inetd. You can use inetd to run tftp if you want. Just edit the -s option for tftp appropriately in  /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
 tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/in.tftpd -s /exports/overo/boot&lt;br /&gt;
&lt;br /&gt;
and instead of this restart command&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
&lt;br /&gt;
use this one&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/openbsd-inetd restart&lt;br /&gt;
&lt;br /&gt;
And finally, prevent tftpd-hpa from starting by &lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20tftpd-hpa /etc/rc2.d/s20tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The default u-boot environment variables for the overo are defined in the u-boot source tree under &amp;lt;b&amp;gt;include/configs/omap3-overo.h&amp;lt;/b&amp;gt; if you wanted to customize or go back to defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
[http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt Documentation/filesystems/nfsroot.txt]&lt;br /&gt;
and [http://www.kernel.org/doc/Documentation/kernel-parameters.txt Documentation/kernel-parameters.txt.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11. If the gumstix seems unwilling to connect to your NFS server, ensure you've enabled NFS options in your kernel.&lt;br /&gt;
You'll need to include (directly, not as modules) CONFIG_NFS_FS, CONFIG_ROOT_NFS, CONFIG_NET_ETHERNET,&lt;br /&gt;
and, the appropriate Ethernet chip driver, in my case, CONFIG_SMC911X.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12. Older gumstix ethernet boards did not come with an EEPROM specifying a MAC address and so the ethernet controller's reset value of FF:FF:FF:FF:FF:FF was being used by U-Boot. Older versions of U-Boot didn't complain about this, but newer versions do. So if you are in the situation with an older gumstix ethernet board running a newer U-Boot, you must specify an ethaddr U-Boot environment variable manually if you want to tftp boot. Newer U-Boot still allows FF:FF:FF:FF:FF:FF when set from the environment, though that's just an oversight that might get fixed anytime. &lt;br /&gt;
&lt;br /&gt;
This works for now. &lt;br /&gt;
&lt;br /&gt;
 setenv ethaddr FF:FF:FF:FF:FF:FF&lt;br /&gt;
&lt;br /&gt;
If U-Boot starts checking more thoroughly, you may have to use another value. &lt;br /&gt;
&lt;br /&gt;
This is not a problem once Linux is booted. The Linux driver will assign a random MAC if it detects FF:FF:FF:FF:FF:FF.&lt;br /&gt;
&lt;br /&gt;
Again this is a problem that is going away and shouldn't affect any new gumstix owners.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4102</id>
		<title>GPIO</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4102"/>
				<updated>2010-02-16T15:13:46Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: remux as gpio not limited to 5 spi pins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo GPIO ==&lt;br /&gt;
&lt;br /&gt;
The Overo kernels support the sysfs gpio implementation for accessing GPIO from userspace. &lt;br /&gt;
&lt;br /&gt;
This allows you to control GPIO from the command line this way&lt;br /&gt;
&lt;br /&gt;
 root@overo# echo 146 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 in&lt;br /&gt;
 root@overo# echo out &amp;gt; /sys/class/gpio/gpio146/direction&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 out&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 0&lt;br /&gt;
 root@overo# echo 1 &amp;gt; /sys/class/gpio/gpio146/value&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 1&lt;br /&gt;
&lt;br /&gt;
If you have an expansion card with a 40 pin header, then this will be controlling pin 27. You can use pin 1 for a ground. (If you don't have a meter, a p/n 276-0330 1.8V Red LED from Radio Shack works for testing.) &lt;br /&gt;
&lt;br /&gt;
Schematics and pin-outs for the Gumstix expansion boards can be found [http://pubs.gumstix.com/boards/ here.]&lt;br /&gt;
&lt;br /&gt;
=== How It Works ===&lt;br /&gt;
&lt;br /&gt;
See the kernel docs [http://www.kernel.org/doc/Documentation/gpio.txt gpio.txt] for an overview of gpio and the userspace sysfs interface. The &amp;quot;Sysfs Interface for Userspace (OPTIONAL)&amp;quot; section near the end discusses the userspace implementation.&lt;br /&gt;
&lt;br /&gt;
See the [http://www-s.ti.com/sc/techlit/spruf98 OMAP35X Technical Reference Manual] Section 7.6.3 PADCONFS Register Description and Table 7.5 Core Control Module PadConf Register Field in Section 7.4.4.3 Pad Multiplexing Register Fields for identifying the possible MUX configuration for each GPIO.&lt;br /&gt;
&lt;br /&gt;
Then see the U-Boot source code, board/overo/overo.h for how the pins on the Overo are actually being muxed. See include/asm-arm/arch-omap3/mux.h in the U-Boot tree for the definitions used in overo.h. The pins in mux mode M4 are already configured for GPIO.&lt;br /&gt;
&lt;br /&gt;
=== Making Modifications ===&lt;br /&gt;
&lt;br /&gt;
Currently all the GPIO multiplexing for the Overo's is being done by the bootloader U-Boot, so the conventional way to modify the pin muxing is to edit overo.h and rebuild U-Boot.&lt;br /&gt;
&lt;br /&gt;
You can also change the mux configuration from within Linux. One simple approach is to do it from userspace accessing /dev/mem. A program devmem2 is part of the omap3-console-image and will work. See the remuxing example below.&lt;br /&gt;
&lt;br /&gt;
If you are writing your own kernel module, you can also read/write the PADCONF registers the way you normally would after an ioremap.&lt;br /&gt;
&lt;br /&gt;
Third, there is a Linux build config option CONFIG_OMAP_MUX, not normally enabled in the Overo configs, that will give you some additional utility functions to simplify mux changes within kernel or module code (see arch/arm/plat-omap/mux.c).&lt;br /&gt;
&lt;br /&gt;
Finally, it looks like the Linux OMAP34xx pin muxing code is getting a complete overhaul. See this [http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18474.html thread] on the Linux OMAP mailing list. Judging from some posts on the Gumstix lists, it sounds like this will be available in 2.6.33.&lt;br /&gt;
&lt;br /&gt;
=== Overo Kernel Usage ===&lt;br /&gt;
&lt;br /&gt;
Just because pins are configured as GPIO in u-boot, doesn't necessarily mean you can use them. If you look at /sys/class/gpio on a default Overo, you'll get something like this.&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ls /sys/class/gpio&lt;br /&gt;
 export	gpio164  gpio65       gpiochip160  gpiochip64&lt;br /&gt;
 gpio15	gpio168  gpiochip0    gpiochip192  gpiochip96&lt;br /&gt;
 gpio16	gpio176  gpiochip128  gpiochip32   unexport&lt;br /&gt;
&lt;br /&gt;
The reason you see some GPIO already exported is because the linux code in arch/arm/mach-omap2/board-overo.c is explicitly exporting these pins for another use. Whether they are being used depends on the hardware you have attached. The kernel also uses pins configured as GPIO that it doesn't export. These depend on the board configuration and the kernel drivers being used.&lt;br /&gt;
&lt;br /&gt;
To be more explicit, look inside board-overo.c, you'll see these definitions&lt;br /&gt;
&lt;br /&gt;
 #define OVERO_GPIO_BT_XGATE     15&lt;br /&gt;
 #define OVERO_GPIO_W2W_NRESET   16&lt;br /&gt;
 #define OVERO_GPIO_PENDOWN      114&lt;br /&gt;
 #define OVERO_GPIO_BT_NRESET    164&lt;br /&gt;
 #define OVERO_GPIO_USBH_CPEN    168&lt;br /&gt;
 #define OVERO_GPIO_USBH_NRESET  183&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_SMSC911X_GPIO    176&lt;br /&gt;
 #define OVERO_SMSC911X2_GPIO   65&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_GPIO_LCD_EN 144&lt;br /&gt;
 #define OVERO_GPIO_LCD_BL 145&lt;br /&gt;
&lt;br /&gt;
Follow their usage inside the file and you will be able to explain the /sys/class/gpio output you see above.&lt;br /&gt;
&lt;br /&gt;
=== Input or Output ===&lt;br /&gt;
&lt;br /&gt;
Pins configured as GPIO are sometimes also specified as being strictly input or output. &lt;br /&gt;
&lt;br /&gt;
This can happen when they are mux'd or when they are explicitly exported by the kernel. &lt;br /&gt;
&lt;br /&gt;
In either of those cases you won't be able to change the I/O direction from userspace.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Specifications ===&lt;br /&gt;
&lt;br /&gt;
Voltage is 1.8v &lt;br /&gt;
&lt;br /&gt;
Current specifications &amp;lt;TODO ???&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Usable Pins ===&lt;br /&gt;
&lt;br /&gt;
Here's a few GPIO you can use immediately from userspace without any u-boot or kernel changes.&lt;br /&gt;
&lt;br /&gt;
==== 40 Pin Expansion Header ==== &lt;br /&gt;
&lt;br /&gt;
Pin 4 - gpio114&amp;lt;br /&amp;gt;&lt;br /&gt;
It's the pendown signal on the touchscreen controller but it's available if you aren't using a touchscreen.&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as input only when exported by the kernel in board-overo.h. Can't change the direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pulled-low, reads 0 with no input, reads 1 with an input applied&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 19 - gpio170&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDQ/1-Wire output. Not used unless you explicitly enable the 1-wire module.&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Output only - configured this way in the u-boot muxing&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 27 - gpio146&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 29 - gpio147&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Direction can be changed&amp;lt;br /&amp;gt;&lt;br /&gt;
Floating state&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 28 - gpio145&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 30 - gpio144&amp;lt;br /&amp;gt;&lt;br /&gt;
Used with LCD, but available if not using an LCD&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as output only when exported by the kernel in board-overo.h. Can't change direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Set to ON by kernel during init (not all configs, see board-overo.c). This could be a problem for real use, but okay for testing.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Palo43 Board ====&lt;br /&gt;
&lt;br /&gt;
LED D2 - gpio21&amp;lt;br /&amp;gt;&lt;br /&gt;
LED D3 - gpio22&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, set the direction as out&amp;lt;br /&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; gpioxx/value to turn on, echo 1 &amp;gt; gpioxx/value to turn off&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch - gpio14&amp;lt;br /&amp;gt;&lt;br /&gt;
Switch - gpio23&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, leave direction as in&amp;lt;br /&amp;gt;&lt;br /&gt;
With the switch open (not pushed) will register a value of 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Push the switch and the value will be 0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Changing the multiplexing for a pin ===&lt;br /&gt;
&lt;br /&gt;
If you aren't using the first SPI bus, then there are 5 pins on the 40-pin expansion header that you could repurpose for GPIO.&lt;br /&gt;
&lt;br /&gt;
Pin 3 - gpio171(spi1_clk)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 5 - gpio172 (spi1_mosi)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 6 - gpio174 (spi1_cs0)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 7 - gpio173 (spi1_miso)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 8 - gpio175 (spi1_cs1)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first step is to find the appropriate PADCONF register address for each gpio from Table 7.5 of the TRM. Pay attention to whether it is the low or high order 16 bits for each gpio. You should come up with these values.&lt;br /&gt;
&lt;br /&gt;
gpio171 : 0x4800 21C8&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio172 : 0x4800 21CA&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio173 : 0x4800 21CC&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio174 : 0x4800 21CE&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio175 : 0x4800 21D0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using devmem2, here is how you could read the current PADCONF value for what could be gpio171&lt;br /&gt;
&lt;br /&gt;
 root@overo# devmem2 0x480021c8 h&lt;br /&gt;
 ...&lt;br /&gt;
 Value at address 0x480021C8 (0x400201c8): 0x100&lt;br /&gt;
&lt;br /&gt;
Which corresponds to a mux value of (IEN | PTD | DIS | M0) using the U-Boot mux.h definitions. Mux mode 0 for this pin is the spi1_clk configuration found by looking in Table 7.5 of the TRM.&lt;br /&gt;
&lt;br /&gt;
To reconfigure pin 3 to be gpio171, as input or output with inputs pulled low, write 0x010C to the controlling PADCONF register. This would correspond to (IEN | PTD | EN | M4). The bit fields are defined in the TRM Section 7.6.3.&lt;br /&gt;
&lt;br /&gt;
 root@overo# devmem2 0x480021c8 h 0x10c&lt;br /&gt;
&lt;br /&gt;
Now you can export and configure gpio171 from userspace like the example with gpio146 at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you want this multiplexing to be permanent, then you would modify the U-Boot file board/overo/overo.h and rebuild U-Boot. If you are using OE, then you'll want to generate a patch file to be used in the u-boot-omap3 recipe.&lt;br /&gt;
&lt;br /&gt;
There are additional pins on the header that can be reconfigured this way.&lt;br /&gt;
&lt;br /&gt;
=== GPIO Software for the Overo ===&lt;br /&gt;
&lt;br /&gt;
Dave Hylands has written several software packages to facilitate GPIO programming on the Overos.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=GPIO_Event_Driver GPIO Event Driver] allows multiple GPIO lines to be monitored from user-space.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=User_GPIO_Driver User GPIO Driver] is a reflection of the kernel's gpiolib API into user space.&lt;br /&gt;
&lt;br /&gt;
=== More Links ===&lt;br /&gt;
&lt;br /&gt;
Here is another article [http://elinux.org/BeagleBoardPinMux BeagleBoardPinMux] talking about OMAP3 pin muxing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Verdex GPIO ==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100px&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:yellow;&amp;quot; | GPIO(&amp;lt;i&amp;gt; n &amp;lt;/i&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Logic level (3.3V) signals &lt;br /&gt;
* 3-4mA max&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all GPIO's information and examples should go here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
todo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the PXA270 datasheet:&lt;br /&gt;
http://pubs.gumstix.com/documents/PXA%20Documentation/PXA270/PXA270%20Electrical,%20Mechanical,%20and%20Thermal%20Specification%20%5b280002-005%5d.pdf&lt;br /&gt;
most of the pins are limited to 3mA, and a few can go upto 4 mA (see page 5-9) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If proc-gpio is a module, add it to /etc/modules or do a modprobe proc-gpio.&lt;br /&gt;
&lt;br /&gt;
A number of files exist under /proc/gpio, one for each GPIO on the PXA processor.&lt;br /&gt;
&lt;br /&gt;
If you cat one of these files, you get, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /proc/gpio/GPIO12&lt;br /&gt;
12 GPIO in set&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That tells you — GPIO number, function (either GPIO, AF 1, AF 2, or AF 3), in|out, set|clear.&lt;br /&gt;
&lt;br /&gt;
You can change any of those values, by writing to the file, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;AF1 out&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets GPIO12 to AF1, out mode. (In the case of GPIO12, the PXA defines this function as putting out the 32kHz clock signal.) this is currently case-sensitive&lt;br /&gt;
&lt;br /&gt;
If you have the GPIO set to an output, and GPIO mode, you can set or clear the signal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;GPIO out set&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
# echo &amp;quot;GPIO out clear&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The alternative functions are described in the PXA255 Developer's Manual (link should be found in the Featured links-box) section 4.1.2.&lt;br /&gt;
&lt;br /&gt;
=== Alternative method to access GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
The [[User GPIO Driver]] provides a reflection of the kernel's gpiolib library into userspace.&lt;br /&gt;
&lt;br /&gt;
=== gpio-event driver ===&lt;br /&gt;
&lt;br /&gt;
The [[GPIO Event Driver]] allows gpio changes to be captured from user-space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Related pages on the old wiki:&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Tips_and_tricks#Access_GPIOs_from_user-space&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Sample_code/C/gpregs&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Kernel_programming&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
[[Category:Literature]]&lt;br /&gt;
[[Category:GPIO]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4101</id>
		<title>GPIO</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4101"/>
				<updated>2010-02-15T14:09:35Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added remux example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo GPIO ==&lt;br /&gt;
&lt;br /&gt;
The Overo kernels support the sysfs gpio implementation for accessing GPIO from userspace. &lt;br /&gt;
&lt;br /&gt;
This allows you to control GPIO from the command line this way&lt;br /&gt;
&lt;br /&gt;
 root@overo# echo 146 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 in&lt;br /&gt;
 root@overo# echo out &amp;gt; /sys/class/gpio/gpio146/direction&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 out&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 0&lt;br /&gt;
 root@overo# echo 1 &amp;gt; /sys/class/gpio/gpio146/value&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 1&lt;br /&gt;
&lt;br /&gt;
If you have an expansion card with a 40 pin header, then this will be controlling pin 27. You can use pin 1 for a ground. (If you don't have a meter, a p/n 276-0330 1.8V Red LED from Radio Shack works for testing.) &lt;br /&gt;
&lt;br /&gt;
Schematics and pin-outs for the Gumstix expansion boards can be found [http://pubs.gumstix.com/boards/ here.]&lt;br /&gt;
&lt;br /&gt;
=== How It Works ===&lt;br /&gt;
&lt;br /&gt;
See the kernel docs [http://www.kernel.org/doc/Documentation/gpio.txt gpio.txt] for an overview of gpio and the userspace sysfs interface. The &amp;quot;Sysfs Interface for Userspace (OPTIONAL)&amp;quot; section near the end discusses the userspace implementation.&lt;br /&gt;
&lt;br /&gt;
See the [http://www-s.ti.com/sc/techlit/spruf98 OMAP35X Technical Reference Manual] Section 7.6.3 PADCONFS Register Description and Table 7.5 Core Control Module PadConf Register Field in Section 7.4.4.3 Pad Multiplexing Register Fields for identifying the possible MUX configuration for each GPIO.&lt;br /&gt;
&lt;br /&gt;
Then see the U-Boot source code, board/overo/overo.h for how the pins on the Overo are actually being muxed. See include/asm-arm/arch-omap3/mux.h in the U-Boot tree for the definitions used in overo.h. The pins in mux mode M4 are already configured for GPIO.&lt;br /&gt;
&lt;br /&gt;
=== Making Modifications ===&lt;br /&gt;
&lt;br /&gt;
Currently all the GPIO multiplexing for the Overo's is being done by the bootloader U-Boot, so the conventional way to modify the pin muxing is to edit overo.h and rebuild U-Boot.&lt;br /&gt;
&lt;br /&gt;
You can also change the mux configuration from within Linux. One simple approach is to do it from userspace accessing /dev/mem. A program devmem2 is part of the omap3-console-image and will work. See the remuxing example below.&lt;br /&gt;
&lt;br /&gt;
If you are writing your own kernel module, you can also read/write the PADCONF registers the way you normally would after an ioremap.&lt;br /&gt;
&lt;br /&gt;
Third, there is a Linux build config option CONFIG_OMAP_MUX, not normally enabled in the Overo configs, that will give you some additional utility functions to simplify mux changes within kernel or module code (see arch/arm/plat-omap/mux.c).&lt;br /&gt;
&lt;br /&gt;
Finally, it looks like the Linux OMAP34xx pin muxing code is getting a complete overhaul. See this [http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18474.html thread] on the Linux OMAP mailing list. Judging from some posts on the Gumstix lists, it sounds like this will be available in 2.6.33.&lt;br /&gt;
&lt;br /&gt;
=== Overo Kernel Usage ===&lt;br /&gt;
&lt;br /&gt;
Just because pins are configured as GPIO in u-boot, doesn't necessarily mean you can use them. If you look at /sys/class/gpio on a default Overo, you'll get something like this.&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ls /sys/class/gpio&lt;br /&gt;
 export	gpio164  gpio65       gpiochip160  gpiochip64&lt;br /&gt;
 gpio15	gpio168  gpiochip0    gpiochip192  gpiochip96&lt;br /&gt;
 gpio16	gpio176  gpiochip128  gpiochip32   unexport&lt;br /&gt;
&lt;br /&gt;
The reason you see some GPIO already exported is because the linux code in arch/arm/mach-omap2/board-overo.c is explicitly exporting these pins for another use. Whether they are being used depends on the hardware you have attached. The kernel also uses pins configured as GPIO that it doesn't export. These depend on the board configuration and the kernel drivers being used.&lt;br /&gt;
&lt;br /&gt;
To be more explicit, look inside board-overo.c, you'll see these definitions&lt;br /&gt;
&lt;br /&gt;
 #define OVERO_GPIO_BT_XGATE     15&lt;br /&gt;
 #define OVERO_GPIO_W2W_NRESET   16&lt;br /&gt;
 #define OVERO_GPIO_PENDOWN      114&lt;br /&gt;
 #define OVERO_GPIO_BT_NRESET    164&lt;br /&gt;
 #define OVERO_GPIO_USBH_CPEN    168&lt;br /&gt;
 #define OVERO_GPIO_USBH_NRESET  183&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_SMSC911X_GPIO    176&lt;br /&gt;
 #define OVERO_SMSC911X2_GPIO   65&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_GPIO_LCD_EN 144&lt;br /&gt;
 #define OVERO_GPIO_LCD_BL 145&lt;br /&gt;
&lt;br /&gt;
Follow their usage inside the file and you will be able to explain the /sys/class/gpio output you see above.&lt;br /&gt;
&lt;br /&gt;
=== Input or Output ===&lt;br /&gt;
&lt;br /&gt;
Pins configured as GPIO are sometimes also specified as being strictly input or output. &lt;br /&gt;
&lt;br /&gt;
This can happen when they are mux'd or when they are explicitly exported by the kernel. &lt;br /&gt;
&lt;br /&gt;
In either of those cases you won't be able to change the I/O direction from userspace.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Specifications ===&lt;br /&gt;
&lt;br /&gt;
Voltage is 1.8v &lt;br /&gt;
&lt;br /&gt;
Current specifications &amp;lt;TODO ???&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Usable Pins ===&lt;br /&gt;
&lt;br /&gt;
Here's a few GPIO you can use immediately from userspace without any u-boot or kernel changes.&lt;br /&gt;
&lt;br /&gt;
==== 40 Pin Expansion Header ==== &lt;br /&gt;
&lt;br /&gt;
Pin 4 - gpio114&amp;lt;br /&amp;gt;&lt;br /&gt;
It's the pendown signal on the touchscreen controller but it's available if you aren't using a touchscreen.&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as input only when exported by the kernel in board-overo.h. Can't change the direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pulled-low, reads 0 with no input, reads 1 with an input applied&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 19 - gpio170&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDQ/1-Wire output. Not used unless you explicitly enable the 1-wire module.&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Output only - configured this way in the u-boot muxing&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 27 - gpio146&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 29 - gpio147&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Direction can be changed&amp;lt;br /&amp;gt;&lt;br /&gt;
Floating state&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 28 - gpio145&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 30 - gpio144&amp;lt;br /&amp;gt;&lt;br /&gt;
Used with LCD, but available if not using an LCD&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as output only when exported by the kernel in board-overo.h. Can't change direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Set to ON by kernel during init (not all configs, see board-overo.c). This could be a problem for real use, but okay for testing.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Palo43 Board ====&lt;br /&gt;
&lt;br /&gt;
LED D2 - gpio21&amp;lt;br /&amp;gt;&lt;br /&gt;
LED D3 - gpio22&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, set the direction as out&amp;lt;br /&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; gpioxx/value to turn on, echo 1 &amp;gt; gpioxx/value to turn off&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch - gpio14&amp;lt;br /&amp;gt;&lt;br /&gt;
Switch - gpio23&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, leave direction as in&amp;lt;br /&amp;gt;&lt;br /&gt;
With the switch open (not pushed) will register a value of 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Push the switch and the value will be 0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example: Changing the multiplexing for a pin ===&lt;br /&gt;
&lt;br /&gt;
If you aren't using the first SPI bus, then there are 5 pins on the 40-pin expansion header that you could repurpose for GPIO.&lt;br /&gt;
&lt;br /&gt;
Pin 3 - gpio171(spi1_clk)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 5 - gpio172 (spi1_mosi)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 6 - gpio174 (spi1_cs0)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 7 - gpio173 (spi1_miso)&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 8 - gpio175 (spi1_cs1)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first step is to find the appropriate PADCONF register address for each gpio from Table 7.5 of the TRM. Pay attention to whether it is the low or high order 16 bits for each gpio. You should come up with these values.&lt;br /&gt;
&lt;br /&gt;
gpio171 : 0x4800 21C8&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio172 : 0x4800 21CA&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio173 : 0x4800 21CC&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio174 : 0x4800 21CE&amp;lt;br /&amp;gt;&lt;br /&gt;
gpio175 : 0x4800 21D0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using devmem2, here is how you could read the current PADCONF value for what could be gpio171&lt;br /&gt;
&lt;br /&gt;
 root@overo# devmem2 0x480021c8 h&lt;br /&gt;
 ...&lt;br /&gt;
 Value at address 0x480021C8 (0x400201c8): 0x100&lt;br /&gt;
&lt;br /&gt;
Which corresponds to a mux value of (IEN | PTD | DIS | M0) using the U-Boot mux.h definitions. Mux mode 0 for this pin is the spi1_clk configuration found by looking in Table 7.5 of the TRM.&lt;br /&gt;
&lt;br /&gt;
To reconfigure pin 3 to be gpio171, as input or output with inputs pulled low, write 0x010C to the controlling PADCONF register. This would correspond to (IEN | PTD | EN | M4). The bit fields are defined in the TRM Section 7.6.3.&lt;br /&gt;
&lt;br /&gt;
 root@overo# devmem2 0x480021c8 h 0x10c&lt;br /&gt;
&lt;br /&gt;
Now you can export and configure gpio171 from userspace like the example with gpio146 at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you want this multiplexing to be permanent, then you would modify the U-Boot file board/overo/overo.h and rebuild U-Boot. If you are using OE, then you'll want to generate a patch file to be used in the u-boot-omap3 recipe.&lt;br /&gt;
&lt;br /&gt;
=== GPIO Software for the Overo ===&lt;br /&gt;
&lt;br /&gt;
Dave Hylands has written several software packages to facilitate GPIO programming on the Overos.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=GPIO_Event_Driver GPIO Event Driver] allows multiple GPIO lines to be monitored from user-space.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=User_GPIO_Driver User GPIO Driver] is a reflection of the kernel's gpiolib API into user space.&lt;br /&gt;
&lt;br /&gt;
=== More Links ===&lt;br /&gt;
&lt;br /&gt;
Here is another article [http://elinux.org/BeagleBoardPinMux BeagleBoardPinMux] talking about OMAP3 pin muxing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Verdex GPIO ==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100px&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:yellow;&amp;quot; | GPIO(&amp;lt;i&amp;gt; n &amp;lt;/i&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Logic level (3.3V) signals &lt;br /&gt;
* 3-4mA max&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all GPIO's information and examples should go here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
todo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the PXA270 datasheet:&lt;br /&gt;
http://pubs.gumstix.com/documents/PXA%20Documentation/PXA270/PXA270%20Electrical,%20Mechanical,%20and%20Thermal%20Specification%20%5b280002-005%5d.pdf&lt;br /&gt;
most of the pins are limited to 3mA, and a few can go upto 4 mA (see page 5-9) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If proc-gpio is a module, add it to /etc/modules or do a modprobe proc-gpio.&lt;br /&gt;
&lt;br /&gt;
A number of files exist under /proc/gpio, one for each GPIO on the PXA processor.&lt;br /&gt;
&lt;br /&gt;
If you cat one of these files, you get, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /proc/gpio/GPIO12&lt;br /&gt;
12 GPIO in set&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That tells you — GPIO number, function (either GPIO, AF 1, AF 2, or AF 3), in|out, set|clear.&lt;br /&gt;
&lt;br /&gt;
You can change any of those values, by writing to the file, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;AF1 out&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets GPIO12 to AF1, out mode. (In the case of GPIO12, the PXA defines this function as putting out the 32kHz clock signal.) this is currently case-sensitive&lt;br /&gt;
&lt;br /&gt;
If you have the GPIO set to an output, and GPIO mode, you can set or clear the signal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;GPIO out set&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
# echo &amp;quot;GPIO out clear&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The alternative functions are described in the PXA255 Developer's Manual (link should be found in the Featured links-box) section 4.1.2.&lt;br /&gt;
&lt;br /&gt;
=== Alternative method to access GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
The [[User GPIO Driver]] provides a reflection of the kernel's gpiolib library into userspace.&lt;br /&gt;
&lt;br /&gt;
=== gpio-event driver ===&lt;br /&gt;
&lt;br /&gt;
The [[GPIO Event Driver]] allows gpio changes to be captured from user-space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Related pages on the old wiki:&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Tips_and_tricks#Access_GPIOs_from_user-space&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Sample_code/C/gpregs&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Kernel_programming&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
[[Category:Literature]]&lt;br /&gt;
[[Category:GPIO]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4100</id>
		<title>GPIO</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4100"/>
				<updated>2010-02-12T14:15:14Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Better OMAP3 TRM link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo GPIO ==&lt;br /&gt;
&lt;br /&gt;
The Overo kernels support the sysfs gpio implementation for accessing GPIO from userspace. &lt;br /&gt;
&lt;br /&gt;
This allows you to control GPIO from the command line this way&lt;br /&gt;
&lt;br /&gt;
 root@overo# echo 146 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 in&lt;br /&gt;
 root@overo# echo out &amp;gt; /sys/class/gpio/gpio146/direction&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 out&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 0&lt;br /&gt;
 root@overo# echo 1 &amp;gt; /sys/class/gpio/gpio146/value&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 1&lt;br /&gt;
&lt;br /&gt;
If you have an expansion card with a 40 pin header, then this will be controlling pin 27. You can use pin 1 for a ground. (If you don't have a meter, a p/n 276-0330 1.8V Red LED from Radio Shack works for testing.) &lt;br /&gt;
&lt;br /&gt;
Schematics and pin-outs for the Gumstix expansion boards can be found [http://pubs.gumstix.com/boards/ here.]&lt;br /&gt;
&lt;br /&gt;
=== How It Works ===&lt;br /&gt;
&lt;br /&gt;
See the kernel docs [http://www.kernel.org/doc/Documentation/gpio.txt gpio.txt] for an overview of gpio and the userspace sysfs interface. The &amp;quot;Sysfs Interface for Userspace (OPTIONAL)&amp;quot; section near the end discusses the userspace implementation.&lt;br /&gt;
&lt;br /&gt;
See the [http://www-s.ti.com/sc/techlit/spruf98 OMAP35X Technical Reference Manual] Section 7.6.3 PADCONFS Register Description and Table 7.5 Core Control Module PadConf Register Field in Section 7.4.4.3 Pad Multiplexing Register Fields for identifying the possible MUX configuration for each GPIO.&lt;br /&gt;
&lt;br /&gt;
Then see the U-Boot source code, board/overo/overo.h for how the pins on the Overo are actually being muxed. See include/asm-arm/arch-omap3/mux.h in the U-Boot tree for the definitions used in overo.h. The pins in mux mode M4 are already configured for GPIO.&lt;br /&gt;
&lt;br /&gt;
=== Making Modifications ===&lt;br /&gt;
&lt;br /&gt;
Currently all the GPIO multiplexing for the Overo's is being done by the bootloader U-Boot, so the conventional way to modify the pin muxing is to edit overo.h and rebuild U-Boot.&lt;br /&gt;
&lt;br /&gt;
You can also change the mux configuration from within Linux. One simple approach is to do it from userspace accessing /dev/mem. A program devmem2 is part of the omap3-console-image and will work. TODO: show an example&lt;br /&gt;
&lt;br /&gt;
If you are writing your own kernel module, you can also read/write the PADCONF registers the way you normally would after an ioremap.&lt;br /&gt;
&lt;br /&gt;
Third, there is a Linux build config option CONFIG_OMAP_MUX, not normally enabled in the Overo configs, that will give you some additional utility functions to simplify mux changes within kernel or module code (see arch/arm/plat-omap/mux.c).&lt;br /&gt;
&lt;br /&gt;
Finally, it looks like the Linux OMAP34xx pin muxing code is getting a complete overhaul. See this [http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18474.html thread] on the Linux OMAP mailing list. Judging from some posts on the Gumstix lists, it sounds like this will be available in 2.6.33.&lt;br /&gt;
&lt;br /&gt;
=== Overo Kernel Usage ===&lt;br /&gt;
&lt;br /&gt;
Just because pins are configured as GPIO in u-boot, doesn't necessarily mean you can use them. If you look at /sys/class/gpio on a default Overo, you'll get something like this.&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ls /sys/class/gpio&lt;br /&gt;
 export	gpio164  gpio65       gpiochip160  gpiochip64&lt;br /&gt;
 gpio15	gpio168  gpiochip0    gpiochip192  gpiochip96&lt;br /&gt;
 gpio16	gpio176  gpiochip128  gpiochip32   unexport&lt;br /&gt;
&lt;br /&gt;
The reason you see some GPIO already exported is because the linux code in arch/arm/mach-omap2/board-overo.c is explicitly exporting these pins for another use. Whether they are being used depends on the hardware you have attached. The kernel also uses pins configured as GPIO that it doesn't export. These depend on the board configuration and the kernel drivers being used.&lt;br /&gt;
&lt;br /&gt;
To be more explicit, look inside board-overo.c, you'll see these definitions&lt;br /&gt;
&lt;br /&gt;
 #define OVERO_GPIO_BT_XGATE     15&lt;br /&gt;
 #define OVERO_GPIO_W2W_NRESET   16&lt;br /&gt;
 #define OVERO_GPIO_PENDOWN      114&lt;br /&gt;
 #define OVERO_GPIO_BT_NRESET    164&lt;br /&gt;
 #define OVERO_GPIO_USBH_CPEN    168&lt;br /&gt;
 #define OVERO_GPIO_USBH_NRESET  183&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_SMSC911X_GPIO    176&lt;br /&gt;
 #define OVERO_SMSC911X2_GPIO   65&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_GPIO_LCD_EN 144&lt;br /&gt;
 #define OVERO_GPIO_LCD_BL 145&lt;br /&gt;
&lt;br /&gt;
Follow their usage inside the file and you will be able to explain the /sys/class/gpio output you see above.&lt;br /&gt;
&lt;br /&gt;
=== Input or Output ===&lt;br /&gt;
&lt;br /&gt;
Pins configured as GPIO are sometimes also specified as being strictly input or output. &lt;br /&gt;
&lt;br /&gt;
This can happen when they are mux'd or when they are explicitly exported by the kernel. &lt;br /&gt;
&lt;br /&gt;
In either of those cases you won't be able to change the I/O direction from userspace.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Specifications ===&lt;br /&gt;
&lt;br /&gt;
Voltage is 1.8v &lt;br /&gt;
&lt;br /&gt;
Current specifications &amp;lt;TODO ???&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Usable Pins ===&lt;br /&gt;
&lt;br /&gt;
Here's a few GPIO you can use immediately from userspace without any u-boot or kernel changes.&lt;br /&gt;
&lt;br /&gt;
==== 40 Pin Expansion Header ==== &lt;br /&gt;
&lt;br /&gt;
Pin 4 - gpio114&amp;lt;br /&amp;gt;&lt;br /&gt;
It's the pendown signal on the touchscreen controller but it's available if you aren't using a touchscreen.&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as input only when exported by the kernel in board-overo.h. Can't change the direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pulled-low, reads 0 with no input, reads 1 with an input applied&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 19 - gpio170&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDQ/1-Wire output. Not used unless you explicitly enable the 1-wire module.&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Output only - configured this way in the u-boot muxing&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 27 - gpio146&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 29 - gpio147&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Direction can be changed&amp;lt;br /&amp;gt;&lt;br /&gt;
Floating state&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 28 - gpio145&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 30 - gpio144&amp;lt;br /&amp;gt;&lt;br /&gt;
Used with LCD, but available if not using an LCD&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as output only when exported by the kernel in board-overo.h. Can't change direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Set to ON by kernel during init (not all configs, see board-overo.c). This could be a problem for real use, but okay for testing.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Palo43 Board ====&lt;br /&gt;
&lt;br /&gt;
LED D2 - gpio21&amp;lt;br /&amp;gt;&lt;br /&gt;
LED D3 - gpio22&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, set the direction as out&amp;lt;br /&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; gpioxx/value to turn on, echo 1 &amp;gt; gpioxx/value to turn off&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch - gpio14&amp;lt;br /&amp;gt;&lt;br /&gt;
Switch - gpio23&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, leave direction as in&amp;lt;br /&amp;gt;&lt;br /&gt;
With the switch open (not pushed) will register a value of 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Push the switch and the value will be 0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPIO Software for the Overo ===&lt;br /&gt;
&lt;br /&gt;
Dave Hylands has written several software packages to facilitate GPIO programming on the Overos.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=GPIO_Event_Driver GPIO Event Driver] allows multiple GPIO lines to be monitored from user-space.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=User_GPIO_Driver User GPIO Driver] is a reflection of the kernel's gpiolib API into user space.&lt;br /&gt;
&lt;br /&gt;
=== More Links ===&lt;br /&gt;
&lt;br /&gt;
Here is another article [http://elinux.org/BeagleBoardPinMux BeagleBoardPinMux] talking about OMAP3 pin muxing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Verdex GPIO ==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100px&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:yellow;&amp;quot; | GPIO(&amp;lt;i&amp;gt; n &amp;lt;/i&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Logic level (3.3V) signals &lt;br /&gt;
* 3-4mA max&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all GPIO's information and examples should go here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
todo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the PXA270 datasheet:&lt;br /&gt;
http://pubs.gumstix.com/documents/PXA%20Documentation/PXA270/PXA270%20Electrical,%20Mechanical,%20and%20Thermal%20Specification%20%5b280002-005%5d.pdf&lt;br /&gt;
most of the pins are limited to 3mA, and a few can go upto 4 mA (see page 5-9) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If proc-gpio is a module, add it to /etc/modules or do a modprobe proc-gpio.&lt;br /&gt;
&lt;br /&gt;
A number of files exist under /proc/gpio, one for each GPIO on the PXA processor.&lt;br /&gt;
&lt;br /&gt;
If you cat one of these files, you get, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /proc/gpio/GPIO12&lt;br /&gt;
12 GPIO in set&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That tells you — GPIO number, function (either GPIO, AF 1, AF 2, or AF 3), in|out, set|clear.&lt;br /&gt;
&lt;br /&gt;
You can change any of those values, by writing to the file, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;AF1 out&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets GPIO12 to AF1, out mode. (In the case of GPIO12, the PXA defines this function as putting out the 32kHz clock signal.) this is currently case-sensitive&lt;br /&gt;
&lt;br /&gt;
If you have the GPIO set to an output, and GPIO mode, you can set or clear the signal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;GPIO out set&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
# echo &amp;quot;GPIO out clear&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The alternative functions are described in the PXA255 Developer's Manual (link should be found in the Featured links-box) section 4.1.2.&lt;br /&gt;
&lt;br /&gt;
=== Alternative method to access GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
The [[User GPIO Driver]] provides a reflection of the kernel's gpiolib library into userspace.&lt;br /&gt;
&lt;br /&gt;
=== gpio-event driver ===&lt;br /&gt;
&lt;br /&gt;
The [[GPIO Event Driver]] allows gpio changes to be captured from user-space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Related pages on the old wiki:&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Tips_and_tricks#Access_GPIOs_from_user-space&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Sample_code/C/gpregs&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Kernel_programming&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
[[Category:Literature]]&lt;br /&gt;
[[Category:GPIO]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4099</id>
		<title>GPIO</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=GPIO&amp;diff=4099"/>
				<updated>2010-02-12T14:00:42Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added Overo stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overo GPIO ==&lt;br /&gt;
&lt;br /&gt;
The Overo kernels support the sysfs gpio implementation for accessing GPIO from userspace. &lt;br /&gt;
&lt;br /&gt;
This allows you to control GPIO from the command line this way&lt;br /&gt;
&lt;br /&gt;
 root@overo# echo 146 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 in&lt;br /&gt;
 root@overo# echo out &amp;gt; /sys/class/gpio/gpio146/direction&lt;br /&gt;
 root@overo:/sys/class/gpio# cat gpio146/direction&lt;br /&gt;
 out&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 0&lt;br /&gt;
 root@overo# echo 1 &amp;gt; /sys/class/gpio/gpio146/value&lt;br /&gt;
 root@overo# cat /sys/class/gpio/gpio146/value&lt;br /&gt;
 1&lt;br /&gt;
&lt;br /&gt;
If you have an expansion card with a 40 pin header, then this will be controlling pin 27. You can use pin 1 for a ground. (If you don't have a meter, a p/n 276-0330 1.8V Red LED from Radio Shack works for testing.) &lt;br /&gt;
&lt;br /&gt;
Schematics and pin-outs for the Gumstix expansion boards can be found [http://pubs.gumstix.com/boards/ here.]&lt;br /&gt;
&lt;br /&gt;
=== How It Works ===&lt;br /&gt;
&lt;br /&gt;
See the kernel docs [http://www.kernel.org/doc/Documentation/gpio.txt gpio.txt] for an overview of gpio and the userspace sysfs interface. The &amp;quot;Sysfs Interface for Userspace (OPTIONAL)&amp;quot; section near the end discusses the userspace implementation.&lt;br /&gt;
&lt;br /&gt;
See the [http://wiki.davincidsp.com/index.php/OMAP35x_Technical_Reference_Manual_%28TRM%29 OMAP35X Technical Reference Manual] Section 7.6.3 PADCONFS Register Description and Table 7.5 Core Control Module PadConf Register Field in Section 7.4.4.3 Pad Multiplexing Register Fields for identifying the possible MUX configuration for each GPIO.&lt;br /&gt;
&lt;br /&gt;
Then see the U-Boot source code, board/overo/overo.h for how the pins on the Overo are actually being muxed. See include/asm-arm/arch-omap3/mux.h in the U-Boot tree for the definitions used in overo.h. The pins in mux mode M4 are already configured for GPIO.&lt;br /&gt;
&lt;br /&gt;
=== Making Modifications ===&lt;br /&gt;
&lt;br /&gt;
Currently all the GPIO multiplexing for the Overo's is being done by the bootloader U-Boot, so the conventional way to modify the pin muxing is to edit overo.h and rebuild U-Boot.&lt;br /&gt;
&lt;br /&gt;
You can also change the mux configuration from within Linux. One simple approach is to do it from userspace accessing /dev/mem. A program devmem2 is part of the omap3-console-image and will work. TODO: show an example&lt;br /&gt;
&lt;br /&gt;
If you are writing your own kernel module, you can also read/write the PADCONF registers the way you normally would after an ioremap.&lt;br /&gt;
&lt;br /&gt;
Third, there is a Linux build config option CONFIG_OMAP_MUX, not normally enabled in the Overo configs, that will give you some additional utility functions to simplify mux changes within kernel or module code (see arch/arm/plat-omap/mux.c).&lt;br /&gt;
&lt;br /&gt;
Finally, it looks like the Linux OMAP34xx pin muxing code is getting a complete overhaul. See this [http://www.mail-archive.com/linux-omap@vger.kernel.org/msg18474.html thread] on the Linux OMAP mailing list. Judging from some posts on the Gumstix lists, it sounds like this will be available in 2.6.33.&lt;br /&gt;
&lt;br /&gt;
=== Overo Kernel Usage ===&lt;br /&gt;
&lt;br /&gt;
Just because pins are configured as GPIO in u-boot, doesn't necessarily mean you can use them. If you look at /sys/class/gpio on a default Overo, you'll get something like this.&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ls /sys/class/gpio&lt;br /&gt;
 export	gpio164  gpio65       gpiochip160  gpiochip64&lt;br /&gt;
 gpio15	gpio168  gpiochip0    gpiochip192  gpiochip96&lt;br /&gt;
 gpio16	gpio176  gpiochip128  gpiochip32   unexport&lt;br /&gt;
&lt;br /&gt;
The reason you see some GPIO already exported is because the linux code in arch/arm/mach-omap2/board-overo.c is explicitly exporting these pins for another use. Whether they are being used depends on the hardware you have attached. The kernel also uses pins configured as GPIO that it doesn't export. These depend on the board configuration and the kernel drivers being used.&lt;br /&gt;
&lt;br /&gt;
To be more explicit, look inside board-overo.c, you'll see these definitions&lt;br /&gt;
&lt;br /&gt;
 #define OVERO_GPIO_BT_XGATE     15&lt;br /&gt;
 #define OVERO_GPIO_W2W_NRESET   16&lt;br /&gt;
 #define OVERO_GPIO_PENDOWN      114&lt;br /&gt;
 #define OVERO_GPIO_BT_NRESET    164&lt;br /&gt;
 #define OVERO_GPIO_USBH_CPEN    168&lt;br /&gt;
 #define OVERO_GPIO_USBH_NRESET  183&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_SMSC911X_GPIO    176&lt;br /&gt;
 #define OVERO_SMSC911X2_GPIO   65&lt;br /&gt;
 ...&lt;br /&gt;
 #define OVERO_GPIO_LCD_EN 144&lt;br /&gt;
 #define OVERO_GPIO_LCD_BL 145&lt;br /&gt;
&lt;br /&gt;
Follow their usage inside the file and you will be able to explain the /sys/class/gpio output you see above.&lt;br /&gt;
&lt;br /&gt;
=== Input or Output ===&lt;br /&gt;
&lt;br /&gt;
Pins configured as GPIO are sometimes also specified as being strictly input or output. &lt;br /&gt;
&lt;br /&gt;
This can happen when they are mux'd or when they are explicitly exported by the kernel. &lt;br /&gt;
&lt;br /&gt;
In either of those cases you won't be able to change the I/O direction from userspace.&lt;br /&gt;
&lt;br /&gt;
=== Electrical Specifications ===&lt;br /&gt;
&lt;br /&gt;
Voltage is 1.8v &lt;br /&gt;
&lt;br /&gt;
Current specifications &amp;lt;TODO ???&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Usable Pins ===&lt;br /&gt;
&lt;br /&gt;
Here's a few GPIO you can use immediately from userspace without any u-boot or kernel changes.&lt;br /&gt;
&lt;br /&gt;
==== 40 Pin Expansion Header ==== &lt;br /&gt;
&lt;br /&gt;
Pin 4 - gpio114&amp;lt;br /&amp;gt;&lt;br /&gt;
It's the pendown signal on the touchscreen controller but it's available if you aren't using a touchscreen.&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as input only when exported by the kernel in board-overo.h. Can't change the direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Pulled-low, reads 0 with no input, reads 1 with an input applied&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 19 - gpio170&amp;lt;br /&amp;gt;&lt;br /&gt;
The HDQ/1-Wire output. Not used unless you explicitly enable the 1-wire module.&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Output only - configured this way in the u-boot muxing&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 27 - gpio146&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 29 - gpio147&amp;lt;br /&amp;gt;&lt;br /&gt;
User exportable&amp;lt;br /&amp;gt;&lt;br /&gt;
Direction can be changed&amp;lt;br /&amp;gt;&lt;br /&gt;
Floating state&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pin 28 - gpio145&amp;lt;br /&amp;gt;&lt;br /&gt;
Pin 30 - gpio144&amp;lt;br /&amp;gt;&lt;br /&gt;
Used with LCD, but available if not using an LCD&amp;lt;br /&amp;gt;&lt;br /&gt;
Configured as output only when exported by the kernel in board-overo.h. Can't change direction from userspace without modifying kernel.&amp;lt;br /&amp;gt;&lt;br /&gt;
Set to ON by kernel during init (not all configs, see board-overo.c). This could be a problem for real use, but okay for testing.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Palo43 Board ====&lt;br /&gt;
&lt;br /&gt;
LED D2 - gpio21&amp;lt;br /&amp;gt;&lt;br /&gt;
LED D3 - gpio22&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, set the direction as out&amp;lt;br /&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; gpioxx/value to turn on, echo 1 &amp;gt; gpioxx/value to turn off&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch - gpio14&amp;lt;br /&amp;gt;&lt;br /&gt;
Switch - gpio23&amp;lt;br /&amp;gt;&lt;br /&gt;
Userspace exportable, leave direction as in&amp;lt;br /&amp;gt;&lt;br /&gt;
With the switch open (not pushed) will register a value of 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Push the switch and the value will be 0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPIO Software for the Overo ===&lt;br /&gt;
&lt;br /&gt;
Dave Hylands has written several software packages to facilitate GPIO programming on the Overos.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=GPIO_Event_Driver GPIO Event Driver] allows multiple GPIO lines to be monitored from user-space.&lt;br /&gt;
&lt;br /&gt;
[http://www.gumstix.net/wiki/index.php?title=User_GPIO_Driver User GPIO Driver] is a reflection of the kernel's gpiolib API into user space.&lt;br /&gt;
&lt;br /&gt;
=== More Links ===&lt;br /&gt;
&lt;br /&gt;
Here is another article [http://elinux.org/BeagleBoardPinMux BeagleBoardPinMux] talking about OMAP3 pin muxing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Verdex GPIO ==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;width:100px&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:yellow;&amp;quot; | GPIO(&amp;lt;i&amp;gt; n &amp;lt;/i&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Logic level (3.3V) signals &lt;br /&gt;
* 3-4mA max&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all GPIO's information and examples should go here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
todo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the PXA270 datasheet:&lt;br /&gt;
http://pubs.gumstix.com/documents/PXA%20Documentation/PXA270/PXA270%20Electrical,%20Mechanical,%20and%20Thermal%20Specification%20%5b280002-005%5d.pdf&lt;br /&gt;
most of the pins are limited to 3mA, and a few can go upto 4 mA (see page 5-9) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If proc-gpio is a module, add it to /etc/modules or do a modprobe proc-gpio.&lt;br /&gt;
&lt;br /&gt;
A number of files exist under /proc/gpio, one for each GPIO on the PXA processor.&lt;br /&gt;
&lt;br /&gt;
If you cat one of these files, you get, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /proc/gpio/GPIO12&lt;br /&gt;
12 GPIO in set&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That tells you — GPIO number, function (either GPIO, AF 1, AF 2, or AF 3), in|out, set|clear.&lt;br /&gt;
&lt;br /&gt;
You can change any of those values, by writing to the file, eg:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;AF1 out&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets GPIO12 to AF1, out mode. (In the case of GPIO12, the PXA defines this function as putting out the 32kHz clock signal.) this is currently case-sensitive&lt;br /&gt;
&lt;br /&gt;
If you have the GPIO set to an output, and GPIO mode, you can set or clear the signal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;GPIO out set&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
# echo &amp;quot;GPIO out clear&amp;quot; &amp;gt; /proc/gpio/GPIO12&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The alternative functions are described in the PXA255 Developer's Manual (link should be found in the Featured links-box) section 4.1.2.&lt;br /&gt;
&lt;br /&gt;
=== Alternative method to access GPIO's from userland ===&lt;br /&gt;
&lt;br /&gt;
The [[User GPIO Driver]] provides a reflection of the kernel's gpiolib library into userspace.&lt;br /&gt;
&lt;br /&gt;
=== gpio-event driver ===&lt;br /&gt;
&lt;br /&gt;
The [[GPIO Event Driver]] allows gpio changes to be captured from user-space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Related pages on the old wiki:&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Tips_and_tricks#Access_GPIOs_from_user-space&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Sample_code/C/gpregs&lt;br /&gt;
&lt;br /&gt;
http://docwiki.gumstix.org/index.php/Kernel_programming&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
[[Category:Literature]]&lt;br /&gt;
[[Category:GPIO]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4089</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4089"/>
				<updated>2010-02-11T13:39:26Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added links to kernel docs, cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. This procedure&lt;br /&gt;
also works for Verdex-Pro boards although all the text and links&lt;br /&gt;
refer to Overo.&lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
A workstation running Ubuntu 9.10 is used for the example.&lt;br /&gt;
&lt;br /&gt;
The names of the packages will be different if you are using another &lt;br /&gt;
distribution.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This is just one method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo rootfs on the workstation. &lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server==&lt;br /&gt;
&lt;br /&gt;
Disable inetd control of tftpd which is the default for Ubuntu. Either comment the line in /etc/inetd.conf that references tftpd by adding a # to the start of the tftp line&lt;br /&gt;
&lt;br /&gt;
 # tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/int.tftpd -s /var/lib/tftpboot&lt;br /&gt;
&lt;br /&gt;
or if you don't need inetd for any other service, which a Ubuntu desktop install typically doesn't, disable inetd completely this way&lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20openbsd-inetd /etc/rc2.d/s20openbsd-inetd &lt;br /&gt;
&lt;br /&gt;
See the NOTES(1) section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing is pointing the tftp daemon at the Gumstix root filesystem we created above so that it will find the uImage kernel that sits there. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use &amp;lt;b&amp;gt;man exports&amp;lt;/b&amp;gt; to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables are used by default, so the boot behavior is still unchanged.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct. The format of the &amp;lt;b&amp;gt;ip&amp;lt;/b&amp;gt; kernel command line argument is found in the kernel documentation under  [http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt filesystems/nfsroot.txt]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. tftp and inetd. You can use inetd to run tftp if you want. Just edit the -s option for tftp appropriately in  /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
 tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/in.tftpd -s /exports/overo/boot&lt;br /&gt;
&lt;br /&gt;
and instead of this restart command&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
&lt;br /&gt;
use this one&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/openbsd-inetd restart&lt;br /&gt;
&lt;br /&gt;
And finally, prevent tftpd-hpa from starting by &lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20tftpd-hpa /etc/rc2.d/s20tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The default u-boot environment variables for the overo are defined in the u-boot source tree under &amp;lt;b&amp;gt;include/configs/omap3-overo.h&amp;lt;/b&amp;gt; if you wanted to customize or go back to defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
[http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/nfsroot.txt Documentation/filesystems/nfsroot.txt]&lt;br /&gt;
and [http://www.kernel.org/doc/Documentation/kernel-parameters.txt Documentation/kernel-parameters.txt.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11. If the gumstix seems unwilling to connect to your NFS server, ensure you've enabled NFS options in your kernel.&lt;br /&gt;
You'll need to include (directly, not as modules) CONFIG_NFS_FS, CONFIG_ROOT_NFS, CONFIG_NET_ETHERNET,&lt;br /&gt;
and, the appropriate Ethernet chip driver, in my case, CONFIG_SMC911X.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4082</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4082"/>
				<updated>2010-02-07T16:37:36Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Note to disable inetd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. This procedure&lt;br /&gt;
also works for Verdex-Pro boards although all the text and links&lt;br /&gt;
refer to Overo.&lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
The following procedure assumes a Linux workstation to host all&lt;br /&gt;
the services. The workstation for the example is running Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This example tries to keep it simple.&lt;br /&gt;
 &lt;br /&gt;
The names of the packages may be different if you are using another &lt;br /&gt;
Linux distribution.&lt;br /&gt;
&lt;br /&gt;
The example will use the following network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo kernel and rootfs on the workstation.&lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server==&lt;br /&gt;
&lt;br /&gt;
Disable inetd control of tftpd which is the default for Ubuntu. Either comment the line in /etc/inetd.conf that references tftpd by adding a # to the start of the tftp line&lt;br /&gt;
&lt;br /&gt;
 # tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/int.tftpd -s /var/lib/tftpboot&lt;br /&gt;
&lt;br /&gt;
or if you don't need inetd for any other service, which a Ubuntu desktop install typically doesn't, disable inetd completely this way&lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20openbsd-inetd /etc/rc2.d/s20openbsd-inetd &lt;br /&gt;
&lt;br /&gt;
See the NOTES section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing here is pointing the tftp daemon at the Gumstix root &lt;br /&gt;
filesystem we created above. The uImage kernel image sits here. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use man exports to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables&lt;br /&gt;
are used by the default boot process so there will be no booting behavior changes&lt;br /&gt;
yet.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. tftp and inetd. You can use inetd to run tftp if you want. Just edit the -s option for tftp appropriately in  /etc/inetd.conf &lt;br /&gt;
&lt;br /&gt;
 tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  /usr/sbin/in.tftpd -s /exports/overo/boot&lt;br /&gt;
&lt;br /&gt;
and instead of this restart command&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
&lt;br /&gt;
use this one&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/openbsd-inetd restart&lt;br /&gt;
&lt;br /&gt;
And finally, prevent tftpd-hpa from starting by &lt;br /&gt;
&lt;br /&gt;
 sudo mv /etc/rc2.d/S20tftpd-hpa /etc/rc2.d/s20tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
though that's not really necessary since inetd beats him to the socket.&lt;br /&gt;
&lt;br /&gt;
TIMTOWTDI&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The default u-boot environment variables are defined in the u-boot source tree under include/configs/omap3-overo.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
Documentation/filesystems/nfsroot.txt and Documentation/kernel-parameters.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
11. If the gumstix seems unwilling to connect to your NFS server, ensure you've enabled NFS options in your kernel.&lt;br /&gt;
You'll need to include (directly, not as modules) CONFIG_NFS_FS, CONFIG_ROOT_NFS, CONFIG_NET_ETHERNET,&lt;br /&gt;
and, the appropriate Ethernet chip driver, in my case, CONFIG_SMC911X.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4078</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4078"/>
				<updated>2010-02-04T13:07:42Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Not supposed to include linux/i2c.h in userspace progs,  I2C_SLAVE is also in linux/i2c-dev.h&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly different ways to do the same thing so a very similar serial communications method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
== I2C with Gumstix Overo ==&lt;br /&gt;
&lt;br /&gt;
There are several i2c buses available on the overo board.&lt;br /&gt;
&lt;br /&gt;
The bus accessible from most of the 40 pin expansion board headers is i2c-3.&lt;br /&gt;
&lt;br /&gt;
Refer to the board [http://pubs.gumstix.com/boards/ schematics] to find whether the board you are using exposes the i2c lines.&lt;br /&gt;
&lt;br /&gt;
You are looking for GPIO184_SCL3 and GPIO185_SDA3.&lt;br /&gt;
&lt;br /&gt;
For many of the boards, pin 23 is SCL and pin 24 is SDA. &lt;br /&gt;
&lt;br /&gt;
The voltage levels are 1.8v, so a voltage level shifter is required to connect to 3.3 or 5 volt slave devices. &lt;br /&gt;
A good explanation can be found [http://www.nxp.com/documents/application_note/AN10441.pdf here.]&lt;br /&gt;
&lt;br /&gt;
The overo main board already has pullup resistors for SCL and SDA.&lt;br /&gt;
&lt;br /&gt;
The default gumstix kernels set the i2c-3 bus speed to 400 kHz. &lt;br /&gt;
&lt;br /&gt;
This can be changed to 100 kHz with a kernel command line parameter in u-boot.&lt;br /&gt;
&lt;br /&gt;
 i2c_bus=3,100&lt;br /&gt;
&lt;br /&gt;
The i2c-3 bus appears as a character device under /dev&lt;br /&gt;
&lt;br /&gt;
 root@overo:/dev# ls -all i2c*&lt;br /&gt;
 crw-rw---- 1 root root 89, 1 Jan  1  2000 i2c-1&lt;br /&gt;
 crw-rw---- 1 root root 89, 3 Jan  1  2000 i2c-3&lt;br /&gt;
&lt;br /&gt;
Programmers can access devices on the bus using standard unix file i/o.&lt;br /&gt;
&lt;br /&gt;
You must set the slave address with an ioctl() call prior to communicating with a slave device. &lt;br /&gt;
&lt;br /&gt;
The driver takes care of shifting the slave address one bit and appending the R/W bit in the first byte of the transfer. &lt;br /&gt;
&lt;br /&gt;
Here's a C example minus any error checking.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 #include &amp;lt;stdint.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/i2c-dev.h&amp;gt; /* for I2C_SLAVE */&lt;br /&gt;
   ...&lt;br /&gt;
 &lt;br /&gt;
 int fh;&lt;br /&gt;
 uint8_t data[4];&lt;br /&gt;
 &lt;br /&gt;
 fh = open(&amp;quot;/dev/i2c-3&amp;quot;, O_RDWR);&lt;br /&gt;
 &lt;br /&gt;
 /* tell the driver we want the device at address 0x20 */&lt;br /&gt;
 ioctl(fh, I2C_SLAVE, 0x20);&lt;br /&gt;
 &lt;br /&gt;
 /* write two bytes */&lt;br /&gt;
 data[0] = 0x05;&lt;br /&gt;
 data[1] = 0x08;&lt;br /&gt;
 write(fh, data, 2);&lt;br /&gt;
 &lt;br /&gt;
 /* read 4 bytes */&lt;br /&gt;
 read(fh, data, 4);&lt;br /&gt;
 &lt;br /&gt;
 close(fh);&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&lt;br /&gt;
Another source of I2C information can be found [http://www.gumstix.net/wiki/index.php?title=I%C2%B2C here].&lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
Here is a small project showing how to write Overo I2C userland code to communicate with an I/O expander as the slave device. It includes a schematic for the voltage level conversion of the I2C lines that's required.&lt;br /&gt;
&lt;br /&gt;
[http://github.com/scottellis/overo-mcp23017 overo-mcp23017]&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4073</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4073"/>
				<updated>2010-02-02T16:26:04Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Missing restart arg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. This procedure&lt;br /&gt;
also works for Verdex-Pro boards although all the text and links&lt;br /&gt;
refer to Overo.&lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
The following procedure assumes a Linux workstation to host all&lt;br /&gt;
the services. The workstation for the example is running Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This example tries to keep it simple.&lt;br /&gt;
 &lt;br /&gt;
The names of the packages may be different if you are using another &lt;br /&gt;
Linux distribution.&lt;br /&gt;
&lt;br /&gt;
The example will use the following network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo kernel and rootfs on the workstation.&lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server== &lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing here is pointing the tftp daemon at the Gumstix root &lt;br /&gt;
filesystem we created above. The uImage kernel image sits here. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use man exports to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server restart&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables&lt;br /&gt;
are used by the default boot process so there will be no booting behavior changes&lt;br /&gt;
yet.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. The default u-boot environment variables are defined in the u-boot source tree under include/configs/omap3-overo.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
Documentation/filesystems/nfsroot.txt and Documentation/kernel-parameters.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;br /&gt;
&lt;br /&gt;
10. If the gumstix seems unwilling to connect to your NFS server, ensure you've enabled NFS options in your kernel.&lt;br /&gt;
You'll need to include (directly, not as modules) CONFIG_NFS_FS, CONFIG_ROOT_NFS, CONFIG_NET_ETHERNET,&lt;br /&gt;
and, the appropriate Ethernet chip driver, in my case, CONFIG_SMC911X.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4063</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4063"/>
				<updated>2010-01-30T13:21:33Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: better method, use local.conf instead of editting recipe directly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
The gumstix recipes for either of these kernels has a variable that allows you to specify how the OTG usb port is configured.&lt;br /&gt;
&lt;br /&gt;
Kernel version 2.6.31 is used for the example. Substitute 2.6.32 if that's the kernel you are using.&lt;br /&gt;
 &lt;br /&gt;
To get started, look at the recipe file ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.31.bb. You'll see a line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are three valid values for MUSB_MODE: &amp;quot;host&amp;quot;, &amp;quot;peripheral&amp;quot; or &amp;quot;otg&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
You could change the MUSB_MODE assignment directly in the recipe, but a better way to do this is to modify your local.conf file and add a MUSB_MODE variable.&lt;br /&gt;
&lt;br /&gt;
The ?= assignment means &amp;quot;host&amp;quot; will be assigned to MUSB_MODE only if it does not already have a value which it will if you give it one in local.conf.&lt;br /&gt;
&lt;br /&gt;
The local.conf file is found here ${OVEROTOP}/build/conf/local.conf.&lt;br /&gt;
&lt;br /&gt;
Add the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;peripheral&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE = &amp;quot;otg&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
depending on your preference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 cd ${OVEROTOP}&lt;br /&gt;
 bitbake -c clean linux-omap3-2.6.31&lt;br /&gt;
 bitbake -c rebuild linux-omap3-2.6.31&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs since the drivers available in /lib/modules will have changed.&lt;br /&gt;
&lt;br /&gt;
 bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
 &lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4062</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4062"/>
				<updated>2010-01-28T21:19:48Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Point to a simpler example, maybe more useful&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly different ways to do the same thing so a very similar serial communications method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
== I2C with Gumstix Overo ==&lt;br /&gt;
&lt;br /&gt;
There are several i2c buses available on the overo board.&lt;br /&gt;
&lt;br /&gt;
The bus accessible from most of the 40 pin expansion board headers is i2c-3.&lt;br /&gt;
&lt;br /&gt;
Refer to the board [http://pubs.gumstix.com/boards/ schematics] to find whether the board you are using exposes the i2c lines.&lt;br /&gt;
&lt;br /&gt;
You are looking for GPIO184_SCL3 and GPIO185_SDA3.&lt;br /&gt;
&lt;br /&gt;
For many of the boards, pin 23 is SCL and pin 24 is SDA. &lt;br /&gt;
&lt;br /&gt;
The voltage levels are 1.8v, so a voltage level shifter is required to connect to 3.3 or 5 volt slave devices. &lt;br /&gt;
A good explanation can be found [http://www.nxp.com/documents/application_note/AN10441.pdf here.]&lt;br /&gt;
&lt;br /&gt;
The overo main board already has pullup resistors for SCL and SDA.&lt;br /&gt;
&lt;br /&gt;
The default gumstix kernels set the i2c-3 bus speed to 400 kHz. &lt;br /&gt;
&lt;br /&gt;
This can be changed to 100 kHz with a kernel command line parameter in u-boot.&lt;br /&gt;
&lt;br /&gt;
 i2c_bus=3,100&lt;br /&gt;
&lt;br /&gt;
The i2c-3 bus appears as a character device under /dev&lt;br /&gt;
&lt;br /&gt;
 root@overo:/dev# ls -all i2c*&lt;br /&gt;
 crw-rw---- 1 root root 89, 1 Jan  1  2000 i2c-1&lt;br /&gt;
 crw-rw---- 1 root root 89, 3 Jan  1  2000 i2c-3&lt;br /&gt;
&lt;br /&gt;
Programmers can access devices on the bus using standard unix file i/o.&lt;br /&gt;
&lt;br /&gt;
You must set the slave address with an ioctl() call prior to communicating with a slave device. &lt;br /&gt;
&lt;br /&gt;
The driver takes care of shifting the slave address one bit and appending the R/W bit in the first byte of the transfer. &lt;br /&gt;
&lt;br /&gt;
Here's a C example minus any error checking.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 #include &amp;lt;stdint.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/i2c.h&amp;gt; /* for I2C_SLAVE */&lt;br /&gt;
   ...&lt;br /&gt;
 &lt;br /&gt;
 int fh;&lt;br /&gt;
 uint8_t data[4];&lt;br /&gt;
 &lt;br /&gt;
 fh = open(&amp;quot;/dev/i2c-3&amp;quot;, O_RDWR);&lt;br /&gt;
 &lt;br /&gt;
 /* tell the driver we want the device at address 0x20 */&lt;br /&gt;
 ioctl(fh, I2C_SLAVE, 0x20);&lt;br /&gt;
 &lt;br /&gt;
 /* write two bytes */&lt;br /&gt;
 data[0] = 0x05;&lt;br /&gt;
 data[1] = 0x08;&lt;br /&gt;
 write(fh, data, 2);&lt;br /&gt;
 &lt;br /&gt;
 /* read 4 bytes */&lt;br /&gt;
 read(fh, data, 4);&lt;br /&gt;
 &lt;br /&gt;
 close(fh);&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&lt;br /&gt;
Another source of I2C information can be found [http://www.gumstix.net/wiki/index.php?title=I%C2%B2C here].&lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
Here is a small project showing how to write Overo I2C userland code to communicate with an I/O expander as the slave device. It includes a schematic for the voltage level conversion of the I2C lines that's required.&lt;br /&gt;
&lt;br /&gt;
[http://github.com/scottellis/overo-mcp23017 overo-mcp23017]&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4054</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4054"/>
				<updated>2010-01-20T21:46:24Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
The gumstix-oe linux-omap3_2.6.xx recipes for either of these kernels has a variable that allows you to specify how you want the OTG usb port configured.&lt;br /&gt;
&lt;br /&gt;
Kernel version 2.6.31 is used for the example. Substitute 2.6.32 if that's the kernel you are using.&lt;br /&gt;
 &lt;br /&gt;
To get started, first edit the recipe file ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.31.bb&lt;br /&gt;
&lt;br /&gt;
Change the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;peripheral&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
or &amp;quot;otg&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 cd ${OVEROTOP}&lt;br /&gt;
 bitbake -c clean linux-omap3-2.6.31&lt;br /&gt;
 bitbake -c rebuild linux-omap3-2.6.31&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs.&lt;br /&gt;
&lt;br /&gt;
 bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
 &lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4052</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4052"/>
				<updated>2010-01-19T11:27:28Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Clarify when nand u-boot is used&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. &lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
The following procedure assumes a Linux workstation to host all&lt;br /&gt;
the services. The workstation for the example is running Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This example tries to keep it simple.&lt;br /&gt;
 &lt;br /&gt;
The names of the packages may be different if you are using another &lt;br /&gt;
Linux distribution.&lt;br /&gt;
&lt;br /&gt;
The example will use the following network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo kernel and rootfs on the workstation.&lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server== &lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing here is pointing the tftp daemon at the Gumstix root &lt;br /&gt;
filesystem we created above. The uImage kernel image sits here. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use man exports to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables&lt;br /&gt;
are used by the default boot process so there will be no booting behavior changes&lt;br /&gt;
yet.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. The default u-boot environment variables are defined in the u-boot source tree under include/configs/omap3-overo.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
Documentation/filesystems/nfsroot.txt and Documentation/kernel-parameters.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. When you do a &lt;br /&gt;
network boot without a microSD card, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4051</id>
		<title>Kernel Reconfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4051"/>
				<updated>2010-01-19T11:04:45Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Formatting of commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:How_to_-_linux]]&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
==Verdex==&lt;br /&gt;
&lt;br /&gt;
To reconfigure the kernel with the current state of Gumstix's OE things, you will need ''gnome-terminal''. Run this command: '''bitbake gumstix-kernel -c menuconfig'''&lt;br /&gt;
&lt;br /&gt;
NOTE: You have to have ncurses and ncurses-dev installed in order for the MENUCONFIG to actually work.&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: If a screen flashes infront of you and dissapears edit $OE_HOME/org.openembedded.snapshot/conf/bitbake.conf to the following &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: If you don't have gnome-terminal installed and wish to use xterm instead, use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMD = 'gnome-terminal --disable-factory -t &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMD = 'xterm -title &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -e ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel config information is kept in&amp;lt;br&amp;gt; &lt;br /&gt;
''$OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.XX/gumstix-custom-YYYYY/defconfig''&amp;lt;br&amp;gt;&lt;br /&gt;
where XX is the current default kernel version for your bitbake environment.  That nugget is set in the&lt;br /&gt;
''$OE_HOME/com.gumstix.collection/conf/machine/include/gumstix.inc'' file, under the PREFERRED_VERSION_gumstix-kernel&lt;br /&gt;
and YYYYY is usually one of connex/basix/verdex.  That nugget comes from&amp;lt;br&amp;gt;&lt;br /&gt;
''$OE_HOME/build/conf/auto.conf''&lt;br /&gt;
&lt;br /&gt;
After running menuconfig, running &amp;quot;bitbake -c rebuild gumstix-kernel&amp;quot; will blow away the customizations just made.  There is probably a better way to do this, but in order to preserve the customizations, you can copy the new config file and replace the default config.  For example, to preserve a verdex board's config, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cp \&lt;br /&gt;
 $OE_HOME/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/.config \&lt;br /&gt;
 $OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have replaced the default config, the following commands will rebuild and repackage the new kernel and create new images for you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake -c rebuild gumstix-kernel&lt;br /&gt;
bitbake -c rebuild task-base-gumstix&lt;br /&gt;
bitbake gumstix-basic-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overo==&lt;br /&gt;
&lt;br /&gt;
These instructions assume you are using the default gumstix-oe kernel as defined here&lt;br /&gt;
  &lt;br /&gt;
 $ cd $OVEROTOP&lt;br /&gt;
 $ grep linux org.openembedded/conf/machine/overo.conf&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And the current revision as defined here&lt;br /&gt;
&lt;br /&gt;
 $ bitbake --show-versions | grep linux-omap3&lt;br /&gt;
 linux-omap3                            0:2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
So the rest of the example will assume linux-omap3-2.6.32 revision 51. &lt;br /&gt;
&lt;br /&gt;
Substitute the kernel version and revision your system is using in the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First build the kernel normally with bitbake. If you have built an image, then it's already done. &lt;br /&gt;
&lt;br /&gt;
If not run this command&lt;br /&gt;
&lt;br /&gt;
 $ bitbake linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
This will create a source directory in the ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi directory.&lt;br /&gt;
In this case it will be &lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
To modify the kernel configuration, run menuconfig via bitbake. Make your changes and save the configuration.&lt;br /&gt;
&lt;br /&gt;
 $ cd $OVEROTOP&lt;br /&gt;
 $ bitbake -c menuconfig linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
The new kernel configuration file you created can be found here.&lt;br /&gt;
&lt;br /&gt;
${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/git/.config&lt;br /&gt;
&lt;br /&gt;
Copy that file to where the bitbake recipe for the kernel will use it.&lt;br /&gt;
&lt;br /&gt;
 $ cp ${OVEROTOP}/tmp/work/overo-angstrom-linux/gnueabi/linux-omap3-2.6.32-r51/git/.config \&lt;br /&gt;
    ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/defconfig&lt;br /&gt;
&lt;br /&gt;
Then rebuild the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -c clean linux-omap3-2.6.32&lt;br /&gt;
 $ bitbake -c rebuild linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
Then rebuild the rootfs to get the modules installed correctly. &lt;br /&gt;
&lt;br /&gt;
Substitute the image you are using, the example assumes the omap3-console-image.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Finally, install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4050</id>
		<title>Kernel Reconfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=4050"/>
				<updated>2010-01-18T11:35:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added overo instructions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:How_to_-_linux]]&lt;br /&gt;
[[Category:How_to_-_general]]&lt;br /&gt;
==Verdex==&lt;br /&gt;
&lt;br /&gt;
To reconfigure the kernel with the current state of Gumstix's OE things, you will need ''gnome-terminal''. Run this command: '''bitbake gumstix-kernel -c menuconfig'''&lt;br /&gt;
&lt;br /&gt;
NOTE: You have to have ncurses and ncurses-dev installed in order for the MENUCONFIG to actually work.&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: If a screen flashes infront of you and dissapears edit $OE_HOME/org.openembedded.snapshot/conf/bitbake.conf to the following &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: If you don't have gnome-terminal installed and wish to use xterm instead, use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
-GNOME_TERMCMD = 'gnome-terminal --disable-factory -t &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
-GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -x ${SHELLRCCMD}'&lt;br /&gt;
+GNOME_TERMCMD = 'xterm -title &amp;quot;$TERMWINDOWTITLE&amp;quot;'&lt;br /&gt;
+GNOME_TERMCMDRUN = '${GNOME_TERMCMD} -e ${SHELLCMDS}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The kernel config information is kept in&amp;lt;br&amp;gt; &lt;br /&gt;
''$OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.XX/gumstix-custom-YYYYY/defconfig''&amp;lt;br&amp;gt;&lt;br /&gt;
where XX is the current default kernel version for your bitbake environment.  That nugget is set in the&lt;br /&gt;
''$OE_HOME/com.gumstix.collection/conf/machine/include/gumstix.inc'' file, under the PREFERRED_VERSION_gumstix-kernel&lt;br /&gt;
and YYYYY is usually one of connex/basix/verdex.  That nugget comes from&amp;lt;br&amp;gt;&lt;br /&gt;
''$OE_HOME/build/conf/auto.conf''&lt;br /&gt;
&lt;br /&gt;
After running menuconfig, running &amp;quot;bitbake -c rebuild gumstix-kernel&amp;quot; will blow away the customizations just made.  There is probably a better way to do this, but in order to preserve the customizations, you can copy the new config file and replace the default config.  For example, to preserve a verdex board's config, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cp \&lt;br /&gt;
 $OE_HOME/tmp/work/gumstix-custom-verdex-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/.config \&lt;br /&gt;
 $OE_HOME/com.gumstix.collection/packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have replaced the default config, the following commands will rebuild and repackage the new kernel and create new images for you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
bitbake -c rebuild gumstix-kernel&lt;br /&gt;
bitbake -c rebuild task-base-gumstix&lt;br /&gt;
bitbake gumstix-basic-image&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Overo==&lt;br /&gt;
&lt;br /&gt;
These instructions assume you are using the default gumstix-oe kernel as defined here&lt;br /&gt;
  &lt;br /&gt;
  $ cd $OVEROTOP&lt;br /&gt;
  $ grep linux org.openembedded/conf/machine/overo.conf&lt;br /&gt;
  PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And the current revision as defined here&lt;br /&gt;
&lt;br /&gt;
  $ bitbake --show-versions | grep linux-omap3&lt;br /&gt;
  linux-omap3                            0:2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
So the rest of the example will assume linux-omap3-2.6.32 revision 51. &lt;br /&gt;
&lt;br /&gt;
Substitute the kernel version and revision your system is using in the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First build the kernel normally with bitbake. If you have built an image, then it's already done. &lt;br /&gt;
&lt;br /&gt;
If not run this command&lt;br /&gt;
&lt;br /&gt;
  $ bitbake linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
This will create a source directory in the ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi directory.&lt;br /&gt;
In this case it will be &lt;br /&gt;
&lt;br /&gt;
  ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51&lt;br /&gt;
&lt;br /&gt;
To modify the kernel configuration, run menuconfig via bitbake. Make your changes and save the configuration.&lt;br /&gt;
&lt;br /&gt;
  cd $OVEROTOP&lt;br /&gt;
  bitbake -c menuconfig linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
The new kernel configuration file you created can be found here.&lt;br /&gt;
&lt;br /&gt;
  ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/git/.config&lt;br /&gt;
&lt;br /&gt;
Copy that file to where the bitbake recipe for the kernel will use it.&lt;br /&gt;
&lt;br /&gt;
  cp ${OVEROTOP}/tmp/work/overo-angstrom-linux/gnueabi/linux-omap3-2.6.32-r51/git/.config \&lt;br /&gt;
    ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/defconfig&lt;br /&gt;
&lt;br /&gt;
Then rebuild the kernel.&lt;br /&gt;
&lt;br /&gt;
  bitbake -c clean linux-omap3-2.6.32&lt;br /&gt;
  bitbake -c rebuild linux-omap3-2.6.32&lt;br /&gt;
&lt;br /&gt;
Then rebuild the rootfs to get the modules installed correctly. &lt;br /&gt;
&lt;br /&gt;
Substitute the image you are using, the example assumes the omap3-console-image.&lt;br /&gt;
&lt;br /&gt;
  bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Finally, install the new kernel and rootfs the way you normally would using either a &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html microSD card] &lt;br /&gt;
or by copying to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html onboard nand].&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4049</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4049"/>
				<updated>2010-01-15T14:02:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added a link to a level shifter explanation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly different ways to do the same thing so a very similar serial communications method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
== I2C with Gumstix Overo ==&lt;br /&gt;
&lt;br /&gt;
There are several i2c buses available on the overo board.&lt;br /&gt;
&lt;br /&gt;
The bus accessible from most of the 40 pin expansion board headers is i2c-3.&lt;br /&gt;
&lt;br /&gt;
Refer to the board [http://pubs.gumstix.com/boards/ schematics] to find whether the board you are using exposes the i2c lines.&lt;br /&gt;
&lt;br /&gt;
You are looking for GPIO184_SCL3 and GPIO185_SDA3.&lt;br /&gt;
&lt;br /&gt;
For many of the boards, pin 23 is SCL and pin 24 is SDA. &lt;br /&gt;
&lt;br /&gt;
The voltage levels are 1.8v, so a voltage level shifter is required to connect to 3.3 or 5 volt slave devices. &lt;br /&gt;
A good explanation can be found [http://www.nxp.com/documents/application_note/AN10441.pdf here.]&lt;br /&gt;
&lt;br /&gt;
The overo main board already has pullup resistors for SCL and SDA.&lt;br /&gt;
&lt;br /&gt;
The default gumstix kernels set the i2c-3 bus speed to 400 kHz. &lt;br /&gt;
&lt;br /&gt;
This can be changed to 100 kHz with a kernel command line parameter in u-boot.&lt;br /&gt;
&lt;br /&gt;
 i2c_bus=3,100&lt;br /&gt;
&lt;br /&gt;
The i2c-3 bus appears as a character device under /dev&lt;br /&gt;
&lt;br /&gt;
 root@overo:/dev# ls -all i2c*&lt;br /&gt;
 crw-rw---- 1 root root 89, 1 Jan  1  2000 i2c-1&lt;br /&gt;
 crw-rw---- 1 root root 89, 3 Jan  1  2000 i2c-3&lt;br /&gt;
&lt;br /&gt;
Programmers can access devices on the bus using standard unix file i/o.&lt;br /&gt;
&lt;br /&gt;
You must set the slave address with an ioctl() call prior to communicating with a slave device. &lt;br /&gt;
&lt;br /&gt;
The driver takes care of shifting the slave address one bit and appending the R/W bit in the first byte of the transfer. &lt;br /&gt;
&lt;br /&gt;
Here's a C example minus any error checking.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 #include &amp;lt;stdint.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/i2c.h&amp;gt; /* for I2C_SLAVE */&lt;br /&gt;
   ...&lt;br /&gt;
 &lt;br /&gt;
 int fh;&lt;br /&gt;
 uint8_t data[4];&lt;br /&gt;
 &lt;br /&gt;
 fh = open(&amp;quot;/dev/i2c-3&amp;quot;, O_RDWR);&lt;br /&gt;
 &lt;br /&gt;
 /* tell the driver we want the device at address 0x20 */&lt;br /&gt;
 ioctl(fh, I2C_SLAVE, 0x20);&lt;br /&gt;
 &lt;br /&gt;
 /* write two bytes */&lt;br /&gt;
 data[0] = 0x05;&lt;br /&gt;
 data[1] = 0x08;&lt;br /&gt;
 write(fh, data, 2);&lt;br /&gt;
 &lt;br /&gt;
 /* read 4 bytes */&lt;br /&gt;
 read(fh, data, 4);&lt;br /&gt;
 &lt;br /&gt;
 close(fh);&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&lt;br /&gt;
Another source of I2C information can be found [http://www.gumstix.net/wiki/index.php?title=I%C2%B2C here].&lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
Here is a simple project showing how to use an overo to control some &amp;quot;smart&amp;quot; leds. It includes a schematic for the voltage level conversion of the I2C lines that's required.&lt;br /&gt;
&lt;br /&gt;
[http://github.com/scottellis/overo-blinkm Controlling BlinkM leds over I2C using a Gumstix Overo]&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4048</id>
		<title>Category:How to - Build helloworld</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Build_helloworld&amp;diff=4048"/>
				<updated>2010-01-14T18:39:21Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added a network boot link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
What follows is a description for building C programs on a workstation using the cross-build tools of [http://wiki.openembedded.net/index.php/Main_Page OpenEmbedded], but not using the bitbake/recipe framework.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
Follow the instructions for [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] to get the cross-build tools correctly installed.&lt;br /&gt;
&lt;br /&gt;
While you don't necessarily need to build a complete image to get the cross-tools for a C program, as a practical matter, successfully building an image is a good test that the cross-tools are correctly installed.&lt;br /&gt;
&lt;br /&gt;
If you only want to cross compile a C program without third-party dependencies, then you can build just the gcc-cross recipe.&lt;br /&gt;
&lt;br /&gt;
 bitbake gcc-cross&lt;br /&gt;
&lt;br /&gt;
And if you need the kernel headers too...&lt;br /&gt;
&lt;br /&gt;
 bitbake linux-libc-headers&lt;br /&gt;
&lt;br /&gt;
There is no time lost building only these recipes, since both are dependencies of a full image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tools are built under the TMPDIR directory declared in ${OVEROTOP}/build/conf/site.conf.&lt;br /&gt;
&lt;br /&gt;
TMPDIR defaults to ${OVEROTOP}/tmp, but you can point it somewhere else.&lt;br /&gt;
 &lt;br /&gt;
For instance, putting TMPDIR on a faster disk can speed your build.&lt;br /&gt;
&lt;br /&gt;
==Makefile==&lt;br /&gt;
&lt;br /&gt;
Create a makefile for your project pointing to the cross-build toolchain.&lt;br /&gt;
&lt;br /&gt;
Here is a simple one for helloworld.&lt;br /&gt;
&lt;br /&gt;
 # Makefile for building with the OE cross tools &lt;br /&gt;
 #&lt;br /&gt;
 # OVEROTOP is normally ${HOME}/overo-oe &lt;br /&gt;
 #&lt;br /&gt;
 # OETMP is the same as TMPDIR as defined in ${OVEROTOP}/build/conf/site.conf&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 OETMP = ${OVEROTOP}/tmp&lt;br /&gt;
 &lt;br /&gt;
 TOOLDIR = ${OETMP}/cross/armv7a/bin&lt;br /&gt;
 &lt;br /&gt;
 STAGEDIR = ${OETMP}/staging/armv7a-angstrom-linux-gnueabi/usr&lt;br /&gt;
 &lt;br /&gt;
 CC = ${TOOLDIR}/arm-angstrom-linux-gnueabi-gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS = -Wall  &lt;br /&gt;
 &lt;br /&gt;
 LIBDIR = ${STAGEDIR}/lib&lt;br /&gt;
 &lt;br /&gt;
 INCDIR = ${STAGEDIR}/include      &lt;br /&gt;
 &lt;br /&gt;
 LIBS = -L ${LIBDIR}&lt;br /&gt;
 &lt;br /&gt;
 TARGET = helloworld&lt;br /&gt;
 &lt;br /&gt;
 OBJS = helloworld.o &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ${TARGET} : $(OBJS)&lt;br /&gt;
         ${CC} ${CFLAGS} ${OBJS} ${LIBS} -o ${TARGET}&lt;br /&gt;
 &lt;br /&gt;
 helloworld.o: helloworld.c &lt;br /&gt;
         ${CC} ${CFLAGS} -I ${INCDIR} -c helloworld.c  &lt;br /&gt;
 &lt;br /&gt;
 clean:&lt;br /&gt;
         rm -f ${TARGET} ${OBJS} *~&lt;br /&gt;
&lt;br /&gt;
==Distribute==&lt;br /&gt;
&lt;br /&gt;
Copy the resulting target executable to the overo.&lt;br /&gt;
&lt;br /&gt;
1. If you are using [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html a microSD card], copy your executable to the rootfs before you unmount it in the final step.&lt;br /&gt;
&lt;br /&gt;
2. If you have a network connection to the overo, use scp.&lt;br /&gt;
&lt;br /&gt;
3. If you have a kermit console session, use the kermit SEND command.&lt;br /&gt;
&lt;br /&gt;
4. If you are doing a [http://www.gumstix.net/wiki/index.php?title=Category:How_to_-_Network_Boot network boot] then copy the executable directly to the nfs exported root filesystem the gumstix is using on the workstation.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4047</id>
		<title>Category:How to - usb</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=4047"/>
				<updated>2010-01-14T18:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added 2.6.32 reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==USBNet with Overo==&lt;br /&gt;
&lt;br /&gt;
The OTG USB port on the Overo expansion boards support USB networking. To enable this, the OTG port needs to be configured as a USB peripheral or gadget. The default kernels from Gumstix have the OTG port configured to act as a USB host.&lt;br /&gt;
&lt;br /&gt;
The procedure for changing the configuration requires rebuilding your kernel, so you should first be comfortable with [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html setting up a build environment] and building images for your Overo.&lt;br /&gt;
&lt;br /&gt;
The following steps assume you are using a recent snapshot of the gumstix-oe git tree and are going to use kernel version 2.6.31 or 2.6.32.&lt;br /&gt;
&lt;br /&gt;
The gumstix-oe linux-omap3_2.6.xx recipes for either of these kernels has a variable that allows you to specify how you want the OTG usb port configured.&lt;br /&gt;
&lt;br /&gt;
Kernel version 2.6.31 is used for the example. Substitute 2.6.32 if that's the kernel you are using.&lt;br /&gt;
 &lt;br /&gt;
To get started, first edit the recipe file ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3_2.6.31.bb&lt;br /&gt;
&lt;br /&gt;
Change the line&lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;host&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 MUSB_MODE ?= &amp;quot;peripheral&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
or &amp;quot;otg&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next rebuild your kernel.&lt;br /&gt;
&lt;br /&gt;
 cd ${OVEROTOP}&lt;br /&gt;
 bitbake -c clean linux-omap3-2.6.31&lt;br /&gt;
 bitbake -c rebuild linux-omap3-2.6.31&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then rebuild your rootfs.&lt;br /&gt;
&lt;br /&gt;
 bitbake omap3-console-image    &lt;br /&gt;
&lt;br /&gt;
Change omap3-console-image to whatever image you use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have booted the new system, you still need to load the g_ether driver since it was built as a module. &lt;br /&gt;
&lt;br /&gt;
You can add g_ether to /etc/modules if you always want it to load at boot.&lt;br /&gt;
&lt;br /&gt;
 root@overo# modbprobe g_ether&lt;br /&gt;
 g_ether gadget: using random self ethernet address&lt;br /&gt;
 g_ether gadget: using random host ethernet address&lt;br /&gt;
 usb0: MAC d6:2c:8f:d9:51:32&lt;br /&gt;
 usb0: HOST MAC f2:99:dc:4c:cb:7a&lt;br /&gt;
 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008&lt;br /&gt;
 g_ether gadget: g_ether ready&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig -a&lt;br /&gt;
 lo      Link encap:Local Loopback&lt;br /&gt;
         inet addr:127.0.0.1  Mask:255.0.0.0&lt;br /&gt;
         inet6 addr: ::1/128 Scope:Host&lt;br /&gt;
         UP LOOPBACK RUNNING  MTU:16436  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:0&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
 usb0    Link encap:Ethernet  HWaddr D6:2C:8F:D9:51:32&lt;br /&gt;
         BROADCAST MULTICAST  MTU:1500  Metric:1&lt;br /&gt;
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
         collisions:0 txqueuelen:1000&lt;br /&gt;
         RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configure the usb0 interface the way you would any other. &lt;br /&gt;
&lt;br /&gt;
For example&lt;br /&gt;
&lt;br /&gt;
 root@overo:~# ifconfig usb0 192.168.20.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
If you then plug the usb OTG cable into a host computer ready for usb networking you'll get a console message&lt;br /&gt;
&lt;br /&gt;
 g_ether gadget: high speed config #1: CDC Ethernet (ECM)&lt;br /&gt;
&lt;br /&gt;
The rest is all standard Linux networking.&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4046</id>
		<title>Category:How to - i2c</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_i2c&amp;diff=4046"/>
				<updated>2010-01-14T18:19:11Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added reference to the schematics page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Background==&lt;br /&gt;
&lt;br /&gt;
I2c is a 2-wire serial 8 bit communications protocol from the old days. It is mainly used to communicate between on-board components when the design does not allow for a data and address bus. Typical components are elapsed timer chips, ee-proms, FRAM's, A/D and D/A chips. Some cpu's have the I2c hardware shift registers built in. &lt;br /&gt;
&lt;br /&gt;
The 2 wires are the SCL or clock wire and the SDL or data wire. The clock high to low transition is used to signal that the data wire has a stable 1/0 data value and that the receiver should shift this into the data results register. The clock line is high when the bus is idle. A special high to low transition on the clock line followed by a high to low transition on the data line signals the start of a message sequence. the end of a message sequence is a low to high transition in the data line followed by a low to high transition in the SCL line.  An important aspect of this communication standard is that each device is assigned a unique 7 bit address, (oh yea the 8th bit is the Read/write indicator to complete the byte). The device address is the first byte sent in any communication. Subsequent bytes of a message depend on the device you are talking to. &lt;br /&gt;
&lt;br /&gt;
Because of patents that have since expired, other companies had to use slightly different ways to do the same thing so a very similar serial communications method called SPI uses 4 wires and another called TWI uses the same 2 wires.&lt;br /&gt;
&lt;br /&gt;
== I2C with Gumstix Overo ==&lt;br /&gt;
&lt;br /&gt;
There are several i2c buses available on the overo board.&lt;br /&gt;
&lt;br /&gt;
The bus accessible from most of the 40 pin expansion board headers is i2c-3.&lt;br /&gt;
&lt;br /&gt;
Refer to the board [http://pubs.gumstix.com/boards/ schematics] to find whether the board you are using exposes the i2c lines.&lt;br /&gt;
&lt;br /&gt;
You are looking for GPIO184_SCL3 and GPIO185_SDA3.&lt;br /&gt;
&lt;br /&gt;
For many of the boards, pin 23 is SCL and pin 24 is SDA. &lt;br /&gt;
&lt;br /&gt;
The voltage levels are 1.8v, so a voltage level shifter is required to connect to 3.3 or 5 volt slave devices.&lt;br /&gt;
&lt;br /&gt;
The overo main board already has pullup resistors for SCL and SDA.&lt;br /&gt;
&lt;br /&gt;
The default gumstix kernels set the i2c-3 bus speed to 400 kHz. &lt;br /&gt;
&lt;br /&gt;
This can be changed to 100 kHz with a kernel command line parameter in u-boot.&lt;br /&gt;
&lt;br /&gt;
 i2c_bus=3,100&lt;br /&gt;
&lt;br /&gt;
The i2c-3 bus appears as a character device under /dev&lt;br /&gt;
&lt;br /&gt;
 root@overo:/dev# ls -all i2c*&lt;br /&gt;
 crw-rw---- 1 root root 89, 1 Jan  1  2000 i2c-1&lt;br /&gt;
 crw-rw---- 1 root root 89, 3 Jan  1  2000 i2c-3&lt;br /&gt;
&lt;br /&gt;
Programmers can access devices on the bus using standard unix file i/o.&lt;br /&gt;
&lt;br /&gt;
You must set the slave address with an ioctl() call prior to communicating with a slave device. &lt;br /&gt;
&lt;br /&gt;
The driver takes care of shifting the slave address one bit and appending the R/W bit in the first byte of the transfer. &lt;br /&gt;
&lt;br /&gt;
Here's a C example minus any error checking.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 #include &amp;lt;stdint.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;linux/i2c.h&amp;gt; /* for I2C_SLAVE */&lt;br /&gt;
   ...&lt;br /&gt;
 &lt;br /&gt;
 int fh;&lt;br /&gt;
 uint8_t data[4];&lt;br /&gt;
 &lt;br /&gt;
 fh = open(&amp;quot;/dev/i2c-3&amp;quot;, O_RDWR);&lt;br /&gt;
 &lt;br /&gt;
 /* tell the driver we want the device at address 0x20 */&lt;br /&gt;
 ioctl(fh, I2C_SLAVE, 0x20);&lt;br /&gt;
 &lt;br /&gt;
 /* write two bytes */&lt;br /&gt;
 data[0] = 0x05;&lt;br /&gt;
 data[1] = 0x08;&lt;br /&gt;
 write(fh, data, 2);&lt;br /&gt;
 &lt;br /&gt;
 /* read 4 bytes */&lt;br /&gt;
 read(fh, data, 4);&lt;br /&gt;
 &lt;br /&gt;
 close(fh);&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&lt;br /&gt;
Another source of I2C information can be found [http://www.gumstix.net/wiki/index.php?title=I%C2%B2C here].&lt;br /&gt;
&lt;br /&gt;
==Sample code==&lt;br /&gt;
&lt;br /&gt;
[http://github.com/scottellis/overo-blinkm Controlling BlinkM leds over I2C using a Gumstix Overo]&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4045</id>
		<title>Category:How to - Network Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Network_Boot&amp;diff=4045"/>
				<updated>2010-01-14T14:38:01Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Formatting, reason for missing display kernel parameters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Network booting can be very convenient during the development cycle &lt;br /&gt;
for an embedded device. Current Gumstix Overos have a bootloader &lt;br /&gt;
and kernel ready for network booting if you have an expansion board &lt;br /&gt;
with an ethernet connector. Older Gumstix Overos can upgrade their &lt;br /&gt;
version of u-boot to get support for network booting. &lt;br /&gt;
&lt;br /&gt;
The procedures that follow are for setting up a workstation to act &lt;br /&gt;
as both the tftp server and the nfs server to host the root file &lt;br /&gt;
system. &lt;br /&gt;
&lt;br /&gt;
The procedure described does not require a dhcp server.&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
&lt;br /&gt;
The following procedure assumes a Linux workstation to host all&lt;br /&gt;
the services. The workstation for the example is running Ubuntu 9.10.&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to configure the nfs server and the tftpd &lt;br /&gt;
server. This example tries to keep it simple.&lt;br /&gt;
 &lt;br /&gt;
The names of the packages may be different if you are using another &lt;br /&gt;
Linux distribution.&lt;br /&gt;
&lt;br /&gt;
The example will use the following network configuration.&lt;br /&gt;
&lt;br /&gt;
 Workstation IP: 192.168.4.4&lt;br /&gt;
 &lt;br /&gt;
 Gumstix IP: 192.168.4.50&lt;br /&gt;
&lt;br /&gt;
You will also need a Gumstix Overo kernel and rootfs on the workstation.&lt;br /&gt;
&lt;br /&gt;
You can either &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html build] &lt;br /&gt;
one yourself or download one &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Downloading-pre-built-images/111.html here.] &lt;br /&gt;
&lt;br /&gt;
I'll assume an omap3-console-image custom built with OE located in the standard location. &lt;br /&gt;
Any image will work though.&lt;br /&gt;
&lt;br /&gt;
==Packages==&lt;br /&gt;
&lt;br /&gt;
Install the following Ubuntu packages on the workstation&lt;br /&gt;
&lt;br /&gt;
tftp-hpa &lt;br /&gt;
&lt;br /&gt;
nfs-common&lt;br /&gt;
&lt;br /&gt;
nfs-kernel-server &lt;br /&gt;
&lt;br /&gt;
portmap&lt;br /&gt;
&lt;br /&gt;
==Create a root filesystem==&lt;br /&gt;
&lt;br /&gt;
Create and populate the /exports directory with a kernel and a root filesystem&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir -p /exports/overo&lt;br /&gt;
 sudo tar -C /exports/overo -xvjf ${OVEROTOP}/tmp/deploy/glibc/images/overo/omap3-console-image-overo.tar.bz2&lt;br /&gt;
&lt;br /&gt;
==Configure the tftp server== &lt;br /&gt;
&lt;br /&gt;
Edit /etc/default/tftpd-hpa &lt;br /&gt;
&lt;br /&gt;
 RUN_DAEMON=&amp;quot;yes&amp;quot;&lt;br /&gt;
 OPTIONS=&amp;quot;-l -s /exports/overo/boot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What we are doing here is pointing the tftp daemon at the Gumstix root &lt;br /&gt;
filesystem we created above. The uImage kernel image sits here. &lt;br /&gt;
&lt;br /&gt;
 $ ls -all /exports/overo/boot/*&lt;br /&gt;
 lrwxrwxrwx 1 root root      13 2010-01-13 11:50 /exports/overo/boot/uImage -&amp;gt; uImage-2.6.32&lt;br /&gt;
 -rw-r--r-- 1 root root 3147516 2010-01-10 11:12 /exports/overo/boot/uImage-2.6.32&lt;br /&gt;
&lt;br /&gt;
==Configure the nfs server==&lt;br /&gt;
&lt;br /&gt;
Add the following line to /etc/exports&lt;br /&gt;
&lt;br /&gt;
 /exports/overo	192.168.4.50(rw,no_root_squash,no_subtree_check)&lt;br /&gt;
&lt;br /&gt;
This tells the nfs server what directories to export as an nfs mountpoint and what machines have access to it. &lt;br /&gt;
Use man exports to get the documentation for /etc/exports.&lt;br /&gt;
&lt;br /&gt;
==Restart the servers==&lt;br /&gt;
&lt;br /&gt;
 sudo /etc/init.d/tftpd-hpa restart&lt;br /&gt;
 sudo service portmap restart&lt;br /&gt;
 sudo /etc/init.d/nfs-kernel-server&lt;br /&gt;
&lt;br /&gt;
==Configure u-boot==&lt;br /&gt;
&lt;br /&gt;
Establish a serial console connection with the gumstix.&lt;br /&gt;
&lt;br /&gt;
Power the gumstix unit and hit a key to stop the process in uboot.&lt;br /&gt;
&lt;br /&gt;
Add some environment variables to u-boot.&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ipaddr 192.168.4.50&lt;br /&gt;
 Overo # setenv netmask 255.255.255.0&lt;br /&gt;
 Overo # setenv serverip 192.168.4.4&lt;br /&gt;
 Overo # setenv gatewayip 192.168.4.1&lt;br /&gt;
 Overo # setenv hostname overo&lt;br /&gt;
&lt;br /&gt;
 Overo # setenv ip ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:none&lt;br /&gt;
 Overo # setenv nfsroot /exports/overo&lt;br /&gt;
 Overo # setenv nfsargs setenv bootargs console=\${console} root=/dev/nfs rootfstype=nfs ip=\${ip} nfsroot=\${nfsroot} rootwait&lt;br /&gt;
 Overo # setenv loadnfskernel tftp \${loadaddr} uImage&lt;br /&gt;
&lt;br /&gt;
Save what you've entered in the u-boot environment so far. None of these variables&lt;br /&gt;
are used by the default boot process so there will be no booting behavior changes&lt;br /&gt;
yet.&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
The next step is to test the network boot by running each step manually.&lt;br /&gt;
Later we will modify u-boot to run this automatically.&lt;br /&gt;
&lt;br /&gt;
1. First tftp load the kernel into the overo memory&lt;br /&gt;
&lt;br /&gt;
 Overo # print loadaddr&lt;br /&gt;
 loadaddr=0x82000000&lt;br /&gt;
&lt;br /&gt;
 Overo # tftp ${loadaddr} uImage&lt;br /&gt;
 smc911x: detected LAN9221 controller&lt;br /&gt;
 smc911x: phy initialized&lt;br /&gt;
 smc911x: MAC 00:15:c9:28:c1:78&lt;br /&gt;
 Using smc911x-0 device&lt;br /&gt;
 TFTP from server 192.168.4.4; our IP address is 192.168.4.50&lt;br /&gt;
 Filename 'uImage'.&lt;br /&gt;
 Load address: 0x82000000&lt;br /&gt;
 Loading: T ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            ######################################################&lt;br /&gt;
            #####################################################&lt;br /&gt;
 done&lt;br /&gt;
 Bytes transferred = 3147516 (3006fc hex)&lt;br /&gt;
&lt;br /&gt;
Okay, if that worked, make sure the loadnfskernel variable we created doesn't &lt;br /&gt;
have a typo by running the same process again using the u-boot run command.&lt;br /&gt;
&lt;br /&gt;
 Overo # run loadnfskernel&lt;br /&gt;
&lt;br /&gt;
You should get the same results, a kernel tftp loaded into memory.&lt;br /&gt;
&lt;br /&gt;
If it did not work, use a network monitoring tool like tcpdump or wireshark to&lt;br /&gt;
see if you are getting any traffic. &lt;br /&gt;
&lt;br /&gt;
See the Notes section for some troubleshooting tips.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Test the loading of the boot arguments.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 ## Error: &amp;quot;bootargs&amp;quot; not defined&lt;br /&gt;
 Overo # print nfsargs&lt;br /&gt;
 nfsargs=setenv bootargs console=${console} root=/dev/nfs rootfstype=nfs ip=${ip} nfsroot=${nfsroot} rootwait&lt;br /&gt;
 Overo # run nfsargs&lt;br /&gt;
 Overo # print bootargs&lt;br /&gt;
 bootargs=console=ttyS2,115200n8 root=/dev/nfs rootfstype=nfs ip=192.168.4.50:192.168.4.4:192.168.4.1:255.255.255.0:overo:eth0:none nfsroot=/exports/overo rootwait&lt;br /&gt;
&lt;br /&gt;
Make sure that bootargs looks correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Boot the kernel&lt;br /&gt;
&lt;br /&gt;
With a kernel of the correct format loaded into memory, the u-boot command bootm will&lt;br /&gt;
transfer control of the processor to this kernel.&lt;br /&gt;
&lt;br /&gt;
 Overo # bootm ${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 ...normal kernel boot messages here, then...&lt;br /&gt;
 net eth0: SMSC911x/921x identified at 0xd08c8000, IRQ: 336&lt;br /&gt;
 IP-Config: Complete:&lt;br /&gt;
     device=eth0, addr=192.168.4.50, mask=255.255.255.0, gw=192.168.4.1,&lt;br /&gt;
     host=overo, domain=, nis-domain=(none),&lt;br /&gt;
     bootserver=192.168.4.4, rootserver=192.168.4.4, rootpath=&lt;br /&gt;
 Looking up port of RPC 100003/2 on 192.168.4.4&lt;br /&gt;
 Looking up port of RPC 100005/1 on 192.168.4.4&lt;br /&gt;
 VFS: Mounted root (nfs filesystem) on device 0:13.&lt;br /&gt;
 Freeing init memory: 928K&lt;br /&gt;
 INIT: version 2.86 booting&lt;br /&gt;
 ...&lt;br /&gt;
 The Angstrom Distribution overo ttyS2&lt;br /&gt;
 Angstrom 2009.X-test-20100110 overo ttyS2&lt;br /&gt;
 overo login:&lt;br /&gt;
&lt;br /&gt;
==Making it automatic==&lt;br /&gt;
&lt;br /&gt;
So if everything worked and you want to boot this way every time you need to modify the &lt;br /&gt;
bootcmd u-boot variable.&lt;br /&gt;
&lt;br /&gt;
Reboot the gumstix and hit a key to stop it in u-boot again.&lt;br /&gt;
&lt;br /&gt;
 Overo # print bootcmd&lt;br /&gt;
 bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi&lt;br /&gt;
&lt;br /&gt;
You may want to save this for the future or see the Notes section for where it is defined in the build. &lt;br /&gt;
&lt;br /&gt;
Make a new bootcmd using the u-boot environment variables that we created. &lt;br /&gt;
&lt;br /&gt;
 Overo # setenv bootcmd echo Booting nfs ...\; run loadnfskernel\; run nfsargs\; bootm \${loadaddr}&lt;br /&gt;
&lt;br /&gt;
 Overo # saveenv&lt;br /&gt;
&lt;br /&gt;
Now reboot and the gumstix should nfsboot by default.&lt;br /&gt;
&lt;br /&gt;
 Overo # reset&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
1. The default u-boot environment variables are defined in the u-boot source tree under include/configs/omap3-overo.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. The documentation for linux kernel parameters for nfs booting can be found in the linux source tree under&lt;br /&gt;
Documentation/filesystems/nfsroot.txt and Documentation/kernel-parameters.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. tftp listens over udp on port 69&lt;br /&gt;
 $ grep tftp /etc/services&lt;br /&gt;
 tftp		69/udp&lt;br /&gt;
&lt;br /&gt;
You can check if it is listening with the following command.&lt;br /&gt;
&lt;br /&gt;
 $ netstat -an | grep udp&lt;br /&gt;
 udp        0      0 0.0.0.0:111             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:880             0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:39921           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:56957           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:2049            0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:59435           0.0.0.0:*                          &lt;br /&gt;
 udp        0      0 0.0.0.0:69              0.0.0.0:*                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. nfs listens on port 2049 both tcp and udp. The nfs root process uses only udp.&lt;br /&gt;
 $ grep nfs /etc/services&lt;br /&gt;
 nfs		2049/tcp			# Network File System&lt;br /&gt;
 nfs		2049/udp			# Network File System&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. The following is a tcpdump command for watching the gumstix boot traffic. Choose the appropriate &lt;br /&gt;
interface for your workstation.&lt;br /&gt;
&lt;br /&gt;
 $ sudo tcpdump -i eth1 -l -n udp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. A cross-over ethernet cable connected between the workstation and the gumstix works well&lt;br /&gt;
if you can't host services on your regular network. You may want to check before starting a &lt;br /&gt;
tftp server on a shared network. A dedicated switch/hub will also work to keep things isolated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. You can check for running firewall rules with this command&lt;br /&gt;
&lt;br /&gt;
 $ sudo iptables --list&lt;br /&gt;
 Chain INPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain FORWARD (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination         &lt;br /&gt;
 Chain OUTPUT (policy ACCEPT)&lt;br /&gt;
 target     prot opt source               destination       &lt;br /&gt;
&lt;br /&gt;
If you get output different then this (nothing running) and you are having problems booting, then &lt;br /&gt;
you should ensure you are not blocking any of the required traffic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. I removed the kernel parameters for the kernel display configuration for wiki formatting reasons.&lt;br /&gt;
You should add the settings you require to the bootcmd variable in the example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. There is a patch to u-boot in the current gumstix overo-oe tree that improves the ethernet&lt;br /&gt;
network speeds on the overos. You can save about 10 seconds on an nfs boot using a u-boot&lt;br /&gt;
built with this patch as well as get better ethernet performance after booting. (The patch is &lt;br /&gt;
a tuning of the timing registers of the GPMC connected to the ethernet controller. This &lt;br /&gt;
configuration is done by u-boot when the board is brought up and not modified by Linux kernel&lt;br /&gt;
after booting.) When you do a network boot, you are using the u-boot on the NAND flash which&lt;br /&gt;
was probably built without this patch. &lt;br /&gt;
Build a newer version of u-boot following the standard build procedures. (U-boot is built &lt;br /&gt;
whenever you build an image.) Then copy it to NAND using the instructions &lt;br /&gt;
[http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html here.]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=4044</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=4044"/>
				<updated>2010-01-14T14:29:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sellis: Added a new Network Boot page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;''Welcome to the gumstix users wiki''&amp;lt;/big&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
This site is provided so that users of the gumstix OpenEmbedded build system can share their knowledge, showcase their gumstix based projects, and pass on links to other sources of information and materials.  This information is entirely user generated and supported.  Please contribute your know-how to help your fellow developers.&lt;br /&gt;
&lt;br /&gt;
  '''Customer additions and edits are encouraged, but please read the help page before you make any major edits.'''&lt;br /&gt;
  ''Note:  you will need to create a new user account if you would like to contribute or edit content on this site.''&lt;br /&gt;
&lt;br /&gt;
Go to the [http://www.gumstix.net Gumstix Developer's website] for official Gumstix supported documentation on OpenEmbedded and other information of interest to developers:&lt;br /&gt;
{|&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{|cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;5&amp;quot; style=&amp;quot;vertical-align:top;background-color:#f5fffa;border:1px solid #bcc&amp;quot;&lt;br /&gt;
! style=&amp;quot;margin:0;background:#cef2e0;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;&amp;quot; | [[:Category:How-tos |User how to's]]&lt;br /&gt;
! style=&amp;quot;margin:0;background:#cef2e0;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;&amp;quot; | [[:Category:projects|User projects]]&lt;br /&gt;
! style=&amp;quot;margin:0;background:#cef2e0;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;&amp;quot; | [[:Category:User_pics_videos|User Pics &amp;amp; Videos]]&lt;br /&gt;
! style=&amp;quot;margin:0;background:#cef2e0;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;&amp;quot; | [[:Category:resources|Resources]]&lt;br /&gt;
! style=&amp;quot;margin:0;background:#cef2e0;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;&amp;quot; | [[:Category:faqs|Questions and Answers]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - general|General]]&lt;br /&gt;
* [[:Category:how to - Android|Android]]&lt;br /&gt;
* [[:Category:how to - audio|Audio]]&lt;br /&gt;
* [[:Category:how to - batteries|Batteries]]&lt;br /&gt;
* [[:Category:how to - bluetooth|Bluetooth]]&lt;br /&gt;
* [[:Category:how to - fedora|Fedora]]&lt;br /&gt;
* [[:Category:Connect_hardware|Connect Hardware]]&lt;br /&gt;
* [[:Category:how to - displays|Displays]]&lt;br /&gt;
* [[:Category:how to - DSP|DSP]]&lt;br /&gt;
* [[:Category:how to - git|Git]]&lt;br /&gt;
* [[:Category:how to - gui|GUI]]&lt;br /&gt;
* [[:Category:how to - Build helloworld|HelloWorld]]&lt;br /&gt;
* [[:Category:how to - i2c|I2C]]&lt;br /&gt;
* [[:Category:how to - JAVA|JAVA]]&lt;br /&gt;
* [[:Category:how to - LCD|LCD]]&lt;br /&gt;
* [[:Category:how to - linux|Linux]]&lt;br /&gt;
* [[:Category:how to - Network_Boot|Network Boot]]&lt;br /&gt;
* [[:Category:How_to_-_qemu|Qemu]]&lt;br /&gt;
* [[:Category:How_to_-_Qt|Qt]]&lt;br /&gt;
* [[:Category:how to - robotics|Robotics]]&lt;br /&gt;
* [[:Category:how to - security|Security]]&lt;br /&gt;
* [[:Category:SPI|SPI]]&lt;br /&gt;
* [[:Category:SUSE|SUSE]]&lt;br /&gt;
* [[:Category:how to - Ubuntu|Ubuntu]]&lt;br /&gt;
* [[:Category:how to - usb|USB]]&lt;br /&gt;
* [[:Category:how to - webcams|Webcams]]&lt;br /&gt;
* [[:Category:how to - wifi|Wifi]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:projects - audio|Audio]]&lt;br /&gt;
* [[:Category:projects - competitions|Competitions]]&lt;br /&gt;
* [[:Category:projects - displays|Displays]]&lt;br /&gt;
* [[:Category:Projects_-Research_and_Education|Research &amp;amp; Education]]&lt;br /&gt;
* [[:Category:projects - monitoring and control|Monitoring and Control]]&lt;br /&gt;
* [[:Category:projects - robotics|Robotics &amp;amp; UAV's]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [http://johnwoconnor.blogspot.com/2009/03/linux-on-gumstick-tour-of-gumstix-overo.html Short &amp;amp; Sweet - A User's Tour of Overo Earth]&lt;br /&gt;
* [http://www.flickr.com/search/?q=gumstix&amp;amp;s=rec Gumstix in Flickr]&lt;br /&gt;
* [http://www.youtube.com/results?search_query=gumstix&amp;amp;search_sort=video_date_uploaded Gumstix on Youtube]&lt;br /&gt;
* [http://www.cs.umd.edu/alandaluz/nchen/ebook/dualdisp-chi.mov Dual Display device at UMD]&lt;br /&gt;
* [http://ca.youtube.com/watch?v=3ZFmjOHnWds&amp;amp;eurl=http://paginas.fe.up.pt/~jca/fast/en/media.php First World Robotic Sailing Championships in May 2008]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Windows CE solution|Solutions for Windows CE]]&lt;br /&gt;
* [[Qt solution|Solutions for Qt]]&lt;br /&gt;
* [[Manufacturer's specifications|Specifications for Processors &amp;amp; Components]]&lt;br /&gt;
* [[Software information]]&lt;br /&gt;
* [[Supported hardware]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [https://lists.sourceforge.net/lists/listinfo/gumstix-users Sign-up - Community mailing list]&lt;br /&gt;
* [http://www.nabble.com/Gumstix-f22543.html Archives - Community mailing list]&lt;br /&gt;
* [http://www.gumstix.net/wiki/index.php?title=Other_FAQs Other FAQs]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For information and support for the legacy gumstix buildroot build system:&lt;br /&gt;
[http://docwiki.gumstix.org/Main_Page docwiki.gumstix.org]&lt;/div&gt;</summary>
		<author><name>Sellis</name></author>	</entry>

	</feed>