Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel config for 32-bit Gentoo on Athlon64 [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
geoffp
n00b
n00b


Joined: 10 Oct 2004
Posts: 47

PostPosted: Mon Oct 16, 2006 8:01 pm    Post subject: Kernel config for 32-bit Gentoo on Athlon64 [solved] Reply with quote

Hey, all --

If I'm running a 32-bit x86 install on an Athlon 64 or Sempron (64), is it safe to select "Athlon64/Opteron/Whathaveyou" under "Processor Type and Features" when configuring my kernel? Will that generate a 64-bit kernel, or a 32 bit one?

I've read in many a wiki that you can sure pass march=athlon64 to GCC, and it will generate 32-bit code (as long as your CHOST is "i686-pc-linux-gnu" or similar), so by extension, I'm wondering if that's all that kernel config option does. Or will it build with a different CHOST as well...?

I bet I'm not the only one wondering this. ;) Thanks in advance if you have any insight.


Last edited by geoffp on Mon Oct 23, 2006 1:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Mon Oct 16, 2006 10:04 pm    Post subject: Reply with quote

That should get you going check out the wiki. These are safe cflag settings http://gentoo-wiki.com/Safe_Cflags

Sempron/Sempron64 (AMD)

* If it is a Socket A (Socket 462) Sempron you can be sure it is neither 64-bit capable nor SSE2/SSE3 capable.
* If it is a Socket AM2 Sempron you can be sure it is both 64-bit and SSE3 capable.
* If it is a Socket 754 it depends on the stepping (part number):
o Steppings: CG (Part No.: *AX) or D0 (Part No.: *BA) have neither SSE3 nor AMD64
o Stepping: E3 (Part No.: *BO) has SSE3
o Stepping: E6 (Part No.: *BX) has SSE3 and AMD64
* Anyway you should check /proc/cpuinfo for pni (SSE3) string before using -msse3.

vendor_id : AuthenticAMD
cpu family : 15
model : 44
model name : AMD Sempron(tm) Processor

Note: The model number may differ.

32 bit (Socket A)

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

32 bit

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

32 bit (SSE3 capable)

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

Sempron64 - 64 bit

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
Back to top
View user's profile Send private message
geoffp
n00b
n00b


Joined: 10 Oct 2004
Posts: 47

PostPosted: Tue Oct 17, 2006 4:25 am    Post subject: Reply with quote

Thanks for your effort, Wizard, but that's not really what I'm asking. The CFLAGS in my make.conf I've got a good handle on. It's the kernel config option that I'm curious about.
Back to top
View user's profile Send private message
geoffp
n00b
n00b


Joined: 10 Oct 2004
Posts: 47

PostPosted: Mon Oct 23, 2006 1:31 pm    Post subject: Reply with quote

So I worked up the nerve to try it, and it works! I've compiled the kernel with "Opteron/Athlon64/Hammer/K8" under "Processor type and features"->"Processor Family" and my system is still (apparently) humming along in 32-bit mode. Question answered!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum