[ENBD] Re: UML and enbd issues

P.T. Breuer ptb at it.uc3m.es
Fri Jul 2 08:25:01 MDT 2004


In article <20040702132812.GA28691 at blop.info> you wrote:
> I've been trying to get enbd to work in UML. I used enbd enbd-2.4.31.

Hi - it works fine (I know, becaue I tried it under uml).

> I compiled the module against the debian uml kernel (a 2.4.26 one).

Really? How? One needs special compile options for uml kernels.

> Looking at the archives, it seems Julien Rennard had problems doing
> this. Here is how I proceeded :
> apt-get source user-mode-linux
> cd user-mode-linux-2.4.26-1um
> dpkg-buildpackage
> Now that I have a correct source tree, I compiled the enbd module
> against it :
> in enbd's Makefile :
> LINUXDIR = /home/lucas/user-mode-linux-2.4.26-1um/kernel-source-2.4.26/

This is not enough. To compile against a uml kernel you need several
special flags. I thought the enbd-2.4.32 archive Makefile has UML
support built in ... umm. Yes!

You want to do

   make ARCH=um module

in the enbd directory (as well as your LINUXDIR change). That will set
the right compile flags automatically.

The makefile contains the following rubric:

ifeq ($(ARCH),um)
SUBARCH := $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sun4u/sparc64/' -e 's/arm.*/arm/' -e 's/sa110/arm/')
EXTRA_CFLAGS+=  -DUM_FASTCALL  \
                -D__arch_$(ARCH)__ \
                -DSUBARCH=\"$(SUBARCH)\" \
                -D_LARGEFILE64_SOURCE \
                -I$(LINUXDIR)/arch/$(ARCH)/include \
                -Derrno=kernel_errno \
                -I$(LINUXDIR)/arch/$(ARCH)/kernel/tt/include \
                -I$(LINUXDIR)/arch/$(ARCH)/kernel/skas/include
endif


> (or whatever suits you)

If the Makefile "out there" does not have that in, my apolgies. It's in
the works, then.


Peter


More information about the ENBD mailing list