Hi,

I'm having problems trying to compile a 2.4.20 UML kernel. In particular, I'm 
using the vanilla (i.e., kernel.org) 2.4.20 sources, patches with 
uml-patch-2.4.20-4 
(http://downloads.sourceforge.net/user-mode-linux/uml-patch-2.4.20-4.bz2?modtime=1051142400&big_mirror=1).
 I've tried also with uml-patch-2.4.20-8, with the same results.

The procedure I've followed is the conventional one:

- Uncompress and patch:

# tar xfvj linux-2.4.20.tar.bz2
# cd linux-2.4.20
# patch -p1 < ../uml-patch-2.4.20-4

- Make the .config file (from the UML pre-compiled kernel 2.4.19-um5, 
downloaded from 
http://prdownloads.sourceforge.net/user-mode-linux/linux-2.4.19-5.bz2). I've 
also tried a clean "make menuconfig ARCH=um" but the results are the same.

# ../linux-2.4.19-5 --showconfig > .config
# make oldconfig ARCH=um
(answering always with the option by default)

- Create dependencies:
# make dep ARCH=um

- The problem happens when I tried to compile:

# make ARCH=um
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o
scripts/split-include scripts/split-include.c
scripts/split-include include/linux/autoconf.h include/config
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.20/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -U__i386__ -Ui386 -DUM_FASTCALL  -D__arch_um__
-DSUBARCH=\"i386\" -D_LARGEFILE64_SOURCE
-I/usr/local/src/linux-2.4.20/arch/um/include -Derrno=kernel_errno
-I/usr/local/src/linux-2.4.20/arch/um/kernel/tt/include
-DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr/local/src/linux-2.4.20/include/linux/ptrace.h:24,
                 from
/usr/local/src/linux-2.4.20/include/linux/binfmts.h:4,
                 from /usr/local/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/local/src/linux-2.4.20/include/linux/mm.h:4,
                 from /usr/local/src/linux-2.4.20/include/linux/slab.h:14,
                 from
/usr/local/src/linux-2.4.20/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/include/asm/ptrace.h:9:4: warning: #warning This machine appears to
be neither x86_64 nor i386.
In file included from
/usr/local/src/linux-2.4.20/include/linux/posix_types.h:46,
                 from /usr/local/src/linux-2.4.20/include/linux/types.h:8,
                 from
/usr/local/src/linux-2.4.20/include/linux/capability.h:16,
                 from
/usr/local/src/linux-2.4.20/include/linux/binfmts.h:5,
                 from /usr/local/src/linux-2.4.20/include/linux/sched.h:9,
                 from /usr/local/src/linux-2.4.20/include/linux/mm.h:4,
                 from /usr/local/src/linux-2.4.20/include/linux/slab.h:14,
                 from
/usr/local/src/linux-2.4.20/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/local/src/linux-2.4.20/include/asm/posix_types.h:4:34: error:
asm/arch/posix_types.h: No existe el fichero o el directorio
[...]

I think the problem is due to include/asm/posix_type.h file is missing. I 
understand that this file is created by "make dep ARCH=um" (or maybe "make 
(menu|old)config ARCH=um"?), so something should be wrong with the Makefiles...

The details of the host system where I'm trying to compile follows:

- Debian 4.0 with 2.6.18-6-686 kernel
- Gcc 4.1.2 20061115

I've googled to see some similar reports regarding 2.5.42 and some patches 
intended to solve the problem 
(http://www.cs.helsinki.fi/linux/linux-kernel/2002-41/0285.html). I've tried 
with those patches, but they don't seem to work with 2.4.20.

Any suggestion/idea/help to solve the problem or further debug is really 
welcome, please.

Thank in advance!

Best regards,
------
Fermín

PD. You may wonder why I'm compiling so ancient kernel :) The reason is
that I'm trying to reproduce the ptrace vulnerability in a security
testbed, so using a newer version (the vulnerability was fix in 2.4.21)
is not an option...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to