Skip to contentSkip to conversation

What's different about building for x86-64?

uml-devel Rob Landley 3 participants 4 messages Nov 4, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Daving Lang grabbed my firmware-linux build script and tried to build it on x86-64, and it barfed trying to compile User Mode Linux:

gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -D__arch_um__ -DSUBARCH=\"x86_64\" -Dvmap=kernel_vmap -Iarch/um/include -I/root/firmware-build-0.8.9/tmpdir/linux-2.6.13.2/arch/um/kernel/tt/include -I/root/firmware-build-0.8.9/tmpdir/linux-2.6.13.2/arch/um/kernel/skas/include -fno-builtin -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -S -o arch/um/user-offsets.s arch/um/sys-x86_64/user-offsets.c arch/um/sys-x86_64/user-offsets.c: In function `foo':
arch/um/sys-x86_64/user-offsets.c:24: error: structure has no member named `rbx'
arch/um/sys-x86_64/user-offsets.c:25: error: structure has no member named `rcx'
...
and so on.

My build is basically extracting the 2.6.14 tarball, adding the squashfs patch, and then doing this:

make ARCH=um O=../linux-build allnoconfig &&
cd ../linux-build &&
cat >> .config << EOF &&
CONFIG_MODE_SKAS=y
CONFIG_BINFMT_ELF=y
CONFIG_HOSTFS=y
CONFIG_SYSCTL=y
CONFIG_STDERR_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_UBD=y
CONFIG_TMPFS=y
CONFIG_SWAP=y
CONFIG_LBD=y
CONFIG_EXT2_FS=y
CONFIG_PROC_FS=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_ZLIB_INFLATE=y
EOF
yes "" | make ARCH=um oldconfig &&
make ARCH=um &&

It's not working, and I don't have an x86-64 machine to test this on. I can only assume the config file is wrong, but it's in a way that oldconfig isn't fixing...

I don't know quite how ARCH=um figures out whether it's derived from ARCH=i386 or ARCH=x86-64...

Rob

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 4 lines · Rob Landley

My build is basically extracting the 2.6.14 tarball, adding the squashfs patch, and then doing this:

make ARCH=um O=../linux-build allnoconfig &&

I would start with a make defconfig. This smacks of a mangled configuration.

Jeff

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#2 lore raw
Quoted 8 lines · Jeff Dike
Quoted 4 lines · Rob Landley

My build is basically extracting the 2.6.14 tarball, adding the squashfs patch, and then doing this:

make ARCH=um O=../linux-build allnoconfig &&

I would start with a make defconfig. This smacks of a mangled configuration.

Actually, he turned out to be using an older version of my firmware linux build script (the one with the 2.6.13.2 kernel, from the website), and the problem he was seeing is that building on an x86-64 machine in 32 bit emulation mode gets confused.

Once he started building in 64 bit mode, he got past that, but then hit the 3 level page tables leak from 2.6.13 shortly thereafter. I sent him a new build script using 2.6.14 and still am waiting to hear back...

Thanks,

Rob

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
Quoted 10 lines · Rob Landley
Quoted 8 lines · Jeff Dike
Quoted 4 lines · Rob Landley

My build is basically extracting the 2.6.14 tarball, adding the squashfs patch, and then doing this:

make ARCH=um O=../linux-build allnoconfig &&

I would start with a make defconfig. This smacks of a mangled configuration.

Quoted 7 lines

Actually, he turned out to be using an older version of my firmware linux build script (the one with the 2.6.13.2 kernel, from the website), and the problem he was seeing is that building on an x86-64 machine in 32 bit emulation mode gets confused.

Once he started building in 64 bit mode, he got past that, but then hit the 3 level page tables leak from 2.6.13 shortly thereafter.

Don't you know that I maintain a kernel tree exactly for this purpose?

The fix is included starting from 2.6.13-bs1. And I've even merged it upstream in -stable (even if it was merged in .4 only).

Quoted 2 lines

I sent him a new
build script using 2.6.14 and still am waiting to hear back...

Signature · 21 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade


		
___________________________________ 
Yahoo! Messenger: chiamate gratuite in tutto il mondo 
http://it.messenger.yahoo.com



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel