<?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=Gerardo+Richarte</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=Gerardo+Richarte"/>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php/Special:Contributions/Gerardo_Richarte"/>
		<updated>2026-05-21T18:26:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=5626</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=5626"/>
				<updated>2011-08-02T19:22:04Z</updated>
		
		<summary type="html">&lt;p&gt;Gerardo Richarte: fixed links&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. Though this procedure currently does not work with 2.6.39, as there are some inconsistencies between linux-omap3_2.6.39.bb recipe and the configuration (.config/defconfig) file shipped by default. See note below for more info on 2.6.39.&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;
===Note on 2.6.39===&lt;br /&gt;
&lt;br /&gt;
There is currently an inconsistency between the recipe linux-omap3_2.6.39.bb and the default configuration (.config/defconfig) shipped, see [http://old.nabble.com/linux-omap3-2.6.39-build-failure-in-overo-2011.03-branch-td32094095.html this post] and [http://old.nabble.com/Re%3A-Thumbo-in-Gadget-mode-and-USBNet-p32171580.html this other post]. The latter, together with [[Kernel_Reconfiguration]], is what worked for me.&lt;br /&gt;
&lt;br /&gt;
==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>Gerardo Richarte</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_usb&amp;diff=5625</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=5625"/>
				<updated>2011-08-02T18:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Gerardo Richarte: added infor on configuring 2.6.39&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. Though this procedure currently does not work with 2.6.39, as there are some inconsistencies between linux-omap3_2.6.39.bb recipe and the configuration (.config/defconfig) file shipped by default. See note below for more info on 2.6.39.&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;
===Note on 2.6.39===&lt;br /&gt;
&lt;br /&gt;
There is currently an inconsistency between the recipe linux-omap3_2.6.39.bb and the default configuration (.config/defconfig) shipped, see [http://old.nabble.com/linux-omap3-2.6.39-build-failure-in-overo-2011.03-branch-td32094095.html|this post] and [http://old.nabble.com/Re%3A-Thumbo-in-Gadget-mode-and-USBNet-p32171580.html|this other post]. The latter, together with [[Kernel_Reconfiguration]], is what worked for me.&lt;br /&gt;
&lt;br /&gt;
==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>Gerardo Richarte</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=5624</id>
		<title>Kernel Reconfiguration</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Kernel_Reconfiguration&amp;diff=5624"/>
				<updated>2011-08-02T18:06:57Z</updated>
		
		<summary type="html">&lt;p&gt;Gerardo Richarte: added info on configuring 2.6.39&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/kernel&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;
For 2.6.39 I used:&lt;br /&gt;
&lt;br /&gt;
 $ cp ${OVEROTOP}/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.39-r101/git/.config \&lt;br /&gt;
    ${OVEROTOP}/org.openembedded.dev/recipes/linux/linux-omap3/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>Gerardo Richarte</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=User:Gerardo_Richarte&amp;diff=5605</id>
		<title>User:Gerardo Richarte</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=User:Gerardo_Richarte&amp;diff=5605"/>
				<updated>2011-07-07T20:47:35Z</updated>
		
		<summary type="html">&lt;p&gt;Gerardo Richarte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;7-July-2011 - I'm starting to develop on the Gumstix platform and I expect to do it for some time, I already have my Caspa working and I have already built a custom kernel and filesystem.&lt;br /&gt;
&lt;br /&gt;
I'm an experienced software developer (24+ years of programming) , both in low and high level (down from assembly up to Smalltalk). I also have formal studies in electronics and maths.&lt;/div&gt;</summary>
		<author><name>Gerardo Richarte</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Caspa_camera_boards&amp;diff=5604</id>
		<title>Caspa camera boards</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Caspa_camera_boards&amp;diff=5604"/>
				<updated>2011-07-07T20:44:09Z</updated>
		
		<summary type="html">&lt;p&gt;Gerardo Richarte: How to save a single picture into a file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;The Caspa series of Camera Boards from Gumstix&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MT9V032 sensor, at the heart of the Caspa FS camera board and the Caspa VL camera board, is not yet supported in the kernel, so a little work is necessary to get the camera up and running.&lt;br /&gt;
&lt;br /&gt;
OMAP35x processors have dedicated hardware for capturing and processing data from image sensors. The Caspa camera sensor outputs raw 10-bit Bayer images which is transferred to the Image Signal Processor (ISP) via a parallel interface. The ISP contains various sub-modules that can be exported as Video for Linux (V4L2) devices in /dev. For additional hardware information see the external links section.&lt;br /&gt;
&lt;br /&gt;
[[Image:Altoids.jpg|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
== Quickstart ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CaspaHardware.jpg|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
Insert the white ribbon cable contact-side-up into the Caspa connector and contact side down into the Overo connector.&lt;br /&gt;
&lt;br /&gt;
Using a small flat-head screwdriver, loosen the lensholder set screw and rotate the lens to adjust the focus.&lt;br /&gt;
&lt;br /&gt;
=== Install Pre-built Kernel ===&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started is to replace the kernel and modules of an existing image. This has been tested on an Overo Fire with a Tobi expansion board using the desktop image available [http://www.sakoman.com/feeds/omap3/glibc/images/overo/201011150741/ here].&lt;br /&gt;
&lt;br /&gt;
Get the kernel and modules.&lt;br /&gt;
 $ wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/uImage-2.6.34&lt;br /&gt;
 $ wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/modules-2.6.34.tgz&lt;br /&gt;
&lt;br /&gt;
Copy to a bootable microSD card.&lt;br /&gt;
 $ tar -xf modules-2.6.34.tgz -C /media/mmcblk0p2/&lt;br /&gt;
 $ cp uImage-2.6.34 /media/mmcblk0p1/uImage&lt;br /&gt;
 $ cp uImage-2.6.34 /media/mmcblk0p2/boot/uImage&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you have a network connection, you can copy the files without removing the microSD.&lt;br /&gt;
 $ tar -xf modules-2.6.34.tgz&lt;br /&gt;
 $ scp -r lib root@overo:/&lt;br /&gt;
 $ scp uImage-2.6.34 root@overo:/boot/uImage&lt;br /&gt;
 $ scp uImage-2.6.34 root@overo:/media/mmcblk0p1/uImage&lt;br /&gt;
 $ ssh root@overo 'depmod; shutdown -r now'&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
&lt;br /&gt;
From the serial console:&lt;br /&gt;
&lt;br /&gt;
 # export DISPLAY=:0.0&lt;br /&gt;
&lt;br /&gt;
 # gst-launch v4l2src ! xvimagesink&lt;br /&gt;
 ''or''&lt;br /&gt;
 # mplayer tv:// -tv driver=v4l2:device=/dev/video0&lt;br /&gt;
&lt;br /&gt;
If you just want to take a picture:&lt;br /&gt;
&lt;br /&gt;
 # mplayer tv:// -vo png -ss 1 -frames 1 -loop 1 -tv driver=v4l2:device=/dev/video0&lt;br /&gt;
&lt;br /&gt;
From the desktop:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;left-click&amp;gt; Applications &amp;gt; Multimedia &amp;gt; Cheese&lt;br /&gt;
&lt;br /&gt;
If video0 doesn't appear in /dev you might have to load the driver manually.&lt;br /&gt;
&lt;br /&gt;
 # depmod&lt;br /&gt;
 # modprobe mt9v032&lt;br /&gt;
&lt;br /&gt;
== Bitbake ==&lt;br /&gt;
&lt;br /&gt;
You can build the kernel and modules using bit-bake. This allows you to incorporate the kernel with camera driver into an image of your design.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/overo-oe/org.openembedded.dev&lt;br /&gt;
 $ git pull origin overo&lt;br /&gt;
 $ bitbake linux-omap3-caspapx&lt;br /&gt;
&lt;br /&gt;
When the build completes, the kernel and modules will appear in ~/overo-oe/tmp/deploy/glibc/images/overo.&lt;br /&gt;
&lt;br /&gt;
== Customization ==&lt;br /&gt;
&lt;br /&gt;
This section describes how to customize the camera driver and kernel for your needs.&lt;br /&gt;
&lt;br /&gt;
=== 2.6.34 ===&lt;br /&gt;
&lt;br /&gt;
Get the kernel source that is used in the Gumstix kernel recipe (~/overo-oe/org.openmebedded.dev/recipes/linux/linux-omap3_2.6.34.bb) and create a new branch from the recipe SRCREV.&lt;br /&gt;
 $ cd ~&lt;br /&gt;
 $ git clone git://www.sakoman.com/git/linux-omap-2.6.git&lt;br /&gt;
 $ cd linux-omap-2.6&lt;br /&gt;
 $ git checkout -b 2.6.34 cb89736af28f583598e49a05249334a194d00f1d&lt;br /&gt;
&lt;br /&gt;
Get the patch.&lt;br /&gt;
 $ wget http://cumulus.gumstix.org/sources/mt9v032-2.6.34.patch&lt;br /&gt;
 $ patch -p1 &amp;lt; mt9v032-2.6.34.patch&lt;br /&gt;
&lt;br /&gt;
Get the kernel configuration. This is the same one used for the linux-omap3-caspapx image.&lt;br /&gt;
 $ wget http://cumulus.gumstix.org/sources/mt9v032-2.6.34.defconfig&lt;br /&gt;
 $ cp mt9v032-2.6.34.defconfig .config&lt;br /&gt;
&lt;br /&gt;
If you haven't done so yet, you'll need to [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html set up your build environment]. Build the console image. This will ensure that the cross compiler, binutils, and libraries need to compile the kernel are installed.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Add the cross compiler to your path and configure the kernel. The cross compiler location depends on the architecture of your build machine.&lt;br /&gt;
 ''32-bit processors''&lt;br /&gt;
 $ export PATH=/home/&amp;lt;username&amp;gt;/overo-oe/tmp/sysroots/i686-linux/usr/armv7a/bin:${PATH} &amp;lt;br /&amp;gt;&lt;br /&gt;
 ''64-bit processors''&lt;br /&gt;
 $ export PATH=/home/&amp;lt;username&amp;gt;/overo-oe/tmp/sysroots/x86_64-linux/usr/armv7a/bin:${PATH}&lt;br /&gt;
&lt;br /&gt;
Build kernel and modules&lt;br /&gt;
 $ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage&lt;br /&gt;
 $ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- modules&lt;br /&gt;
&lt;br /&gt;
Install modules&lt;br /&gt;
 $ mkdir ~/linux-omap-2.6/modules&lt;br /&gt;
 $ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- INSTALL_MOD_PATH=./modules modules_install&lt;br /&gt;
&lt;br /&gt;
=== Other Kernel Versions ===&lt;br /&gt;
&lt;br /&gt;
The ISP code used for the 2.6.34 patch came from the arago-project. This is the OMAP3 PSP kernel integration/staging tree&lt;br /&gt;
 $ git remote add git://arago-project.org/git/projects/linux-omap3.git aragoOMAP3 PSP kernel integration/staging tree&lt;br /&gt;
 $ git fetch arago&lt;br /&gt;
 $ git checkout -b arago&lt;br /&gt;
&lt;br /&gt;
The V4L2 subdevice framework offers a way to configure the Image Signal Processor pipeline from user-space. This is currently under active development and users wishing to make use of this should visit the Media controller development repository [http://git.linuxtv.org/pinchartl/media.git here]. This contains the bleeding edge Video for Linux media framework, ISP, and MT9V032 drivers.&lt;br /&gt;
&lt;br /&gt;
=== MT9V032 Driver ===&lt;br /&gt;
&lt;br /&gt;
If you want to take advantage of an unimplemented sensor feature, change defaults, etc., you need to modify the driver source. After you've made a change you can use a script like the following to quickly test your new driver.&lt;br /&gt;
&lt;br /&gt;
 #! /bin/bash &amp;lt;br&amp;gt;&lt;br /&gt;
 TARGET_OVERO=&amp;quot;root@10.0.1.15&amp;quot;&lt;br /&gt;
 make -j8 ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- modules&lt;br /&gt;
 ssh $TARGET_OVERO 'rmmod mt9v032'&lt;br /&gt;
 scp drivers/media/video/mt9v032.ko $TARGET_OVERO:/lib/modules/2.6.34/kernel/drivers/media/video/&lt;br /&gt;
 ssh $TARGET_OVERO 'insmod /lib/modules/2.6.34/kernel/drivers/media/video/mt9v032.ko'&lt;br /&gt;
 ssh $TARGET_OVERO 'mplayer -display :0.0 tv:// -tv driver=v4l2:device=/dev/video0'&lt;br /&gt;
&lt;br /&gt;
=== Image Signal Processor ===&lt;br /&gt;
&lt;br /&gt;
There is some code that you can't modularize and modifying means rebuilding the kernel. Such is the case for the ISP code which is used by board-overo.c for hardware configuration. Another script like that in the previous section can be very useful.&lt;br /&gt;
&lt;br /&gt;
This script rebuilds the kernel, copies it to the COM, and resets:&lt;br /&gt;
&lt;br /&gt;
 #! /bin/bash &amp;lt;br /&amp;gt;&lt;br /&gt;
 TARGET_OVERO=&amp;quot;root@10.0.1.15&amp;quot;&lt;br /&gt;
 make -j8 ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage;&lt;br /&gt;
 scp arch/arm/boot/uImage $TARGET_OVERO:/boot/uImage;&lt;br /&gt;
 scp arch/arm/boot/uImage $TARGET_OVERO:/media/mmcblk0p1/uImage&lt;br /&gt;
 ssh $TARGET_OVERO 'shutdown -r now'&lt;br /&gt;
&lt;br /&gt;
This is useful for adjusting the filters, white balance, and color blending coefficients used by the ISP preview module. The preview module is used for doing hardware conversion from 10-bit Bayer to YUV. If you are having color problems - especially under certain lighting conditions but not others - look at '''isppreview.c''' and the gamma correction tables in '''drivers/media/video/isp/'''&lt;br /&gt;
&lt;br /&gt;
== Tuning ==&lt;br /&gt;
&lt;br /&gt;
=== Module Parameters ===&lt;br /&gt;
By default, auto exposure, auto gain, and high dynamic range are all enabled. You can disable any or all of these to suit your needs by reloading the driver.&lt;br /&gt;
&lt;br /&gt;
Get a list of driver parameters.&lt;br /&gt;
 # modinfo mt9v032&lt;br /&gt;
 filename:       /lib/modules/2.6.34/kernel/drivers/media/video/mt9v032.ko&lt;br /&gt;
 license:        GPL&lt;br /&gt;
 author:         Ignacio Garcia Perez &amp;lt;iggarpe@gmail.com&amp;gt;&lt;br /&gt;
 description:    mt9v032 camera sensor driver&lt;br /&gt;
 srcversion:     A46920FD64C35A2645E0D54&lt;br /&gt;
 alias:          i2c:mt9v032&lt;br /&gt;
 depends:        &lt;br /&gt;
 vermagic:       2.6.34 mod_unload modversions ARMv7 &lt;br /&gt;
 parm:           sensor_type:Sensor type: &amp;quot;color&amp;quot; or &amp;quot;mono&amp;quot; (charp)&lt;br /&gt;
 parm:           auto_exp:Initial state of automatic exposure (int)&lt;br /&gt;
 parm:           auto_gain:Initial state of automatic gain (int)&lt;br /&gt;
 parm:           hdr:High dynamic range (int)&lt;br /&gt;
 parm:           low_light:Enable companding (int)&lt;br /&gt;
 parm:           hflip:Horizontal flip (int)&lt;br /&gt;
 parm:           vflip:Vertical flip (int)&lt;br /&gt;
&lt;br /&gt;
Depending on the light level, auto exposure might reduce the framerate as low as 15 frames per second. You can disable auto exposure like so:&lt;br /&gt;
 # rmmod mt9v032;&lt;br /&gt;
 # insmod /lib/modules/2.6.34/kernel/drivers/media/video/mt9v032.ko auto_exp=0&lt;br /&gt;
&lt;br /&gt;
If this makes your image too dark, you can disable auto gain and enable companding mode (more information [http://www.aptina.com/assets/downloadDocument.do?id=668 here]).&lt;br /&gt;
 # rmmod mt9v032&lt;br /&gt;
 # insmod /lib/modules/2.6.34/kernel/drivers/media/video/mt9v032.ko auto_exp=0 auto_gain=0 low_light=1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- === Userspace control (IOCTL) === --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
Caspa VL (filtered lens): [http://www.mars-cam.com/optical/lenses/ccd_cmos/43fix.php V-4303.6-1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Caspa FS (unfiltered lens): [http://www.ktnc.co.kr/english/viewtopic.php?t=468 KLB-0360]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spruf98m&amp;amp;fileType=pdf OMAP35x Technical Reference Manual]&lt;br /&gt;
&lt;br /&gt;
[http://www.aptina.com/assets/downloadDocument.do?id=668 MT9V032 Datasheet]&lt;br /&gt;
&lt;br /&gt;
[http://pubs.gumstix.com/boards/CASPA/PCB30009-R2496/ Caspa layout and schematic files]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_expansion_boards]]&lt;/div&gt;</summary>
		<author><name>Gerardo Richarte</name></author>	</entry>

	</feed>