LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (http://www.linuxquestions.org/questions/gentoo-87/)
-   -   problem with my kernel (http://www.linuxquestions.org/questions/gentoo-87/problem-with-my-kernel-933294/)

linux_sonic 03-07-2012 03:14 PM

problem with my kernel
 
Hi to all

I am tring to install gentoo 3.2.1-gentoo-r2 and i have problem with my kernel.
When i execute this command: time make -j2 i have this error
usr/initramfs_data.S:1:0: error: CPU you selected does not support x86-64 instruction set

I have tried all the processor families but i have the same error :(

I have pentium r cpu
Here is my cpu:
Code:

processor        : 0
vendor_id        : GenuineIntel
cpu family        : 6
model                : 23
model name        : Intel(R) Pentium(R)  CPU      E5200  @ 2.50GHz
stepping        : 10
cpu MHz                : 2499.598
cache size        : 2048 KB
physical id        : 0
siblings        : 2
core id                : 0
cpu cores        : 2
apicid                : 0
initial apicid        : 0
fpu                : yes
fpu_exception        : yes
cpuid level        : 13
wp                : yes
flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni monitor tm2 ssse3 lahf_lm dts
bogomips        : 4999.19
clflush size        : 64
cache_alignment        : 64
address sizes        : 36 bits physical, 48 bits virtual
power management:

processor        : 1
vendor_id        : GenuineIntel
cpu family        : 6
model                : 23
model name        : Intel(R) Pentium(R)  CPU      E5200  @ 2.50GHz
stepping        : 10
cpu MHz                : 2499.598
cache size        : 2048 KB
physical id        : 0
siblings        : 2
core id                : 1
cpu cores        : 2
apicid                : 1
initial apicid        : 1
fpu                : yes
fpu_exception        : yes
cpuid level        : 13
wp                : yes
flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni monitor tm2 ssse3 lahf_lm dts
bogomips        : 4999.63
clflush size        : 64
cache_alignment        : 64
address sizes        : 36 bits physical, 48 bits virtual
power management:

Please help me

mitofik 03-08-2012 11:41 AM

Either select a proper processor family under "Processor Type and Features" in kernel config (you could use generic x86-64) or post the config you're trying to compile that kernel with so we could see what may be the problem.

Does it compile with default config?

mulyadi.santosa 03-08-2012 11:41 AM

Hi :)

your gcc could help to find the right CPU model for you :)

Try execute:
Quote:

echo "" | gcc -E -march=native -v - | grep -C 1 -i cc
you'll see gcc spelling out options that it thinks will fit your CPU model. The simply use that for your kernel config.

Hope it helps...

i92guboj 03-09-2012 03:02 AM

Are you using a source tree that you previously used in some other architecture? This can happen sometimes when you've used x86 on a 64 bits cpu, and later you decide to migrate.

Leftovers could be cleaned up with "make clean", or more in depth, with "make mrproper", but that will erase your .config file as well, so be sure to back it up. If you want to use it, in any case, make sure you use "make oldconfig" after putting it back after the cleaning, to fix any inconsistency.

If that's not it, I would erase the whole tree, and redownload and install it again. Of course, always save your .config if you tuned it yourself. Otherwise, just use genkernel.

colorpurple21859 03-09-2012 09:09 AM

what is in your /etc/make.conf

i92guboj 03-09-2012 12:58 PM

Settings in make.conf only are only for portage. Just invoking "make" in command line won't source that file. So, the CFLAGS in there are really not relevant (and that error message has nothing to do with them anyway).

colorpurple21859 03-09-2012 01:29 PM

This is what I do know, I can download a kernel from kernel.org and place it in puppylinux run make menuconfig and get every processor from i386 to the 64 bit processors, take the same clean kernel put it on slackware64 or any other 64bit system and only get options for 64bit processors. So if the op has a 32bit processor and only getting options for 64bit processors then the options for processor has to be determined by something external to the kernel itself such as a make configuration file of some sort. When initially installing gentoo the type of arch installing on is set in the /etc/make file, so was thinking that might be the problem.

i92guboj 03-10-2012 01:59 AM

Quote:

Originally Posted by colorpurple21859 (Post 4622938)
This is what I do know, I can download a kernel from kernel.org and place it in puppylinux run make menuconfig and get every processor from i386 to the 64 bit processors, take the same clean kernel put it on slackware64 or any other 64bit system and only get options for 64bit processors. So if the op has a 32bit processor and only getting options for 64bit processors then the options for processor has to be determined by something external to the kernel itself such as a make configuration file of some sort. When initially installing gentoo the type of arch installing on is set in the /etc/make file, so was thinking that might be the problem.

Part of the purpose of running make menuconfig is configuring the source tree, before compiling it. If you have already ran menuconfig in another box then the source tree is at least partly configured for that cpu, which can result in odd things when you move the configured tree to another architecture (even if it's just from x86 to amd64 in the same box). The kind of message s/he's getting there often appears in such kind of scenario.

Of course, it could also be just regular file system corruption, or a manually messed .config file. I can't be sure.

colorpurple21859 03-10-2012 08:15 AM

Are you installing Gentoo or is this a running installation and is it 32bit or 64bit. If this an installation gone wrong, what is your host system 32bit or 64bit. I can some sort of duplicate the error the op is getting by using
Quote:

linux32 make menuconfig
and the
Quote:

make -j2
on a 64bit host machine. But not sure how this helps or will help someone else figure out what is wrong

linux_sonic 03-11-2012 09:07 AM

Quote:

Originally Posted by colorpurple21859 (Post 4622738)
what is in your /etc/make.conf

Here is my /etc/make.conf

Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
#detailed example.
CFLAGS="-02 -march=i686 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"


i92guboj 03-11-2012 04:46 PM

But, as the output in your first post shows, your kernel sources are at least partly configured for x86_64. I already told you above the reasons why this can happen, and the procedures on how to fix this. You could also just try "make oldconfig". The script might or might not work depending on what the exact problem is. In any case, if it doesn, it will probably ask you a few things so it can configure your kernel properly.

linux_sonic 03-11-2012 06:26 PM

Quote:

Originally Posted by i92guboj (Post 4624231)
But, as the output in your first post shows, your kernel sources are at least partly configured for x86_64. I already told you above the reasons why this can happen, and the procedures on how to fix this. You could also just try "make oldconfig". The script might or might not work depending on what the exact problem is. In any case, if it doesn, it will probably ask you a few things so it can configure your kernel properly.

Hey look i am not good at linux :(
Could you tell me exactly what i have to do???

i92guboj 03-12-2012 12:02 PM

What did you do to configure your kernel?

Did you use genkernel as suggested in the handbook, or are you using some other method? Did you configure it by hand or did you copy it from some other installation? Is Gentoo already installed or are you still in the trance of installing it?

I really need some input to be able to help you.

linux_sonic 03-12-2012 01:35 PM

Quote:

Originally Posted by i92guboj (Post 4624905)
What did you do to configure your kernel?

Did you use genkernel as suggested in the handbook, or are you using some other method? Did you configure it by hand or did you copy it from some other installation? Is Gentoo already installed or are you still in the trance of installing it?

I really need some input to be able to help you.

I followed this steps http://www.gentoo.org/doc/en/gentoo-...ickinstall.xml
I cofigured the kernel by hand!!
I have downloaded this gentoo architecture amd64!!!
Is it the right achitecture for my cpu???

i92guboj 03-13-2012 10:05 AM

Quote:

Originally Posted by linux_sonic (Post 4624980)
I followed this steps http://www.gentoo.org/doc/en/gentoo-...ickinstall.xml
I cofigured the kernel by hand!!

So, that means you used this:

Code:

make menuconfig
And you configured the kernel using the text based menus of menuconfig, right?

Quote:

I have downloaded this gentoo architecture amd64!!!
That architecture is ok for your cpu, as long as you want to use a 64 bits OS (you could also use the 32 bits version). In any case, the sources are exactly the same, no matter what architecture you are using. And the configure script should present you with the right options, so something is wrong with that.

What I'd do, is the following.

First, erase the whole kernel tree. If you did the chroot step, that should usually be /usr/src/linux.

Then, install the sources again. That'd be:

Code:

emerge gentoo-sources
Proceed again to configure your kernel from the ground using menuconfig, as per the guide you linked in your post above.


All times are GMT -5. The time now is 06:54 AM.