View previous topic :: View next topic |
Author |
Message |
gringo Advocate


Joined: 27 Apr 2003 Posts: 3793
|
Posted: Mon Nov 17, 2008 9:39 am Post subject: CONFIG_x86_64=y set but 32 bit kernel ? |
|
|
hi all,
hopefully someone can sched some light : we all know about the in-kernel merge some time ago between both i386/x86_64 resulting in only one arch, x86.
That´s all fine and cool, but why do i get a 32 bit kernel even if i have CONFIG_X86_64=y set ?
Code: | -->ls -la arch/x86_64/boot
total 8
drwxr-xr-x 2 root root 4096 oct 5 14:36 .
drwxr-xr-x 3 root root 4096 oct 5 14:36 ..
lrwxrwxrwx 1 root root 22 oct 5 14:36 bzImage -> ../../x86/boot/bzImage |
Code: | -->file arch/x86/boot/bzImage
arch/x86/boot/bzImage: Linux kernel x86 boot executable RO-rootFS, root_dev 0x906, swap_dev 0x1, Normal VGA |
The vmlinux image created in the root directory is 64bit btw.
Is this expected ? I have been searching and looking around a bit but i don´t see anything that explains this behaviour and yes, this happens with gentoo-sources and with current git.
I guess the Kernel section is better suited for this thread than the amd64 one, even if it apparently is x86_64 related. More kernel gurus will read this here.
TIA
( this question came up in a thread in the spanish section of this forums -> https://forums.gentoo.org/viewtopic-t-714420.html) _________________ Error: Failing not supported by current locale |
|
Back to top |
|
 |
jw5801 Apprentice


Joined: 12 Jun 2008 Posts: 251 Location: Melbourne, Australia
|
Posted: Mon Nov 17, 2008 12:58 pm Post subject: |
|
|
This is expected I believe. I know I definitely have a 64-bit kernel, yet it still gets compiled into the x86 directory and symlinked. Try booting into the kernel and checking with:
Should tell you it's x86_64. `uname -a' will give you a bunch of other info about your kernel too. |
|
Back to top |
|
 |
gringo Advocate


Joined: 27 Apr 2003 Posts: 3793
|
Posted: Mon Nov 17, 2008 1:40 pm Post subject: |
|
|
yeah, i know, uname says it´s a x86_64 system of course but i was wondering why the kernel image is 32bits, at least the compressed kernel image is.
cheers _________________ Error: Failing not supported by current locale |
|
Back to top |
|
 |
jw5801 Apprentice


Joined: 12 Jun 2008 Posts: 251 Location: Melbourne, Australia
|
Posted: Mon Nov 17, 2008 1:49 pm Post subject: |
|
|
I think most bootloaders can only load 32-bit executables, therefore the compressed image is 32-bit but actually unloads the 64-bit kernel. That's just an educated guess though. |
|
Back to top |
|
 |
gringo Advocate


Joined: 27 Apr 2003 Posts: 3793
|
Posted: Mon Nov 17, 2008 2:19 pm Post subject: |
|
|
thanks, that´s what i was guessing too.
I´ve read somewhere the kernel is responsible to switch to long mode once executed, but my thought was this was only because of a grub ( paging) limitation and that´s why i was a bit confused after seeing the default generated kernel was 32bit only. I assumed lilo could boot such a beast.
thanks for your input  _________________ Error: Failing not supported by current locale |
|
Back to top |
|
 |
gimpel Advocate


Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Mon Nov 17, 2008 2:23 pm Post subject: |
|
|
They just merged i386 and x86_64 tree into x86 in the kernel, as both is x86 after all.
http://lwn.net/Articles/243704/ _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
 |
gringo Advocate


Joined: 27 Apr 2003 Posts: 3793
|
Posted: Mon Nov 17, 2008 2:26 pm Post subject: |
|
|
Quote: | If you end up with a symlink in arch/x86_64/boot then your kernel is 64bit. |
no, it´s not, check yourself.
Apparently it will switch to long mode once run but file says it isn´t a 64bit executable.
cheers _________________ Error: Failing not supported by current locale |
|
Back to top |
|
 |
gimpel Advocate


Joined: 15 Oct 2004 Posts: 2720 Location: Munich, Bavaria
|
Posted: Mon Nov 17, 2008 2:28 pm Post subject: |
|
|
Ah, I thought you were just wondering why the bzImage ends up in arch/x86 _________________ http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
|
|
Back to top |
|
 |
|