List Info

Thread: build.sh and xen?




build.sh and xen?
user name
2006-07-23 01:37:50
How to build kernel modules for xen?

Xen kernel is built with DEBUG and DIAGNOSTIC and the kernel
modules are 
not so they conflict.

So I want to build modules with those options. But I don't
see any 
build.sh config for building just modules. It was suggested
that I build 
my modules for xen and not i386 because of different
headers.

So I am attempting to build all with:

   time ./build.sh -U -m xen -a i386 build 

But then fails with:

dependall ===> lib/csu/i386_elf
#    create  i386_elf/crt0.d
CC=/usr/src/netbsd-3/src/tooldir.NetBSD-3.99.21-i386/bin/i38
6--netbsdelf-gcc 
/usr/src/netbsd-3/src/tooldir.NetBSD-3.99.21-i386/bin/nbmkde
p -f crt0.d --      
-I- -I/usr/src/netbsd-3/src/lib/csu/i386_elf -DLIBC_SCCS
-DPIC -DDYNAMIC 
-DELFSIZE=32 -I/usr/src/netbsd-3/src/libexec/ld.elf_so 
-I/usr/src/netbsd-3/src/lib/csu/i386_elf/../common_elf 
-I/usr/src/netbsd-3/src/lib/libc/dlfcn -DDWARF2_EH -DJCR
-DDSO_HANDLE  
-nostdinc -isystem
/usr/src/netbsd-3/src/destdir.xen/usr/include   
/usr/src/netbsd-3/src/lib/csu/i386_elf/crt0.c
In file included from 
/usr/src/netbsd-3/src/lib/csu/common_elf/common.h:37,
                 from
/usr/src/netbsd-3/src/lib/csu/i386_elf/crt0.c:38:
/usr/src/netbsd-3/src/destdir.xen/usr/include/sys/types.h:45
:27: 
machine/types.h: No such file or directory
/usr/src/netbsd-3/src/destdir.xen/usr/include/sys/types.h:47
:26: 
machine/ansi.h:


$ ls -l destdir.xen/usr/include/machine                     
                  
lrwxr-xr-x  1 reed  wsrc  3 Jul 22 20:19
destdir.xen/usr/include/machine 
-> xen
$ ls -l destdir.xen/usr/include/xen      
ls: destdir.xen/usr/include/xen: No such file or directory

What is supposed to populate that?

Any ideas?

Thanks in advance,

Jeremy C. Reed
build.sh and xen?
user name
2006-07-23 14:18:37
reedreedmedia.net writes:

> How to build kernel modules for xen?
>
> Xen kernel is built with DEBUG and DIAGNOSTIC and the
kernel modules are 
> not so they conflict.
>
> So I want to build modules with those options. But I
don't see any 
> build.sh config for building just modules.

I think this is really a general problem of lkm vs kernel
options and
not about xen, except that xen kenrels have DEBUG/DIAGNOSTIC
set.

I added

CPPFLAGS+=      -DDIAGNOSTIC

to /usr/src/sys/lkm/Makefile.inc

and then build.sh builds lkms with DIAGNOSTIC.  Of course,
they then
don't work with non-DIAGNOSTIC kernels.

I think what is needed is either

1) treat lkms needing a flag as a bug and fix them.  This is
probably
   too hard.

2) Enumerate the n flags that matter in some config file,
and build
   2^n flavors of lkms with build.sh, or perhaps just have a
way to
   configure the requested sets.

3) Stop using lkms.

-- 
    Greg Troxel <gdtir.bbn.com>
build.sh and xen?
user name
2006-07-23 14:18:37
reedreedmedia.net writes:

> How to build kernel modules for xen?
>
> Xen kernel is built with DEBUG and DIAGNOSTIC and the
kernel modules are 
> not so they conflict.
>
> So I want to build modules with those options. But I
don't see any 
> build.sh config for building just modules.

I think this is really a general problem of lkm vs kernel
options and
not about xen, except that xen kenrels have DEBUG/DIAGNOSTIC
set.

I added

CPPFLAGS+=      -DDIAGNOSTIC

to /usr/src/sys/lkm/Makefile.inc

and then build.sh builds lkms with DIAGNOSTIC.  Of course,
they then
don't work with non-DIAGNOSTIC kernels.

I think what is needed is either

1) treat lkms needing a flag as a bug and fix them.  This is
probably
   too hard.

2) Enumerate the n flags that matter in some config file,
and build
   2^n flavors of lkms with build.sh, or perhaps just have a
way to
   configure the requested sets.

3) Stop using lkms.

-- 
    Greg Troxel <gdtir.bbn.com>
build.sh and xen?
user name
2006-07-23 14:29:34
On Sun, Jul 23, 2006 at 10:18:37AM -0400, Greg Troxel wrote:
> 
> reedreedmedia.net writes:
> 
> > How to build kernel modules for xen?
> >
> > Xen kernel is built with DEBUG and DIAGNOSTIC and
the kernel modules are 
> > not so they conflict.
> >
> > So I want to build modules with those options. But
I don't see any 
> > build.sh config for building just modules.
> 
> I think this is really a general problem of lkm vs
kernel options and
> not about xen, except that xen kenrels have
DEBUG/DIAGNOSTIC set.

Not only. xen has different definitions for e.g.
splfoo()/splx()

-- 
Manuel Bouyer <bouyerantioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la
difference
--
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )