Yet Another Blog

September 19, 2008

PHC-Control in Debian Lenny

Filed under: computer, linux, Software — Tags: , , , , , , — guilleml @ 5:42 pm

To build your own module for undervolting your CPU you’ll need some files:

linux-phc-0.3.1 from https://sourceforge.net/projects/linux-phc/

linux-source and headers from aptitude:

aptitude install build-essential linux-source-2.6.26 linux-headers-2.6.24-1-amd64

Go to /usr/src and untar the linux source:

tar xvfj linux-source-2.6.26.tar.bz2

Apply the patch and build the module:

cd linux-source-2.6.26

cp /boot/config-2.6.26-1-amd64 .config

cp /usr/src/linux-headers-2.6.26-1-amd64/Module.symvers /usr/src/linux-source-2.6.26

patch -p1 < linux-phc-0.3.1-kernel-vanilla-2.6.26rc8.patch

make oldconfig

make prepare

make scripts

make M=./arch/x86/kernel/cpu/cpufreq

mv /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

mv /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko \
/lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

cp /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/

And that’s all

Edit: Thanks to Andrew for the correction, there was an error I made writing the commands to the blog.

Advertisements

2 Comments »

  1. Shouldn’t the next-to-last line be as follows?

    mv /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko \
    /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

    Comment by Andrew — January 29, 2009 @ 5:10 pm

  2. Thank you, you are right.

    Comment by guilleml — February 4, 2009 @ 9:53 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: