<?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=Maroc</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=Maroc"/>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php/Special:Contributions/Maroc"/>
		<updated>2026-04-10T02:36:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5618</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5618"/>
				<updated>2011-07-22T15:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* Disable LEDs */ Updated for new kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===2.6.39 PM Kernel===&lt;br /&gt;
Steve Sakoman has recently provided the 2.6.39 PM kernel with gumstix specific patches.  This is the preferred kernel to use although no future PM changes will be back ported to this kernel.  Steve will only maintain gumstix specific fixes for this kernel.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.39.bb recipe.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake to build the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.39.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.39.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
 &lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.2/sleep_timeout&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS may not work with the 2.6.39 PM kernel.  DVFS was going through a rewrite and may not be stable enough to be used.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All peripherals, DSP, and GPU are turned off when sleep while idle and off mode are enabled.  Turning off peripherals, will only reduce power while the Gumstix is awake and processing, it won't allow for a lower power draw while sleeping.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Disable Wifi===&lt;br /&gt;
To disable Wifi &lt;br /&gt;
&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio16/value &lt;br /&gt;
&lt;br /&gt;
This will hold the Wifi chip in reset and reduce its power consumption to the absolute minimum.  However, once disabled, you can't reenable the chip without powering down the gumstix.  &lt;br /&gt;
&lt;br /&gt;
If you wish to disable and enable the Wifi without powering off the gumstix, you'll have to use rfkill. Rfkill will do a software power down of the Wifi radio.  The defconfig included with the PM recipe above will enable rfkill in the pm kernel.  You can verify rfkill is setup and working as you should see /dev/rfkill on the gumstix.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake rfkill&lt;br /&gt;
&lt;br /&gt;
Will build rfkill, after which you can copy the binary over to your gumstix.&lt;br /&gt;
&lt;br /&gt;
To disable the wifi using rfkill simply execute&lt;br /&gt;
&lt;br /&gt;
 $ rfkill block wlan&lt;br /&gt;
&lt;br /&gt;
To bring it back up run&lt;br /&gt;
&lt;br /&gt;
 $ rfkill unblock wlan&lt;br /&gt;
&lt;br /&gt;
===Disable Bluetooth===&lt;br /&gt;
&lt;br /&gt;
To disable bluetooth&lt;br /&gt;
&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio164/value&lt;br /&gt;
&lt;br /&gt;
This will hold the bluetooth in reset.  &lt;br /&gt;
&lt;br /&gt;
TBD: Does rfkill work for bluetooth???&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' You must be running the 2.6.39 PM kernel to have access to GPIO 211.&lt;br /&gt;
&lt;br /&gt;
==Legacy PM Kernels==&lt;br /&gt;
&lt;br /&gt;
The instructions here are for legacy PM kernels.  These should no longer be used since Steve Sakoman has provided a 2.6.39 PM kernel for gumstix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5617</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5617"/>
				<updated>2011-07-22T15:07:49Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* Wifi/Bluetooth */  Added instructions for disabling Wifi/Bluetooth&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===2.6.39 PM Kernel===&lt;br /&gt;
Steve Sakoman has recently provided the 2.6.39 PM kernel with gumstix specific patches.  This is the preferred kernel to use although no future PM changes will be back ported to this kernel.  Steve will only maintain gumstix specific fixes for this kernel.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.39.bb recipe.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake to build the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.39.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.39.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
 &lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.2/sleep_timeout&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS may not work with the 2.6.39 PM kernel.  DVFS was going through a rewrite and may not be stable enough to be used.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All peripherals, DSP, and GPU are turned off when sleep while idle and off mode are enabled.  Turning off peripherals, will only reduce power while the Gumstix is awake and processing, it won't allow for a lower power draw while sleeping.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Disable Wifi===&lt;br /&gt;
To disable Wifi &lt;br /&gt;
&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio16/value &lt;br /&gt;
&lt;br /&gt;
This will hold the Wifi chip in reset and reduce its power consumption to the absolute minimum.  However, once disabled, you can't reenable the chip without powering down the gumstix.  &lt;br /&gt;
&lt;br /&gt;
If you wish to disable and enable the Wifi without powering off the gumstix, you'll have to use rfkill. Rfkill will do a software power down of the Wifi radio.  The defconfig included with the PM recipe above will enable rfkill in the pm kernel.  You can verify rfkill is setup and working as you should see /dev/rfkill on the gumstix.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake rfkill&lt;br /&gt;
&lt;br /&gt;
Will build rfkill, after which you can copy the binary over to your gumstix.&lt;br /&gt;
&lt;br /&gt;
To disable the wifi using rfkill simply execute&lt;br /&gt;
&lt;br /&gt;
 $ rfkill block wlan&lt;br /&gt;
&lt;br /&gt;
To bring it back up run&lt;br /&gt;
&lt;br /&gt;
 $ rfkill unblock wlan&lt;br /&gt;
&lt;br /&gt;
===Disable Bluetooth===&lt;br /&gt;
&lt;br /&gt;
To disable bluetooth&lt;br /&gt;
&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio164/value&lt;br /&gt;
&lt;br /&gt;
This will hold the bluetooth in reset.  &lt;br /&gt;
&lt;br /&gt;
TBD: Does rfkill work for bluetooth???&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legacy PM Kernels==&lt;br /&gt;
&lt;br /&gt;
The instructions here are for legacy PM kernels.  These should no longer be used since Steve Sakoman has provided a 2.6.39 PM kernel for gumstix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5616</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5616"/>
				<updated>2011-07-22T14:55:23Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Changed PM kernel to Steve's 2.6.39 kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===2.6.39 PM Kernel===&lt;br /&gt;
Steve Sakoman has recently provided the 2.6.39 PM kernel with gumstix specific patches.  This is the preferred kernel to use although no future PM changes will be back ported to this kernel.  Steve will only maintain gumstix specific fixes for this kernel.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.39.bb recipe.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake to build the kernel.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.39.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.39.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
 &lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/omap/omap_uart.2/sleep_timeout&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS may not work with the 2.6.39 PM kernel.  DVFS was going through a rewrite and may not be stable enough to be used.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All peripherals, DSP, and GPU are turned off when sleep while idle and off mode are enabled.  Turning off peripherals, will only reduce power while the Gumstix is awake and processing, it won't allow for a lower power draw while sleeping.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legacy PM Kernels==&lt;br /&gt;
&lt;br /&gt;
The instructions here are for legacy PM kernels.  These should no longer be used since Steve Sakoman has provided a 2.6.39 PM kernel for gumstix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Fast_Boot&amp;diff=5259</id>
		<title>Category:How to - Fast Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Fast_Boot&amp;diff=5259"/>
				<updated>2011-03-23T23:24:59Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Initial info outlining boot optimization process.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
The Gumstix boot process is far from optimized and several steps must be taken to reduce boot time.  Since the boot process is comprised of 3 different boot stages, changes must be made in each stage to get the quickest boot time possible.  The steps here outline the various techniques to reduce boot time.&lt;br /&gt;
&lt;br /&gt;
===Boot Process===&lt;br /&gt;
The OMAP boot process is outlined in detail at the [http://www.omappedia.org/wiki/Bootloader_Project omapedia page].&lt;br /&gt;
&lt;br /&gt;
The first boot stage attempts to load the x-loader from different sources such as the serial port, mmc card, nand, etc.  Once loaded, the x-load will run u-boot.  U-boot then loads the kernel into memory and executes it.  Once the kernel has initialized all core components and drivers, control is transferred to init which executes startup scripts to activate the various system services.&lt;br /&gt;
&lt;br /&gt;
===Boot Optimization===&lt;br /&gt;
In order to optimize the boot process, each step of the boot process can potentially be reduced through various means.  The areas which we look at in this how to include&lt;br /&gt;
&lt;br /&gt;
* Modify x-load&lt;br /&gt;
* Modify u-boot&lt;br /&gt;
* Reduce kernel size&lt;br /&gt;
* Remove kernel modules&lt;br /&gt;
* Remove unnecessary execution of init scripts&lt;br /&gt;
* Modify kernel&lt;br /&gt;
&lt;br /&gt;
==Init Scripts==&lt;br /&gt;
The first and easiest step to reduce boot time is to turn off any unnecessary init scripts.  After the kernel is loaded and ready for operation, the &amp;quot;init&amp;quot; process is started. Init is the father of all processes and is responsible for starting terminals, executing init scripts, etc.  The innitab file in /etc/ specifies the run level, number of terminals, and other options for init.  In the Angstrom distribution, init is configured to run scripts in /etc/rcS.d as well as scripts in /etc/rc#.d where # is the run level.&lt;br /&gt;
&lt;br /&gt;
Look in /etc/rcS.d to see what scripts are run at start.  You should see symbolic links in the form S##name where ## is a two digit number and name is the name of the script linked in /etc/init.d/.  Each script prefixed with an &amp;quot;S&amp;quot; is started at boot time. The two digit number specifies the order each script is started.  Higher numbers are started after lower numbers.  Also in this directory may be scripts that start with a &amp;quot;K&amp;quot;.  Scripts starting with a &amp;quot;K&amp;quot; are &amp;quot;killed&amp;quot; or stopped.  That is they are executed with a &amp;quot;stop&amp;quot; parameter that tells the script to shutdown the service.&lt;br /&gt;
&lt;br /&gt;
There will also be the same type of scripts in each /etc/rc#.d run level directory.  By default, Angstrom is set to start at run level &amp;quot;5&amp;quot; which typically in linux systems is the run level for a graphical environment.  You may want to change inittab to run level &amp;quot;3&amp;quot; to for a console run level.&lt;br /&gt;
&lt;br /&gt;
So how do you turn these services off?  You can either rename the S##name script to K##name or remove the S##name symlink altogether. Removing the symlink is the easiest path and should not cause any side effects unless you are switching between run levels.  Most users won't be changing the run level (except to halt and reboot) so you should be safe by simply removing the symlinks.&lt;br /&gt;
&lt;br /&gt;
'''Todo:''' Offer suggestions on which services to turn off.&lt;br /&gt;
==Kernel==&lt;br /&gt;
===Kernel Size===&lt;br /&gt;
Reducing kernel size has several benefits for reducing boot time:&lt;br /&gt;
* Kernel is loaded faster from NAND/SD&lt;br /&gt;
* Unnecessary components are not executed&lt;br /&gt;
* Less output from nonessential systems&lt;br /&gt;
&lt;br /&gt;
Reducing kernel size requires you to reconfigure and recompile the kernel.&lt;br /&gt;
&lt;br /&gt;
'''Todo:''' Details on kernel recompile.&lt;br /&gt;
===Kernel Modules===&lt;br /&gt;
Any unneeded kernel drivers compiled as modules and loaded at boot time should be removed. Any modules needed at boot time should be compiled into the kernel.  This will increase the kernel size but the additional size should be offset by the reduced overhead of loading the module.&lt;br /&gt;
&lt;br /&gt;
Kernel drivers that are currently compiled into the kernel and not needed at boot time, should be compiled as modules and only loaded when needed.  This will reduce the kernel size and prevent the kernel from executing the driver until needed.&lt;br /&gt;
&lt;br /&gt;
'''Todo:''' Details...&lt;br /&gt;
&lt;br /&gt;
==U-Boot==&lt;br /&gt;
U-boot needs heavy modification in order to reduce its total time before loading and executing the kernel.  &lt;br /&gt;
&lt;br /&gt;
* Remove most or all output&lt;br /&gt;
* Disable kernel CRC check&lt;br /&gt;
* Disable unnecessary drivers&lt;br /&gt;
* Reduce memory usage&lt;br /&gt;
* Add compile flags for optimization&lt;br /&gt;
&lt;br /&gt;
==X-Load==&lt;br /&gt;
X-load can be modified similar to u-boot.&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=5258</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=5258"/>
				<updated>2011-03-23T22:16:12Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Added Fast Boot how to link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;''Welcome to the Gumstix User 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://gumstix.org 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 - Focus]]&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: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: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:How-tos |User how to's]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - Android|Android]]&lt;br /&gt;
* [[:Category:how to - eclipse|Eclipse]]&lt;br /&gt;
* [[:Category:How_to_-_Migrate_to_Gumstix|Migrate to Gumstix]]&lt;br /&gt;
* [[Linaro]]&lt;br /&gt;
* [[:Category:how to - Ubuntu|Ubuntu]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - audio|Audio]]&lt;br /&gt;
* [[AutoLogin|Automatic Logins]]&lt;br /&gt;
* [[:Category:how to - batteries|Batteries]]&lt;br /&gt;
* [[:Category:how to - bluetooth|Bluetooth]]&lt;br /&gt;
* [[:Category:Connect_hardware|Connect Hardware]]&lt;br /&gt;
* [[Caspa_camera_boards|Caspa camera boards]]&lt;br /&gt;
* [[:Category:how to - displays|Displays]]&lt;br /&gt;
* [[:Category:how to - DSP|DSP]]&lt;br /&gt;
* [[:Category:how_to_-_ethernet|Ethernet]]&lt;br /&gt;
* [[:Category:how_to_-_expansion_boards|Expansion Boards]]&lt;br /&gt;
* [[:Category:how to - fedora|Fedora]]&lt;br /&gt;
* [[:Category:how to - Fast Boot|Fast Boot]]&lt;br /&gt;
* [[Gaining Console Connection via Terminal]]&lt;br /&gt;
* [[:Category:how to - git|Git]]&lt;br /&gt;
&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[GPIO|GPIO]]&lt;br /&gt;
* [[GPS|GPS]]&lt;br /&gt;
* [[:Category:how to - gui|GUI]]&lt;br /&gt;
* [[:Category:how to - general|General]]&lt;br /&gt;
* [[:Category:how to - Build helloworld|HelloWorld]]&lt;br /&gt;
* [[HelloWorld|HelloWorld in Python, C, C++]]&lt;br /&gt;
* [[HelloWorld in Java|HelloWorld in Java]]&lt;br /&gt;
* [[:Category:how to - i2c|I2C]]&lt;br /&gt;
* [[:Category:how to - IMU|IMU]]&lt;br /&gt;
* [[:Category:how to - JAVA|JAVA]]&lt;br /&gt;
* [[Kernel Reconfiguration|Kernel Reconfiguration]]&lt;br /&gt;
* [[:Category:how to - Known Issues|Known Issues]]&lt;br /&gt;
* [[:Category:how to - LCD|LCD]]&lt;br /&gt;
* [[:Category:how to - Low Power|Low Power]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - linux|Linux]]&lt;br /&gt;
* [[AudioIn | Use a microphone]]&lt;br /&gt;
* [[MicroSd |MicroSD Duplication]]&lt;br /&gt;
* [[:Category:how to - Network_Boot|Network Boot]]&lt;br /&gt;
* [[:Category:how to - OpenEmbedded|OpenEmbedded]]&lt;br /&gt;
* [[:Category:how to - player|Player]]&lt;br /&gt;
* [[:Category:How to - PWM|PWM]]&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;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:SUSE|SUSE]]&lt;br /&gt;
* [[Remote Debugging with GDB|Remote Debugging with GDB]]&lt;br /&gt;
* [[U-Boot|UBoot]]&lt;br /&gt;
* [[:Category:how to - usb|USB]]&lt;br /&gt;
* [[Verdex Git Repository]]&lt;br /&gt;
* [[VerdexPro U-Boot Flashing Fix]]&lt;br /&gt;
* [[:Category:how to - virtual machine|Virtual Machine]]&lt;br /&gt;
* [[:Category:how to - webcams|Webcams]]&lt;br /&gt;
* [[:Category:how to - wifi|Wifi]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&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: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:projects - audio|Audio]]&lt;br /&gt;
* [[:Category:projects - competitions|Competitions]]&lt;br /&gt;
* [[:Category:projects - displays|Displays]]&lt;br /&gt;
* [[:Category:projects - pdas|PDA's]]&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;
| 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;
* [[Third Party Boards]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
Gumstix Community Mailing List (no cost)&lt;br /&gt;
* [https://lists.sourceforge.net/lists/listinfo/gumstix-users Sign-up]&lt;br /&gt;
* [http://old.nabble.com/Gumstix-f22543.html Archives]&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.com/Main_Page docwiki.gumstix.com]&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5204</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5204"/>
				<updated>2011-03-17T13:58:15Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* Disable Internal Devices */ Added note explaining peripherals are off while sleeping.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
For kernels &amp;gt; 2.6.36 use /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
For the 2.6.29 PM kernel use /sys/power/ instead of /debug/pm_debug/&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel (so far).  Its technically not necessary in newer kernels since the sleep while idle and off modes reduce the frequency and voltage automatically when idle.  DVFS is only needed if you don't won't to run at full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All peripherals, DSP, and GPU are turned off when sleep while idle and off mode are enabled.  Turning off peripherals, will only reduce power while the Gumstix is awake and processing, it won't allow for a lower power draw while sleeping.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5181</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5181"/>
				<updated>2011-03-13T13:34:05Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Fix typo with &amp;quot;run loaduimage&amp;quot; command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduimage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
For kernels &amp;gt; 2.6.36 use /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
For the 2.6.29 PM kernel use /sys/power/ instead of /debug/pm_debug/&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel (so far).  Its technically not necessary in newer kernels since the sleep while idle and off modes reduce the frequency and voltage automatically when idle.  DVFS is only needed if you don't won't to run at full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5180</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5180"/>
				<updated>2011-03-13T04:32:04Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* USB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
For kernels &amp;gt; 2.6.36 use /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
For the 2.6.29 PM kernel use /sys/power/ instead of /debug/pm_debug/&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel (so far).  Its technically not necessary in newer kernels since the sleep while idle and off modes reduce the frequency and voltage automatically when idle.  DVFS is only needed if you don't won't to run at full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
If you're running the Custom PM Kernel listed above, the kernel is already patched to disable power to USB. Otherwise, you can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5179</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5179"/>
				<updated>2011-03-13T04:23:47Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Features */ Clarified instructions for different kernels&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using any kernel higher than 2.6.29 (PM or standard kernel), then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
&lt;br /&gt;
For kernels &amp;gt; 2.6.36 use /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
For the 2.6.29 PM kernel use /sys/power/ instead of /debug/pm_debug/&lt;br /&gt;
&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel (so far).  Its technically not necessary in newer kernels since the sleep while idle and off modes reduce the frequency and voltage automatically when idle.  DVFS is only needed if you don't won't to run at full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
'''Note:''' You can also copy the omap3-console-image.bb recipe over to your user.collection and add cpufreqd and cpufrequtils to the recipe.  Doing so will automatically include the cpufreqd and cpufrequtils in your image.&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5178</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5178"/>
				<updated>2011-03-13T04:12:25Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* Custom PM Kernel */ Rewrote a few sentences and added a note for usb off.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
The &amp;quot;custom&amp;quot; PM kernel described here uses the 2.6.38-rc? PM kernel which at the time of this writing offers the best power saving features.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you plan to use USB, then you will need to comment out the usb_off patch in the linux-omap-pm_2.6.38.bb recipe.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you need to make changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. To make the changes,cd to the Gumstix os partition on your micro sd, and do the following:&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 saveenv (run only if you want to save the new console setting)&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using a PM kernel higher than 2.6.29 or are using the stock 2.6.36 kernel with OpenEmbedded, then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
Everywhere below you see &amp;quot;/sys/power/&amp;quot; replace with &amp;quot;/debug/pm_debug/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel.  Its technically not necessary since the sleep while idle and off modes reduce the frequency and voltage automatically.  DVFS is only needed if you don't won't to run a full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5159</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5159"/>
				<updated>2011-03-11T23:33:28Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Changed to use  bitbake recipe for 2.6.38 PM kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
There are three methods for compiling a PM kernel.&lt;br /&gt;
* Use the PM recipe included with the current OpenEmbedded build.&lt;br /&gt;
* Use a custom recipe with the latest PM kernel and patches for Overo COM's&lt;br /&gt;
* Perform a manual build with CodeSourcery&lt;br /&gt;
&lt;br /&gt;
===OpenEmbedded PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  For a newer PM kernel with better power savings, see the next method.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Custom PM Kernel===&lt;br /&gt;
If you already have an open embedded build system setup, then follow the directions in this section for the easiest and quickest build.&lt;br /&gt;
&lt;br /&gt;
First download the custom PM recipes from [http://iconux.org/files/oe/user.collection_overo_pm.tar.gz here] and extract the archive to your over-oe directory.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''  If you have an existing user.collection in your overo-oe directory, you may want to back it up before extracting this archive.&lt;br /&gt;
&lt;br /&gt;
Bitbake the new kernel and make sure it builds correctly.&lt;br /&gt;
 $ bitbake -b user.collection/recipes/linux/linux-omap-pm_2.6.38.bb&lt;br /&gt;
Or simply run&lt;br /&gt;
 $ bitbake virtual/kernel&lt;br /&gt;
and bitbake should use the new linux-omap-pm_2.6.38.bb recipe automatically.&lt;br /&gt;
&lt;br /&gt;
You may get an error saying it can't download the tar archive but it should fallback to pulling the source using git.  This step will take a while since the pm git is over 400 MB.&lt;br /&gt;
&lt;br /&gt;
If the kernel builds fine, you can build your image normally.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
&lt;br /&gt;
Once you install the new build to your micro sd card, you'll need to make some changes for the new kernel. The new kernel uses ttyO2 as the serial port instead of ttyS2. So you need to make changes in your ext3 file system. cd to the os partition on your micro sd card (from your development system) and do the following.&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access. Use the Custom PM method above for best results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using a PM kernel higher than 2.6.29 or are using the stock 2.6.36 kernel with OpenEmbedded, then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
Everywhere below you see &amp;quot;/sys/power/&amp;quot; replace with &amp;quot;/debug/pm_debug/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' DVFS only works with the 2.6.29 PM kernel.  Its technically not necessary since the sleep while idle and off modes reduce the frequency and voltage automatically.  DVFS is only needed if you don't won't to run a full speed and power when not idle.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Your kernel must be patched or you must be using the custom 2.6.38 PM kernel to access GPIO 211.&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5153</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5153"/>
				<updated>2011-03-11T14:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Fixed git urls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  Even though this kernel is significantly older than the mainstream 2.6.36 linux-omap kernel, it is necessary to use a PM kernel to get all PM features such as DVFS.  In fact, the most savings will be seen with the most recent PM kernel.  See the two alternate methods below for instructions on how to use the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Update bitbake recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate OpenEmbedded Method===&lt;br /&gt;
If you already have an open embedded build system setup, then follow the directions in this section for the easiest and quickest build.&lt;br /&gt;
&lt;br /&gt;
First git the sources for the pm kernel branch&lt;br /&gt;
 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
and cd into the resulting &amp;quot;linux-omap-pm&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' This will pull the latest development code from the pm kernel branch.  Since this code is in constant development, things can change quickly.&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Change to have git pull a known working revision.&lt;br /&gt;
&lt;br /&gt;
Add the openembedded cross compile tools to your path.&lt;br /&gt;
 $ PATH=&amp;lt;path to oe tmp&amp;gt;/sysroots/i686-linux/usr/armv7a/bin/:&amp;lt;path to oe tmp&amp;gt;/sysroots/i686-linux/usr/bin:$PATH&lt;br /&gt;
Next, activate the default config for omap2 and higher devices.&lt;br /&gt;
 $ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- ARCH=arm omap2plus_defconfig&lt;br /&gt;
By default, this config does not have the cpu frequency scaling enabled.  In order to enable it you need to edit the config.&lt;br /&gt;
 $ make menuconfig&lt;br /&gt;
Navigate to CPU Power Management and enable &amp;quot;CPU Frequency Scaling&amp;quot;.  Exit the config and select yes to save it.&lt;br /&gt;
&lt;br /&gt;
Finally, build the kernel image.&lt;br /&gt;
 $ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- ARCH=arm uImage&lt;br /&gt;
&lt;br /&gt;
Copy the resulting image to the FAT partition of your microSD card.  The image can be found at&lt;br /&gt;
 ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
You can now follow steps 4 through 6 in the CodeSourcery method below or continue here.&lt;br /&gt;
&lt;br /&gt;
The new kernel uses ttyO2 as the serial port instead of ttyS2. So you need to make changes in your ext3 file system. cd to the os partition on your micro sd card (from your development system) and do the following.&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using a non PM kernel, then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
Everywhere below you see &amp;quot;/sys/power/&amp;quot; replace with &amp;quot;/debug/pm_debug/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5144</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5144"/>
				<updated>2011-03-10T21:02:41Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  Even though this kernel is significantly older than the mainstream 2.6.36 linux-omap kernel, it is necessary to use a PM kernel to get all PM features such as DVFS.  In fact, the most savings will be seen with the most recent PM kernel.  See the two alternate methods below for instructions on how to use the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Update bitbake recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate OpenEmbedded Method===&lt;br /&gt;
If you already have an open embedded build system setup, then follow the directions in this section for the easiest and quickest build.&lt;br /&gt;
&lt;br /&gt;
First git the sources for the pm kernel branch&lt;br /&gt;
 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git?branch=pm&lt;br /&gt;
and cd into the resulting &amp;quot;linux-omap-pm&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' This will pull the latest development code from the pm kernel branch.  Since this code is in constant development, things can change quickly.&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Change to have git pull a known working revision.&lt;br /&gt;
&lt;br /&gt;
Add the openembedded cross compile tools to your path.&lt;br /&gt;
 $ PATH=&amp;lt;path to oe tmp&amp;gt;/sysroots/i686-linux/usr/armv7a/bin/:&amp;lt;path to oe tmp&amp;gt;/sysroots/i686-linux/usr/bin:$PATH&lt;br /&gt;
Next, activate the default config for omap2 and higher devices.&lt;br /&gt;
 $ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- ARCH=arm omap2plus_defconfig&lt;br /&gt;
By default, this config does not have the cpu frequency scaling enabled.  In order to enable it you need to edit the config.&lt;br /&gt;
 $ make menuconfig&lt;br /&gt;
Navigate to CPU Power Management and enable &amp;quot;CPU Frequency Scaling&amp;quot;.  Exit the config and select yes to save it.&lt;br /&gt;
&lt;br /&gt;
Finally, build the kernel image.&lt;br /&gt;
 $ make CROSS_COMPILE=arm-angstrom-linux-gnueabi- ARCH=arm uImage&lt;br /&gt;
&lt;br /&gt;
Copy the resulting image to the FAT partition of your microSD card.  The image can be found at&lt;br /&gt;
 ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
You can now follow steps 4 through 6 in the CodeSourcery method below or continue here.&lt;br /&gt;
&lt;br /&gt;
The new kernel uses ttyO2 as the serial port instead of ttyS2. So you need to make changes in your ext3 file system. cd to the os partition on your micro sd card (from your development system) and do the following.&lt;br /&gt;
* Edit &amp;lt;path to mcirosd rootfs&amp;gt;/etc/inittab and change ttyS2 to ttyO2&lt;br /&gt;
* Make a &amp;quot;node&amp;quot; in dev for ttyO2&lt;br /&gt;
 $ mknod -m 660 &amp;lt;path to mcirosd rootfs&amp;gt;/dev/ttyO2 c 4 66&lt;br /&gt;
* On bootup, execute these commands from the uboot command line (assumes your uboot and xload are setup previously)&lt;br /&gt;
 mmc init&lt;br /&gt;
 setenv console ttyO2,115200n8&lt;br /&gt;
 run loaduImage&lt;br /&gt;
 run mmcboot&lt;br /&gt;
&lt;br /&gt;
You should now boot into your new kernel. Follow the instructions in the sections below to use PM features.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Some things have changed in the sections below for the new kernel such as the path to set the serial timeout.  Its now &lt;br /&gt;
 /sys/devices/platform/omap/omap_uart.#/sleep_timeout&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate CodeSourcery Method===&lt;br /&gt;
If you do not already have an openembedded build setup, then follow these step taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git?branch=pm&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Update:'''  The omap3_pm_defconfig is no longer available. Use omap2plus_defconfig instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2-8M.bin&lt;br /&gt;
setenv bootargs console=ttyO2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using a non PM kernel, then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
Everywhere below you see &amp;quot;/sys/power/&amp;quot; replace with &amp;quot;/debug/pm_debug/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5134</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5134"/>
				<updated>2011-03-07T22:20:31Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Features */ Removed kernel verisons specifiers and added note for non PM kernels instead.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  Even though this kernel is significantly older than the mainstream 2.6.36 linux-omap kernel, it is necessary to use a PM kernel to get all PM features such as DVFS.  In fact, the most savings will be seen with the most recent PM kernel.  See the alternate method below for instructions on how to use the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Update bitbake recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
If you are using a non PM kernel, then before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
Everywhere below you see &amp;quot;/sys/power/&amp;quot; replace with &amp;quot;/debug/pm_debug/&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5133</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5133"/>
				<updated>2011-03-07T22:17:06Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Features */  Added notes for different kernels&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  Even though this kernel is significantly older than the mainstream 2.6.36 linux-omap kernel, it is necessary to use a PM kernel to get all PM features such as DVFS.  In fact, the most savings will be seen with the most recent PM kernel.  See the alternate method below for instructions on how to use the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Update bitbake recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' There are several discrepancies between kernel versions.  The specific kernel version will be specified for all commands using the following notation:&lt;br /&gt;
* [ 2.6.36 ] The mainstream 2.6.36 linux-omap kernel included by default with current openembedded build&lt;br /&gt;
* [ 2.6.29 PM ] The 2.6.29 PM branch included in the openembedded linux-omap-pm recipe&lt;br /&gt;
* [ 2.6.36 PM ] The 2.6.26 PM branch built manually&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 # echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 [ 2.6.36 ]&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
 [ 2.6.29 PM ]&lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 [ 2.6.36 ]&lt;br /&gt;
 # echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
 [ 2.6.29 PM ]&lt;br /&gt;
 # echo 1 &amp;gt; /sys/power/enable_off_mode&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5132</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5132"/>
				<updated>2011-03-07T21:52:09Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Kernel */ Clarified PM kernel explanation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Some of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel to get the most power savings possible.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  Even though this kernel is significantly older than the mainstream 2.6.36 linux-omap kernel, it is necessary to use a PM kernel to get all PM features such as DVFS.  In fact, the most savings will be seen with the most recent PM kernel.  See the alternate method below for instructions on how to use the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Update bitbake recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5131</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5131"/>
				<updated>2011-03-07T21:43:14Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* DVFS */  First attempt to fill in DVFS section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Many of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel instead of the mainstream branch.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  This kernel is significantly older than the 2.6.36 mainstream linux-omap kernel available in the open embedded build.  The 2.6.36 linux-omap kernel contains many of the changes in the 2.6.29 PM branch.  However, the most recent 2.6.36 PM kernel has additional features for power saving.  You must follow the alternate method below to use the most recent PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Figure out how to update recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. You must be running the PM kernel for DVFS functionality.&lt;br /&gt;
&lt;br /&gt;
The cpufreq utils and daemon are needed to enable and configure DVFS. Use bitbake to manually build cpufreqd and cpufrequtils.&lt;br /&gt;
&lt;br /&gt;
 $ bitbake cpufreqd&lt;br /&gt;
 $ bitbake cpufrequtils&lt;br /&gt;
&lt;br /&gt;
You can also place these dependencies in your user config recipie....TODO&lt;br /&gt;
&lt;br /&gt;
Once the cpufreqd and cpufrequtils are built, you can build your image as normal, or you can simply copy the ipk files to your SD card and install them.&lt;br /&gt;
&lt;br /&gt;
 $ cp tmp/deploy/glibc/ipk/armv7a/cpufreqd_* tmp/deploy/glib/ipk/armv7a/cpufrequtils_* /media/SD_CARD/home/root/&lt;br /&gt;
&lt;br /&gt;
To install, run the following command from your Overo COM:&lt;br /&gt;
 # opkg install /home/root/cpufreq*.ipk&lt;br /&gt;
&lt;br /&gt;
You may see some errors about a &amp;quot;hicolor-icon-theme&amp;quot; which can be ignored.&lt;br /&gt;
&lt;br /&gt;
Now that you have cpufreq tools setup, run cpufreq-info and you will see output describing the cpu frequency modes for your cpu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~#cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;performance&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 600 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:100.00%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:0.00%  (1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the cpufreq stats line, we have run at full speed 600 MHz for 100% of the time.  In order to reduce cpu frequency automatically, we have to change to a different &amp;quot;governor&amp;quot;. For example, switching to the powersave governor will limit cpu frequency to between 0% and 33% of max speed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@overo:~# cpufreq-set -g powersave&lt;br /&gt;
root@overo:~# cpufreq-info&lt;br /&gt;
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009&lt;br /&gt;
Report errors and bugs to cpufreq@vger.kernel.org, please.&lt;br /&gt;
analyzing CPU 0:&lt;br /&gt;
  driver: omap&lt;br /&gt;
  CPUs which run at the same hardware frequency: 0&lt;br /&gt;
  CPUs which need to have their frequency coordinated by software: 0&lt;br /&gt;
  maximum transition latency: 0.00 ms.&lt;br /&gt;
  hardware limits: 125 MHz - 600 MHz&lt;br /&gt;
  available frequency steps: 600 MHz, 550 MHz, 500 MHz, 250 MHz, 125 MHz&lt;br /&gt;
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance&lt;br /&gt;
  current policy: frequency should be within 125 MHz and 600 MHz.&lt;br /&gt;
                  The governor &amp;quot;powersave&amp;quot; may decide which speed to use&lt;br /&gt;
                  within this range.&lt;br /&gt;
  current CPU frequency is 125 MHz (asserted by call to hardware).&lt;br /&gt;
  cpufreq stats: 600 MHz:86.17%, 550 MHz:0.00%, 500 MHz:0.00%, 250 MHz:0.00%, 125 MHz:13.83%  (2)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cpufreq daemon automatically switches governors based on rules defined in&lt;br /&gt;
 /etc/cpufreqd.conf&lt;br /&gt;
&lt;br /&gt;
'''TODO:''' Examine how to use cpufreqd to manage the active governor.&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5130</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5130"/>
				<updated>2011-03-07T16:48:46Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: /* PM Kernel */  Expanded PM kernel explanation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running Gumstix COMs in power sensitive applications and need to reduce power consumption as much as possible. This page is being developed by the Gumstix community as the steps are learned for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Community Mailing List Threads===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth COM power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on Gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  By default, openembedded does not use the PM kernel, but instead uses the mainstream linux-omap kernel. Many of the changes of the PM branch have been merged to the mainstream linux-omap branch.  However, not all changes have been merged so you must manually configure openembedded to use the PM kernel instead of the mainstream branch.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 PM kernel.  This kernel is significantly older than the 2.6.36 mainstream linux-omap kernel available in the open embedded build.  The 2.6.36 linux-omap kernel contains many of the changes in the 2.6.29 PM branch.  However, the most recent 2.6.36 PM kernel has additional features for power saving.  You must follow the alternate method below to use the most recent PM kernel.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Figure out how to update recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the Gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are steps to build the kernel &amp;quot;the traditional way&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the &lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html instructions here].&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (these commands must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot to a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable PM features, you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. This function is not available in the mainline kernel.  Will fill in after switching to PM kernel.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section applies only to the OMAP3530-based Overo COMs, as the OMAP3530 has both a DSP and Graphics engine.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the Gumstix COM consume power even if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined Wifi/Bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on-board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=5124</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Main_Page&amp;diff=5124"/>
				<updated>2011-03-02T00:35:47Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Added link to Low Power how to&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;''Welcome to the Gumstix User 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://gumstix.org 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 - Focus]]&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: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: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:How-tos |User how to's]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - Android|Android]]&lt;br /&gt;
* [[:Category:how to - eclipse|Eclipse]]&lt;br /&gt;
* [[:Category:How_to_-_Migrate_to_Gumstix|Migrate to Gumstix]]&lt;br /&gt;
* [[:Category:how to - Ubuntu|Ubuntu]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - audio|Audio]]&lt;br /&gt;
* [[AutoLogin|Automatic Logins]]&lt;br /&gt;
* [[:Category:how to - batteries|Batteries]]&lt;br /&gt;
* [[:Category:how to - bluetooth|Bluetooth]]&lt;br /&gt;
* [[:Category:Connect_hardware|Connect Hardware]]&lt;br /&gt;
* [[Caspa_camera_boards|Caspa camera boards]]&lt;br /&gt;
* [[:Category:how to - displays|Displays]]&lt;br /&gt;
* [[:Category:how to - DSP|DSP]]&lt;br /&gt;
* [[:Category:how_to_-_ethernet|Ethernet]]&lt;br /&gt;
* [[:Category:how_to_-_expansion_boards|Expansion Boards]]&lt;br /&gt;
* [[:Category:how to - fedora|Fedora]]&lt;br /&gt;
* [[Gaining Console Connection via Terminal]]&lt;br /&gt;
* [[:Category:how to - git|Git]]&lt;br /&gt;
* [[GPIO|GPIO]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[GPS|GPS]]&lt;br /&gt;
* [[:Category:how to - gui|GUI]]&lt;br /&gt;
* [[:Category:how to - general|General]]&lt;br /&gt;
* [[:Category:how to - Build helloworld|HelloWorld]]&lt;br /&gt;
* [[HelloWorld|HelloWorld in Python, C, C++]]&lt;br /&gt;
* [[HelloWorld in Java|HelloWorld in Java]]&lt;br /&gt;
* [[:Category:how to - i2c|I2C]]&lt;br /&gt;
* [[:Category:how to - IMU|IMU]]&lt;br /&gt;
* [[:Category:how to - JAVA|JAVA]]&lt;br /&gt;
* [[Kernel Reconfiguration|Kernel Reconfiguration]]&lt;br /&gt;
* [[:Category:how to - Known Issues|Known Issues]]&lt;br /&gt;
* [[:Category:how to - LCD|LCD]]&lt;br /&gt;
* [[:Category:how to - Low Power|Low Power]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:how to - linux|Linux]]&lt;br /&gt;
* [[AudioIn | Use a microphone]]&lt;br /&gt;
* [[MicroSd |MicroSD Duplication]]&lt;br /&gt;
* [[:Category:how to - Network_Boot|Network Boot]]&lt;br /&gt;
* [[:Category:how to - OpenEmbedded|OpenEmbedded]]&lt;br /&gt;
* [[:Category:how to - player|Player]]&lt;br /&gt;
* [[:Category:How to - PWM|PWM]]&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;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[:Category:SUSE|SUSE]]&lt;br /&gt;
* [[Remote Debugging with GDB|Remote Debugging with GDB]]&lt;br /&gt;
* [[U-Boot|UBoot]]&lt;br /&gt;
* [[:Category:how to - usb|USB]]&lt;br /&gt;
* [[Verdex Git Repository]]&lt;br /&gt;
* [[VerdexPro U-Boot Flashing Fix]]&lt;br /&gt;
* [[:Category:how to - virtual machine|Virtual Machine]]&lt;br /&gt;
* [[:Category:how to - webcams|Webcams]]&lt;br /&gt;
* [[:Category:how to - wifi|Wifi]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&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: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:projects - audio|Audio]]&lt;br /&gt;
* [[:Category:projects - competitions|Competitions]]&lt;br /&gt;
* [[:Category:projects - displays|Displays]]&lt;br /&gt;
* [[:Category:projects - pdas|PDA's]]&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;
| 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;
* [[Third Party Boards]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
Gumstix Community Mailing List (no cost)&lt;br /&gt;
* [https://lists.sourceforge.net/lists/listinfo/gumstix-users Sign-up]&lt;br /&gt;
* [http://old.nabble.com/Gumstix-f22543.html Archives]&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.com/Main_Page docwiki.gumstix.com]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5123</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5123"/>
				<updated>2011-03-02T00:35:15Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Reorganized the PM features section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running gumstix in power sensitive applications and therefore need to reduce power consumption as much as possible.  There is no documentation available describing precisely the steps needed to reduce gumstix power consumption.  As a result, I created this how to and am filling it in as I learn each step for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Emails===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  Many of the changes of the PM branch have been merged to the mainstream linux-omap branch.  Not all changes have been merged though so you must manually configure openembedded to use the PM kernel instead of the mainstream branch.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 branch + patches.  This is significantly older than the 2.6.36 kernel available in the open embedded build.  The 2.6.36 contains most of the changes in the 2.6.29 branch.  For the best power savings you'll need to follow the alternate method below.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Figure out how to update recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I don't want to start a flame war, but I find the OpenEmbedded /&lt;br /&gt;
BitBake approach wholly lacking.&lt;br /&gt;
&lt;br /&gt;
So, I've been building the kernel the traditional way.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the&lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the instructions here:&lt;br /&gt;
&lt;br /&gt;
http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (alas, they must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot, and one should be presented with a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PM Features==&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable pm features, first you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. This functionality is not available in the mainline kernel.  Will fill in after switching to PM kernel.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section does not apply to the Overo Earth/Air since only the OMAP 3530 contains a DSP and GPU.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section does not apply to the Overo Earth/Air since only the OMAP 3530 contains a DSP and GPU.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the gumstix COM consume power if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined wifi/bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5122</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5122"/>
				<updated>2011-03-02T00:32:21Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Added all sections. Placeholders for sections to be filled in&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running gumstix in power sensitive applications and therefore need to reduce power consumption as much as possible.  There is no documentation available describing precisely the steps needed to reduce gumstix power consumption.  As a result, I created this how to and am filling it in as I learn each step for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Emails===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/cpufreq-on-the-Overo-td21680612.htm cpufreq on the Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle, off mode, and dvfs&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  Many of the changes of the PM branch have been merged to the mainstream linux-omap branch.  Not all changes have been merged though so you must manually configure openembedded to use the PM kernel instead of the mainstream branch.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
'''NOTE:'''  The linux-omap-pm bitbake recipe is setup to use the 2.6.29 branch + patches.  This is significantly older than the 2.6.36 kernel available in the open embedded build.  The 2.6.36 contains most of the changes in the 2.6.29 branch.  For the best power savings you'll need to follow the alternate method below.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Figure out how to update recipe for latest PM branch.&lt;br /&gt;
&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===PM Kernel Alternate Method===&lt;br /&gt;
There is an alternate method for building the omap-pm kernel taken from Peter Lawrence on the gumstix mailing list.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  As per the comments below, this method disables nand and microSD access.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  See how to get nand and microSD working with the latest PM kernel.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I don't want to start a flame war, but I find the OpenEmbedded /&lt;br /&gt;
BitBake approach wholly lacking.&lt;br /&gt;
&lt;br /&gt;
So, I've been building the kernel the traditional way.&lt;br /&gt;
&lt;br /&gt;
1) Download and install cross-compiler tools:&lt;br /&gt;
&lt;br /&gt;
The easiest solution is to download the CodeSourcery binaries:&lt;br /&gt;
&lt;br /&gt;
http://www.codesourcery.com/sgpp/lite/arm&lt;br /&gt;
&lt;br /&gt;
CodeSourcery provides an install program.  (You'll have to set the&lt;br /&gt;
executable bit on the file to run it.)&lt;br /&gt;
&lt;br /&gt;
Note that the CodeSourcery install modifies .bash_profile to add the&lt;br /&gt;
path, but this file does not run automatically in Ubuntu.  To fix&lt;br /&gt;
this, refer to:&lt;br /&gt;
&lt;br /&gt;
http://www.linuxquestions.org/questions/linux-general-1/do-i-put-path-in-bash_profile-or-bashrc-or-both-540288/&lt;br /&gt;
&lt;br /&gt;
which says:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;You can change the second by opening a gnome-terminal window and&lt;br /&gt;
going to Edit / Profiles - select the Default profile and click the&lt;br /&gt;
Edit button. On the Title and Command tab, click the check box for Run&lt;br /&gt;
command as a login shell. Your .bash_profile file should be sourced&lt;br /&gt;
the next time you open a gnome-terminal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2) Get latest Linux OMAP PM code&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git&amp;quot; the latest code:&lt;br /&gt;
&lt;br /&gt;
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git&lt;br /&gt;
&lt;br /&gt;
The result will be in the subdirectory &amp;quot;linux-omap-pm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) Build the OMAP3_PM Linux Kernel&lt;br /&gt;
&lt;br /&gt;
Extract the download Linux kernel code and cd to that directory.  The&lt;br /&gt;
command sequence is:&lt;br /&gt;
&lt;br /&gt;
export ARCH=arm&lt;br /&gt;
make omap3_pm_defconfig&lt;br /&gt;
&lt;br /&gt;
This creates a .config file suitable for Linux OMAP3 PM.&lt;br /&gt;
&lt;br /&gt;
TBD: patch the .config file for JFFS2 and SD card&lt;br /&gt;
&lt;br /&gt;
export CROSS_COMPILE=arm-none-eabi-&lt;br /&gt;
make uImage [this takes a very long while]&lt;br /&gt;
&lt;br /&gt;
The resultant kernel file will be in: ./arch/arm/boot/uImage&lt;br /&gt;
&lt;br /&gt;
4) Download the initramfs filesystem&lt;br /&gt;
&lt;br /&gt;
Obtain &amp;quot;rd-ext2-8M.bin&amp;quot; from:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/beagleboard/downloads/list&lt;br /&gt;
&lt;br /&gt;
5) Create a bootable MicroSD card&lt;br /&gt;
&lt;br /&gt;
Follow the instructions here:&lt;br /&gt;
&lt;br /&gt;
http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html&lt;br /&gt;
&lt;br /&gt;
However, one can omit the &amp;quot;MLO&amp;quot; and the &amp;quot;u-boot.bin&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
One should, however, copy over the &amp;quot;uImage&amp;quot; file created in step #3,&lt;br /&gt;
and the &amp;quot;rd-ext2-8M.bin&amp;quot; (as &amp;quot;rd-ext2.bin&amp;quot;) created in step #4.&lt;br /&gt;
6) Boot the Overo&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;Press any key&amp;quot; prompt at boot to operate the U-Boot app.&lt;br /&gt;
&lt;br /&gt;
Enter the following commands: (alas, they must be done individually,&lt;br /&gt;
as U-Boot does not have a large enough buffer for the entire quantity&lt;br /&gt;
to be pasted at once)&lt;br /&gt;
&lt;br /&gt;
mmc init&lt;br /&gt;
fatload mmc 1:1 0x80300000 uImage.pm&lt;br /&gt;
fatload mmc 1:1 0x81600000 rd-ext2.bin&lt;br /&gt;
setenv bootargs console=ttyS2,115200n8 ramdisk_size=8192&lt;br /&gt;
root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M&lt;br /&gt;
bootm 0x80300000&lt;br /&gt;
&lt;br /&gt;
 TBD: change u-boot parameters to perform this automatically&lt;br /&gt;
&lt;br /&gt;
 Linux should boot, and one should be presented with a BusyBox console prompt.&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use PM Features===&lt;br /&gt;
For a full list of PM features see [http://elinux.org/OMAP_Power_Management OMAP Power Management].  The features listed here are the most common needed to reduce power.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel up and running, you can access PM features to enable power savings.&lt;br /&gt;
&lt;br /&gt;
===Setup Debug FS===&lt;br /&gt;
Before you can enable pm features, first you need to setup the debug file system for manipulating pm configuration.&lt;br /&gt;
 mkdir /debug&lt;br /&gt;
 mount -t debugfs debugfs /debug&lt;br /&gt;
&lt;br /&gt;
===Sleep While Idle===&lt;br /&gt;
Next, enable &amp;quot;sleep while idle&amp;quot;. This will allow the processor to attempt deeper sleep states when idle. You must also enable sleep timeouts for the serial ports, otherwise this will result in '''increased''' power consumption.&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.0/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.1/sleep_timeout&lt;br /&gt;
 $ echo 5 &amp;gt; /sys/devices/platform/serial8250.2/sleep_timeout &lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/sleep_while_idle&lt;br /&gt;
&lt;br /&gt;
You can also enable &amp;quot;off mode&amp;quot; after enabling &amp;quot;sleep while idle&amp;quot;.&lt;br /&gt;
 $ echo 1 &amp;gt; /debug/pm_debug/enable_off_mode &lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Enabling sleep when idle will cause the device to &amp;quot;miss&amp;quot; the first character or two from the serial console (and most likely all UARTS).  Since the UART is asleep, a character must be sent to wake it up. This character will be missed as well as subsequent characters until the UART is fully awake.&lt;br /&gt;
&lt;br /&gt;
===DVFS===&lt;br /&gt;
Dynamic frequency and voltage scaling dynamically reduces clock frequency and voltage for further power savings. This functionality is not available in the mainline kernel.  Will fill in after switching to PM kernel.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Disable Internal Devices==&lt;br /&gt;
The internal peripherals and devices such as the DSP and GPU consume power if not being used. All unused peripherals, DSP, and GPU should be turned off.&lt;br /&gt;
&lt;br /&gt;
===Turn Off Peripherals===&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off DSP===&lt;br /&gt;
This section does not apply to the Overo Earth/Air since only the OMAP 3530 contains a DSP and GPU.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
===Turn Off GPU===&lt;br /&gt;
This section does not apply to the Overo Earth/Air since only the OMAP 3530 contains a DSP and GPU.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable External Chipsets==&lt;br /&gt;
Several external chipsets on the gumstix COM consume power if not being used.  Their power consumption can be reduced (although not completely eliminated) by holding the chips in reset.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
You can hold the USB chip in reset with the following commands:&lt;br /&gt;
&lt;br /&gt;
 $ echo 183 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio183/direction&lt;br /&gt;
 $ echo 0 &amp;gt; /sys/class/gpio/gpio183/value &lt;br /&gt;
&lt;br /&gt;
These commands will export GPIO 183 for access through the sys interface, set the GPIO to output, and drive &amp;quot;0&amp;quot; to the reset line on the USB chip.&lt;br /&gt;
&lt;br /&gt;
You can also turn off power to the USB chip.&lt;br /&gt;
&lt;br /&gt;
 If someone wanted to try the same nasty kernel hack, I added this two lines:&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x08 /* value */, 0xBB /* register (CARKIT_ANA_CTRL) */);&lt;br /&gt;
        twl_i2c_write_u8(TWL4030_MODULE_USB, 0x01 /* value */, 0xFD /*register (PHY_PWR_CTRL) */);&lt;br /&gt;
 in the function &amp;quot;twl_probe&amp;quot; in /drivers/mfd/twl-core.c just prior to the comment &amp;quot;load power event scripts&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
===Wifi/Bluetooth===&lt;br /&gt;
If not using the combined wifi/bluetooth module, you can hold it in reset.  You can also hold it in reset and only enable as needed for periodic connectivity.&lt;br /&gt;
&lt;br /&gt;
 TBD&lt;br /&gt;
&lt;br /&gt;
==Disable LEDs==&lt;br /&gt;
The on board blue LED can be disabled with the following commands.&lt;br /&gt;
&lt;br /&gt;
 $ echo 211 &amp;gt; /sys/class/gpio/export&lt;br /&gt;
 $ echo out &amp;gt; /sys/class/gpio/gpio211/direction&lt;br /&gt;
 $ echo 1 &amp;gt; /sys/class/gpio/gpio211/value &lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	<entry>
		<id>https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5121</id>
		<title>Category:How to - Low Power</title>
		<link rel="alternate" type="text/html" href="https://wiki.gumstix.com/index.php?title=Category:How_to_-_Low_Power&amp;diff=5121"/>
				<updated>2011-03-01T21:15:39Z</updated>
		
		<summary type="html">&lt;p&gt;Maroc: Steps for reducing power on gumstix overo coms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Status==&lt;br /&gt;
This page is a work in progress. Many users are running gumstix in power sensitive applications and therefore need to reduce power consumption as much as possible.  There is no documentation available describing precisely the steps needed to reduce gumstix power consumption.  As a result, I created this how to and am filling it in as I learn each step for reducing power.&lt;br /&gt;
&lt;br /&gt;
===Relevant Emails===&lt;br /&gt;
[http://old.nabble.com/sample-numbers-for-Overo-Earth-power-consumption-td29792431.html sample numbers for Overo Earth power consumption]&lt;br /&gt;
&lt;br /&gt;
[http://old.nabble.com/Building-a-linux-omap3-pm-for-Overo-td29819751.html#a29819751 Building a linux omap3 pm for Overo]&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The default omap3 openembedded build does not provide an optimal setup for power reduction on gumstix Overo COMS.  In order to achieve the lowest power possible for your application, you have to perform a combination of the following:&lt;br /&gt;
&lt;br /&gt;
* Use the latest OMAP Power Management (pm) kernel branch&lt;br /&gt;
* Enable power saving features such as sleep when idle and off mode&lt;br /&gt;
* Disable internal OMAP devices&lt;br /&gt;
* Hold unused external chips such as USB, Wifi, Bluetooth, etc. in reset&lt;br /&gt;
* Turn off unused LEDs&lt;br /&gt;
&lt;br /&gt;
==PM Kernel==&lt;br /&gt;
The [http://elinux.org/OMAP_Power_Management PM kernel] is a development branch of the linux-omap kernel focused on developing the power management features of OMAP.  Many of the changes of the PM branch have been merged to the mainstream linux-omap branch.  Not all changes have been merged though so you must manually configure openembedded to use the PM kernel instead of the mainstream branch.&lt;br /&gt;
&lt;br /&gt;
===Compile PM Kernel===&lt;br /&gt;
To enable the PM kernel edit the file&lt;br /&gt;
 org.openembedded.dev/conf/machine/overo.conf&lt;br /&gt;
and change the line &lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap3&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 PREFERRED_PROVIDER_virtual/kernel = &amp;quot;linux-omap-pm&amp;quot;&lt;br /&gt;
Save the changes and then run bitbake as usual e.g.&lt;br /&gt;
 $ bitbake omap3-console-image&lt;br /&gt;
The pm branch will be downloaded and compiled.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''  Downloading the branch may take some time.&lt;br /&gt;
&lt;br /&gt;
'''TODO:'''  Add alternative method for downloading branch from mirror.&lt;br /&gt;
&lt;br /&gt;
Once you have the PM kernel built, follow the instructions for copying the new image and filesystem to your microSD card.&lt;br /&gt;
&lt;br /&gt;
===Configure PM Kernel===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:How_to_-_general]]&lt;/div&gt;</summary>
		<author><name>Maroc</name></author>	</entry>

	</feed>