Getting phc-intel to work on a 2.6.27 kernel

If you have trouble with PHC you can ask and hope for help here.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Pluies
Posts: 4
Joined: Sat 11. Apr 2009, 16:05
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Getting phc-intel to work on a 2.6.27 kernel

Post by Pluies » Sat 11. Apr 2009, 16:40

Hello everyone !

As I was trying to setup phc-intel on my MacBook Air (Intel Core2Duo P7500 processor), running Linux Mint 6 (based upon Ubuntu 8.10, itself based upon kernel 2.6.27) I stumbled across a little problem.

I first tried to download phc-intel-0.3.2-3.tar.gz [18.54 KiB] from the download page . Problem is: two files are required in order to patch, acpi_cpufreq.c and linux-phc-0.3.2.patch. These files are available in inc/ ; in two separate folders : one for kernel 2.6.28, and one for 2.6.29.

Sooo I continued to read the download page, and found a patch file for kernel 2.6.26 which was supposed to work with kernel 2.6.27. So I downloaded it and copied it into my newly created inc/2.6.27 folder, copied acpi_cpufreq.c from kernel 2.6.28, and rebooted. Rock on!

Despite one or two compilation warnings, it seemed to work right.


Though... Boot freezed a bit after acpi launch, at:
CPUFreq Utilities : Setting ondemand CPUFreq governor...
CPU0...
CPU1... OK
Only workaround I found was to reboot from an external drive and comment out the lines at /etc/modprobe/phc-intel.conf . I could boot again, but without any phc-intel.

After some research, and various attempts to "make prepare && make && sudo make install", I started to think about this acpi_cpufreq.c file I used... It might have changed between kernel 2.6.27 and 2.6.28 ("diff" confirms modifications have been made between 2.6.28 and 2.6.29), so I downloaded the 2.6.27 version from kernel.org (here is the exact link) into my inc/2.6.27 folder.

make prepare ; make ; sudo make install... No error, reboot is okay, it works! lsmod confirms.

I hope it might help others having similar problems. :)

Cheers,

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Getting phc-intel to work on a 2.6.27 kernel

Post by the-fallen » Sat 11. Apr 2009, 17:38

Yeah I love people using their brain :)

Cool that you made it.
The lack of the support of 2.6.27 is only because I started writing the package as I ran 2.6.28. If I find some spere time I might add support for older Kernels.

If you (or someone else) want to support this you are free to send your patchsets (patches should work without hunks).


How ever - welcome on board:)

Pluies
Posts: 4
Joined: Sat 11. Apr 2009, 16:05
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Getting phc-intel to work on a 2.6.27 kernel

Post by Pluies » Sat 11. Apr 2009, 19:15

the-fallen wrote:Yeah I love people using their brain :)
Haha, thank you :p
If you (or someone else) want to support this you are free to send your patchsets (patches should work without hunks).
I don't understand - isn't the patch for vanilla 2.6.26 (working with 2.6.27), available on the download page enough?

It actually didn't show any hunk at compiling.


However, after setting up new VIDs values via the linux-phc-optimize.bash script (found on this tutorial), I had a "> ERROR: Wrong VID count!" error.

I posted a quick workaround here ; it seemed to do the trick.

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Getting phc-intel to work on a 2.6.27 kernel

Post by the-fallen » Sat 11. Apr 2009, 20:29

I don't understand - isn't the patch for vanilla 2.6.26 (working with 2.6.27), available on the download page enough?
Yeah, it is "enough" but not as easy as the offtree-package and many 'beginner' have many problems with those things that are easy to us.

Pluies
Posts: 4
Joined: Sat 11. Apr 2009, 16:05
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Getting phc-intel to work on a 2.6.27 kernel

Post by Pluies » Sat 11. Apr 2009, 22:12

the-fallen wrote:
I don't understand - isn't the patch for vanilla 2.6.26 (working with 2.6.27), available on the download page enough?
Yeah, it is "enough" but not as easy as the offtree-package and many 'beginner' have many problems with those things that are easy to us.
I actually used the offtree-package and added a "2.6.27" folder in the /inc/ folder, along to "2.6.28" and "2.6.29", then put the renamed patch (for vanilla 2.6.26) and acpi_cpufreq.c (from kernel 2.6.27) in it, then proceeded to make prepare &&make && make install =o

Wouldn't you add this folder into, say, phc-intel-0.3.2-4 offtree? Owners of 2.6.26 kernels would be able to run it too :)

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Getting phc-intel to work on a 2.6.27 kernel

Post by the-fallen » Sat 11. Apr 2009, 22:43

Yes, it'S that easy ... need to download 2.6.27 ...


wait some minutes.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable