
Originally Posted by
Skull One
Your comments are out of date, now. For previous version of BB, you were correct - the maximum CPU scaling speed was hard-coded into the
/system/xbin/pete script. Customized copies of that script were distributed with the bekit kernels recommended with BB. That's why ONLY the recommended kernels went the right speed. But again, this is no longer the case as of BB 0.2.
BB 0.2 Froyo uses
/system/etc/install-recovery.sh as a startup script. Inside the startup script it sets the
scaling_max_freq value (in the /sys virtual filesystem). It sets it to the value found in
cpuinfo_max_freq (also found in the /sys virtual filesystem).
What this means is that on boot, it DOES set the speed to the maximum value supported by your kernel on boot - regardless of what kernel you have! The
/sys virtual filesystem is like a window into the kernel. Some of the virtual files in there are designed for reading values from, some are designed for writing values, and some can do both. In this case, you are reading the maximum supported cpu speed in the
cpuinfo_max_freq file and writing that to the
scaling_max_freq file to select that speed. Without having to modify that startup script, you can flash a new kernel and rest assured that when you boot back up, you will be running at your new maximum speed!
NOTE: There IS still a problem! Your MINIMUM speed is still being hard-coded to 250Mhz. If you install a kernel that does not have a 250Mhz slot, all bets are off as to what your minimum speed will be set to.
I wrote a setspeed script to allow simple modification of speed both immediately and persistent between reboots, compatible with the latest releases of BB Froyo (0.1, 0.2 and 0.2.1). See it in another thread in this subforum.