You are not logged in.

#1 2009-03-03 09:21:43

pix
Member
Registered: 2005-07-07
Posts: 25

Installing a 64bit kernel and 32bit userland.

Starting from Leonidas, Fedora will start installing a x64 kernel on compatible hardware, even when installing a 32-bit OS.
This should allow the kernel to better handle memory as the kernel no longer has to worry about low memory, high memory, etc...

Link http://fedoraproject.org/wiki/Features/ … ureSupport


It should be possible to do this under Arch, No ?


Any resemblance to grammar or spelling mistakes is purely coincidental and independant of the willing of the author

Offline

#2 2009-03-03 09:53:20

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Installing a 64bit kernel and 32bit userland.

I'm already doing this on debian. In theory, you should be able to install an amd64 kernel using pacman, as pacman doesn't handle architecture differences when updating with the -U flag as far as I know.
Be sure you install the amd64 versions of all modules also.

Offline

#3 2009-03-03 10:35:21

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

sounds interesting. is there any way to build an amd64 kernel inside this kind of hybrid systems?

/edit: is the -m64 flag passed to gcc enough?

Last edited by bangkok_manouel (2009-03-03 10:39:38)

Offline

#4 2009-03-03 10:38:30

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Installing a 64bit kernel and 32bit userland.

you would need a 64bit toolchain. so it's better to build that outside in a true 64bit Arch installation.

Offline

#5 2009-03-03 10:41:35

pix
Member
Registered: 2005-07-07
Posts: 25

Re: Installing a 64bit kernel and 32bit userland.

It should be possible to make a x64 repo just for the kernel related stuff, copy the related pakages, and enable it by default (or not) when installing on x64 hardware


Any resemblance to grammar or spelling mistakes is purely coincidental and independant of the willing of the author

Offline

#6 2009-03-03 10:42:45

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

Thanks for your reply Andy, I found out this while STFWing. Would that work?

 

man gcc wrote:

-m64
           Generate code for a 32-bit or 64-bit environment.  The 32-bit environment sets int, long and
           pointer to 32 bits and generates code that runs on any i386 system.  The 64-bit environment sets
           int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture.
           For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options.

Last edited by bangkok_manouel (2009-03-03 10:44:03)

Offline

#7 2009-03-03 10:55:28

pix
Member
Registered: 2005-07-07
Posts: 25

Re: Installing a 64bit kernel and 32bit userland.

On 32bit archlinux:

pix@bozo> cat toto.c
int main(int argc, char ** argv){
  printf("Bouh\n");
}
pix@bozo> gcc -m64 toto.c -o toto
toto.c:1: sorry, unimplemented: 64-bit mode not compiled in
toto.c: In function 'main':
toto.c:2: warning: incompatible implicit declaration of built-in function 'printf'

It should be possible to recompile gcc and adding the 64bit mode support (Read: I don't know) But it isn't enabled.

Last edited by pix (2009-03-03 10:56:42)


Any resemblance to grammar or spelling mistakes is purely coincidental and independant of the willing of the author

Offline

#8 2009-03-03 11:02:35

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

Thanks pix. I've found this on the subject:
http://linux.derkeiler.com/Mailing-List … 02950.html
Anyway, I have a 64bit arch machine that i can use so that should do it.

Offline

#9 2009-03-03 15:09:28

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

i just installed a 64bit kernel and after ultra intensive testing (3 minutes of web browsing), everything seems to work as expected.

Offline

#10 2009-03-03 16:53:36

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

now come the issues. i have some problems building packages while running this kernel.

/etc/makepkg.conf

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="i686"
CHOST="i686-pc-linux-gnu"

#-- Exclusive: will only run on -march=i686 
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=i686 -mtune=native -Os -pipe -fomit-frame-pointer"
CXXFLAGS="-march=i686 -mtune=native -Os -pipe -fomit-frame-pointer"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j3"

Firefox fails with:

/home/eb/pkg/firefox/src/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp:181: error: invalid register name for 'a4'
/home/eb/pkg/firefox/src/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp:182: error: invalid register name for 'a5'
make[9]: *** [xptcinvoke_x86_64_linux.o] Error 1
make[9]: *** Waiting for unfinished jobs....
{standard input}: Assembler messages:
{standard input}:7: Error: bad register name `%rbp'
{standard input}:8: Error: bad register name `%rsp'
{standard input}:9: Error: bad register name `%rsp'
{standard input}:10: Error: bad register name `%rdi'
{standard input}:11: Error: bad register name `%rsi'
{standard input}:12: Error: bad register name `%rdx'
{standard input}:13: Error: bad register name `%rcx'
{standard input}:14: Error: bad register name `%r8'
{standard input}:15: Error: bad register name `%r9'
{standard input}:16: Error: bad register name `%rbp)'
{standard input}:17: Error: bad register name `%rbp)'
{standard input}:18: Error: bad register name `%rbp)'
{standard input}:19: Error: bad register name `%rbp)'
{standard input}:20: Error: bad register name `%rbp)'
{standard input}:21: Error: bad register name `%rbp)'
{standard input}:22: Error: bad register name `%rbp)'
{standard input}:23: Error: bad register name `%rbp)'
{standard input}:24: Error: bad register name `%rbp)'
{standard input}:25: Error: bad register name `%rbp)'
{standard input}:27: Error: bad register name `%rbp)'
make[9]: *** [xptcstubs_x86_64_linux.o] Error 1

qt fails with:

main.cpp:1: sorry, unimplemented: 64-bit mode not compiled in
make: *** [property.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [main.o] Error 1
make: *** [project.o] Error 1

Any idea why the building process seems not to care about the arch set in makepkg.conf and if it could be possible to fix that?

TIA

Offline

#11 2009-03-03 23:45:31

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Installing a 64bit kernel and 32bit userland.

There's a tool called "linux32" for that. It manages to change the architecture reported by uname. I use it to build i686 packages inside my i686 chroot on my amd64 system.

Offline

#12 2009-03-04 06:55:26

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Installing a 64bit kernel and 32bit userland.

this might also interest you


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#13 2009-03-04 12:58:37

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Installing a 64bit kernel and 32bit userland.

JGC wrote:

There's a tool called "linux32" for that. It manages to change the architecture reported by uname. I use it to build i686 packages inside my i686 chroot on my amd64 system.

Thanks Jan, it works perfectly with linux32.

dolby wrote:

this might also interest you

Interesting read, thanks. In fact, using linux32, the only problem one would face using this kind of hybrid system is the ability to build his custom kernel.

Offline

#14 2009-03-04 14:44:16

Kilz
Member
Registered: 2008-03-01
Posts: 140

Re: Installing a 64bit kernel and 32bit userland.

What is the purpose of this in Linux, other than to continue to slow the adoption of 64bit on hardware that supports it?


I trust Microsoft about as far as I can comfortably spit a dead rat.
Cinnamon is a wonderful desktop
"Faith is the substance of things hoped for, the evidence of things not seen."

Offline

#15 2009-03-05 19:48:15

b9anders
Member
Registered: 2007-11-07
Posts: 691

Re: Installing a 64bit kernel and 32bit userland.

I installed a 64-bit kernel on my i686 when I wanted to do a remote install of arch64 and it worked without a hitch.

Offline

Board footer

Powered by FluxBB