Skip to contentSkip to conversation

Compiling a xen patched 2.4.27 kernel

DISCUSSION Hugo Delchini 2 participants 3 messages Nov 22, 2004 – Nov 23, 2004

lore
Share & tools
lore
#0 lore raw

Hi there, i'm a new Xen user and try to experiment it for a future use with our High Availability product "Availix". We are currently using VMWare stuff and seriously plan to replace it by Xen.

As a start, currently our product is based on a 2.4.27 linux kernel with several patches for ACLs and various other things.

I retrieved "xen-2.0.1-install.tar.gz" and "xen-2.0.1-src.tar.gz" and generated the "linux-2.4.27-xen.patch" by using the "make mkpatches" command under the base of the src directory of Xen.

I applied this patch to our already patched linux kernel without any problem.

Then, i used the domain0 default config under the linux source tree via "cp arch/xen/defconfig-xen0 .config".

Then according to the documentation i tried to compile the kernel :

% make ARCH=xen oldconfig
% make ARCH=xen dep
% make ARCH=xen bzImage

And here is what i got :

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.4.27/include/asm/processor.h:188,

                from /usr/src/linux-2.4.27/include/linux/prefetch.h:13,
                from /usr/src/linux-2.4.27/include/linux/list.h:6,
                from /usr/src/linux-2.4.27/include/linux/wait.h:14,
                from /usr/src/linux-2.4.27/include/linux/fs.h:12,
                from /usr/src/linux-2.4.27/include/linux/capability.h:17,
                from /usr/src/linux-2.4.27/include/linux/binfmts.h:5,
                from /usr/src/linux-2.4.27/include/linux/sched.h:9,
                from /usr/src/linux-2.4.27/include/linux/mm.h:4,
                from /usr/src/linux-2.4.27/include/linux/slab.h:14,
                from /usr/src/linux-2.4.27/include/linux/proc_fs.h:5,
                from init/main.c:15:

/usr/src/linux-2.4.27/include/asm/hypervisor.h: In function `HYPERVISOR_dom_mem_op':
/usr/src/linux-2.4.27/include/asm/hypervisor.h:494: more than 10 operands in `asm'
make: *** [init/main.o] Error 1

Sorry if it is a trivial/common question, i searched the mailing list but found nothing about such a problem.
Any help is apreciated.
Thanks a lot and long life to Xen.

Hugo Delchini.
Availix Founder and CTO.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/

#1 lore raw

What version of GCC are you using? I suspect 2.95 which is too old for building Xen and XenLinux. Upgrade to at least 3.2.x or 3.3.x.

-- Keir

Quoted 40 lines

% make ARCH=xen oldconfig
% make ARCH=xen dep
% make ARCH=xen bzImage

And here is what i got :

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27/include -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686   
-DKBUILD_BASENAME=main -c -o init/main.o init/main.c

In file included from /usr/src/linux-2.4.27/include/asm/processor.h:188,

                 from /usr/src/linux-2.4.27/include/linux/prefetch.h:13,
                 from /usr/src/linux-2.4.27/include/linux/list.h:6,
                 from /usr/src/linux-2.4.27/include/linux/wait.h:14,
                 from /usr/src/linux-2.4.27/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.27/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.27/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.27/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.27/include/linux/mm.h:4,
                 from /usr/src/linux-2.4.27/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.27/include/linux/proc_fs.h:5,
                 from init/main.c:15:

/usr/src/linux-2.4.27/include/asm/hypervisor.h: In function `HYPERVISOR_dom_mem_op':
/usr/src/linux-2.4.27/include/asm/hypervisor.h:494: more than 10 operands in `asm'
make: *** [init/main.o] Error 1

Sorry if it is a trivial/common question, i searched the mailing list but found nothing about such a problem.
Any help is apreciated.
Thanks a lot and long life to Xen.

Hugo Delchini.
Availix Founder and CTO.

Quoted 9 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#2 lore raw

Yep, just after the post to the mailing list, i re-read carefully the documentation and saw that it was a gcc version problem. I upgraded to 3.2.2 and everything works fine.
Thanks a lot for your answer.
Hugo.

Quoted 60 lines · Keir Fraser

What version of GCC are you using? I suspect 2.95 which is too old for building Xen and XenLinux. Upgrade to at least 3.2.x or 3.3.x.

-- Keir

Quoted 48 lines

% make ARCH=xen oldconfig
% make ARCH=xen dep
% make ARCH=xen bzImage

And here is what i got :

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27/include -Wall

(quoted diff) +0 -3
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686   
-DKBUILD_BASENAME=main -c -o init/main.o init/main.c

In file included from /usr/src/linux-2.4.27/include/asm/processor.h:188,

                from /usr/src/linux-2.4.27/include/linux/prefetch.h:13,
                from /usr/src/linux-2.4.27/include/linux/list.h:6,
                from /usr/src/linux-2.4.27/include/linux/wait.h:14,
                from /usr/src/linux-2.4.27/include/linux/fs.h:12,
                from /usr/src/linux-2.4.27/include/linux/capability.h:17,
                from /usr/src/linux-2.4.27/include/linux/binfmts.h:5,
                from /usr/src/linux-2.4.27/include/linux/sched.h:9,
                from /usr/src/linux-2.4.27/include/linux/mm.h:4,
                from /usr/src/linux-2.4.27/include/linux/slab.h:14,
                from /usr/src/linux-2.4.27/include/linux/proc_fs.h:5,
                from init/main.c:15:

/usr/src/linux-2.4.27/include/asm/hypervisor.h: In function `HYPERVISOR_dom_mem_op':
/usr/src/linux-2.4.27/include/asm/hypervisor.h:494: more than 10 operands in `asm'
make: *** [init/main.o] Error 1

Sorry if it is a trivial/common question, i searched the mailing list but found nothing about such a problem.
Any help is apreciated.
Thanks a lot and long life to Xen.

Hugo Delchini.
Availix Founder and CTO.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel