Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] How to compile a module for dom0 or domU kernel?

To: "ashutosh mehra" <ashutosh.xen@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] How to compile a module for dom0 or domU kernel?
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 15:31:02 +0900
Delivery-date: Tue, 30 Oct 2007 23:29:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <bb4253730710300011j49dc4e84l9fe122d75f935af9@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <bb4253730710300011j49dc4e84l9fe122d75f935af9@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

>I am trying to create a new module for a domU kernel (which FYI, includes
>the xen/xenbus.h header file), but I'm unable to figure out how to compile
>it. What should be the command and the Makefile for compiling the module? I
>tried compiling it like a linux kernel module, but I guess I didn't give the
>correct path. None of the paths I tried with -C worked.
Did you use different vmlinuxs between dom0 and domU?
If using the same vmlinux, you can compile it on dom0 with the same way as 
linux.
For example, like the below.
"make -C /lib/modules/`uname -r`/build M=`pwd` V=1 modules"

If no, I think you should be able to use like the below.
"make -C /home/hoge/xen-unstable.hg/build-linux-2.6.18-xenU_ia64 M=`pwd` V=1 
modules"

Best Regards,

Akio Takebe


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel