<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jho</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jho"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Jho"/>
	<updated>2026-04-16T05:07:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=GSM_%26_UMTS_Frequencies&amp;diff=15777</id>
		<title>GSM &amp; UMTS Frequencies</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=GSM_%26_UMTS_Frequencies&amp;diff=15777"/>
		<updated>2011-05-04T15:24:16Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is to track the frequencies available on different webOS phones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;We should insert a table here but I don't know how&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://kb.palm.com/wps/portal/kb/na/pre/p100eww/att/solutions/article/65931_en.html%5DPalm%20Support%20:%20Palm%20Pre%20Plus%20for%20AT&amp;amp;T%20-%20Understanding%20network%20bands%20and%20frequencies%20for%20a%20GSM/UMTS%20phone Frequencies for Palm Pre/Pre Plus/Pre 2 US &amp;amp; RoW]&lt;br /&gt;
[http://www.worldtimezone.com/gsm.html GSM World Coverage Map]&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=GSM_%26_UMTS_Frequencies&amp;diff=15775</id>
		<title>GSM &amp; UMTS Frequencies</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=GSM_%26_UMTS_Frequencies&amp;diff=15775"/>
		<updated>2011-05-04T14:53:39Z</updated>

		<summary type="html">&lt;p&gt;Jho: Created page with &amp;quot;This is to track the frequencies available on different webOS phones.  &amp;lt;We should insert a table here but I don't know how&amp;gt;  [http://kb.palm.com/wps/portal/kb/na/pre/p100eww/att/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is to track the frequencies available on different webOS phones.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;We should insert a table here but I don't know how&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://kb.palm.com/wps/portal/kb/na/pre/p100eww/att/solutions/article/65931_en.html%5DPalm%20Support%20:%20Palm%20Pre%20Plus%20for%20AT&amp;amp;T%20-%20Understanding%20network%20bands%20and%20frequencies%20for%20a%20GSM/UMTS%20phone]&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=WhoIsWho&amp;diff=11092</id>
		<title>WhoIsWho</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=WhoIsWho&amp;diff=11092"/>
		<updated>2010-08-30T07:29:26Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists all the WebOS Internals developers, and the projects and activities for which each is responsible.  Names are listed in chronological order of officially joining the WebOS Internals team.&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=rwhitby|realname=Rod Whitby|responsibility=Founder and Project Lead for WebOS Internals and Preware |aboutme=Homebrew Ecosystem Architect. Lead developer for Save/Restore. Co-Lead developer for Preware, Govnah and UberKernel.  Co-developer for a number of other packages. Oh, and a family and full-time day job too.}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=ka6sox|realname=Tom King|responsibility=Chief Server Infrastructure Architect and Sys-Admin Team Lead(aka BOFH)|aboutme=FT:High Power RF, VHDL/Verilog Design, Play Time: Dabble with Kernel development.}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=rboatright|realname=Rick Boatright|responsibility=Chief Evangelist|aboutme=}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=destinal|realname=Eric Duprey|responsibility=That would be telling|aboutme=Hacker, security geek, one of the original devs behind the WebOS Internals &amp;quot;Terminal&amp;quot; application}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=PuffTheMagic|realname=Ryan Hope|responsibility=Play devil's advocate|aboutme=Research assistant / cognitive science grad student by day; webos developer by night }}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=egaudet|realname=Eric Gaudet|responsibility=AUPT architect and randomness|aboutme=Busy debugging}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=oil|realname=Brandon VanBelle|responsibility=Minister of Awesomeness|aboutme=It's not my fault!}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=dtzWill|realname=Will Dietz|responsibility=Various WebOS Internals games, X11, WIDK management|aboutme=CS grad student who spends entirely too much time on WebOS }}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=zsoc|realname=|responsibility=Multimedia subsystem architect|aboutme=}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=uNiXpSyChO|realname=Marco Benton|responsibility=BOFH and Kernel hacker|aboutme=[[Full-time]]; SysAdmin, SAN Admin, Network Admin. [[Part-time]]; System integration and network design consulting. [[Free-time]]; programming - since that's what i used to do full-time 20 years ago. }}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=sbromwich|realname=Steve Bromwich|responsibility=Kernel developer|aboutme=Dilettante kernel programmer concentrating mostly on extending battery life.}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=swisstomcat|realname=Markus Leutwyler|responsibility=Chief German Translator (ja, genau!) and Javascript Parts Donator to different Projects. Also European Propaganda Minister. |aboutme=Web and Mobile Developer}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=jhojho|realname=|responsibility=Warthog kernel developer. Various patches.|aboutme=}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=cryptk|realname=Chris Jowett|responsibility=Server administration and management|aboutme=I work as a full time linux systems administratior as my day job and lend that knowledge to keep the WebOS Internals servers running as well as they possibly can.}}&lt;br /&gt;
&lt;br /&gt;
{{AboutMe|alias=sconix|realname=Janne Julkunen|responsibility=Creating nice patches and developing Mode Switcher|aboutme=Involved with Linux way too much :)}}&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=10627</id>
		<title>Patch webOS CPU Frequency or Voltage Scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=10627"/>
		<updated>2010-07-28T01:27:25Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Enable SmartReflex */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
= Overview=&lt;br /&gt;
There are currently 2 methods to enable further power saving - neither is perfect. Note that '''these 2 methods CANNOT be used together''' so make sure you try only one solution at a time. Using both has been reported to brick your Pre, requiring a visit to the WebOS Doctor. Patches for these are now available in the gitorious repo. See [[Applying Patches]]&lt;br /&gt;
&lt;br /&gt;
1 CPU Scaling&lt;br /&gt;
* This allows the Pre to scale the CPU clock speed up and down in response to changes in CPU utilization. Some people have reported glitching when using scaling when the CPU is under heavy load (lots of multitasking, playing video, etc).&lt;br /&gt;
2 SmartReflex&lt;br /&gt;
* This allows the Pre to vary the voltage inside the core in response to silicon characteristics, temperature, voltage, etc. This does not save that much power because it is supposed to be used along with CPU scaling to reduce voltage when the CPU is running slower, but the Pre's kernel is missing the modules to do this. This is why using both together will '''freeze''' the Palm Pre. (Remove the battery, restart with the USB plugged into your computer with NovaCom installed, During the phones boot procedure simply telnet to the phone through NovaCom's Proxy port 8023, remove the smartreflex files you installed in the events folder in /etc/ before WebOS panics) &lt;br /&gt;
&lt;br /&gt;
= CPU Scaling=&lt;br /&gt;
== Default Setting==&lt;br /&gt;
Frequency scaling does not appear to be active by default on the Pre by default. The directory /sys/devices/system/cpu/cpu0/cpufreq contains information on the current state. The clock seems to be fixed at 500mHz for normal operation (according to cpuinfo_cur_freq), however several other frequencies exist:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# cat ./scaling_available_frequencies &lt;br /&gt;
600000 550000 500000 250000 125000 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state shows that at some point (probably during startup) the frequency is raised to 550mHz for a short period of time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enabling Scaling==&lt;br /&gt;
It is possible to enable frequency scaling using the 'ondemand' governor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo ondemand &amp;gt; ./scaling_governor &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
this will cause the frequency to be reduced automatically while idle, and increased as needed during operation, potentially increasing battery life. Because higher frequencies may cause overheating, and TI has noted a significant decrease in the life of the processor when running above 500mHz, you should also restrict the frequency scaling to 500mHz and below by doing the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 &amp;gt; ./scaling_max_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your Pre seems sluggish after enabling scaling, you can try changing the values in /sys/devices/system/cpu/cpu0/cpufreq/ondemand as detailed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 'ondemand' Configuration==&lt;br /&gt;
Increasing the value of 'scaling_min_freq' will prevent the CPU from going into extremely low speed configurations, which will significantly improve the responsiveness of the device when it first detects increased CPU usage, at the cost of a little bit of battery life.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 250000 &amp;gt; ./scaling_min_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setting the value of 'up_threshold' lower will cause the frequency to be increased at lower levels of activity.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq/ondemand# echo 30 &amp;gt; ./up_threshold&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: The default setting for 'up_threshold' is 80.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checking Performance and Stats==&lt;br /&gt;
To check how long your Pre has been running and at what frequency, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;600000 906&lt;br /&gt;
550000 768&lt;br /&gt;
500000 380&lt;br /&gt;
250000 0&lt;br /&gt;
125000 180505&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number is the CPU frequency, the second is a time interval.  In this example, my Pre has spent the most time @ 125mHz, but you can see it shoots up when needed.  Note that if you are overclocking, it really doesn't spend much time at 600mHz, so overheating shouldn't be a problem, but you will definitely notice an improvement. These stats are reset after a reboot.&lt;br /&gt;
&lt;br /&gt;
== Overclocking==&lt;br /&gt;
Overclocking is not recommended, as TI has reported a significant decrease in the life of the CPU at frequencies about 500mHz. However some users have reported better responsiveness, in addition to running cooler and using less battery while overclocking.&lt;br /&gt;
&lt;br /&gt;
To overclock to the CPU's maximum speed, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;600000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To put it back, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
Create a file called '''cpu-scaling''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Enables cpu scaling&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
    echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
    echo &amp;quot;250000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
    echo &amp;quot;ondemand&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
    echo &amp;quot;30&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Stock Fixed Frequency==&lt;br /&gt;
The simple way is just to remove the '''cpu-scaling''' script from /etc/event.d (if you created it) and reboot.  None of these changes are persistent without the &amp;quot;sticky&amp;quot; script shown above.&lt;br /&gt;
&lt;br /&gt;
If you switch back to the 'userspace' governor without rebooting, your frequency could get stuck at a lower setting and the whole system get really bogged down.  Here is a quick shell script to help you revert to userspace with the original frequency:&lt;br /&gt;
&lt;br /&gt;
Copy/paste this whole line as one command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo userspace &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ; echo 500000 &amp;gt;/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then confirm the frequency/governor are back the way you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;I tried this out but video playback was flickery and horrible.  The up_threshold tweak setting to 30 seems to improve it a lot , but it's still flickery a bit.  Some people may not be happy.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I found that setting the max freq to 600000 with the threshold helps this problem.  See relevant warnings above first!  I don't really watch video on my Pre, so it's not so big of a deal.&amp;quot; -pEEf&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;A lot of people on the Precentral forums (myself included) are experiencing the phone locking up after a while of using this, and need to pull the battery to reset.  (On webOS 1.0.3 at least.)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I've been running my phone with scaling for nearly a week now without problems, but I'm not 'overlcocking' so to speak.  Any specifics on what might cause the locks? (ok had my first locks tonight while attached to the touchstone, weird it never happened before now (and annoying))&amp;quot; -retry&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I tried the folling over WebOSQuick Installer Linux Console: 1. root@castle: echo ondemand &amp;gt; ./scaling_governor  2. root@castle: echo 500000 &amp;gt; ./scaling_max_freq 3. root@castle: echo 125000 &amp;gt; ./scaling_min_freq 4. root@castle: echo 30 &amp;gt; ./up_threshold . But even after 7hours... nothing changed.. just used 500Mhz in Airplane mode over Night.&amp;quot; -Ryo&lt;br /&gt;
&lt;br /&gt;
= SmartReflex=&lt;br /&gt;
== Enable SmartReflex==&lt;br /&gt;
SmartReflex can be enabled in the VDD1 and VDD2 areas of the OMAP processor by setting two flags under /sys/power&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; /sys/power/sr_vdd1_autocomp&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; /sys/power/sr_vdd2_autocomp&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt This slide deck] has much of the pertinent information about SmartReflex and other power-saving technologies on the OMAP processor. Unfortunately the kernel modules that provide many of the features mentioned in the slide deck are not present on the Pre. This is the main reason that SmartReflex may not save a terribly large amount of power.&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
To enable SmartReflex, create a file called '''smartreflex''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# -*- mode: shell-script; -*-&lt;br /&gt;
description &amp;quot;SmartReflex&amp;quot;&lt;br /&gt;
author &amp;quot;Alex Markson&amp;quot;&lt;br /&gt;
version 1.0&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
&lt;br /&gt;
# SmartReflex&lt;br /&gt;
# &amp;quot;SmartReflex™ driver allows for auto-compensation of VDD1 and&lt;br /&gt;
# VDD2 voltages (around the voltages specified by current OPP)&lt;br /&gt;
# by analyzing the silicon characteristics, temperature, voltage etc&amp;quot;&lt;br /&gt;
# &lt;br /&gt;
# Enable SmartReflex&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd1_autocomp&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd2_autocomp&lt;br /&gt;
&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable overclocking in addition to SmartReflex, add the following JUST BEFORE the '''end script''' line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# according to the OEM shell script in /etc/miniboot.sh&lt;br /&gt;
# this seems like it needs to be set twice to make sure ?&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;AFter using this for about a week, I find that using SmartReflex causes the Pre to stutter every so often&amp;quot;&lt;br /&gt;
* &amp;quot;webos 1.1 w/ no problems to start. Installed ondemand script, full 125-600mhz range, threshold 30: worked fine mostly but on the touchstone it gets hot and locks up kills battery, backlight on behind black screen, every time, within an hour. Switched to smartreflex with 600mhz, no problems, though only a few days so far and no video testing. Media player remix playing to car stereo via bluetooth is smooth.&amp;quot; [[User:Bkw|Bkw]] 00:02, 15 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
* Alex Markson for the SmartReflex find and the script.&lt;br /&gt;
* pEEf for numerous discoveries related to cpu scaling.&lt;br /&gt;
* sidamos for the info about 'up_threshold'&lt;br /&gt;
* garrettwp for the cpu scaling event.d script.&lt;br /&gt;
* Jauder Ho for gitorious patches&lt;br /&gt;
&lt;br /&gt;
= Hacking=&lt;br /&gt;
There is still a lot of work to be done in making this work optimally. The following are some resources and thoughts.&lt;br /&gt;
* A paper about the ondemand governor http://www.linuxinsight.com/ols2006_the_ondemand_governor.html&lt;br /&gt;
* webOS 1.0.4 has CONFIG_PREEMPT set along with CONFIG_HZ=100. CONFIG_NO_HZ aka tickless is not set. In webOS 1.4.0 (Feb 2010), CONFIG_PREEMPT is not set, CONFIG_HZ=100 and CONFIG_NO_HZ=y (did not check in between).&lt;br /&gt;
* Possible patch for NOHZ / ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
* Use PowerTop to observe what is going on inside the Pre:&lt;br /&gt;
** Install [[Next_steps|ipkg-opt]] then run these commands from a root command prompt to install and start powertop:&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
cd /opt/bin&lt;br /&gt;
./ipkg-opt update&lt;br /&gt;
./ipkg-opt install powertop&lt;br /&gt;
/opt/sbin/powertop&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* http://www.lesswatts.org/&lt;br /&gt;
* http://wiki.davincidsp.com/index.php/Running_PowerTOP_on_OMAP35x_platform&lt;br /&gt;
* TI 3430 PM presentation http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt&lt;br /&gt;
* CPU frequency scaling in Linux with cpufreq. Details on cpufreq parameters http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
* smartreflex patches http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26629.html&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
Right now this is a [slow] collection of data --A2NY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kernel Config File:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel Config Freq:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# CPU Frequency scaling&lt;br /&gt;
#&lt;br /&gt;
CONFIG_CPU_FREQ=y&lt;br /&gt;
CONFIG_CPU_FREQ_TABLE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEBUG is not set&lt;br /&gt;
CONFIG_CPU_FREQ_STAT=y&lt;br /&gt;
CONFIG_CPU_FREQ_STAT_DETAILS=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_USERSPACE=y&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_ONDEMAND=y&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled Governors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors &lt;br /&gt;
ondemand userspace &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ONDEMAND is also called DVFS (Dynamic Voltage &amp;amp; Frequency Scaling)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Newer kernels apparently have an improved ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
&lt;br /&gt;
Kernel Config PM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# OMAP Power Management&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Power Management Options&lt;br /&gt;
#&lt;br /&gt;
CONFIG_OMAP3_PM=y&lt;br /&gt;
CONFIG_OMAP_VOLT_SR_BYPASS=y&lt;br /&gt;
# CONFIG_OMAP_VOLT_SR is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VSEL is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VMODE is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD1 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP1 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP2 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP3 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD1_OPP4=y&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP5 is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD2 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD2_OPP2 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD2_OPP3=y&lt;br /&gt;
# CONFIG_ENABLE_VOLTSCALE_IN_SUSPEND is not set&lt;br /&gt;
# CONFIG_RESET_IVA_IN_SUSPEND is not set&lt;br /&gt;
CONFIG_MPU_OFF=y&lt;br /&gt;
CONFIG_OMAP34XX_OFFMODE=y&lt;br /&gt;
CONFIG_CORE_OFF=y&lt;br /&gt;
# CONFIG_CORE_OFF_CPUIDLE is not set&lt;br /&gt;
CONFIG_SYSOFFMODE=y&lt;br /&gt;
# CONFIG_HW_SUP_TRANS is not set&lt;br /&gt;
# CONFIG_TRACK_RESOURCES is not set&lt;br /&gt;
CONFIG_AUTO_POWER_DOMAIN_CTRL=y&lt;br /&gt;
# CONFIG_PREVENT_MPU_RET is not set&lt;br /&gt;
# CONFIG_PREVENT_CORE_RET is not set&lt;br /&gt;
# CONFIG_DISABLE_EMUDOMAIN_CONTROL is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TWL4030:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_registers.0/module_pm_receiver&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+	  Please note, that by default SmartReflex is only&lt;br /&gt;
+	  initialized. To enable the automatic voltage&lt;br /&gt;
+	  compensation for VDD1 and VDD2, user must write 1 to&lt;br /&gt;
+	  /sys/power/sr_vddX_autocomp, where X is 1 or 2.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Startup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-02T02:40:01.263122Z [15] webos kern.warning kernel: OMAP: Initializing SmartReflex subsystem...&lt;br /&gt;
2009-11-02T02:40:01.263549Z [15] webos kern.info kernel: OMAP: SmartReflex subsystem initialized.&lt;br /&gt;
2009-11-02T02:40:01.282196Z [15] webos kern.err kernel: OMAP 3430 Power Management subsystem initializing.&lt;br /&gt;
2009-11-02T02:40:01.292083Z [15] webos kern.info kernel: OMAP: Setting up clocks.&lt;br /&gt;
2009-11-02T02:40:01.319152Z [15] webos kern.warning kernel: OMAP: OPP mismatch: current/target=2:4&lt;br /&gt;
2009-11-02T02:40:01.319702Z [15] webos kern.info kernel: OMAP: Change MPU speed: 250 =&amp;gt; 550 MHz&lt;br /&gt;
2009-11-02T02:40:01.321044Z [15] webos kern.info kernel: OMAP: ARM/DSP clock at 550/396 MHz.&lt;br /&gt;
2009-11-02T02:40:01.321624Z [15] webos kern.info kernel: BogoMIPS: 547.88 @550000 KHz&lt;br /&gt;
2009-11-02T02:40:01.327911Z [15] webos kern.info kernel: OMAP CPU idle driver initializing.&lt;br /&gt;
2009-11-02T02:40:01.328277Z [15] webos kern.err kernel: create_proc_entry succeeded&lt;br /&gt;
2009-11-02T02:40:01.342102Z [15] webos kern.info kernel: Initialize power support module&lt;br /&gt;
2009-11-02T02:40:01.342742Z [15] webos kern.info kernel: OMAP3: PM: Sirloin target registered successfully.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in userspace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:39:39.106658Z [329] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
2009-11-30T17:39:55.827423Z [345] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in ondemand: (device wants off, will not wake if it goes off)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:27:37.676910Z [7523] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
2009-11-30T17:27:45.676269Z [7531] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
powersave_bias http://osdir.com/ml/kernel.cpufreq/2006-07/msg00137.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
This patch adds a &amp;quot;powersave_bias&amp;quot; tunable to ondemand&lt;br /&gt;
to allow it to reduce its target frequency by a specified percent.&lt;br /&gt;
&lt;br /&gt;
By default, the powersave_bias is 0 and has no effect.&lt;br /&gt;
powersave_bias is in units of 0.1%, so it has an effective range&lt;br /&gt;
of 1 through 1000, resulting in 0.1% to 100% impact.&lt;br /&gt;
&lt;br /&gt;
In practice, users will not be able to detect a difference between&lt;br /&gt;
0.1% increments, but 1.0% increments turned out to be too large.&lt;br /&gt;
Also, the max value of 1000 (100%) would simply peg the system&lt;br /&gt;
in its deepest power saving P-state, unless the processor really has&lt;br /&gt;
a hardware P-state at 0Hz:-)&lt;br /&gt;
&lt;br /&gt;
For example, If ondemand requests 2.0GHz based on utilization,&lt;br /&gt;
and powersave_bias=100, this code will knock 10% off the target&lt;br /&gt;
and seek  a target of 1.8GHz instead of 2.0GHz until the&lt;br /&gt;
next sampling.  If 1.8 is an exact match with an hardware frequency&lt;br /&gt;
we use it, otherwise we average our time between the frequency&lt;br /&gt;
next higher than 1.8 and next lower than 1.8.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Howto_memboot_a_kernel&amp;diff=10626</id>
		<title>Howto memboot a kernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Howto_memboot_a_kernel&amp;diff=10626"/>
		<updated>2010-07-28T01:02:32Z</updated>

		<summary type="html">&lt;p&gt;Jho: Howto memboot a kernel moved to How to memboot a kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[How to memboot a kernel]]&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_to_memboot_a_kernel&amp;diff=10625</id>
		<title>How to memboot a kernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_to_memboot_a_kernel&amp;diff=10625"/>
		<updated>2010-07-28T01:02:32Z</updated>

		<summary type="html">&lt;p&gt;Jho: Howto memboot a kernel moved to How to memboot a kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are testing out experiemental kernels, this is a very useful trick to know. What this will do is to boot a file (uImage) directly into memory for you. If something bad happens, simply reboot and the old installed kernel on the phone will be used.&lt;br /&gt;
&lt;br /&gt;
 novaterm&lt;br /&gt;
 &amp;gt; tellbootie recover&lt;br /&gt;
 novacom boot mem:// &amp;lt; uImage&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_to_memboot_a_kernel&amp;diff=10624</id>
		<title>How to memboot a kernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_to_memboot_a_kernel&amp;diff=10624"/>
		<updated>2010-07-28T01:02:07Z</updated>

		<summary type="html">&lt;p&gt;Jho: New page: If you are testing out experiemental kernels, this is a very useful trick to know. What this will do is to boot a file (uImage) directly into memory for you. If something bad happens, simp...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are testing out experiemental kernels, this is a very useful trick to know. What this will do is to boot a file (uImage) directly into memory for you. If something bad happens, simply reboot and the old installed kernel on the phone will be used.&lt;br /&gt;
&lt;br /&gt;
 novaterm&lt;br /&gt;
 &amp;gt; tellbootie recover&lt;br /&gt;
 novacom boot mem:// &amp;lt; uImage&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Testing_Feeds&amp;diff=10443</id>
		<title>Testing Feeds</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Testing_Feeds&amp;diff=10443"/>
		<updated>2010-07-07T06:51:09Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Rules that you must agree to before using these feeds=&lt;br /&gt;
&lt;br /&gt;
Before you use our testing feeds, please read and agree to the following rules:&lt;br /&gt;
&lt;br /&gt;
# Anyone participating in WebOS Internals alpha testing of any kind must be prepared to fully erase and webOS Doctor their phone at a moment's notice without warning and without any regrets or complaints.&lt;br /&gt;
# They must be prepared to and able to log into the command line on the device and type Linux commands when instructed to do so. Knowing Linux commands ahead of time is preferred, but not required if you are willing to learn them when necessary or can follow instructions without making mistakes.&lt;br /&gt;
# They must be prepared to go to great and extraordinary lengths to try and reliably reproduce any problems they encounter.&lt;br /&gt;
# They must give full and detailed bug reports, leaving out no piece of information which could possibly be remotely connected to the problem.&lt;br /&gt;
# They must read any and all documentation and forums threads (in their entirety) before asking a question.&lt;br /&gt;
# They must fastidiously follow the forum threads where the alpha testing is being discussed by the authors, and follow precisely any instructions given there.&lt;br /&gt;
&lt;br /&gt;
If you're not prepared to do *all* the above, and do it all in good spirit, then please wait for the public release of the item.&lt;br /&gt;
&lt;br /&gt;
If you are prepared to do *all* the above, then by all means please participate in the alpha testing.&lt;br /&gt;
&lt;br /&gt;
Note that everything above is a function of attitude, not of skill.&lt;br /&gt;
&lt;br /&gt;
==Setting up the WebOS Internals testing feeds on your webOS 1.3.5+ device:==&lt;br /&gt;
&lt;br /&gt;
===Using Preware===&lt;br /&gt;
With Preware versions 0.9.30 and above, users are now able to add custom feeds through Preware without the use of a computer. The following instructions will explain how to add the Webos-Internals Testing feed for all devices:&lt;br /&gt;
#Open Preware and wait for it to finish loading.&lt;br /&gt;
#Open the App Menu (tap &amp;quot;Preware&amp;quot; in the top left corner of the screen) and tap Manage feeds.&lt;br /&gt;
#Scroll to the bottom until you see the New Feed box.&lt;br /&gt;
#Type or paste in the NAME text box. (from phone: shift-click on text to select, then gesture-c to copy, gesture-v to paste)&lt;br /&gt;
:webos-testing-all &lt;br /&gt;
#Type or paste the URL in the text box&lt;br /&gt;
:http://ipkg.preware.org/feeds/webos-internals/testing/all&lt;br /&gt;
#*Make sure to delete 'http://' before pasting the URL if the URL already contains 'http://'&lt;br /&gt;
#Make sure the IS COMPRESSED option is set to YES.&lt;br /&gt;
#Tap Add Feed and then tap Yes when the alert pops up.&lt;br /&gt;
#Scroll to the bottom until you see the New Feed box.&lt;br /&gt;
#Type or paste in the NAME text box. &lt;br /&gt;
:webos-testing-armv7 &lt;br /&gt;
#Type or paste the URL in the text box&lt;br /&gt;
:http://ipkg.preware.org/feeds/webos-internals/testing/armv7&lt;br /&gt;
#Make sure the IS COMPRESSED option is set to YES.&lt;br /&gt;
#Tap Add Feed and then tap Yes when the alert pops up.&lt;br /&gt;
#Gesture swipe back, open the App Menu, and tap Update Feeds.&lt;br /&gt;
Congratulations, you have just added a custom feed! For adding other feeds, be sure to replace the name and URL in these instructions with the proper name and URL.&lt;br /&gt;
&lt;br /&gt;
The following are the testing feed URLs specifically for Pre, Pixi, and Emulator respectively. These are separate from the 'all' testing feed (which contains packages that will run on all devices).&lt;br /&gt;
&lt;br /&gt;
Replace 'armv7' with 'armv6' or 'i686' in the instructions above if you are using a Pixi or the Emulator.&lt;br /&gt;
&lt;br /&gt;
:Pre:&lt;br /&gt;
:http://ipkg.preware.org/feeds/webos-internals/testing/armv7&lt;br /&gt;
&lt;br /&gt;
:Pixi:&lt;br /&gt;
:http://ipkg.preware.org/feeds/webos-internals/testing/armv6&lt;br /&gt;
&lt;br /&gt;
:Emulator:&lt;br /&gt;
:http://ipkg.preware.org/feeds/webos-internals/testing/i686&lt;br /&gt;
&lt;br /&gt;
===Using a Computer===&lt;br /&gt;
1. Gain access to the shell, either through novaterm/ssh or via the terminal application available through the regular WebOS Internals Feed&lt;br /&gt;
&lt;br /&gt;
2. Execute the following script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /media/cryptofs/apps/etc/ipkg&lt;br /&gt;
echo &amp;quot;src/gz webos-internals-testing-all http://ipkg.preware.org/feeds/webos-internals/testing/all&amp;quot; &amp;gt; webos-internals-testing-all.conf&lt;br /&gt;
echo &amp;quot;src/gz webos-internals-testing-armv7 http://ipkg.preware.org/feeds/webos-internals/testing/armv7&amp;quot; &amp;gt; webos-internals-testing-armv7.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Once Preware is launched, selected the Update Feeds menu.&lt;br /&gt;
&lt;br /&gt;
Replace 'armv7' with 'armv6' or 'i686' in the instructions above if you are using a Pixi or the Emulator.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10404</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10404"/>
		<updated>2010-06-29T07:10:14Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-61 =&lt;br /&gt;
&lt;br /&gt;
* Various housekeeping for patches&lt;br /&gt;
* Top speed is now 1.05GHz, no more 800Mhz (may return later)&lt;br /&gt;
* Removed some debugging options&lt;br /&gt;
* Initial attempts at undervolting. Report if strangeness is experienced.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-49 =&lt;br /&gt;
&lt;br /&gt;
* Some makefile housekeeping&lt;br /&gt;
* Enabled all TCP congestion algorithms, CPU governors and IO schedulers.&lt;br /&gt;
* Testers wanted to help determine optimal configurations. If interested, join #webos-internals IRC channel on Freenode.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-46 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
Just a scratchpad for now.&lt;br /&gt;
&lt;br /&gt;
* http://david.woodhou.se/linux-combine-build.patch&lt;br /&gt;
* http://david.woodhou.se/olpc-config&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10370</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10370"/>
		<updated>2010-06-23T02:30:43Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-49 =&lt;br /&gt;
&lt;br /&gt;
* Some makefile housekeeping&lt;br /&gt;
* Enabled all TCP congestion algorithms, CPU governors and IO schedulers.&lt;br /&gt;
* Testers wanted to help determine optimal configurations. If interested, join #webos-internals IRC channel on Freenode.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-46 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
Just a scratchpad for now.&lt;br /&gt;
&lt;br /&gt;
* http://david.woodhou.se/linux-combine-build.patch&lt;br /&gt;
* http://david.woodhou.se/olpc-config&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10369</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10369"/>
		<updated>2010-06-23T02:10:43Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-49 =&lt;br /&gt;
&lt;br /&gt;
* Some makefile housekeeping&lt;br /&gt;
* Enabled all TCP congestion algorithms, CPU governors and IO schedulers.&lt;br /&gt;
* Testers wanted to help determine optimal configurations. If interested, join #webos-internals IRC channel on Freenode.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-46 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10368</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10368"/>
		<updated>2010-06-23T02:10:25Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-49 =&lt;br /&gt;
&lt;br /&gt;
* Some makefile housekeeping&lt;br /&gt;
* Enabled all TCP congestion algorithms, CPU governors and IO schedulers.&lt;br /&gt;
* Testers wanted to help determine optimal configurations. If interested, join #webos-internals IRC channel on Freenode.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-46 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted.&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10364</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10364"/>
		<updated>2010-06-21T04:28:13Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-46 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10361</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10361"/>
		<updated>2010-06-20T09:16:09Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-44 =&lt;br /&gt;
&lt;br /&gt;
* Revised compcache makefile gcc flags&lt;br /&gt;
* Initial pixi build. Feedback wanted&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10360</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10360"/>
		<updated>2010-06-19T23:27:26Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings (THIS IS A TESTING KERNEL) =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10359</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10359"/>
		<updated>2010-06-19T23:27:00Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will '''only live in testing''' (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10358</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10358"/>
		<updated>2010-06-19T12:50:45Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will only live in testing (meaning, '''no crying if this kernel eats your phone'''). Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10357</id>
		<title>Application:WarthogKernel</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:WarthogKernel&amp;diff=10357"/>
		<updated>2010-06-19T11:20:08Z</updated>

		<summary type="html">&lt;p&gt;Jho: New page: The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The warthog series of kernels are the kernels intended to explore performance and benchmarking in a stable manner. It will also cherry-pick patches as needed from sbromwich and unixpsycho kernels.&lt;br /&gt;
&lt;br /&gt;
The kernels are only available at http://ipkg.preware.org/feeds/webos-kernels/testing/1.4.1.1/ and can be added using any standard package manager in the standard format (deducing this is left as an exercise for the reader).&lt;br /&gt;
&lt;br /&gt;
= Patches applied for 1.4.1-43 =&lt;br /&gt;
&lt;br /&gt;
* Compcache included&lt;br /&gt;
* Using 2007q3 toolchain&lt;br /&gt;
* Use -Os -mtune=cortex-a8 -mcpu=cortex-a8 -march=armv7-a for kernel compile&lt;br /&gt;
&lt;br /&gt;
This makes things about 6% faster @ 500Mhz. YMMV.&lt;br /&gt;
&lt;br /&gt;
= Warnings =&lt;br /&gt;
&lt;br /&gt;
* This kernel may be less stable than Uber-Kernel although stability is still a key target. &lt;br /&gt;
* This kernel will only live in testing. Data and knowledge gleaned from this kernel will migrate to UK over time.&lt;br /&gt;
* Out of the testing kernels, warthog will most likely be the closest to uber-kernel. That is, it is intended to be less bleeding edge.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Health&amp;diff=10326</id>
		<title>Application:Health</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Health&amp;diff=10326"/>
		<updated>2010-06-17T04:53:13Z</updated>

		<summary type="html">&lt;p&gt;Jho: Application:Health moved to Application:SysHealth: Proper name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Application:SysHealth]]&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:SysHealth&amp;diff=10325</id>
		<title>Application:SysHealth</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:SysHealth&amp;diff=10325"/>
		<updated>2010-06-17T04:53:13Z</updated>

		<summary type="html">&lt;p&gt;Jho: Application:Health moved to Application:SysHealth: Proper name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=SysHealth&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=In Development&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon||float:right;}}An app to do things&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:SysHealth&amp;diff=10324</id>
		<title>Application:SysHealth</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:SysHealth&amp;diff=10324"/>
		<updated>2010-06-17T04:52:52Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=SysHealth&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=In Development&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon||float:right;}}An app to do things&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=9786</id>
		<title>Patch webOS CPU Frequency or Voltage Scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=9786"/>
		<updated>2010-05-04T23:06:21Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Hacking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
= Overview=&lt;br /&gt;
There are currently 2 methods to enable further power saving - neither is perfect. Note that '''these 2 methods CANNOT be used together''' so make sure you try only one solution at a time. Using both has been reported to brick your Pre, requiring a visit to the WebOS Doctor. Patches for these are now available in the gitorious repo. See [[Applying Patches]]&lt;br /&gt;
&lt;br /&gt;
1 CPU Scaling&lt;br /&gt;
* This allows the Pre to scale the CPU clock speed up and down in response to changes in CPU utilization. Some people have reported glitching when using scaling when the CPU is under heavy load (lots of multitasking, playing video, etc).&lt;br /&gt;
2 SmartReflex&lt;br /&gt;
* This allows the Pre to vary the voltage inside the core in response to silicon characteristics, temperature, voltage, etc. This does not save that much power because it is supposed to be used along with CPU scaling to reduce voltage when the CPU is running slower, but the Pre's kernel is missing the modules to do this. This is why using both together will '''freeze''' the Palm Pre. (Remove the battery, restart with the USB plugged into your computer with NovaCom installed, During the phones boot procedure simply telnet to the phone through NovaCom's Proxy port 8023, remove the smartreflex files you installed in the events folder in /etc/ before WebOS panics) &lt;br /&gt;
&lt;br /&gt;
= CPU Scaling=&lt;br /&gt;
== Default Setting==&lt;br /&gt;
Frequency scaling does not appear to be active by default on the Pre by default. The directory /sys/devices/system/cpu/cpu0/cpufreq contains information on the current state. The clock seems to be fixed at 500mHz for normal operation (according to cpuinfo_cur_freq), however several other frequencies exist:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# cat ./scaling_available_frequencies &lt;br /&gt;
600000 550000 500000 250000 125000 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state shows that at some point (probably during startup) the frequency is raised to 550mHz for a short period of time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enabling Scaling==&lt;br /&gt;
It is possible to enable frequency scaling using the 'ondemand' governor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo ondemand &amp;gt; ./scaling_governor &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
this will cause the frequency to be reduced automatically while idle, and increased as needed during operation, potentially increasing battery life. Because higher frequencies may cause overheating, and TI has noted a significant decrease in the life of the processor when running above 500mHz, you should also restrict the frequency scaling to 500mHz and below by doing the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 &amp;gt; ./scaling_max_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your Pre seems sluggish after enabling scaling, you can try changing the values in /sys/devices/system/cpu/cpu0/cpufreq/ondemand as detailed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 'ondemand' Configuration==&lt;br /&gt;
Increasing the value of 'scaling_min_freq' will prevent the CPU from going into extremely low speed configurations, which will significantly improve the responsiveness of the device when it first detects increased CPU usage, at the cost of a little bit of battery life.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 250000 &amp;gt; ./scaling_min_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setting the value of 'up_threshold' lower will cause the frequency to be increased at lower levels of activity.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq/ondemand# echo 30 &amp;gt; ./up_threshold&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: The default setting for 'up_threshold' is 80.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checking Performance and Stats==&lt;br /&gt;
To check how long your Pre has been running and at what frequency, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;600000 906&lt;br /&gt;
550000 768&lt;br /&gt;
500000 380&lt;br /&gt;
250000 0&lt;br /&gt;
125000 180505&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number is the CPU frequency, the second is a time interval.  In this example, my Pre has spent the most time @ 125mHz, but you can see it shoots up when needed.  Note that if you are overclocking, it really doesn't spend much time at 600mHz, so overheating shouldn't be a problem, but you will definitely notice an improvement. These stats are reset after a reboot.&lt;br /&gt;
&lt;br /&gt;
== Overclocking==&lt;br /&gt;
Overclocking is not recommended, as TI has reported a significant decrease in the life of the CPU at frequencies about 500mHz. However some users have reported better responsiveness, in addition to running cooler and using less battery while overclocking.&lt;br /&gt;
&lt;br /&gt;
To overclock to the CPU's maximum speed, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;600000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To put it back, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
Create a file called '''cpu-scaling''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Enables cpu scaling&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
    echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
    echo &amp;quot;250000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
    echo &amp;quot;ondemand&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
    echo &amp;quot;30&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Stock Fixed Frequency==&lt;br /&gt;
The simple way is just to remove the '''cpu-scaling''' script from /etc/event.d (if you created it) and reboot.  None of these changes are persistent without the &amp;quot;sticky&amp;quot; script shown above.&lt;br /&gt;
&lt;br /&gt;
If you switch back to the 'userspace' governor without rebooting, your frequency could get stuck at a lower setting and the whole system get really bogged down.  Here is a quick shell script to help you revert to userspace with the original frequency:&lt;br /&gt;
&lt;br /&gt;
Copy/paste this whole line as one command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo userspace &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ; echo 500000 &amp;gt;/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then confirm the frequency/governor are back the way you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;I tried this out but video playback was flickery and horrible.  The up_threshold tweak setting to 30 seems to improve it a lot , but it's still flickery a bit.  Some people may not be happy.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I found that setting the max freq to 600000 with the threshold helps this problem.  See relevant warnings above first!  I don't really watch video on my Pre, so it's not so big of a deal.&amp;quot; -pEEf&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;A lot of people on the Precentral forums (myself included) are experiencing the phone locking up after a while of using this, and need to pull the battery to reset.  (On webOS 1.0.3 at least.)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I've been running my phone with scaling for nearly a week now without problems, but I'm not 'overlcocking' so to speak.  Any specifics on what might cause the locks? (ok had my first locks tonight while attached to the touchstone, weird it never happened before now (and annoying))&amp;quot; -retry&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I tried the folling over WebOSQuick Installer Linux Console: 1. root@castle: echo ondemand &amp;gt; ./scaling_governor  2. root@castle: echo 500000 &amp;gt; ./scaling_max_freq 3. root@castle: echo 125000 &amp;gt; ./scaling_min_freq 4. root@castle: echo 30 &amp;gt; ./up_threshold . But even after 7hours... nothing changed.. just used 500Mhz in Airplane mode over Night.&amp;quot; -Ryo&lt;br /&gt;
&lt;br /&gt;
= SmartReflex=&lt;br /&gt;
== Enable SmartReflex==&lt;br /&gt;
SmartReflex can be enabled in the VDD1 and VDD2 areas of the OMAP processor by setting two flags under /sys/power&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd1_autocomp&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd2_autocomp&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt This slide deck] has much of the pertinent information about SmartReflex and other power-saving technologies on the OMAP processor. Unfortunately the kernel modules that provide many of the features mentioned in the slide deck are not present on the Pre. This is the main reason that SmartReflex may not save a terribly large amount of power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
To enable SmartReflex, create a file called '''smartreflex''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# -*- mode: shell-script; -*-&lt;br /&gt;
description &amp;quot;SmartReflex&amp;quot;&lt;br /&gt;
author &amp;quot;Alex Markson&amp;quot;&lt;br /&gt;
version 1.0&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
&lt;br /&gt;
# SmartReflex&lt;br /&gt;
# &amp;quot;SmartReflex™ driver allows for auto-compensation of VDD1 and&lt;br /&gt;
# VDD2 voltages (around the voltages specified by current OPP)&lt;br /&gt;
# by analyzing the silicon characteristics, temperature, voltage etc&amp;quot;&lt;br /&gt;
# &lt;br /&gt;
# Enable SmartReflex&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd1_autocomp&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd2_autocomp&lt;br /&gt;
&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable overclocking in addition to SmartReflex, add the following JUST BEFORE the '''end script''' line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# according to the OEM shell script in /etc/miniboot.sh&lt;br /&gt;
# this seems like it needs to be set twice to make sure ?&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;AFter using this for about a week, I find that using SmartReflex causes the Pre to stutter every so often&amp;quot;&lt;br /&gt;
* &amp;quot;webos 1.1 w/ no problems to start. Installed ondemand script, full 125-600mhz range, threshold 30: worked fine mostly but on the touchstone it gets hot and locks up kills battery, backlight on behind black screen, every time, within an hour. Switched to smartreflex with 600mhz, no problems, though only a few days so far and no video testing. Media player remix playing to car stereo via bluetooth is smooth.&amp;quot; [[User:Bkw|Bkw]] 00:02, 15 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
* Alex Markson for the SmartReflex find and the script.&lt;br /&gt;
* pEEf for numerous discoveries related to cpu scaling.&lt;br /&gt;
* sidamos for the info about 'up_threshold'&lt;br /&gt;
* garrettwp for the cpu scaling event.d script.&lt;br /&gt;
* Jauder Ho for gitorious patches&lt;br /&gt;
&lt;br /&gt;
= Hacking=&lt;br /&gt;
There is still a lot of work to be done in making this work optimally. The following are some resources and thoughts.&lt;br /&gt;
* A paper about the ondemand governor http://www.linuxinsight.com/ols2006_the_ondemand_governor.html&lt;br /&gt;
* webOS 1.0.4 has CONFIG_PREEMPT set along with CONFIG_HZ=100. CONFIG_NO_HZ aka tickless is not set. In webOS 1.4.0 (Feb 2010), CONFIG_PREEMPT is not set, CONFIG_HZ=100 and CONFIG_NO_HZ=y (did not check in between).&lt;br /&gt;
* Possible patch for NOHZ / ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
* Use PowerTop to observe what is going on inside the Pre:&lt;br /&gt;
** Install [[Next_steps|ipkg-opt]] then run these commands from a root command prompt to install and start powertop:&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
cd /opt/bin&lt;br /&gt;
./ipkg-opt update&lt;br /&gt;
./ipkg-opt install powertop&lt;br /&gt;
/opt/sbin/powertop&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* http://www.lesswatts.org/&lt;br /&gt;
* http://wiki.davincidsp.com/index.php/Running_PowerTOP_on_OMAP35x_platform&lt;br /&gt;
* TI 3430 PM presentation http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt&lt;br /&gt;
* CPU frequency scaling in Linux with cpufreq. Details on cpufreq parameters http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
* smartreflex patches http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26629.html&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
Right now this is a [slow] collection of data --A2NY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kernel Config File:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel Config Freq:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# CPU Frequency scaling&lt;br /&gt;
#&lt;br /&gt;
CONFIG_CPU_FREQ=y&lt;br /&gt;
CONFIG_CPU_FREQ_TABLE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEBUG is not set&lt;br /&gt;
CONFIG_CPU_FREQ_STAT=y&lt;br /&gt;
CONFIG_CPU_FREQ_STAT_DETAILS=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_USERSPACE=y&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_ONDEMAND=y&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled Governors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors &lt;br /&gt;
ondemand userspace &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ONDEMAND is also called DVFS (Dynamic Voltage &amp;amp; Frequency Scaling)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Newer kernels apparently have an improved ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
&lt;br /&gt;
Kernel Config PM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# OMAP Power Management&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Power Management Options&lt;br /&gt;
#&lt;br /&gt;
CONFIG_OMAP3_PM=y&lt;br /&gt;
CONFIG_OMAP_VOLT_SR_BYPASS=y&lt;br /&gt;
# CONFIG_OMAP_VOLT_SR is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VSEL is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VMODE is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD1 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP1 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP2 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP3 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD1_OPP4=y&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP5 is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD2 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD2_OPP2 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD2_OPP3=y&lt;br /&gt;
# CONFIG_ENABLE_VOLTSCALE_IN_SUSPEND is not set&lt;br /&gt;
# CONFIG_RESET_IVA_IN_SUSPEND is not set&lt;br /&gt;
CONFIG_MPU_OFF=y&lt;br /&gt;
CONFIG_OMAP34XX_OFFMODE=y&lt;br /&gt;
CONFIG_CORE_OFF=y&lt;br /&gt;
# CONFIG_CORE_OFF_CPUIDLE is not set&lt;br /&gt;
CONFIG_SYSOFFMODE=y&lt;br /&gt;
# CONFIG_HW_SUP_TRANS is not set&lt;br /&gt;
# CONFIG_TRACK_RESOURCES is not set&lt;br /&gt;
CONFIG_AUTO_POWER_DOMAIN_CTRL=y&lt;br /&gt;
# CONFIG_PREVENT_MPU_RET is not set&lt;br /&gt;
# CONFIG_PREVENT_CORE_RET is not set&lt;br /&gt;
# CONFIG_DISABLE_EMUDOMAIN_CONTROL is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TWL4030:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_registers.0/module_pm_receiver&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+	  Please note, that by default SmartReflex is only&lt;br /&gt;
+	  initialized. To enable the automatic voltage&lt;br /&gt;
+	  compensation for VDD1 and VDD2, user must write 1 to&lt;br /&gt;
+	  /sys/power/sr_vddX_autocomp, where X is 1 or 2.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Startup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-02T02:40:01.263122Z [15] webos kern.warning kernel: OMAP: Initializing SmartReflex subsystem...&lt;br /&gt;
2009-11-02T02:40:01.263549Z [15] webos kern.info kernel: OMAP: SmartReflex subsystem initialized.&lt;br /&gt;
2009-11-02T02:40:01.282196Z [15] webos kern.err kernel: OMAP 3430 Power Management subsystem initializing.&lt;br /&gt;
2009-11-02T02:40:01.292083Z [15] webos kern.info kernel: OMAP: Setting up clocks.&lt;br /&gt;
2009-11-02T02:40:01.319152Z [15] webos kern.warning kernel: OMAP: OPP mismatch: current/target=2:4&lt;br /&gt;
2009-11-02T02:40:01.319702Z [15] webos kern.info kernel: OMAP: Change MPU speed: 250 =&amp;gt; 550 MHz&lt;br /&gt;
2009-11-02T02:40:01.321044Z [15] webos kern.info kernel: OMAP: ARM/DSP clock at 550/396 MHz.&lt;br /&gt;
2009-11-02T02:40:01.321624Z [15] webos kern.info kernel: BogoMIPS: 547.88 @550000 KHz&lt;br /&gt;
2009-11-02T02:40:01.327911Z [15] webos kern.info kernel: OMAP CPU idle driver initializing.&lt;br /&gt;
2009-11-02T02:40:01.328277Z [15] webos kern.err kernel: create_proc_entry succeeded&lt;br /&gt;
2009-11-02T02:40:01.342102Z [15] webos kern.info kernel: Initialize power support module&lt;br /&gt;
2009-11-02T02:40:01.342742Z [15] webos kern.info kernel: OMAP3: PM: Sirloin target registered successfully.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in userspace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:39:39.106658Z [329] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
2009-11-30T17:39:55.827423Z [345] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in ondemand: (device wants off, will not wake if it goes off)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:27:37.676910Z [7523] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
2009-11-30T17:27:45.676269Z [7531] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
powersave_bias http://osdir.com/ml/kernel.cpufreq/2006-07/msg00137.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
This patch adds a &amp;quot;powersave_bias&amp;quot; tunable to ondemand&lt;br /&gt;
to allow it to reduce its target frequency by a specified percent.&lt;br /&gt;
&lt;br /&gt;
By default, the powersave_bias is 0 and has no effect.&lt;br /&gt;
powersave_bias is in units of 0.1%, so it has an effective range&lt;br /&gt;
of 1 through 1000, resulting in 0.1% to 100% impact.&lt;br /&gt;
&lt;br /&gt;
In practice, users will not be able to detect a difference between&lt;br /&gt;
0.1% increments, but 1.0% increments turned out to be too large.&lt;br /&gt;
Also, the max value of 1000 (100%) would simply peg the system&lt;br /&gt;
in its deepest power saving P-state, unless the processor really has&lt;br /&gt;
a hardware P-state at 0Hz:-)&lt;br /&gt;
&lt;br /&gt;
For example, If ondemand requests 2.0GHz based on utilization,&lt;br /&gt;
and powersave_bias=100, this code will knock 10% off the target&lt;br /&gt;
and seek  a target of 1.8GHz instead of 2.0GHz until the&lt;br /&gt;
next sampling.  If 1.8 is an exact match with an hardware frequency&lt;br /&gt;
we use it, otherwise we average our time between the frequency&lt;br /&gt;
next higher than 1.8 and next lower than 1.8.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9685</id>
		<title>Application:Govnah</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9685"/>
		<updated>2010-04-23T23:43:45Z</updated>

		<summary type="html">&lt;p&gt;Jho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Govnah&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=In Development&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=Govnah_ss1.png&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Icon_WebOSInternals_Govnah.png|float:right;}}An App to do things.&lt;br /&gt;
&lt;br /&gt;
Available in the WebOS Internals Testing Feed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
* Main Scene&lt;br /&gt;
** Title Header (like preware/wirc/etc webos-internals apps)&lt;br /&gt;
** Current Governor (Tap to go to Governor Settings)&lt;br /&gt;
** Current Frequency&lt;br /&gt;
** Misc Stats&lt;br /&gt;
*** ...?&lt;br /&gt;
*** Graph of CPU temp over time&lt;br /&gt;
&lt;br /&gt;
* CPU Governor Scene&lt;br /&gt;
** Dropdown to change governor (SelectList)&lt;br /&gt;
** Form of all current settings for selected governor (dynamically generated from information provided by service)&lt;br /&gt;
&lt;br /&gt;
* IO Scheduler Scene&lt;br /&gt;
** Dropdown to select scheduler (cfq, noop, as etc.)&lt;br /&gt;
&lt;br /&gt;
* TCP Congestion Algo Scene?&lt;br /&gt;
&lt;br /&gt;
* App Icon (changes to display indication of CPU temp)&lt;br /&gt;
&lt;br /&gt;
=== Load Reduction ===&lt;br /&gt;
* Govnah is saving data to an array which grows over time and sucks down CPU time/memory iterating over the array.&lt;br /&gt;
* Use sqlite db for saving?&lt;br /&gt;
* To reduce disk writes, have a preference option to save to /media/ramdisk if the user is only interested in the current session for pinch zooming - should reduce disk writes and improve performance though data will be lost on boot.&lt;br /&gt;
* Preference setting for frequency of polling.&lt;br /&gt;
* Use fixed array or circular buffer instead, though this will stop pinch scrolling from going back too far (another preference option?)&lt;br /&gt;
&lt;br /&gt;
=== Governor Settings ===&lt;br /&gt;
* Generic items (needed for all)&lt;br /&gt;
** scaling_max_freq - Set the maximum frequency your CPU(s) are allowed to scale to. Look at the output from scaling_available_frequencies&lt;br /&gt;
** scaling_min_freq - Same as scaling_max_freq but setting a value that will not allow the CPU(s) to go below.&lt;br /&gt;
* ondemand&lt;br /&gt;
** sampling_rate - This is measured in microseconds (one millionth of a second). This is how often you want the kernel to look at the CPU usage and to make decisions on what to do about the frequency. Typically this is set to values of around '10000' or more. If you wanted to set the sampling rate to 1 second you would set it to 1000000 like in the following example.&lt;br /&gt;
** sampling_rate_(min|max) - This is minimum and maximum sampling rates available that you may set 'sampling_rate' to. I believe in microseconds also. &lt;br /&gt;
** up_threshold - This defines what the average CPU usage between the samplings of 'sampling_rate' needs to be for the kernel to make a decision on whether or not it should increase the frequency. For example when it is set to its default value of '80' it means that between the checking intervals the CPU needs to be on average more than 80% in use to then decide that the CPU frequency needs to be increased. &lt;br /&gt;
** ignore_nice_load - This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilization' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. &lt;br /&gt;
** powersave_bias - This modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. By default, (powersave_bias  = 0), the ondemand governor selects the minimum processor frequency that can still complete a workload with minimal idle time. Doing so should result in the highest performance to power efficiency ratio. In some cases, you might prefer a greater emphasis on power efficiency than performance. In this case, set the powersave_bias parameter to a value between 1 and 1000 to reduce the target frequency by one-thousandth of that value. For example, set powersave_bias to 100 for a one-tenth reduction in target frequency. In this case, if the governor chooses a target frequency of 2 GHz (with powersave_bias  = 100), the governor instead will request 1.8GHz – a one-tenth reduction. If 1.8 GHz is an exact match with an available hardware frequency (listed in the scaling_available_freq parameter), the processor is set to this frequency. If 1.8 GHz is not available, the processor fluctuates between the closest available upper and lower frequencies for an average frequency of 1.8 GHz. (from IBM web page)&lt;br /&gt;
* conservative&lt;br /&gt;
** freq_step - This describes what percentage steps the CPU freq should be increased and decreased smoothly by. By default the CPU frequency will increase in 5% chunks of your maximum CPU frequency. You can change this value to anywhere between 0 and 100 where '0' will effectively lock your CPU at a speed regardless of its load whilst '100' will, in theory, make it behave identically to the &amp;quot;ondemand&amp;quot; governor. &lt;br /&gt;
** down_threshold - This is same as the 'up_threshold' found for the &amp;quot;ondemand&amp;quot; governor but for the opposite direction. For example when set to its default value of '20' it means that if the CPU usage needs to be below 20% between samples to have the frequency decreased. &lt;br /&gt;
** sampling_rate - same as ondemand.&lt;br /&gt;
** sampling_rate_(min|max) - same as ondemand.&lt;br /&gt;
** up_threshold - same as ondemand.&lt;br /&gt;
** ignore_nice_load - same as ondemand.&lt;br /&gt;
* userspace&lt;br /&gt;
** scaling_setspeed - one of the values from scaling_available_frequencies&lt;br /&gt;
** NB - when userspace is selected LunaSysMgr will change the frequency as it feels.&lt;br /&gt;
* powersave&lt;br /&gt;
** Nothing special&lt;br /&gt;
* performance&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
* http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaai/cpufreq/TheOndemandGovernor.htm&lt;br /&gt;
* http://fasterdata.es.net/TCP-tuning/linux.html&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9683</id>
		<title>Application:Govnah</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9683"/>
		<updated>2010-04-23T17:17:12Z</updated>

		<summary type="html">&lt;p&gt;Jho: added to design&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Govnah&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=In Development&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=Govnah_ss1.png&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Icon_WebOSInternals_Govnah.png|float:right;}}An App to do things.&lt;br /&gt;
&lt;br /&gt;
Available in the WebOS Internals Testing Feed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
* Main Scene&lt;br /&gt;
** Title Header (like preware/wirc/etc webos-internals apps)&lt;br /&gt;
** Current Governor (Tap to go to Governor Settings)&lt;br /&gt;
** Current Frequency&lt;br /&gt;
** Misc Stats&lt;br /&gt;
*** ...?&lt;br /&gt;
*** Graph of CPU temp over time&lt;br /&gt;
&lt;br /&gt;
* CPU Governor Scene&lt;br /&gt;
** Dropdown to change governor (SelectList)&lt;br /&gt;
** Form of all current settings for selected governor (dynamically generated from information provided by service)&lt;br /&gt;
&lt;br /&gt;
* IO Scheduler Scene&lt;br /&gt;
** Dropdown to select scheduler (cfq, noop, as etc.)&lt;br /&gt;
&lt;br /&gt;
* TCP Congestion Algo Scene?&lt;br /&gt;
&lt;br /&gt;
* App Icon (changes to display indication of CPU temp)&lt;br /&gt;
&lt;br /&gt;
=== Load Reduction ===&lt;br /&gt;
* Govnah is saving data to an array which grows over time and sucks down CPU time/memory iterating over the array.&lt;br /&gt;
* Use sqlite db for saving?&lt;br /&gt;
* To reduce disk writes, have a preference option to save to /media/ramdisk if the user is only interested in the current session for pinch zooming - should reduce disk writes and improve performance though data will be lost on boot.&lt;br /&gt;
* Preference setting for frequency of polling.&lt;br /&gt;
* Use fixed array or circular buffer instead, though this will stop pinch scrolling from going back too far (another preference option?)&lt;br /&gt;
&lt;br /&gt;
=== Governor Settings ===&lt;br /&gt;
* Generic items (needed for all)&lt;br /&gt;
** scaling_max_freq - Set the maximum frequency your CPU(s) are allowed to scale to. Look at the output from scaling_available_frequencies&lt;br /&gt;
** scaling_min_freq - Same as scaling_max_freq but setting a value that will not allow the CPU(s) to go below.&lt;br /&gt;
* ondemand&lt;br /&gt;
** sampling_rate - This is measured in microseconds (one millionth of a second). This is how often you want the kernel to look at the CPU usage and to make decisions on what to do about the frequency. Typically this is set to values of around '10000' or more. If you wanted to set the sampling rate to 1 second you would set it to 1000000 like in the following example.&lt;br /&gt;
** sampling_rate_(min|max) - This is minimum and maximum sampling rates available that you may set 'sampling_rate' to. I believe in microseconds also. &lt;br /&gt;
** up_threshold - This defines what the average CPU usage between the samplings of 'sampling_rate' needs to be for the kernel to make a decision on whether or not it should increase the frequency. For example when it is set to its default value of '80' it means that between the checking intervals the CPU needs to be on average more than 80% in use to then decide that the CPU frequency needs to be increased. &lt;br /&gt;
** ignore_nice_load - This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilization' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. &lt;br /&gt;
** powersave_bias - This modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. By default, (powersave_bias  = 0), the ondemand governor selects the minimum processor frequency that can still complete a workload with minimal idle time. Doing so should result in the highest performance to power efficiency ratio. In some cases, you might prefer a greater emphasis on power efficiency than performance. In this case, set the powersave_bias parameter to a value between 1 and 1000 to reduce the target frequency by one-thousandth of that value. For example, set powersave_bias to 100 for a one-tenth reduction in target frequency. In this case, if the governor chooses a target frequency of 2 GHz (with powersave_bias  = 100), the governor instead will request 1.8GHz – a one-tenth reduction. If 1.8 GHz is an exact match with an available hardware frequency (listed in the scaling_available_freq parameter), the processor is set to this frequency. If 1.8 GHz is not available, the processor fluctuates between the closest available upper and lower frequencies for an average frequency of 1.8 GHz. (from IBM web page)&lt;br /&gt;
* conservative&lt;br /&gt;
** freq_step - This describes what percentage steps the CPU freq should be increased and decreased smoothly by. By default the CPU frequency will increase in 5% chunks of your maximum CPU frequency. You can change this value to anywhere between 0 and 100 where '0' will effectively lock your CPU at a speed regardless of its load whilst '100' will, in theory, make it behave identically to the &amp;quot;ondemand&amp;quot; governor. &lt;br /&gt;
** down_threshold - This is same as the 'up_threshold' found for the &amp;quot;ondemand&amp;quot; governor but for the opposite direction. For example when set to its default value of '20' it means that if the CPU usage needs to be below 20% between samples to have the frequency decreased. &lt;br /&gt;
** sampling_rate - same as ondemand.&lt;br /&gt;
** sampling_rate_(min|max) - same as ondemand.&lt;br /&gt;
** up_threshold - same as ondemand.&lt;br /&gt;
** ignore_nice_load - same as ondemand.&lt;br /&gt;
* userspace&lt;br /&gt;
** scaling_setspeed - one of the values from scaling_available_frequencies&lt;br /&gt;
** NB - when userspace is selected LunaSysMgr will change the frequency as it feels.&lt;br /&gt;
* powersave&lt;br /&gt;
** Nothing special&lt;br /&gt;
* performance&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaai/cpufreq/TheOndemandGovernor.htm&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9682</id>
		<title>Application:Govnah</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=9682"/>
		<updated>2010-04-23T17:08:24Z</updated>

		<summary type="html">&lt;p&gt;Jho: added powersave_bias&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Govnah&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=In Development&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=Govnah_ss1.png&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Icon_WebOSInternals_Govnah.png|float:right;}}An App to do things.&lt;br /&gt;
&lt;br /&gt;
Available in the WebOS Internals Testing Feed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
* Main Scene&lt;br /&gt;
** Title Header (like preware/wirc/etc webos-internals apps)&lt;br /&gt;
** Current Governor (Tap to go to Governor Settings)&lt;br /&gt;
** Current Frequency&lt;br /&gt;
** Misc Stats&lt;br /&gt;
*** ...?&lt;br /&gt;
*** Graph of CPU temp over time&lt;br /&gt;
&lt;br /&gt;
* Governor Scene&lt;br /&gt;
** Dropdown to change governor (SelectList)&lt;br /&gt;
** Form of all current settings for selected governor (dynamically generated from information provided by service)&lt;br /&gt;
&lt;br /&gt;
* App Icon (changes to display indication of CPU temp)&lt;br /&gt;
&lt;br /&gt;
=== Load Reduction ===&lt;br /&gt;
* Govnah is saving data to an array which grows over time and sucks down CPU time/memory iterating over the array.&lt;br /&gt;
* Use sqlite db for saving?&lt;br /&gt;
* To reduce disk writes, have a preference option to save to /media/ramdisk if the user is only interested in the current session for pinch zooming - should reduce disk writes and improve performance though data will be lost on boot.&lt;br /&gt;
* Preference setting for frequency of polling.&lt;br /&gt;
* Use fixed array or circular buffer instead, though this will stop pinch scrolling from going back too far (another preference option?)&lt;br /&gt;
&lt;br /&gt;
=== Governor Settings ===&lt;br /&gt;
* Generic items (needed for all)&lt;br /&gt;
** scaling_max_freq - Set the maximum frequency your CPU(s) are allowed to scale to. Look at the output from scaling_available_frequencies&lt;br /&gt;
** scaling_min_freq - Same as scaling_max_freq but setting a value that will not allow the CPU(s) to go below.&lt;br /&gt;
* ondemand&lt;br /&gt;
** sampling_rate - This is measured in microseconds (one millionth of a second). This is how often you want the kernel to look at the CPU usage and to make decisions on what to do about the frequency. Typically this is set to values of around '10000' or more. If you wanted to set the sampling rate to 1 second you would set it to 1000000 like in the following example.&lt;br /&gt;
** sampling_rate_(min|max) - This is minimum and maximum sampling rates available that you may set 'sampling_rate' to. I believe in microseconds also. &lt;br /&gt;
** up_threshold - This defines what the average CPU usage between the samplings of 'sampling_rate' needs to be for the kernel to make a decision on whether or not it should increase the frequency. For example when it is set to its default value of '80' it means that between the checking intervals the CPU needs to be on average more than 80% in use to then decide that the CPU frequency needs to be increased. &lt;br /&gt;
** ignore_nice_load - This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilization' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. &lt;br /&gt;
** powersave_bias - This modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. By default, (powersave_bias  = 0), the ondemand governor selects the minimum processor frequency that can still complete a workload with minimal idle time. Doing so should result in the highest performance to power efficiency ratio. In some cases, you might prefer a greater emphasis on power efficiency than performance. In this case, set the powersave_bias parameter to a value between 1 and 1000 to reduce the target frequency by one-thousandth of that value. For example, set powersave_bias to 100 for a one-tenth reduction in target frequency. In this case, if the governor chooses a target frequency of 2 GHz (with powersave_bias  = 100), the governor instead will request 1.8GHz – a one-tenth reduction. If 1.8 GHz is an exact match with an available hardware frequency (listed in the scaling_available_freq parameter), the processor is set to this frequency. If 1.8 GHz is not available, the processor fluctuates between the closest available upper and lower frequencies for an average frequency of 1.8 GHz. (from IBM web page)&lt;br /&gt;
* conservative&lt;br /&gt;
** freq_step - This describes what percentage steps the CPU freq should be increased and decreased smoothly by. By default the CPU frequency will increase in 5% chunks of your maximum CPU frequency. You can change this value to anywhere between 0 and 100 where '0' will effectively lock your CPU at a speed regardless of its load whilst '100' will, in theory, make it behave identically to the &amp;quot;ondemand&amp;quot; governor. &lt;br /&gt;
** down_threshold - This is same as the 'up_threshold' found for the &amp;quot;ondemand&amp;quot; governor but for the opposite direction. For example when set to its default value of '20' it means that if the CPU usage needs to be below 20% between samples to have the frequency decreased. &lt;br /&gt;
** sampling_rate - same as ondemand.&lt;br /&gt;
** sampling_rate_(min|max) - same as ondemand.&lt;br /&gt;
** up_threshold - same as ondemand.&lt;br /&gt;
** ignore_nice_load - same as ondemand.&lt;br /&gt;
* userspace&lt;br /&gt;
** scaling_setspeed - one of the values from scaling_available_frequencies&lt;br /&gt;
** NB - when userspace is selected LunaSysMgr will change the frequency as it feels.&lt;br /&gt;
* powersave&lt;br /&gt;
** Nothing special&lt;br /&gt;
* performance&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaai/cpufreq/TheOndemandGovernor.htm&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=7656</id>
		<title>Patch webOS CPU Frequency or Voltage Scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=7656"/>
		<updated>2009-12-05T04:27:39Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* More Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
= Overview=&lt;br /&gt;
There are currently 2 methods to enable further power saving - neither is perfect. Note that '''these 2 methods CANNOT be used together''' so make sure you try only one solution at a time. Using both has been reported to brick your Pre, requiring a visit to the WebOS Doctor. Patches for these are now available in the gitorious repo. See [[Applying Patches]]&lt;br /&gt;
&lt;br /&gt;
1 CPU Scaling&lt;br /&gt;
* This allows the Pre to scale the CPU clock speed up and down in response to changes in CPU utilization. Some people have reported glitching when using scaling when the CPU is under heavy load (lots of multitasking, playing video, etc).&lt;br /&gt;
2 SmartReflex&lt;br /&gt;
* This allows the Pre to vary the voltage inside the core in response to silicon characteristics, temperature, voltage, etc. This does not save that much power because it is supposed to be used along with CPU scaling to reduce voltage when the CPU is running slower, but the Pre's kernel is missing the modules to do this. This is why using both together will '''freeze''' the Palm Pre. (Remove the battery, restart with the USB plugged into your computer with NovaCom installed, During the phones boot procedure simply telnet to the phone through NovaCom's Proxy port 8023, remove the smartreflex files you installed in the events folder in /etc/ before WebOS panics) &lt;br /&gt;
&lt;br /&gt;
= CPU Scaling=&lt;br /&gt;
== Default Setting==&lt;br /&gt;
Frequency scaling does not appear to be active by default on the Pre by default. The directory /sys/devices/system/cpu/cpu0/cpufreq contains information on the current state. The clock seems to be fixed at 500mHz for normal operation (according to cpuinfo_cur_freq), however several other frequencies exist:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# cat ./scaling_available_frequencies &lt;br /&gt;
600000 550000 500000 250000 125000 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state shows that at some point (probably during startup) the frequency is raised to 550mHz for a short period of time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enabling Scaling==&lt;br /&gt;
It is possible to enable frequency scaling using the 'ondemand' governor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo ondemand &amp;gt; ./scaling_governor &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
this will cause the frequency to be reduced automatically while idle, and increased as needed during operation, potentially increasing battery life. Because higher frequencies may cause overheating, and TI has noted a significant decrease in the life of the processor when running above 500mHz, you should also restrict the frequency scaling to 500mHz and below by doing the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 &amp;gt; ./scaling_max_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your Pre seems sluggish after enabling scaling, you can try changing the values in /sys/devices/system/cpu/cpu0/cpufreq/ondemand as detailed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 'ondemand' Configuration==&lt;br /&gt;
Increasing the value of 'scaling_min_freq' will prevent the CPU from going into extremely low speed configurations, which will significantly improve the responsiveness of the device when it first detects increased CPU usage, at the cost of a little bit of battery life.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 250000 &amp;gt; ./scaling_min_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setting the value of 'up_threshold' lower will cause the frequency to be increased at lower levels of activity.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq/ondemand# echo 30 &amp;gt; ./up_threshold&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: The default setting for 'up_threshold' is 80.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checking Performance and Stats==&lt;br /&gt;
To check how long your Pre has been running and at what frequency, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;600000 906&lt;br /&gt;
550000 768&lt;br /&gt;
500000 380&lt;br /&gt;
250000 0&lt;br /&gt;
125000 180505&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number is the CPU frequency, the second is a time interval.  In this example, my Pre has spent the most time @ 125mHz, but you can see it shoots up when needed.  Note that if you are overclocking, it really doesn't spend much time at 600mHz, so overheating shouldn't be a problem, but you will definitely notice an improvement. These stats are reset after a reboot.&lt;br /&gt;
&lt;br /&gt;
== Overclocking==&lt;br /&gt;
Overclocking is not recommended, as TI has reported a significant decrease in the life of the CPU at frequencies about 500mHz. However some users have reported better responsiveness, in addition to running cooler and using less battery while overclocking.&lt;br /&gt;
&lt;br /&gt;
To overclock to the CPU's maximum speed, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;600000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To put it back, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
Create a file called '''cpu-scaling''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Enables cpu scaling&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
    echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
    echo &amp;quot;250000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
    echo &amp;quot;ondemand&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
    echo &amp;quot;30&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Stock Fixed Frequency==&lt;br /&gt;
The simple way is just to remove the '''cpu-scaling''' script from /etc/event.d (if you created it) and reboot.  None of these changes are persistent without the &amp;quot;sticky&amp;quot; script shown above.&lt;br /&gt;
&lt;br /&gt;
If you switch back to the 'userspace' governor without rebooting, your frequency could get stuck at a lower setting and the whole system get really bogged down.  Here is a quick shell script to help you revert to userspace with the original frequency:&lt;br /&gt;
&lt;br /&gt;
Copy/paste this whole line as one command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo userspace &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ; echo 500000 &amp;gt;/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then confirm the frequency/governor are back the way you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;I tried this out but video playback was flickery and horrible.  The up_threshold tweak setting to 30 seems to improve it a lot , but it's still flickery a bit.  Some people may not be happy.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I found that setting the max freq to 600000 with the threshold helps this problem.  See relevant warnings above first!  I don't really watch video on my Pre, so it's not so big of a deal.&amp;quot; -pEEf&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;A lot of people on the Precentral forums (myself included) are experiencing the phone locking up after a while of using this, and need to pull the battery to reset.  (On webOS 1.0.3 at least.)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I've been running my phone with scaling for nearly a week now without problems, but I'm not 'overlcocking' so to speak.  Any specifics on what might cause the locks? (ok had my first locks tonight while attached to the touchstone, weird it never happened before now (and annoying))&amp;quot; -retry&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I tried the folling over WebOSQuick Installer Linux Console: 1. root@castle: echo ondemand &amp;gt; ./scaling_governor  2. root@castle: echo 500000 &amp;gt; ./scaling_max_freq 3. root@castle: echo 125000 &amp;gt; ./scaling_min_freq 4. root@castle: echo 30 &amp;gt; ./up_threshold . But even after 7hours... nothing changed.. just used 500Mhz in Airplane mode over Night.&amp;quot; -Ryo&lt;br /&gt;
&lt;br /&gt;
= SmartReflex=&lt;br /&gt;
== Enable SmartReflex==&lt;br /&gt;
SmartReflex can be enabled in the VDD1 and VDD2 areas of the OMAP processor by setting two flags under /sys/power&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd1_autocomp&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd2_autocomp&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt This slide deck] has much of the pertinent information about SmartReflex and other power-saving technologies on the OMAP processor. Unfortunately the kernel modules that provide many of the features mentioned in the slide deck are not present on the Pre. This is the main reason that SmartReflex may not save a terribly large amount of power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
To enable SmartReflex, create a file called '''smartreflex''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# -*- mode: shell-script; -*-&lt;br /&gt;
description &amp;quot;SmartReflex&amp;quot;&lt;br /&gt;
author &amp;quot;Alex Markson&amp;quot;&lt;br /&gt;
version 1.0&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
&lt;br /&gt;
# SmartReflex&lt;br /&gt;
# &amp;quot;SmartReflex™ driver allows for auto-compensation of VDD1 and&lt;br /&gt;
# VDD2 voltages (around the voltages specified by current OPP)&lt;br /&gt;
# by analyzing the silicon characteristics, temperature, voltage etc&amp;quot;&lt;br /&gt;
# &lt;br /&gt;
# Enable SmartReflex&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd1_autocomp&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd2_autocomp&lt;br /&gt;
&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable overclocking in addition to SmartReflex, add the following JUST BEFORE the '''end script''' line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# according to the OEM shell script in /etc/miniboot.sh&lt;br /&gt;
# this seems like it needs to be set twice to make sure ?&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;AFter using this for about a week, I find that using SmartReflex causes the Pre to stutter every so often&amp;quot;&lt;br /&gt;
* &amp;quot;webos 1.1 w/ no problems to start. Installed ondemand script, full 125-600mhz range, threshold 30: worked fine mostly but on the touchstone it gets hot and locks up kills battery, backlight on behind black screen, every time, within an hour. Switched to smartreflex with 600mhz, no problems, though only a few days so far and no video testing. Media player remix playing to car stereo via bluetooth is smooth.&amp;quot; [[User:Bkw|Bkw]] 00:02, 15 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
* Alex Markson for the SmartReflex find and the script.&lt;br /&gt;
* pEEf for numerous discoveries related to cpu scaling.&lt;br /&gt;
* sidamos for the info about 'up_threshold'&lt;br /&gt;
* garrettwp for the cpu scaling event.d script.&lt;br /&gt;
* Jauder Ho for gitorious patches&lt;br /&gt;
&lt;br /&gt;
= Hacking=&lt;br /&gt;
There is still a lot of work to be done in making this work optimally. The following are some resources and thoughts.&lt;br /&gt;
* A paper about the ondemand governor http://www.linuxinsight.com/ols2006_the_ondemand_governor.html&lt;br /&gt;
* webOS 1.0.4 has CONFIG_PREEMPT set along with CONFIG_HZ=100. CONFIG_NO_HZ aka tickless is not set.&lt;br /&gt;
* Possible patch for NOHZ / ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
* Use PowerTop to observe what is going on inside the Pre&lt;br /&gt;
* http://www.lesswatts.org/&lt;br /&gt;
* http://wiki.davincidsp.com/index.php/Running_PowerTOP_on_OMAP35x_platform&lt;br /&gt;
* TI 3430 PM presentation http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt&lt;br /&gt;
* CPU frequency scaling in Linux with cpufreq. Details on cpufreq parameters http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
Right now this is a [slow] collection of data --A2NY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kernel Config File:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel Config Freq:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# CPU Frequency scaling&lt;br /&gt;
#&lt;br /&gt;
CONFIG_CPU_FREQ=y&lt;br /&gt;
CONFIG_CPU_FREQ_TABLE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEBUG is not set&lt;br /&gt;
CONFIG_CPU_FREQ_STAT=y&lt;br /&gt;
CONFIG_CPU_FREQ_STAT_DETAILS=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_USERSPACE=y&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_ONDEMAND=y&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled Governors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors &lt;br /&gt;
ondemand userspace &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ONDEMAND is also called DVFS (Dynamic Voltage &amp;amp; Frequency Scaling)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Newer kernels apparently have an improved ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
&lt;br /&gt;
Kernel Config PM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# OMAP Power Management&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Power Management Options&lt;br /&gt;
#&lt;br /&gt;
CONFIG_OMAP3_PM=y&lt;br /&gt;
CONFIG_OMAP_VOLT_SR_BYPASS=y&lt;br /&gt;
# CONFIG_OMAP_VOLT_SR is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VSEL is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VMODE is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD1 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP1 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP2 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP3 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD1_OPP4=y&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP5 is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD2 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD2_OPP2 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD2_OPP3=y&lt;br /&gt;
# CONFIG_ENABLE_VOLTSCALE_IN_SUSPEND is not set&lt;br /&gt;
# CONFIG_RESET_IVA_IN_SUSPEND is not set&lt;br /&gt;
CONFIG_MPU_OFF=y&lt;br /&gt;
CONFIG_OMAP34XX_OFFMODE=y&lt;br /&gt;
CONFIG_CORE_OFF=y&lt;br /&gt;
# CONFIG_CORE_OFF_CPUIDLE is not set&lt;br /&gt;
CONFIG_SYSOFFMODE=y&lt;br /&gt;
# CONFIG_HW_SUP_TRANS is not set&lt;br /&gt;
# CONFIG_TRACK_RESOURCES is not set&lt;br /&gt;
CONFIG_AUTO_POWER_DOMAIN_CTRL=y&lt;br /&gt;
# CONFIG_PREVENT_MPU_RET is not set&lt;br /&gt;
# CONFIG_PREVENT_CORE_RET is not set&lt;br /&gt;
# CONFIG_DISABLE_EMUDOMAIN_CONTROL is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TWL4030:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_registers.0/module_pm_receiver&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+	  Please note, that by default SmartReflex is only&lt;br /&gt;
+	  initialized. To enable the automatic voltage&lt;br /&gt;
+	  compensation for VDD1 and VDD2, user must write 1 to&lt;br /&gt;
+	  /sys/power/sr_vddX_autocomp, where X is 1 or 2.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Startup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-02T02:40:01.263122Z [15] webos kern.warning kernel: OMAP: Initializing SmartReflex subsystem...&lt;br /&gt;
2009-11-02T02:40:01.263549Z [15] webos kern.info kernel: OMAP: SmartReflex subsystem initialized.&lt;br /&gt;
2009-11-02T02:40:01.282196Z [15] webos kern.err kernel: OMAP 3430 Power Management subsystem initializing.&lt;br /&gt;
2009-11-02T02:40:01.292083Z [15] webos kern.info kernel: OMAP: Setting up clocks.&lt;br /&gt;
2009-11-02T02:40:01.319152Z [15] webos kern.warning kernel: OMAP: OPP mismatch: current/target=2:4&lt;br /&gt;
2009-11-02T02:40:01.319702Z [15] webos kern.info kernel: OMAP: Change MPU speed: 250 =&amp;gt; 550 MHz&lt;br /&gt;
2009-11-02T02:40:01.321044Z [15] webos kern.info kernel: OMAP: ARM/DSP clock at 550/396 MHz.&lt;br /&gt;
2009-11-02T02:40:01.321624Z [15] webos kern.info kernel: BogoMIPS: 547.88 @550000 KHz&lt;br /&gt;
2009-11-02T02:40:01.327911Z [15] webos kern.info kernel: OMAP CPU idle driver initializing.&lt;br /&gt;
2009-11-02T02:40:01.328277Z [15] webos kern.err kernel: create_proc_entry succeeded&lt;br /&gt;
2009-11-02T02:40:01.342102Z [15] webos kern.info kernel: Initialize power support module&lt;br /&gt;
2009-11-02T02:40:01.342742Z [15] webos kern.info kernel: OMAP3: PM: Sirloin target registered successfully.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in userspace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:39:39.106658Z [329] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
2009-11-30T17:39:55.827423Z [345] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in ondemand: (device wants off, will not wake if it goes off)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:27:37.676910Z [7523] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
2009-11-30T17:27:45.676269Z [7531] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
powersave_bias http://osdir.com/ml/kernel.cpufreq/2006-07/msg00137.html&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
This patch adds a &amp;quot;powersave_bias&amp;quot; tunable to ondemand&lt;br /&gt;
to allow it to reduce its target frequency by a specified percent.&lt;br /&gt;
&lt;br /&gt;
By default, the powersave_bias is 0 and has no effect.&lt;br /&gt;
powersave_bias is in units of 0.1%, so it has an effective range&lt;br /&gt;
of 1 through 1000, resulting in 0.1% to 100% impact.&lt;br /&gt;
&lt;br /&gt;
In practice, users will not be able to detect a difference between&lt;br /&gt;
0.1% increments, but 1.0% increments turned out to be too large.&lt;br /&gt;
Also, the max value of 1000 (100%) would simply peg the system&lt;br /&gt;
in its deepest power saving P-state, unless the processor really has&lt;br /&gt;
a hardware P-state at 0Hz:-)&lt;br /&gt;
&lt;br /&gt;
For example, If ondemand requests 2.0GHz based on utilization,&lt;br /&gt;
and powersave_bias=100, this code will knock 10% off the target&lt;br /&gt;
and seek  a target of 1.8GHz instead of 2.0GHz until the&lt;br /&gt;
next sampling.  If 1.8 is an exact match with an hardware frequency&lt;br /&gt;
we use it, otherwise we average our time between the frequency&lt;br /&gt;
next higher than 1.8 and next lower than 1.8.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=7655</id>
		<title>Patch webOS CPU Frequency or Voltage Scaling</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_CPU_Frequency_or_Voltage_Scaling&amp;diff=7655"/>
		<updated>2009-12-05T02:57:36Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Hacking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
= Overview=&lt;br /&gt;
There are currently 2 methods to enable further power saving - neither is perfect. Note that '''these 2 methods CANNOT be used together''' so make sure you try only one solution at a time. Using both has been reported to brick your Pre, requiring a visit to the WebOS Doctor. Patches for these are now available in the gitorious repo. See [[Applying Patches]]&lt;br /&gt;
&lt;br /&gt;
1 CPU Scaling&lt;br /&gt;
* This allows the Pre to scale the CPU clock speed up and down in response to changes in CPU utilization. Some people have reported glitching when using scaling when the CPU is under heavy load (lots of multitasking, playing video, etc).&lt;br /&gt;
2 SmartReflex&lt;br /&gt;
* This allows the Pre to vary the voltage inside the core in response to silicon characteristics, temperature, voltage, etc. This does not save that much power because it is supposed to be used along with CPU scaling to reduce voltage when the CPU is running slower, but the Pre's kernel is missing the modules to do this. This is why using both together will '''freeze''' the Palm Pre. (Remove the battery, restart with the USB plugged into your computer with NovaCom installed, During the phones boot procedure simply telnet to the phone through NovaCom's Proxy port 8023, remove the smartreflex files you installed in the events folder in /etc/ before WebOS panics) &lt;br /&gt;
&lt;br /&gt;
= CPU Scaling=&lt;br /&gt;
== Default Setting==&lt;br /&gt;
Frequency scaling does not appear to be active by default on the Pre by default. The directory /sys/devices/system/cpu/cpu0/cpufreq contains information on the current state. The clock seems to be fixed at 500mHz for normal operation (according to cpuinfo_cur_freq), however several other frequencies exist:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# cat ./scaling_available_frequencies &lt;br /&gt;
600000 550000 500000 250000 125000 &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The file /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state shows that at some point (probably during startup) the frequency is raised to 550mHz for a short period of time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enabling Scaling==&lt;br /&gt;
It is possible to enable frequency scaling using the 'ondemand' governor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo ondemand &amp;gt; ./scaling_governor &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
this will cause the frequency to be reduced automatically while idle, and increased as needed during operation, potentially increasing battery life. Because higher frequencies may cause overheating, and TI has noted a significant decrease in the life of the processor when running above 500mHz, you should also restrict the frequency scaling to 500mHz and below by doing the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 &amp;gt; ./scaling_max_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your Pre seems sluggish after enabling scaling, you can try changing the values in /sys/devices/system/cpu/cpu0/cpufreq/ondemand as detailed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 'ondemand' Configuration==&lt;br /&gt;
Increasing the value of 'scaling_min_freq' will prevent the CPU from going into extremely low speed configurations, which will significantly improve the responsiveness of the device when it first detects increased CPU usage, at the cost of a little bit of battery life.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq# echo 250000 &amp;gt; ./scaling_min_freq&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setting the value of 'up_threshold' lower will cause the frequency to be increased at lower levels of activity.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/devices/system/cpu/cpu0/cpufreq/ondemand# echo 30 &amp;gt; ./up_threshold&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: The default setting for 'up_threshold' is 80.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checking Performance and Stats==&lt;br /&gt;
To check how long your Pre has been running and at what frequency, do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will see something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;600000 906&lt;br /&gt;
550000 768&lt;br /&gt;
500000 380&lt;br /&gt;
250000 0&lt;br /&gt;
125000 180505&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first number is the CPU frequency, the second is a time interval.  In this example, my Pre has spent the most time @ 125mHz, but you can see it shoots up when needed.  Note that if you are overclocking, it really doesn't spend much time at 600mHz, so overheating shouldn't be a problem, but you will definitely notice an improvement. These stats are reset after a reboot.&lt;br /&gt;
&lt;br /&gt;
== Overclocking==&lt;br /&gt;
Overclocking is not recommended, as TI has reported a significant decrease in the life of the CPU at frequencies about 500mHz. However some users have reported better responsiveness, in addition to running cooler and using less battery while overclocking.&lt;br /&gt;
&lt;br /&gt;
To overclock to the CPU's maximum speed, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;600000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To put it back, do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
Create a file called '''cpu-scaling''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Enables cpu scaling&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
    echo &amp;quot;500000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq&lt;br /&gt;
    echo &amp;quot;250000&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq&lt;br /&gt;
    echo &amp;quot;ondemand&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
    echo &amp;quot;30&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Return to Stock Fixed Frequency==&lt;br /&gt;
The simple way is just to remove the '''cpu-scaling''' script from /etc/event.d (if you created it) and reboot.  None of these changes are persistent without the &amp;quot;sticky&amp;quot; script shown above.&lt;br /&gt;
&lt;br /&gt;
If you switch back to the 'userspace' governor without rebooting, your frequency could get stuck at a lower setting and the whole system get really bogged down.  Here is a quick shell script to help you revert to userspace with the original frequency:&lt;br /&gt;
&lt;br /&gt;
Copy/paste this whole line as one command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;echo userspace &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ; echo 500000 &amp;gt;/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then confirm the frequency/governor are back the way you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;I tried this out but video playback was flickery and horrible.  The up_threshold tweak setting to 30 seems to improve it a lot , but it's still flickery a bit.  Some people may not be happy.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I found that setting the max freq to 600000 with the threshold helps this problem.  See relevant warnings above first!  I don't really watch video on my Pre, so it's not so big of a deal.&amp;quot; -pEEf&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;A lot of people on the Precentral forums (myself included) are experiencing the phone locking up after a while of using this, and need to pull the battery to reset.  (On webOS 1.0.3 at least.)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I've been running my phone with scaling for nearly a week now without problems, but I'm not 'overlcocking' so to speak.  Any specifics on what might cause the locks? (ok had my first locks tonight while attached to the touchstone, weird it never happened before now (and annoying))&amp;quot; -retry&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;I tried the folling over WebOSQuick Installer Linux Console: 1. root@castle: echo ondemand &amp;gt; ./scaling_governor  2. root@castle: echo 500000 &amp;gt; ./scaling_max_freq 3. root@castle: echo 125000 &amp;gt; ./scaling_min_freq 4. root@castle: echo 30 &amp;gt; ./up_threshold . But even after 7hours... nothing changed.. just used 500Mhz in Airplane mode over Night.&amp;quot; -Ryo&lt;br /&gt;
&lt;br /&gt;
= SmartReflex=&lt;br /&gt;
== Enable SmartReflex==&lt;br /&gt;
SmartReflex can be enabled in the VDD1 and VDD2 areas of the OMAP processor by setting two flags under /sys/power&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd1_autocomp&lt;br /&gt;
root@castle:/sys/power# echo -n 1 &amp;gt; ./sr_vdd2_autocomp&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt This slide deck] has much of the pertinent information about SmartReflex and other power-saving technologies on the OMAP processor. Unfortunately the kernel modules that provide many of the features mentioned in the slide deck are not present on the Pre. This is the main reason that SmartReflex may not save a terribly large amount of power.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making your changes stick after a reboot==&lt;br /&gt;
To enable SmartReflex, create a file called '''smartreflex''' in /etc/event.d and put this code in it, then reboot.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# -*- mode: shell-script; -*-&lt;br /&gt;
description &amp;quot;SmartReflex&amp;quot;&lt;br /&gt;
author &amp;quot;Alex Markson&amp;quot;&lt;br /&gt;
version 1.0&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
script&lt;br /&gt;
&lt;br /&gt;
# SmartReflex&lt;br /&gt;
# &amp;quot;SmartReflex™ driver allows for auto-compensation of VDD1 and&lt;br /&gt;
# VDD2 voltages (around the voltages specified by current OPP)&lt;br /&gt;
# by analyzing the silicon characteristics, temperature, voltage etc&amp;quot;&lt;br /&gt;
# &lt;br /&gt;
# Enable SmartReflex&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd1_autocomp&lt;br /&gt;
echo -n 1 &amp;gt; /sys/power/sr_vdd2_autocomp&lt;br /&gt;
&lt;br /&gt;
end script&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable overclocking in addition to SmartReflex, add the following JUST BEFORE the '''end script''' line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# according to the OEM shell script in /etc/miniboot.sh&lt;br /&gt;
# this seems like it needs to be set twice to make sure ?&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
echo 600000 &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comments and Caveats==&lt;br /&gt;
* &amp;quot;AFter using this for about a week, I find that using SmartReflex causes the Pre to stutter every so often&amp;quot;&lt;br /&gt;
* &amp;quot;webos 1.1 w/ no problems to start. Installed ondemand script, full 125-600mhz range, threshold 30: worked fine mostly but on the touchstone it gets hot and locks up kills battery, backlight on behind black screen, every time, within an hour. Switched to smartreflex with 600mhz, no problems, though only a few days so far and no video testing. Media player remix playing to car stereo via bluetooth is smooth.&amp;quot; [[User:Bkw|Bkw]] 00:02, 15 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
* Alex Markson for the SmartReflex find and the script.&lt;br /&gt;
* pEEf for numerous discoveries related to cpu scaling.&lt;br /&gt;
* sidamos for the info about 'up_threshold'&lt;br /&gt;
* garrettwp for the cpu scaling event.d script.&lt;br /&gt;
* Jauder Ho for gitorious patches&lt;br /&gt;
&lt;br /&gt;
= Hacking=&lt;br /&gt;
There is still a lot of work to be done in making this work optimally. The following are some resources and thoughts.&lt;br /&gt;
* A paper about the ondemand governor http://www.linuxinsight.com/ols2006_the_ondemand_governor.html&lt;br /&gt;
* webOS 1.0.4 has CONFIG_PREEMPT set along with CONFIG_HZ=100. CONFIG_NO_HZ aka tickless is not set.&lt;br /&gt;
* Possible patch for NOHZ / ondemand governor http://linux.derkeiler.com/Mailing-Lists/Kernel/2009-05/msg10436.html&lt;br /&gt;
* Use PowerTop to observe what is going on inside the Pre&lt;br /&gt;
* http://www.lesswatts.org/&lt;br /&gt;
* http://wiki.davincidsp.com/index.php/Running_PowerTOP_on_OMAP35x_platform&lt;br /&gt;
* TI 3430 PM presentation http://www.celinux.org/elc08_presentations/TI_OMAP3430_Linux_PM_reference.ppt&lt;br /&gt;
* CPU frequency scaling in Linux with cpufreq. Details on cpufreq parameters http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
Right now this is a [slow] collection of data --A2NY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kernel Config File:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /boot/config-2.6.24-palm-joplin-3430&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel Config Freq:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# CPU Frequency scaling&lt;br /&gt;
#&lt;br /&gt;
CONFIG_CPU_FREQ=y&lt;br /&gt;
CONFIG_CPU_FREQ_TABLE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEBUG is not set&lt;br /&gt;
CONFIG_CPU_FREQ_STAT=y&lt;br /&gt;
CONFIG_CPU_FREQ_STAT_DETAILS=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_USERSPACE=y&lt;br /&gt;
CONFIG_CPU_FREQ_GOV_ONDEMAND=y&lt;br /&gt;
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabled Governors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors &lt;br /&gt;
ondemand userspace &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ONDEMAND is also called DVFS (Dynamic Voltage &amp;amp; Frequency Scaling)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel Config PM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# OMAP Power Management&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Power Management Options&lt;br /&gt;
#&lt;br /&gt;
CONFIG_OMAP3_PM=y&lt;br /&gt;
CONFIG_OMAP_VOLT_SR_BYPASS=y&lt;br /&gt;
# CONFIG_OMAP_VOLT_SR is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VSEL is not set&lt;br /&gt;
# CONFIG_OMAP_VOLT_VMODE is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD1 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP1 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP2 is not set&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP3 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD1_OPP4=y&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD1_OPP5 is not set&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Default VDD2 OPP Level Selection&lt;br /&gt;
#&lt;br /&gt;
# CONFIG_OMAP3ES2_VDD2_OPP2 is not set&lt;br /&gt;
CONFIG_OMAP3ES2_VDD2_OPP3=y&lt;br /&gt;
# CONFIG_ENABLE_VOLTSCALE_IN_SUSPEND is not set&lt;br /&gt;
# CONFIG_RESET_IVA_IN_SUSPEND is not set&lt;br /&gt;
CONFIG_MPU_OFF=y&lt;br /&gt;
CONFIG_OMAP34XX_OFFMODE=y&lt;br /&gt;
CONFIG_CORE_OFF=y&lt;br /&gt;
# CONFIG_CORE_OFF_CPUIDLE is not set&lt;br /&gt;
CONFIG_SYSOFFMODE=y&lt;br /&gt;
# CONFIG_HW_SUP_TRANS is not set&lt;br /&gt;
# CONFIG_TRACK_RESOURCES is not set&lt;br /&gt;
CONFIG_AUTO_POWER_DOMAIN_CTRL=y&lt;br /&gt;
# CONFIG_PREVENT_MPU_RET is not set&lt;br /&gt;
# CONFIG_PREVENT_CORE_RET is not set&lt;br /&gt;
# CONFIG_DISABLE_EMUDOMAIN_CONTROL is not set&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TWL4030:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sys/devices/platform/twl4030_registers.0/module_pm_receiver&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Kernel info:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+	  Please note, that by default SmartReflex is only&lt;br /&gt;
+	  initialized. To enable the automatic voltage&lt;br /&gt;
+	  compensation for VDD1 and VDD2, user must write 1 to&lt;br /&gt;
+	  /sys/power/sr_vddX_autocomp, where X is 1 or 2.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Startup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-02T02:40:01.263122Z [15] webos kern.warning kernel: OMAP: Initializing SmartReflex subsystem...&lt;br /&gt;
2009-11-02T02:40:01.263549Z [15] webos kern.info kernel: OMAP: SmartReflex subsystem initialized.&lt;br /&gt;
2009-11-02T02:40:01.282196Z [15] webos kern.err kernel: OMAP 3430 Power Management subsystem initializing.&lt;br /&gt;
2009-11-02T02:40:01.292083Z [15] webos kern.info kernel: OMAP: Setting up clocks.&lt;br /&gt;
2009-11-02T02:40:01.319152Z [15] webos kern.warning kernel: OMAP: OPP mismatch: current/target=2:4&lt;br /&gt;
2009-11-02T02:40:01.319702Z [15] webos kern.info kernel: OMAP: Change MPU speed: 250 =&amp;gt; 550 MHz&lt;br /&gt;
2009-11-02T02:40:01.321044Z [15] webos kern.info kernel: OMAP: ARM/DSP clock at 550/396 MHz.&lt;br /&gt;
2009-11-02T02:40:01.321624Z [15] webos kern.info kernel: BogoMIPS: 547.88 @550000 KHz&lt;br /&gt;
2009-11-02T02:40:01.327911Z [15] webos kern.info kernel: OMAP CPU idle driver initializing.&lt;br /&gt;
2009-11-02T02:40:01.328277Z [15] webos kern.err kernel: create_proc_entry succeeded&lt;br /&gt;
2009-11-02T02:40:01.342102Z [15] webos kern.info kernel: Initialize power support module&lt;br /&gt;
2009-11-02T02:40:01.342742Z [15] webos kern.info kernel: OMAP3: PM: Sirloin target registered successfully.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in userspace:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:39:39.106658Z [329] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
2009-11-30T17:39:55.827423Z [345] webos kern.info kernel: Timeout in prcm_check_power_domain_status(), domain 9, desired state 1, current state 3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SR autocomp is enabled in ondemand: (device wants off, will not wake if it goes off)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2009-11-30T17:27:37.676910Z [7523] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
2009-11-30T17:27:45.676269Z [7531] webos kern.info kernel: Timeout in prcm_check_clock_domain_status(), domainid 9, desired state 0, current state 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Applying_Patches&amp;diff=5956</id>
		<title>Applying Patches</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Applying_Patches&amp;diff=5956"/>
		<updated>2009-09-29T05:36:22Z</updated>

		<summary type="html">&lt;p&gt;Jho: remove the removal of ncurses as psmisc and hence dropbear depends on it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
We cannot legally redistribute Palm source code (it is copyrighted code, and is not released under an open source license) therefore we need to manage our modifications as patches. Since these patches will come from many different places, and will need to be removed before each OTA update and then reapplied after-wards, we need a procedure and tools for doing this. This page documents this procedure.&lt;br /&gt;
&lt;br /&gt;
Before asking questions about this procedure, please read the following documents fully:&lt;br /&gt;
&lt;br /&gt;
An introduction to Quilt can be found at http://www.suse.de/~agruen/quilt.pdf&lt;br /&gt;
&lt;br /&gt;
The manual for quilt is at http://linux.die.net/man/1/quilt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading from quilt to quilt-lite==&lt;br /&gt;
&lt;br /&gt;
If you have performed these instructions before the 8th Aug 2009, you will have installed a very heavyweight version of the quilt package which has a dependency on a very large perl package.&lt;br /&gt;
&lt;br /&gt;
This dependency has been removed in a new quilt-lite package, which saves 26MB of space in /var as a result.&lt;br /&gt;
&lt;br /&gt;
You can switch over to it as follows:&lt;br /&gt;
&lt;br /&gt;
* ipkg-opt update&lt;br /&gt;
* ipkg-opt remove quilt perl libdb gdbm util-linux-ng e2fslibs ncursesw&lt;br /&gt;
* ipkg-opt install quilt-lite&lt;br /&gt;
&lt;br /&gt;
Alternatively, the setup script below will prompt to uninstall quilt, perl, etc ..., and install quilt-lite, if quilt is installed.&lt;br /&gt;
&lt;br /&gt;
==Setup Procedure (Scripted)==&lt;br /&gt;
The process of setting up quilt has been scripted.  The script performs the following actions:&lt;br /&gt;
* Installs (or upgrades) git and any dependencies&lt;br /&gt;
* Installs (or upgrades) quilt (actually quilt-lite, a version of quilt that does not depend on perl) and any dependencies&lt;br /&gt;
* Configures quilt to store patches in /opt/src/patches&lt;br /&gt;
* Creates (or updates) a local clone of the webos-internals modifications repository&lt;br /&gt;
&lt;br /&gt;
Each step is only performed if necessary.  Please note that ipkg-opt needs to be installed.  The instructions are found [[Next_steps|here]].&lt;br /&gt;
&lt;br /&gt;
To get run the script, log into your Pre, gain root privileges and run the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/quilt-bootstrap.sh&lt;br /&gt;
 sh quilt-bootstrap.sh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup Procedure (Manual Process)==&lt;br /&gt;
(Note: Even though you may have previously installed the optware quilt patch manager, it won't damage anything to follow the Setup procedure. Alternatively, if you KNOW FOR SURE these are installed and your packages are up-to-date, you can skip to Importing and Applying Patches).&lt;br /&gt;
&lt;br /&gt;
* Log into your Pre, and gain root privileges. (Note: This command is not required when using the emulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i # Yes, the -i is important. &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Put your Pre in to Read Write Mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mount -o remount,rw /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Ensure that you are set up for optware package installations, and make sure you have the latest package index:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt update&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install the 'quilt-lite' package, which will be used to manage the patches you apply, and the 'git' package, which will be used to download existing patches from the modifications repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt install quilt-lite git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(If you already have those packages installed, repeating this step will not cause any harm.)&lt;br /&gt;
&lt;br /&gt;
* Create a directory in which 'quilt' will manage your chosen modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir -p /opt/src/patches&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit /opt/etc/quilt.quiltrc to point quilt to that directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sed -ire 's|^[\s#]*QUILT_PATCHES=.*|QUILT_PATCHES=/opt/src/patches|' /opt/etc/quilt.quiltrc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Delete any existing webos-internals modifications directories&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
rm -rf /opt/src/modifications&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Clone the webos-internals modifications repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src&lt;br /&gt;
git clone git://gitorious.org/webos-internals/modifications.git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Importing and Applying Patches==&lt;br /&gt;
&lt;br /&gt;
* Ensure your list of modifications is up to date&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
git pull&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If you find yourself getting errors when you try to pull with the above command then you will need to modify your .git/config file&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo vi /opt/src/modifications/.git/config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Your [master] section should look like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[branch &amp;quot;master&amp;quot;]&lt;br /&gt;
        remote = origin&lt;br /&gt;
        merge = refs/heads/master   &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Browse the set of available patches.  Each patch should have a description at the top.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
find /opt/src/modifications -name *.patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Choose a patch from the modifications repository and import it into your own patches directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt import /opt/src/modifications/application_name/patch_name.patch   # Note that you need to replace application_name and patch_name here.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Verify that quilt has imported the patch successfully:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# You should still be in the / directory to run quilt.&lt;br /&gt;
quilt series  # you should see your patch listed in here&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Instruct quilt to apply your patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# You should still be in the / directory to run quilt.&lt;br /&gt;
quilt push&lt;br /&gt;
# Use this to push all patches at once.&lt;br /&gt;
quilt push -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything worked correctly, the patch should now be applied.  You will usually need to restart the luna service on the Pre to see the effect of patches to applications. Here's how to initiate a rescan.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn't work, try a service restart with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
stop LunaSysMgr &amp;amp;&amp;amp; start LunaSysMgr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if all else fails, simply reboot:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
reboot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Listing Applied Patches==&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt applied&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Removing All Patches==&lt;br /&gt;
&lt;br /&gt;
Before you accept an over-the-air (OTA) update, you should remove any patches you have applied.  Luckily, using quilt makes this very easy.&lt;br /&gt;
&lt;br /&gt;
* Remove all patches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt pop -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reapplying all patches==&lt;br /&gt;
&lt;br /&gt;
After your OTA update is complete, you will want to reapply any patches you have selected. This may or may not go smoothly.&lt;br /&gt;
&lt;br /&gt;
* Apply all patches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt push -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Put your Pre back in to Read Only mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Information for developing patches==&lt;br /&gt;
&lt;br /&gt;
===Getting Authenticated with gitorious.org===&lt;br /&gt;
Before you can commit to gitorious you need to [http://gitorious.org/users/new create an account]. &lt;br /&gt;
&lt;br /&gt;
Next you'll need to generate a public key and share that with gitorious.org, your public key is how gitorious.org authenticates you and checks if have the permissions required to do a commit to a given repository.&lt;br /&gt;
&lt;br /&gt;
Getting your key on window&lt;br /&gt;
* Download [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTYgen] and [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Pageant]&lt;br /&gt;
&lt;br /&gt;
--Gitorious.org [http://gitorious.org/about/faq gitorious.org recommends] you use [http://code.google.com/p/msysgit/ msysGit].--&lt;br /&gt;
&lt;br /&gt;
* On Windows use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTYgen] to generate a public/private key pair. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Key -&amp;gt; SSH-2 RSA KEY&lt;br /&gt;
Key -&amp;gt; Generate key pair&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
After some wiggling of the mouse your keys will be generated.  You should fill in the //Key passphrase// and it's confirmation to secure you key.  Save off the public and private key pairs to your user folder.&lt;br /&gt;
&lt;br /&gt;
* After which you will need to run [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Pageant] on your pc. Pageant holds your private key in memory for PuTTY to use.&lt;br /&gt;
&lt;br /&gt;
* To commit changes to gitorious.org from the pre you will need to install openssh on the device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt update&lt;br /&gt;
ipkg-opt install openssh # since dropbear doesn't do agent forwarding, you need to use openssh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Actually, it is possible to use dropbear with git but requires [http://tumblelog.jauderho.com/post/151678345/using-dropbear-with-git some hackery].&lt;br /&gt;
&lt;br /&gt;
As an alternative, if you don't use the keys for anything else you could just generate them on the pre after installing open-ssh&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo ssh-keygen -t rsa # follow the prompts&lt;br /&gt;
cat ~/.ssh/id_rsa.pub  # display the public key you need to paste into gitorious&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Don't forget to upload your public key to gitorious.org after generating it.&lt;br /&gt;
Now you should be able to follow the steps below and contribute your code to gitorious.org.&lt;br /&gt;
&lt;br /&gt;
* If you find yourself getting errors about your public key when you try to push changes, check to make sure your keys are under /var/home/root/.ssh/ and not under your regular user account.&lt;br /&gt;
&lt;br /&gt;
===Creating a patch===&lt;br /&gt;
&lt;br /&gt;
* Before making any changes to files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt new patch_name.patch&lt;br /&gt;
quilt add /usr/palm/applications/com.palm.app.appYouWantToMod/app/controllers/mod-assistant.js&lt;br /&gt;
quilt add /usr/palm/applications/com.palm.app.appYouWantToMod/app/controllers/mod2-assistant.js&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Now you can make changes on the Pre using vi/nano/joe/whatever, or sftp files to your machine and make changes.  Make sure any file you change has been added in the above step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
quilt files # view files that are being tracked&lt;br /&gt;
quilt header -e  # add a header to the patch to describe it (please do this!)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Once you are finished and ready to create a patch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
quilt refresh # this will create/update the /opt/src/patches/patch_name.patch file&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Pushing the change back to gitorious.org===&lt;br /&gt;
&lt;br /&gt;
* copy the patch into the modification tree you cloned above&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir /opt/src/modifications/application_name # You need to change application_name to the leaf of the palm application id.&lt;br /&gt;
cp /opt/src/patches/patch_name.patch /opt/src/modifications/application_name/patch_name.patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Identify yourself in git (use the user you have setup at gitorious.org)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
git config --global user.name &amp;quot;user&amp;quot;&lt;br /&gt;
git config --global user.email &amp;quot;youremail@example.com&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Commit your changes to your local git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git add application_name/patch_name.patch&lt;br /&gt;
git commit&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Since we did a clone the first time, we need to recreate the origin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git remote rm origin # (if you did a clone, we have to replace the origin)&lt;br /&gt;
git remote add origin git@gitorious.org:webos-internals/modifications.git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, push your changes up to gitorious.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git push origin master # first time&lt;br /&gt;
git push # any future pushes&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the push does not work, try to debug the ssh connection&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/opt/bin/ssh -v git@gitorious.org&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extended, annotated sample session with quilt==&lt;br /&gt;
* First, we just need to setup a file to muck with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# cd /&lt;br /&gt;
root@castle:/# echo &amp;quot;Original file&amp;quot; &amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;2nd lien&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;3rd ilne&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;last line&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Start a new patch (normally you'll want to use patch_name.patch, I just wanted a shortened name)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt new p1&lt;br /&gt;
Patch /opt/src/patches/p1 is now on top&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You must quilt add any files that you are going to edit or create '''before''' you edit or create them.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt add /usr/test&lt;br /&gt;
File /usr/test added to patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just using sed to correct the spelling on the 2nd line&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# sed -i -e 's/lien/line/' /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* quilt refresh actually finds what you have changed and writes it to the patch file  (at this point, you can use git to push your changes)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just for fun, let's do it again&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt new p2&lt;br /&gt;
Patch /opt/src/patches/p2 is now on top&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Again, add file, make some changes, refresh to update the patch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt add /usr/test&lt;br /&gt;
File /usr/test added to patch /opt/src/patches/p2&lt;br /&gt;
root@castle:/# sed -i -e 's/ilne/line/' /usr/test&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just an example of rolling back changes&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt pop&lt;br /&gt;
Removing patch /opt/src/patches/p2&lt;br /&gt;
Restoring usr/test&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/p1&lt;br /&gt;
root@castle:/# quilt pop&lt;br /&gt;
Removing patch /opt/src/patches/p1&lt;br /&gt;
Restoring usr/test&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/enable-browser-downloads.patch&lt;br /&gt;
root@castle:/# cat /usr/test&lt;br /&gt;
Original file&lt;br /&gt;
2nd lien&lt;br /&gt;
3rd ilne&lt;br /&gt;
last line&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* delete will delete the patch from your series, but leave the actual patch file in /opt/src/patches (so you could import it later)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt delete p1&lt;br /&gt;
Removed patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Since we removed p1, push will now apply p2.  However, since p2 was applied against p1 originally, p2 will report an error. If the changes are too significant, you can force with -f, but you should carefully inspect the resulting files.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt push&lt;br /&gt;
Applying patch /opt/src/patches/p2&lt;br /&gt;
patching file usr/test&lt;br /&gt;
Hunk #1 succeeded at 1 with fuzz 2.&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/p2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If we want, we can refresh the patch so that future users of the patch do not receive the &amp;quot;fuzz&amp;quot; warning.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p2&lt;br /&gt;
root@castle:/# cat /usr/test&lt;br /&gt;
Original file&lt;br /&gt;
2nd lien&lt;br /&gt;
3rd line&lt;br /&gt;
last line&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* cleanup&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# rm /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Background info==&lt;br /&gt;
&lt;br /&gt;
* [http://pkg-perl.alioth.debian.org/howto/quilt.html quilt]&lt;br /&gt;
&lt;br /&gt;
==Script for Updating/Installing Patches==&lt;br /&gt;
&lt;br /&gt;
I just wanted to share the following script that I just finished testing out.  It's only been tested on my Pre so far, as I don't have access to any others..  It just updates the patch list, prints out available patches, then lets you choose which to apply.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/opt/bin/bash&lt;br /&gt;
&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
tput clear&lt;br /&gt;
echo Updating list...&lt;br /&gt;
git pull&lt;br /&gt;
tput clear&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
a=0&lt;br /&gt;
for inputline in $(find /opt/src/modifications -name *.patch | sort)&lt;br /&gt;
do&lt;br /&gt;
 a=$(($a+1));&lt;br /&gt;
 line=&amp;quot;$(echo $inputline)&amp;quot;&lt;br /&gt;
 MYARRAY[$a]=&amp;quot;$line&amp;quot;&lt;br /&gt;
 echo &amp;quot;${a}${line}&amp;quot; | awk -F &amp;quot;/&amp;quot; 'sub(&amp;quot;.patch&amp;quot;,&amp;quot;&amp;quot;,$6) {printf &amp;quot;%-3s %-15s %s\n&amp;quot;, $1, $5, $6}'&lt;br /&gt;
done&lt;br /&gt;
echo &amp;quot;q   quit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
x=$(($a+1));&lt;br /&gt;
until [ -n &amp;quot;$opt&amp;quot; ] ; do&lt;br /&gt;
 read -p &amp;quot;Enter the line number for patch to apply [1 - $a] &amp;quot; opt&lt;br /&gt;
 if [ &amp;quot;$opt&amp;quot; = &amp;quot;q&amp;quot; ] ; then&lt;br /&gt;
  exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 if [ &amp;quot;$opt&amp;quot; -lt &amp;quot;$x&amp;quot; 2&amp;gt; /dev/null ] &amp;amp;&amp;amp; [ &amp;quot;$opt&amp;quot; -gt 0 2&amp;gt; /dev/null ] ; then&lt;br /&gt;
  true&lt;br /&gt;
 else&lt;br /&gt;
  opt=&amp;quot;&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
tput clear&lt;br /&gt;
cd /&lt;br /&gt;
quilt import ${MYARRAY[$opt]}&lt;br /&gt;
quilt push&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Preware&amp;diff=4842</id>
		<title>Application:Preware</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Preware&amp;diff=4842"/>
		<updated>2009-08-27T17:16:09Z</updated>

		<summary type="html">&lt;p&gt;Jho: added update instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Preware&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=Version: Alpha 0.7.4 &amp;lt;br /&amp;gt;(26 Aug 2009)&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=Application_Preware_List.png&lt;br /&gt;
|description=&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Icon_Preware.png|float:right;}}&lt;br /&gt;
Preware is a package management application for the Palm Pre.  Preware allows the user to install any package from any of the open standard package repositories on preware.org (or any other location that hosts an open standard package repository).  Preware relies on a custom written service developed from community research which allows the mojo app to talk to the built-in ipkg tool.&lt;br /&gt;
&lt;br /&gt;
This application was the result of extensive community-based design in [[IPKG Service]] and [[Preware Design]].&lt;br /&gt;
&lt;br /&gt;
For application management, Preware can access more applications, and has more features, than any other on-device package installer.&lt;br /&gt;
&lt;br /&gt;
And since it is open source, and has a completely open development process supported by a team of world-class WebOS Internals developers, it will continue to get better much faster than any other package management application.&lt;br /&gt;
&lt;br /&gt;
Preware is the open application installer that has been written specifically to support a homebrew ecosystem where any developer can upload any application to any submission site, and that application can then be installed by any user.  Developers no longer need to upload their applications to multiple submission sites, and users are no longer excluded from accessing applications from any open standard package repository.&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
This is alpha software.  Even so, it is at least as useful for managing applications as any of the other application installer utilities.&lt;br /&gt;
&lt;br /&gt;
== License ==&lt;br /&gt;
&lt;br /&gt;
Please be aware that org.webosinternals.preware and org.webosinternals.ipkgservice are licensed under the GPLv2.&lt;br /&gt;
&lt;br /&gt;
They cannot be used by a closed source application.  If you want to use them in a non-GPLv2 but otherwise open source application, please contact the authors.&lt;br /&gt;
&lt;br /&gt;
== Operating notes ==&lt;br /&gt;
&lt;br /&gt;
=== Recent enhancements ===&lt;br /&gt;
&lt;br /&gt;
0.7.4: Fixed remounting of root filesystem for post-install and pre-remove scripts on the Pre.&lt;br /&gt;
&lt;br /&gt;
0.7.1: Fixed buttons and title on script view screen.&lt;br /&gt;
&lt;br /&gt;
0.7.0: Initial support for post-install and pre-remove scripts, including secure informed user consent.  Does not work properly with dependencies yet, so please install dependencies one at a time.&lt;br /&gt;
&lt;br /&gt;
0.6.7: Fixed bug in category drop-down list.&lt;br /&gt;
&lt;br /&gt;
0.6.6: Fixed bug in package size reporting.&lt;br /&gt;
&lt;br /&gt;
0.6.5: Updated icon and other graphical annotations.&lt;br /&gt;
&lt;br /&gt;
0.6.4: Categories drop-down bug fixed.  Preware category updated.&lt;br /&gt;
&lt;br /&gt;
0.6.2: Categories now work to some extent.  Still a bug in the dropdown box.&lt;br /&gt;
&lt;br /&gt;
0.6.1: Sorting by name or date is now available.  Application details screen is much more organised.&lt;br /&gt;
&lt;br /&gt;
0.6.0: No user visible changes.  Preparation for the secure informed user consent functionality.&lt;br /&gt;
&lt;br /&gt;
0.5.1: Filtering is now available on the list screens.  Just start typing ...&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
The Package Management Service does not yet fully handle postinst and prerm files (initial support is in alpha testing, but dependency handling for postinst and prerm still has to be added), so you will need to continue to use the [http://forums.precentral.net/homebrew-apps/194832-webos-quick-install.html WebOS Quick Install] tool to install advanced webos-internals packages that require commands to be run as the root user upon installation and removal.  This limitation will be removed before the 1.0.0 release, and Preware will then be able to install any webOS application - even those that previously required root access.&lt;br /&gt;
&lt;br /&gt;
=== Known bugs ===&lt;br /&gt;
&lt;br /&gt;
No known bugs.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
You do not need to access the Linux command line or &amp;quot;root your Pre&amp;quot; to install or use Preware.&lt;br /&gt;
&lt;br /&gt;
Note that you *must* use version 2.01 or later of WebOS Quick Install.  Verision 2.0 had a bug which causes the installation of the Package Management Service to fail, and Preware then hangs on the initial &amp;quot;Updating&amp;quot; screen.  A reinstallation with version 2.01 should fix that.&lt;br /&gt;
&lt;br /&gt;
Please use the [http://forums.precentral.net/homebrew-apps/194832-webos-quick-install.html WebOS Quick Install] tool to install the Package Manager Service and the Preware application.  You can find both of these in the WebOS Internals feed.  Make sure you install the Package Manager Service first and the Preware application second, otherwise you will need to reboot your Pre after installation. Do *NOT* install anything else at the same time as the service.&lt;br /&gt;
&lt;br /&gt;
No other application installer tool is sophisticated enough to install the custom Package Manager Service that Preware requires.&lt;br /&gt;
&lt;br /&gt;
Note that Preware works just as well on the Emulator as it does on a real device, and is installed in exactly the same way.&lt;br /&gt;
&lt;br /&gt;
=== Updating ===&lt;br /&gt;
&lt;br /&gt;
Follow the removal instructions below, then repeat the installation instructions above.  Preware will be able to update itself after the 1.0.0 version is released.&lt;br /&gt;
&lt;br /&gt;
=== Removal ===&lt;br /&gt;
&lt;br /&gt;
Please use the [http://forums.precentral.net/homebrew-apps/194832-webos-quick-install.html WebOS Quick Install] tool to remove Preware and the Package Manager Service (in that order).&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
&lt;br /&gt;
Preware is housed in the Applications section of the WebOS Internals git repository at http://gitorious.org/webos-internals/applications&lt;br /&gt;
&lt;br /&gt;
Source code for the Mojo app can be browsed at http://gitorious.org/webos-internals/applications/trees/master/preware&lt;br /&gt;
&lt;br /&gt;
Source code for the service can be browsed at http://gitorious.org/webos-internals/applications/trees/master/ipkgservice&lt;br /&gt;
&lt;br /&gt;
For commit permission to the project, contact rwhitby on #webos-internals or email [[mailto:support@webos-internals.org support@webos-internals.org]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Alternative Installation (ADVANCED/CLI Method)==&lt;br /&gt;
This method is for '''LINUX EXPERTS ONLY''' and depends on the ipkg.preware.org/feeds/webos-internals repository.  '''If you've already install [[Application:Terminal]] then please SKIP the first steps.'''&lt;br /&gt;
&lt;br /&gt;
=== Setting up the repository ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
sudo su&lt;br /&gt;
mount -o remount,rw /&lt;br /&gt;
mkdir -p /var/etc/ipkg/&lt;br /&gt;
ln -s /etc/ipkg/arch.conf /var/etc/ipkg/&lt;br /&gt;
echo &amp;quot;src/gz all http://ipkg.preware.org/feeds/webos-internals/all&amp;quot; &amp;gt; /var/etc/ipkg/preware.conf&lt;br /&gt;
echo &amp;quot;src/gz armv7 http://ipkg.preware.org/feeds/webos-internals/armv7&amp;quot; &amp;gt;&amp;gt; /var/etc/ipkg/preware.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing via IPKG ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/usr/bin/ipkg -o /var update&lt;br /&gt;
/usr/bin/ipkg -o /var install org.webosinternals.ipkgservice&lt;br /&gt;
/usr/bin/ipkg -o /var install org.webosinternals.preware&lt;br /&gt;
sh /var/usr/lib/ipkg/info/org.webosinternals.ipkgservice.postinst&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updating via IPKG ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
/usr/bin/ipkg -o /var update&lt;br /&gt;
/usr/bin/ipkg -o /var upgrade&lt;br /&gt;
sh /var/usr/lib/ipkg/info/org.webosinternals.ipkgservice.postinst&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4367</id>
		<title>EBook-Reader</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4367"/>
		<updated>2009-08-15T02:49:15Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Data Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Application description from a users perspective ===&lt;br /&gt;
Scene 1: Splash image and 3 buttons: [[Image: Scene1.png|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
.. Where I left off ... -- Opens the last book you read at the place you stopped. &lt;br /&gt;
&lt;br /&gt;
.. Bookmarks ... -- opens a list of the books you have bookmarks in and lets you open them to there. -- previews 2 lines above and below bookmark. &lt;br /&gt;
&lt;br /&gt;
... Library ... -- opens a scrollable page of &amp;quot;shelves&amp;quot; Each shelf has a label which is user defined, and each shelf presents the books on it as a coverflow. Books can be moved between shelves by dragging and dropping. Each shelf has a context menu to control order, title, author or user defined. If user defined menu will present shelf as a draggable list instead of a coverflow when you want to re-order books. backswipe returns to coverflow. &lt;br /&gt;
&lt;br /&gt;
in either the bookmarks view, tapping a book takes you to either the bookmark or the title page. upswipe downswipe provide smooth scrolling. Left and right swipe provide page at a time scrolling. Back swipe in gesture offers to bookmark with a dialog and returns to the shelf you came from. &lt;br /&gt;
&lt;br /&gt;
When on a book, top left menu presents presentation options, which can be set book by book or globally. Type face (if I can figure out how), size, leading, justification, colors etc.. &lt;br /&gt;
&lt;br /&gt;
Images default to no larger than 1/4 screen, but touch results in lightbox like zoom. &lt;br /&gt;
&lt;br /&gt;
Menu at splash or library offers import, and delete of books. When in a shelf, books can be deleted by dragging them to the recycle.&lt;br /&gt;
&lt;br /&gt;
===Features Wish List===&lt;br /&gt;
# on-pc conversion of various formats to pre-compatible format -probably using plucker distiller. Should support &lt;br /&gt;
## html&lt;br /&gt;
## rde&lt;br /&gt;
## doc&lt;br /&gt;
## m4b&lt;br /&gt;
## pdb (palm-doc)&lt;br /&gt;
## pdb (isilo), prc (unencrypted mobipocket)&lt;br /&gt;
## prc (encrypted) # lots of people with a ton of fictionwise books want this&lt;br /&gt;
## epub [http://en.wikipedia.org/wiki/EPUB]&lt;br /&gt;
## plain text&lt;br /&gt;
## plucker&lt;br /&gt;
## .lit&lt;br /&gt;
# on Pre conversion of html and text docs by download from the cloud. &lt;br /&gt;
# Library supports user definable catagories for sorting and shelving&lt;br /&gt;
#: Shelves can be user defined to hold any collection of books a reader cares to:  &lt;br /&gt;
#* By author&lt;br /&gt;
#* By Genre&lt;br /&gt;
#* By Geography&lt;br /&gt;
#* By cover color&lt;br /&gt;
#* By Series # very useful to group books in a series together&lt;br /&gt;
#: The ''user'' should define the sorting catagories. Shelf design can initially be a scroll list like the Contacts app.&lt;br /&gt;
# Book display page is minimally invasive making the most space available to read on as possible &lt;br /&gt;
# Typography is bifocal friendly. User definable print sizes, and if possible type faces. &lt;br /&gt;
# user defined foreground/background colors for text.&lt;br /&gt;
## Sepia &lt;br /&gt;
## Night mode&lt;br /&gt;
## Adjust screen brightness&lt;br /&gt;
# multiple bookmarks per doc. &lt;br /&gt;
# shallow menus&lt;br /&gt;
# smooth scrolling or page-at-a-time scrolling by gestures. &lt;br /&gt;
## plucker style button-based scrolling &lt;br /&gt;
## swipe gesture based scrolling&lt;br /&gt;
## auto-scrolling with user adjustable speed&lt;br /&gt;
### Pause auto-scrolling by tapping gesture area&lt;br /&gt;
# support for covers.&lt;br /&gt;
# coverflow view of shelves. &lt;br /&gt;
# easy rapid sorting of books onto shelves.&lt;br /&gt;
# Change text size&lt;br /&gt;
# Possibly be able to add books over Wi-Fi&lt;br /&gt;
# Copy &amp;amp; Paste words&lt;br /&gt;
## Dictionary search implemented&lt;br /&gt;
&lt;br /&gt;
===Data Structure=== &lt;br /&gt;
&lt;br /&gt;
'''Table: Catalog'''&lt;br /&gt;
* catalogId:   (globally unique ID - a system generated number) &lt;br /&gt;
* Title:  string&lt;br /&gt;
* Author: string&lt;br /&gt;
* Genre: string&lt;br /&gt;
* catalogType: (B,S - book or series)&lt;br /&gt;
* ShelfId:  &lt;br /&gt;
* CoverImage: Filename&lt;br /&gt;
* Encrypted: boolean &lt;br /&gt;
* Format: string (book format)&lt;br /&gt;
&lt;br /&gt;
'''Table: BookSeries'''&lt;br /&gt;
* bookseriesId:   (globally unique ID - a system generated number) &lt;br /&gt;
* catSeriesId:   (must be present in book table and the catType must be 'S')&lt;br /&gt;
* catBookId:   (must be present in book table and the catType must be 'B')&lt;br /&gt;
&lt;br /&gt;
'''Table: Bookmarks'''&lt;br /&gt;
* bkmkId: &lt;br /&gt;
* bookId:   (must be present in book table)&lt;br /&gt;
* Position:   ( an integer, refering to the character in the file at the top of the screen.) &lt;br /&gt;
&lt;br /&gt;
'''Table: BookShelf'''&lt;br /&gt;
* shelfId: &lt;br /&gt;
* ShelfName:&lt;br /&gt;
* ShelfOrder: (A, T, or U)  Representing Author, Title or User Set&lt;br /&gt;
&lt;br /&gt;
'''Table ShelfOrder'''&lt;br /&gt;
* shelfId:&lt;br /&gt;
* bookId: &lt;br /&gt;
* position:  (integer representing the position of this book on this shelf) &lt;br /&gt;
&lt;br /&gt;
'''Table: BookText'''&lt;br /&gt;
* BookId: &lt;br /&gt;
* BookText: &lt;br /&gt;
&lt;br /&gt;
====Data Issues====&lt;br /&gt;
&lt;br /&gt;
* This structure does not provide for books stored as chapters.  This structure presumes a book is a single document.  That document might have internal chapter indicators, but this structure does not divide the book up. &lt;br /&gt;
* This structure makes no provision for the internal storage of images. &lt;br /&gt;
* Should we actually store the text of the book in the DB or do we leave the book on the file system and just store a link to it?&lt;br /&gt;
&lt;br /&gt;
There is some point, therefore to consider if in booktext, we want to simply store a plucker file, which CAN contain images and text intermingled.&lt;br /&gt;
&lt;br /&gt;
====Book Format Issues====&lt;br /&gt;
* Can javascript on the device natively parse/navigate all of the above list formats?&lt;br /&gt;
** '''No.''' &lt;br /&gt;
* Can javascript on the device effectively parse/navigate the plucker format (if we settle on this one), or do we need our own format?&lt;br /&gt;
** '''Perhaps.'''  plucker decoding sources in JAVA at  http://www.fbreader.org/downloads.php  &lt;br /&gt;
** Possible ePub since it's basically XHTML?&lt;br /&gt;
* Once we settle on a format, will the device be powerful enough to convert other formats to this one, or will we need a PC app to do the converting?&lt;br /&gt;
** on pc app&lt;br /&gt;
** some scripts found so far: ereader2html, pdbshred &lt;br /&gt;
** (include others as you find them)&lt;br /&gt;
* Has anyone found a free and open source method to unzip files or data streams in javascript??&lt;br /&gt;
** all i have found is a page that refers to the huffman compression technique (http://rumkin.com/tools/compression/compress_huff.php), but i don't know if that is how epub files are zipped and i don't know if we can get our hands on the source.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4320</id>
		<title>EBook-Reader</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4320"/>
		<updated>2009-08-13T06:11:23Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Features Wish List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Application description from a users perspective ===&lt;br /&gt;
Scene 1: Splash image and 3 buttons: &lt;br /&gt;
&lt;br /&gt;
.. Where I left off ... -- Opens the last book you read at the place you stopped. &lt;br /&gt;
&lt;br /&gt;
.. Bookmarks ... -- opens a list of the books you have bookmarks in and lets you open them to there. -- previews 2 lines above and below bookmark. &lt;br /&gt;
&lt;br /&gt;
... Library ... -- opens a scrollable page of &amp;quot;shelves&amp;quot; Each shelf has a label which is user defined, and each shelf presents the books on it as a coverflow. Books can be moved between shelves by dragging and dropping. Each shelf has a context menu to control order, title, author or user defined. If user defined menu will present shelf as a draggable list instead of a coverflow when you want to re-order books. backswipe returns to coverflow. &lt;br /&gt;
&lt;br /&gt;
in either the bookmarks view, tapping a book takes you to either the bookmark or the title page. upswipe downswipe provide smooth scrolling. Left and right swipe provide page at a time scrolling. Back swipe in gesture offers to bookmark with a dialog and returns to the shelf you came from. &lt;br /&gt;
&lt;br /&gt;
When on a book, top left menu presents presentation options, which can be set book by book or globally. Type face (if I can figure out how), size, leading, justification, colors etc.. &lt;br /&gt;
&lt;br /&gt;
Images default to no larger than 1/4 screen, but touch results in lightbox like zoom. &lt;br /&gt;
&lt;br /&gt;
Menu at splash or library offers import, and delete of books. When in a shelf, books can be deleted by dragging them to the recycle. &lt;br /&gt;
&lt;br /&gt;
===Features Wish List===&lt;br /&gt;
# on-pc conversion of various formats to pre-compatible format -probably using plucker distiller. Should support &lt;br /&gt;
## html&lt;br /&gt;
## rde&lt;br /&gt;
## doc&lt;br /&gt;
## pdb (palm-doc)&lt;br /&gt;
## pdb (isilo), prc (unencrypted mobipocket)&lt;br /&gt;
## prc (encrypted) # lots of people with a ton of fictionwise books want this&lt;br /&gt;
## epub [http://en.wikipedia.org/wiki/EPUB]&lt;br /&gt;
## plain text&lt;br /&gt;
## plucker&lt;br /&gt;
# on Pre conversion of html and text docs by download from the cloud. &lt;br /&gt;
# Library supports user definable catagories for sorting and shelving&lt;br /&gt;
#: Shelves can be user defined to hold any collection of books a reader cares to:  &lt;br /&gt;
#* By author&lt;br /&gt;
#* By Genre&lt;br /&gt;
#* By Geography&lt;br /&gt;
#* By cover color&lt;br /&gt;
#* By Series # very useful to group books in a series together&lt;br /&gt;
#: The ''user'' should define the sorting catagories. Shelf design can initially be a scroll list like the Contacts app.&lt;br /&gt;
# Book display page is minimally invasive making the most space available to read on as possible &lt;br /&gt;
# Typography is bifocal friendly. User definable print sizes, and if possible type faces. &lt;br /&gt;
# user defined foreground/background colors for text. &lt;br /&gt;
## Night mode&lt;br /&gt;
# multiple bookmarks per doc. &lt;br /&gt;
# shallow menus&lt;br /&gt;
# smooth scrolling or page-at-a-time scrolling by gestures. &lt;br /&gt;
## plucker style button-based scrolling &lt;br /&gt;
## swipe gesture based scrolling&lt;br /&gt;
## auto-scrolling with user adjustable speed&lt;br /&gt;
# support for covers.&lt;br /&gt;
# coverflow view of shelves. &lt;br /&gt;
# easy rapid sorting of books onto shelves.&lt;br /&gt;
&lt;br /&gt;
===Data Structure=== &lt;br /&gt;
&lt;br /&gt;
'''Table: Catalog'''&lt;br /&gt;
Title:  string&lt;br /&gt;
Author: string&lt;br /&gt;
Shelfguid:  &lt;br /&gt;
CoverImage: Filename&lt;br /&gt;
guid:   (globally unique ID - a system generated number) &lt;br /&gt;
&lt;br /&gt;
'''Table: Bookmarks'''&lt;br /&gt;
guid: &lt;br /&gt;
Position:   ( an integer, refering to the character in the file at the top of the screen.) &lt;br /&gt;
&lt;br /&gt;
'''Table: Shelves'''&lt;br /&gt;
guid: &lt;br /&gt;
ShelfName:&lt;br /&gt;
Shelving Order: (A, T, or U)  Representing Author, Title or User Set&lt;br /&gt;
&lt;br /&gt;
'''Table ShelfOrder'''&lt;br /&gt;
Shelfguid:&lt;br /&gt;
Bookguid: &lt;br /&gt;
Position:  (integer representing the position of this book on this shelf) &lt;br /&gt;
&lt;br /&gt;
'''Table: BookText'''&lt;br /&gt;
BookGuid: &lt;br /&gt;
BookText: &lt;br /&gt;
&lt;br /&gt;
====Data Issues====&lt;br /&gt;
&lt;br /&gt;
* This structure does not provide for books stored as chapters.  This structure presumes a book is a single document.  That document might have internal chapter indicators, but this structure does not divide the book up. &lt;br /&gt;
* This structure makes no provision for the internal storage of images. &lt;br /&gt;
&lt;br /&gt;
There is some point, therefore to consider if in booktext, we want to simply store a plucker file, which CAN contain images and text intermingled.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:EBook-Reader&amp;diff=4319</id>
		<title>Talk:EBook-Reader</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:EBook-Reader&amp;diff=4319"/>
		<updated>2009-08-13T06:08:24Z</updated>

		<summary type="html">&lt;p&gt;Jho: add commentary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I do not really care for coverflow (as it might slow things down). What I would love is an effective, bare bones way to read books. I am still using the treo 700p to read books via ereader.&lt;br /&gt;
&lt;br /&gt;
Next, the cloud thing can be deferred. the shortcovers app is very bad IMO and I tend to read books where network access may not be possible i.e. plane, train etc.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4318</id>
		<title>EBook-Reader</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=EBook-Reader&amp;diff=4318"/>
		<updated>2009-08-13T06:06:06Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Features Wish List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Application description from a users perspective ===&lt;br /&gt;
Scene 1: Splash image and 3 buttons: &lt;br /&gt;
&lt;br /&gt;
.. Where I left off ... -- Opens the last book you read at the place you stopped. &lt;br /&gt;
&lt;br /&gt;
.. Bookmarks ... -- opens a list of the books you have bookmarks in and lets you open them to there. -- previews 2 lines above and below bookmark. &lt;br /&gt;
&lt;br /&gt;
... Library ... -- opens a scrollable page of &amp;quot;shelves&amp;quot; Each shelf has a label which is user defined, and each shelf presents the books on it as a coverflow. Books can be moved between shelves by dragging and dropping. Each shelf has a context menu to control order, title, author or user defined. If user defined menu will present shelf as a draggable list instead of a coverflow when you want to re-order books. backswipe returns to coverflow. &lt;br /&gt;
&lt;br /&gt;
in either the bookmarks view, tapping a book takes you to either the bookmark or the title page. upswipe downswipe provide smooth scrolling. Left and right swipe provide page at a time scrolling. Back swipe in gesture offers to bookmark with a dialog and returns to the shelf you came from. &lt;br /&gt;
&lt;br /&gt;
When on a book, top left menu presents presentation options, which can be set book by book or globally. Type face (if I can figure out how), size, leading, justification, colors etc.. &lt;br /&gt;
&lt;br /&gt;
Images default to no larger than 1/4 screen, but touch results in lightbox like zoom. &lt;br /&gt;
&lt;br /&gt;
Menu at splash or library offers import, and delete of books. When in a shelf, books can be deleted by dragging them to the recycle. &lt;br /&gt;
&lt;br /&gt;
===Features Wish List===&lt;br /&gt;
# on-pc conversion of various formats to pre-compatible format -probably using plucker distiller. Should support &lt;br /&gt;
## html&lt;br /&gt;
## rde&lt;br /&gt;
## doc&lt;br /&gt;
## pdb (palm-doc)&lt;br /&gt;
## pdb (isilo), prc (unencrypted mobipocket)&lt;br /&gt;
## prc (encrypted) # lots of people with a ton of fictionwise books want this&lt;br /&gt;
## epub [http://en.wikipedia.org/wiki/EPUB]&lt;br /&gt;
## plain text&lt;br /&gt;
## plucker&lt;br /&gt;
# on Pre conversion of html and text docs by download from the cloud. &lt;br /&gt;
# Library supports user definable catagories for sorting and shelving&lt;br /&gt;
#: Shelves can be user defined to hold any collection of books a reader cares to:  &lt;br /&gt;
#* By author&lt;br /&gt;
#* By Genre&lt;br /&gt;
#* By Geography&lt;br /&gt;
#* By cover color.  &lt;br /&gt;
#: The ''user'' should define the sorting catagories.  &lt;br /&gt;
# Book display page is minimally invasive making the most space available to read on as possible &lt;br /&gt;
# Typography is bifocal friendly. User definable print sizes, and if possibletype faces. &lt;br /&gt;
# user defined forground/background colors for text. &lt;br /&gt;
## Night mode&lt;br /&gt;
# multiple bookmarks per doc. &lt;br /&gt;
# shallow menus&lt;br /&gt;
# smooth scrolling or page-at-a-time scrolling by gestures. &lt;br /&gt;
## plucker style button-based scrolling &lt;br /&gt;
## swipe gesture based scrolling&lt;br /&gt;
## auto-scrolling with user adjustable speed&lt;br /&gt;
# support for covers.&lt;br /&gt;
# coverflow view of shelves. &lt;br /&gt;
# easy rapid sorting of books onto shelves.&lt;br /&gt;
&lt;br /&gt;
===Data Structure=== &lt;br /&gt;
&lt;br /&gt;
'''Table: Catalog'''&lt;br /&gt;
Title:  string&lt;br /&gt;
Author: string&lt;br /&gt;
Shelfguid:  &lt;br /&gt;
CoverImage: Filename&lt;br /&gt;
guid:   (globally unique ID - a system generated number) &lt;br /&gt;
&lt;br /&gt;
'''Table: Bookmarks'''&lt;br /&gt;
guid: &lt;br /&gt;
Position:   ( an integer, refering to the character in the file at the top of the screen.) &lt;br /&gt;
&lt;br /&gt;
'''Table: Shelves'''&lt;br /&gt;
guid: &lt;br /&gt;
ShelfName:&lt;br /&gt;
Shelving Order: (A, T, or U)  Representing Author, Title or User Set&lt;br /&gt;
&lt;br /&gt;
'''Table ShelfOrder'''&lt;br /&gt;
Shelfguid:&lt;br /&gt;
Bookguid: &lt;br /&gt;
Position:  (integer representing the position of this book on this shelf) &lt;br /&gt;
&lt;br /&gt;
'''Table: BookText'''&lt;br /&gt;
BookGuid: &lt;br /&gt;
BookText: &lt;br /&gt;
&lt;br /&gt;
====Data Issues====&lt;br /&gt;
&lt;br /&gt;
* This structure does not provide for books stored as chapters.  This structure presumes a book is a single document.  That document might have internal chapter indicators, but this structure does not divide the book up. &lt;br /&gt;
* This structure makes no provision for the internal storage of images. &lt;br /&gt;
&lt;br /&gt;
There is some point, therefore to consider if in booktext, we want to simply store a plucker file, which CAN contain images and text intermingled.&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Applying_Patches&amp;diff=3095</id>
		<title>Applying Patches</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Applying_Patches&amp;diff=3095"/>
		<updated>2009-07-30T06:53:57Z</updated>

		<summary type="html">&lt;p&gt;Jho: /* Getting Authenticated with gitorious.org */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
We cannot legally redistribute Palm source code (it is copyrighted code, and is not released under an open source license) therefor we need to manage our modifications as patches. Since these patches will come from many different places, and will need to be removed before each OTA update and then reapplied after-wards, we need a procedure and tools for doing this. This page documents this procedure.&lt;br /&gt;
&lt;br /&gt;
==Setup Procedure (Scripted)==&lt;br /&gt;
The process of setting up quilt has been scripted.  The script performs the following actions:&lt;br /&gt;
* Installs (or upgrades) git and any dependencies&lt;br /&gt;
* Installs quilt (or upgrades) and any dependencies&lt;br /&gt;
* Configures quilt to store patches in /opt/src/patches&lt;br /&gt;
* Creates (or updates) a local clone of the webos-internals modifications repository&lt;br /&gt;
&lt;br /&gt;
Each step is only performed if necessary.  Please note that ipkg-opt needs to be installed.  The instructions are found [[Next_steps|here]].&lt;br /&gt;
&lt;br /&gt;
To get run the script, log into your Pre, gain root privileges and run the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/quilt-bootstrap.sh&lt;br /&gt;
 sh quilt-bootstrap.sh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup Procedure (Manual Process)==&lt;br /&gt;
(Note: Even though you may have previously installed the optware quilt patch manager, it won't damage anything to follow the Setup procedure. Alternatively, if you KNOW FOR SURE these are installed and your packages are up-to-date, you can skip to Importing and Applying Patches).&lt;br /&gt;
&lt;br /&gt;
* Log into your Pre, and gain root privileges. (Note: This command is not required when using the emulator)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -i # Yes, the -i is important. &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Put your Pre in to Read Write Mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mount -o remount,rw /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Ensure that you are set up for optware package installations, and make sure you have the latest package index:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt update&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install the 'quilt packages, which will be used to manage the patches you apply, and the 'git' package, which will be used to download existing patches from the modifications repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt install quilt git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(If you already have those packages installed, repeating this step will not cause any harm.)&lt;br /&gt;
&lt;br /&gt;
* Create a directory in which 'quilt' will manage your chosen modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir -p /opt/src/patches&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Edit /opt/etc/quilt.quiltrc to point quilt to that directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sed -ire 's|^[\s#]*QUILT_PATCHES=.*|QUILT_PATCHES=/opt/src/patches|' /opt/etc/quilt.quiltrc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Clone the webos-internals modifications repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src&lt;br /&gt;
git clone git://gitorious.org/webos-internals/modifications.git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Importing and Applying Patches==&lt;br /&gt;
&lt;br /&gt;
* Ensure your list of modifications is up to date&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
git pull&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
** If you find yourself getting errors when you try to pull with the above command then you will need to modify your .git/config file&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo vi /opt/src/modifications/.git/config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** Your [master] section should look like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[branch &amp;quot;master&amp;quot;]&lt;br /&gt;
        remote = origin&lt;br /&gt;
        merge = refs/heads/master   &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Browse the set of available patches.  Each patch should have a description at the top.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
find /opt/src/modifications -name *.patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Choose a patch from the modifications repository and import it into your own patches directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt import /opt/src/modifications/application_name/patch_name.patch   # Note that you need to replace application_name and patch_name here.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Verify that quilt has imported the patch successfully:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# You should still be in the / directory to run quilt.&lt;br /&gt;
quilt series  # you should see your patch listed in here&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Instruct quilt to apply your patch&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# You should still be in the / directory to run quilt.&lt;br /&gt;
quilt push&lt;br /&gt;
# Use this to push all patches at once.&lt;br /&gt;
quilt push -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If everything worked correctly, the patch should now be applied.  You will usually need to restart the luna service on the Pre to see the effect of patches to applications. Here's how to initiate a rescan.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn't work, try a service restart with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
stop LunaSysMgr &amp;amp;&amp;amp; start LunaSysMgr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if all else fails, simply reboot:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
reboot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Removing all patches==&lt;br /&gt;
&lt;br /&gt;
Before you accept an OTA update, you should remove any patches you have applied.  Luckily, using quilt makes this very easy.&lt;br /&gt;
&lt;br /&gt;
* Remove all patches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt pop -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reapplying all patches==&lt;br /&gt;
&lt;br /&gt;
After your OTA update is complete, you will want to reapply any patches you have selected. This may or may not go smoothly.&lt;br /&gt;
&lt;br /&gt;
* Apply all patches:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt push -a&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Put your Pre back in to Read Only mode&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mount -o remount,ro /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Information for developing patches==&lt;br /&gt;
&lt;br /&gt;
===Getting Authenticated with gitorious.org===&lt;br /&gt;
Before you can commit to gitorious you need to [http://gitorious.org/users/new create an account]. &lt;br /&gt;
&lt;br /&gt;
Next you'll need to generate a public key and share that with gitorious.org, your public key is how gitorious.org authenticates you and checks if have the permissions required to do a commit to a given repository.&lt;br /&gt;
&lt;br /&gt;
Getting your key on windows&lt;br /&gt;
* Download [*http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTYgen] and [*http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Pageant]&lt;br /&gt;
&lt;br /&gt;
--Gitorious.org [http://gitorious.org/about/faq gitorious.org recommends] you use [http://code.google.com/p/msysgit/ msysGit].--&lt;br /&gt;
&lt;br /&gt;
* On Windows use [*http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTYgen] to generate a public/private key pair. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Key -&amp;gt; SSH-2 RSA KEY&lt;br /&gt;
Key -&amp;gt; Generate key pair&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
After some wiggling of the mouse your keys will be generated.  You should fill in the //Key passphrase// and it's confirmation to secure you key.  Save off the public and private key pairs to your user folder.&lt;br /&gt;
&lt;br /&gt;
* After which you will need to run [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Pageant] on your pc. Pageant holds your private key in memory for PuTTY to use.&lt;br /&gt;
&lt;br /&gt;
* To commit changes to gitorious.org from the pre you will need to install openssh on the device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ipkg-opt update&lt;br /&gt;
ipkg-opt install openssh # since dropbear doesn't do agent forwarding, you need to use openssh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Actually, it is possible to use dropbear with git but requires [http://tumblelog.jauderho.com/post/151678345/using-dropbear-with-git some hackery].&lt;br /&gt;
&lt;br /&gt;
As an alternative, if you don't use the keys for anything else you could just generate them on the pre after installing open-ssh&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo ssh-keygen -t rsa # follow the prompts&lt;br /&gt;
cat ~/.ssh/id_rsa.pub  # display the public key you need to paste into gitorious&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Don't forget to upload your public key to gitorious.org after generating it.&lt;br /&gt;
Now you should be able to follow the steps below and contribute your code to gitorious.org.&lt;br /&gt;
&lt;br /&gt;
* If you find yourself getting errors about your public key when you try to push changes, check to make sure your keys are under /var/home/root/.ssh/ and not under your regular user account.&lt;br /&gt;
&lt;br /&gt;
===Creating a patch===&lt;br /&gt;
&lt;br /&gt;
* Before making any changes to files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd / # It is *very* important to be in the / directory when you run quilt.&lt;br /&gt;
quilt new patch_name.patch&lt;br /&gt;
quilt add /usr/palm/applications/com.palm.app.appYouWantToMod/app/controllers/mod-assistant.js&lt;br /&gt;
quilt add /usr/palm/applications/com.palm.app.appYouWantToMod/app/controllers/mod2-assistant.js&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Now you can make changes on the Pre using vi/nano/joe/whatever, or sftp files to your machine and make changes.  Make sure any file you change has been added in the above step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
quilt files # view files that are being tracked&lt;br /&gt;
quilt header -e  # add a header to the patch to describe it (please do this!)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Once you are finished and ready to create a patch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
quilt refresh # this will create/update the /opt/src/patches/patch_name.patch file&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Pushing the change back to gitorious.org===&lt;br /&gt;
&lt;br /&gt;
* copy the patch into the modification tree you cloned above&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir /opt/src/modifications/application_name # You need to change application_name to the leaf of the palm application id.&lt;br /&gt;
cp /opt/src/patches/patch_name.patch /opt/src/modifications/application_name/patch_name.patch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Identify yourself in git (use the user you have setup at gitorious.org)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
git config --global user.name &amp;quot;user&amp;quot;&lt;br /&gt;
git config --global user.email &amp;quot;youremail@example.com&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Commit your changes to your local git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git add application_name/patch_name.patch&lt;br /&gt;
git commit&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Since we did a clone the first time, we need to recreate the origin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git remote rm origin # (if you did a clone, we have to replace the origin)&lt;br /&gt;
git remote add origin git@gitorious.org:webos-internals/modifications.git&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, push your changes up to gitorious.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git push origin master # first time&lt;br /&gt;
git push # any future pushes&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If the push does not work, try to debug the ssh connection&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/opt/bin/ssh -v git@gitorious.org&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extended, annotated sample session with quilt==&lt;br /&gt;
* First, we just need to setup a file to muck with&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# cd /&lt;br /&gt;
root@castle:/# echo &amp;quot;Original file&amp;quot; &amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;2nd lien&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;3rd ilne&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
root@castle:/# echo &amp;quot;last line&amp;quot; &amp;gt;&amp;gt; /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Start a new patch (normally you'll want to use patch_name.patch, I just wanted a shortened name)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt new p1&lt;br /&gt;
Patch /opt/src/patches/p1 is now on top&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* You must quilt add any files that you are going to edit or create '''before''' you edit or create them.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt add /usr/test&lt;br /&gt;
File /usr/test added to patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just using sed to correct the spelling on the 2nd line&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# sed -i -e 's/lien/line/' /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* quilt refresh actually finds what you have changed and writes it to the patch file  (at this point, you can use git to push your changes)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just for fun, let's do it again&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt new p2&lt;br /&gt;
Patch /opt/src/patches/p2 is now on top&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Again, add file, make some changes, refresh to update the patch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt add /usr/test&lt;br /&gt;
File /usr/test added to patch /opt/src/patches/p2&lt;br /&gt;
root@castle:/# sed -i -e 's/ilne/line/' /usr/test&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Just an example of rolling back changes&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt pop&lt;br /&gt;
Removing patch /opt/src/patches/p2&lt;br /&gt;
Restoring usr/test&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/p1&lt;br /&gt;
root@castle:/# quilt pop&lt;br /&gt;
Removing patch /opt/src/patches/p1&lt;br /&gt;
Restoring usr/test&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/enable-browser-downloads.patch&lt;br /&gt;
root@castle:/# cat /usr/test&lt;br /&gt;
Original file&lt;br /&gt;
2nd lien&lt;br /&gt;
3rd ilne&lt;br /&gt;
last line&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* delete will delete the patch from your series, but leave the actual patch file in /opt/src/patches (so you could import it later)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt delete p1&lt;br /&gt;
Removed patch /opt/src/patches/p1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Since we removed p1, push will now apply p2.  However, since p2 was applied against p1 originally, p2 will report an error. If the changes are too significant, you can force with -f, but you should carefully inspect the resulting files.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt push&lt;br /&gt;
Applying patch /opt/src/patches/p2&lt;br /&gt;
patching file usr/test&lt;br /&gt;
Hunk #1 succeeded at 1 with fuzz 2.&lt;br /&gt;
&lt;br /&gt;
Now at patch /opt/src/patches/p2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If we want, we can refresh the patch so that future users of the patch do not receive the &amp;quot;fuzz&amp;quot; warning.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# quilt refresh&lt;br /&gt;
Refreshed patch /opt/src/patches/p2&lt;br /&gt;
root@castle:/# cat /usr/test&lt;br /&gt;
Original file&lt;br /&gt;
2nd lien&lt;br /&gt;
3rd line&lt;br /&gt;
last line&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* cleanup&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# rm /usr/test&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Background info==&lt;br /&gt;
&lt;br /&gt;
* [http://pkg-perl.alioth.debian.org/howto/quilt.html quilt]&lt;br /&gt;
&lt;br /&gt;
==Script for Updating/Installing Patches==&lt;br /&gt;
&lt;br /&gt;
I just wanted to share the following script that I just finished testing out.  It's only been tested on my Pre so far, as I don't have access to any others..  It just updates the patch list, prints out available patches, then lets you choose which to apply.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/src/modifications&lt;br /&gt;
tput clear&lt;br /&gt;
echo Updating list...&lt;br /&gt;
git pull&lt;br /&gt;
tput clear&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
a=0&lt;br /&gt;
for inputline in $(find /opt/src/modifications -name *.patch | sort)&lt;br /&gt;
do&lt;br /&gt;
 a=$(($a+1));&lt;br /&gt;
 line=&amp;quot;$(echo $inputline)&amp;quot;&lt;br /&gt;
 MYARRAY[$a]=&amp;quot;$line&amp;quot;&lt;br /&gt;
 echo &amp;quot;${a}${line}&amp;quot; | awk -F &amp;quot;/&amp;quot; 'sub(&amp;quot;.patch&amp;quot;,&amp;quot;&amp;quot;,$6) {printf &amp;quot;%-3s %-15s %s\n&amp;quot;, $1, $5, $6}'&lt;br /&gt;
done&lt;br /&gt;
echo &amp;quot;q   quit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
x=$(($a+1));&lt;br /&gt;
until [ -n &amp;quot;$opt&amp;quot; ] ; do&lt;br /&gt;
 read -p &amp;quot;Enter the line number for patch to apply [1 - $a] &amp;quot; opt&lt;br /&gt;
 if [ &amp;quot;$opt&amp;quot; = &amp;quot;q&amp;quot; ] ; then&lt;br /&gt;
  exit 0&lt;br /&gt;
 fi&lt;br /&gt;
 if [ &amp;quot;$opt&amp;quot; -lt &amp;quot;$x&amp;quot; 2&amp;gt; /dev/null ] &amp;amp;&amp;amp; [ &amp;quot;$opt&amp;quot; -gt 0 2&amp;gt; /dev/null ] ; then&lt;br /&gt;
  true&lt;br /&gt;
 else&lt;br /&gt;
  opt=&amp;quot;&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
tput clear&lt;br /&gt;
cd /&lt;br /&gt;
quilt import ${MYARRAY[$opt]}&lt;br /&gt;
quilt push&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jho</name></author>
	</entry>
</feed>