[CentOS-docs] Article on building i586 CentOS-5 kernel

Tue Jan 12 00:17:44 UTC 2010
Christopher Chan <christopher.chan at bradbury.edu.hk>

Timothy Lee wrote:
>  On 01/11/2010 03:09 PM, Christopher Chan wrote:
>> Timothy Lee wrote:
>>>   On 01/11/2010 02:29 PM, Christopher Chan wrote:
>>>> Wow. There are Pentium machines still running out there?
>>>> You do know that Pentium optimizations are only for Pentiums and that
>>>> such binaries could actually run slower on anything Pentium-II/Pentium
>>>> Pro and above than i386 (actually i486 optimized binaries iirc - must
>>>> check gcc) optimized binaries due to the architecture differences of 
>>>> the
>>>> Pentium?
>>> Got some VIA C3 processors that absolutely refuse to run i686 kernels.
>> Yeah, who knows what has been turned on on those i686 kernels.
>>> They were running on Fedora 7, but that's getting too abandoned for any
>>> good.
>> http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
>> Try C3 optimization instead then.
> So instead of compiling for i586 targets, is it then better to patch the 
> CentOS-5 kernel so that it uses "-mtune=c3" during compilation?  (There 
> appears to be only a CONFIG_MVIAC3_2 param in the .config file)

I would say so since there is specific matching parameters for the C3. 
You will want to use -march=c3 too I suspect to prevent cmov 
instructions being included which is what does not work on the C3 in the 
i686 binaries. You also have to do this for anything that comes as i686 
binaries that you use, not just the kernel.

Or you could go the Pentium route and forget about getting an optimized 
binary in favour of just a working binary.