| Juanito  
 
  
 
 
 Group: Members
 Posts: 1601
 Joined: Sep. 2005
 | 
|  | Posted: Dec. 08 2006,14:33 |  |  Finally, I got there - thanks to all who helped - unfortunately, it seems that in 2.4.26 I will have to be content with the p4-clockmod module for cpufreq rather than the speedstep-centrino module. Anyway, here's how to do this for anybody that might be interested.
 
 Materials required:
 
 Download gcc-2.95.dsl, gcc1-with-libs.dsl & gnu-utils.dsl from the DSL repository
 Download linux-2.4.26.tar.gz from "www.kernel.org" or mirror sites
 Obtain knoppix 3.4 kernel patch and .config
 Download cpufreq-LINUX_2_4-20040813.tar.gz from http://ftp.linux.org.uk/pub/linux/cpufreq/
 Make a copy of the instructions for fixing the broken 2.4.26 drmP.h file at http://lkml.org/lkml/2004/4/19/202
 
 load required dsl packages:
 
 # mydsl-load /path-to-file/gcc-2.95.dsl
 # mydsl-load /path-to-file/gcc1-with-libs.dsl
 # mydsl-load /path-to-file/gnu-utils.dsl
 
 Create a directory for the kernel sources owned by user dsl:
 
 # mkdir /ramdisk/kernelsource
 # chown dsl /ramdisk/kernelsource
 
 Copy the kernel sources to the new directory and un-pack them:
 
 # cp /path-to-file/linux-2.4.26.tar.gz /ramdisk/kernelsource
 # cd /ramdisk/kernelsource
 # tar -xzvf linux-2.4.26.tar.gz -C /ramdisk/kernelsource
 # rm linux-2.4.26.tar.gz
 
 Apply the knoppix patch to the kernel sources:
 
 # cd /ramdisk/kernelsource
 # patch -p1 -d linux-2.4.26 < knoppix-kernel.patch
 
 Copy the cpufreq patch to the new directory, unpack it and patch:
 
 # cp /path-to-file/cpufreq-LINUX_2_4-20040813.tar.gz /ramdisk/kernelsource
 # tar -xzvf cpufreq-LINUX_2_4-20040813.tar.gz -C /ramdisk/kernelsource
 # rm cpufreq-LINUX_2_4-20040813.tar.gz
 # cd /ramdisk/kernelsource/cpufreq
 # ./patchin.sh /usr/src/linux-2.4.26
 
 Modify the drmP.h file as per instructions and overwrite broken file in kernel sources:
 
 # cp -f /path-to-file/drmP.h /ramdisk/kernelsource/linux-2.4.26/drivers/char/drm
 
 Prepare sources for re-compilation:
 
 # cd /ramdisk/kernelsource/linux-2.4.26
 # make mrproper
 
 Overwrite the default configuration with the knoppix kernel configuration and select the required cpufreq options for your cpu:
 
 # cp -f /path-to-file/.config /ramdisk/kernelsource/linux-2.4.26/arch/i386/defconfig
 # make oldconfig
 
 #
 # CPU Frequency scaling
 #
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_TABLE=y
 CONFIG_CPU_FREQ_PROC_INTF=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_24_API=y
 # CONFIG_X86_POWERNOW_K6 is not set
 # CONFIG_X86_POWERNOW_K7 is not set
 # CONFIG_X86_POWERNOW_K8 is not set
 # CONFIG_X86_LONGHAUL is not set
 # CONFIG_X86_SPEEDSTEP_PIIX4 is not set
 # CONFIG_X86_SPEEDSTEP_SMI is not set
 # CONFIG_X86_SPEEDSTEP_ICH is not set
 # CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 CONFIG_X86_P4_CLOCKMOD=m
 # CONFIG_X86_LONGRUN is not set
 # CONFIG_X86_GX_SUSPMOD is not set
 
 Build dependencies and cleanup:
 
 # make dep
 # make clean
 
 Build kernel boot image, copy to the root directory of your USB stick & make rw:
 
 # make bzImage
 # make install
 # cp /boot/vmlinuz-2.4.26 /path-to-boot-usb-root-dir/vmlinuz
 # rdev -R /path-to-boot-usb-root-dir/vmlinuz 0
 
 Build new cpufreq module and save it:
 
 # make modules
 # make modules_install
 # cp /lib/modules/2.4.26/kernel/arch/i386/kernel/p4-clockmod.o /path-to-safe-place
 
 Reboot chosing vmlinuz at boot prompt, install new module and get setup:
 
 # cp /path-to-safe-place/p4-clockmod.o /lib/modules/2.4.26/kernel/arch/i386/kernel
 # insmod p4-clockmod
 # apt-get install acpid [Debian stable]
 # apt-get install cpufreqd
 
 Modify /etc/cpufreqd.conf to your taste then check things work:
 
 # cat /proc/cpufreq
 minimum CPU frequency  -  maximum CPU frequency  -  policy
 CPU  0       199354 kHz ( 12 %)  -    1594837 kHz (100 %)  -  performance
 
 # cpufreqd -V5 -D
 parse_config(): Rule "conservative" has Profile "lo_boost"
 parse_config(): Rule "lo_cpu_boost" has Profile "medium_boost"
 parse_config(): Rule "hi_cpu_boost" has Profile "medium_boost"
 parse_config(): Rule "AC_on" has Profile "hi_boost"
 Starting operations.
 libsys_init(): ACPICA version 20040326
 set_policy(): 66%100%performance - profile name: hi_boost.
 main_loop(): profile set "hi_boost" for rule "AC_on".
 
 [remove power cord]
 
 set_policy(): 0%33%performance - profile name: lo_boost.
 main_loop(): profile set "lo_boost" for rule "conservative".
 
 <ctrl-c>
 
 Caught INT signal (Interrupt).
 
 # cat /proc/cpufreq
 minimum CPU frequency  -  maximum CPU frequency  -  policy
 CPU  0       199354 kHz ( 12 %)  -     526296 kHz ( 32 %)  -  performance
 
 And that's it. I can't help thinking (in hindsight) that it would have been better to have written a simple acpi script to set the speedstep setting manually - i.e. "echo x > /proc/acpi/processor/CPU0/performance" but that would have been too easy.
 |