compiling 64 bit kernel in 32 bit linux
I have been for the past couple days attempting to put together a 64 bit kernel on my computer but keep on getting the following error message
CC scripts/mod/empty.o cc1: error: code model `kernel' not supported in the 32 bit mode make[2]: *** [scripts/mod/empty.o] Error 1 make[1]: *** [scripts/mod] Error 2 make: *** [scripts] Error 2 anybody seen this before? below is my system information proc: AMD Athlon 64 3000 mobo: asus k8v-x kernel: 2.6.8 distro slack 10.0 |
Same error (1.5 years later)
Same message here on AMD Athlon 64 (dual core), booting with kernel 2.6.15-21.amd64-generic from kubuntu and trying to recompile that same kernel from source, using gcc-4.0.1.
Did anyone find how to solve the error from -mcmodel=kernel meanwhile? Looks like I can compile that kernel on a good old x86 machine with the same options, but that's a bit of a workaround... |
you won't be able to produce a 64 bit kernel unless the compile tools are already designed to output 64bit programs.
either rebuild the compile tools, configuring them for 64 bit system, then use them to compile the kernel, or download a 64bit live cd, and compile from it. |
Can 64-bit build tools still give 32-bit outputs?
Quote:
How easy is it to do this? Shingoshi |
Someone please answer this question...
It seems I have a few alternatives to select from.
1. I can install a full 64-bit system with all of it's libraries included. xx: This is just too easy! 2. I can keep my 64-bit kernel and recompile gcc to build 64-bit packages. xx: This is more of a challenge. But now, if I choose the second option and rebuild gcc, I need to know something here. I know that I can compile gcc with the ability to create a 64-bit kernel (and likely other packages as well). But I want to know is: 1. Should the gcc package be compiled as a native 32-bit (i686) binary, defaulting to 32-bit builds with the option of 64-bit builds (using "gcc -m64")? 2. Could the gcc package be compiled in 64-bit (x86_64) format (on my 32-bit system), with the option of building 32-bit packages? a): Is that even possible? b): Would I need a 64-bit glibc for a 64-bit gcc to be usable on my system? Meaning that I would be required to wind up with a complete 64-bit system. 3. Is there a way to build a 64-bit version of gcc which defaults to 32-bit builds, requiring that gcc -m64 be declared for 64-bit builds? Shingoshi |
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Shingoshi |
All times are GMT -5. The time now is 01:14 AM. |