View previous topic :: View next topic |
Author |
Message |
geoffp n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/80707600041697712aea50.jpg)
Joined: 10 Oct 2004 Posts: 47
|
Posted: Mon Oct 16, 2006 8:01 pm Post subject: Kernel config for 32-bit Gentoo on Athlon64 [solved] |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
wizard69 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Marvel/movie_x-men_wolverine.gif)
Joined: 22 Sep 2003 Posts: 178 Location: Berlin
|
Posted: Mon Oct 16, 2006 10:04 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
geoffp n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/80707600041697712aea50.jpg)
Joined: 10 Oct 2004 Posts: 47
|
Posted: Tue Oct 17, 2006 4:25 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
geoffp n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/80707600041697712aea50.jpg)
Joined: 10 Oct 2004 Posts: 47
|
Posted: Mon Oct 23, 2006 1:31 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|