Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Can't Compile Kernel; Wrong Architecture?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
LiamOS
n00b
n00b


Joined: 06 Jun 2012
Posts: 56
Location: Kerry/Dublin, Ireland

PostPosted: Sun Jun 17, 2012 12:46 am    Post subject: [Solved] Can't Compile Kernel; Wrong Architecture? Reply with quote

To preface this, I'm still a bit of a newb, but this is far from my first Gentoo installation. This is also the first time I've failed to solve my problem through simply reading the forums, but I sense that's my fault.

I'm attempting to do an installation on my netbook, which is based on an Intel Atom N570. I downloaded the i686 Stage 3 and Portage snapshots, and unpacked them, all was well.
When I get to the kernel compilation, I get the "CPU you selected does not support x86-64 instruction set" error when I try to build the kernel, regardless of the CPU selected, but this seems odd, since (If I'm not mistaken), I'm not attempting to build a kernel for x86-64.

I suppose my questions are these:
- Does portage download a kernel for a specific architecture, or can the architecture be specified at build time? (If so, how? I can't seem to find the appropriate config.h file.)
- Is i686 for 32 bit systems?
- Are portage snapshots architecture dependent?


Thanks.
_________________
CFLAGS=" -O999999"


Last edited by LiamOS on Mon Jun 25, 2012 1:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
kurly
n00b
n00b


Joined: 02 Apr 2012
Posts: 72

PostPosted: Sun Jun 17, 2012 1:34 am    Post subject: Re: Can't Compile Kernel; Wrong Architecture? Reply with quote

LiamOS wrote:
I suppose my questions are these:
- Does portage download a kernel for a specific architecture, or can the architecture be specified at build time? (If so, how? I can't seem to find the appropriate config.h file.)
The download should be the same, and you can specify at build time as long as /etc/make.conf is correct and as long as you select the correct kernel architecture inside the kernel config (Processor Types and Features -> Processor Family).
LiamOS wrote:

- Is i686 for 32 bit systems?

Yes.
LiamOS wrote:

- Are portage snapshots architecture dependent?

No; the architecture dependency is handled in /etc/make.conf

Hope this helps.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Sun Jun 17, 2012 2:25 am    Post subject: Reply with quote

LiamOS,

If you haven't made significant changes to .config, save it and try make defconfig. This will create a default .config based on the architecture - you'll see a message as to the architecture.

Also run make mrproper before running make && make modules_install to clean stale files and dependencies.

Good luck :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Ant P.
Veteran
Veteran


Joined: 18 Apr 2009
Posts: 1920
Location: UK

PostPosted: Sun Jun 17, 2012 2:35 am    Post subject: Reply with quote

Try "make ARCH=i386" to force it.
Back to top
View user's profile Send private message
LiamOS
n00b
n00b


Joined: 06 Jun 2012
Posts: 56
Location: Kerry/Dublin, Ireland

PostPosted: Sun Jun 17, 2012 1:25 pm    Post subject: Reply with quote

Thanks for the replies; nice to know it's not due to my ineptitude.

The make ARCH=i386 got it to compile, but I'll see how functional it is when I get all my configs vritten; I've to emerge vim first, because using nano is just impossible for me.
_________________
CFLAGS=" -O999999"
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 7622

PostPosted: Sun Jun 17, 2012 4:46 pm    Post subject: Reply with quote

Based on the information provided, I think you booted a 64-bit LiveCD, unpacked a 32-bit snapshot, and did not use linux32 to change the result of uname inside the chroot. Since your system is clearly capable of running 64-bit, I suggest you back out and start over with a 64-bit installation. You cannot convert from 32-bit to 64-bit in place. For most machines, running a 64-bit kernel is a better choice, and using a 64-bit kernel is easier if you have a 64-bit toolchain.
Back to top
View user's profile Send private message
LiamOS
n00b
n00b


Joined: 06 Jun 2012
Posts: 56
Location: Kerry/Dublin, Ireland

PostPosted: Mon Jun 18, 2012 11:28 am    Post subject: Reply with quote

Hu wrote:
Based on the information provided, I think you booted a 64-bit LiveCD, unpacked a 32-bit snapshot, and did not use linux32 to change the result of uname inside the chroot. Since your system is clearly capable of running 64-bit, I suggest you back out and start over with a 64-bit installation. You cannot convert from 32-bit to 64-bit in place. For most machines, running a 64-bit kernel is a better choice, and using a 64-bit kernel is easier if you have a 64-bit toolchain.

That's impressive; it was a x64 live CD. My friend gave me a "x86" ubuntu live CD to use, and I just checked, and it is actually 64 bit.
Also, upon further investigation, it seems that the Atom N570 does support a 64 bit instruction set. I've no idea why I thought otherwise.
Thanks very much.

I'm also note sure whether I will actually use gentoo-sources, since I've never managed to get it to detect the wireless card on my netbook, so I'll see if I can base the system on an Arch or Debian kernel; fun times ahead.
_________________
CFLAGS=" -O999999"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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