On Tuesday 19 April 2005 17:27, yinyang wrote:
> Hi!
>
> In the User-Mode-Linux-HOWTO, the section of compiling and installing
> kernel modules discriptes those: "If you try building an external module
> against a UML tree, you will find that it doesn't compile because of
> missing includes. There are less obvious problems with the CFLAGS that the
> module Makefile or script provides which would make it not run even if it
> did build. To get around this, you need to provide the same CFLAGS that the
> UML kernel build uses.
>
> A reasonably slick way of getting the UML CFLAGS is
>     cd uml-tree ; make script '[EMAIL PROTECTED] $(CFLAGS)' ARCH=um
>
>
> If the module build process has something that looks like
>
>      $(CC) $(CFLAGS) file
> then you can define CFLAGS in a script like this
>
>     CFLAGS=`cd uml-tree ; make script '[EMAIL PROTECTED] $(CFLAGS)' ARCH=um`
>
> and like this in a Makefile
>
>     CFLAGS=$(shell cd uml-tree ; make script '[EMAIL PROTECTED] $(CFLAGS)'
> ARCH=um)"
>
> I know this method is works well with kernel 2.4, but  how can do with
> kernel 2.6?  Thanks!!
2.6 has explicit support for building external modules (it is explained in the 
Documentation/kbuild directory, or on some http://lwn.net/Kernel articles).

It will work for UML as it does for any architecture.

Regards
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
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