bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in kernel module


From: Sam Ravnborg
Subject: Re: Error in kernel module
Date: Thu, 24 May 2007 19:36:26 +0200
User-agent: Mutt/1.4.2.1i

On Thu, May 24, 2007 at 05:24:21AM +0100, ajay parashar wrote:
> Hi,
>   I am using fedora 6. i write a simple hello world kernel module 
>   i write following makefile for building this module.
>   ###############################
>    
>   obj-m+=hello.o
>   all:
>       make -c /lib/modules/ $(shell uname -r)/ build M=$(PWD) modules 
>   clean:
>          make -c /lib/modules/ $(shell uname -r)/ build M=$(PWD) clean
>    
>   ##############################
>   while runnimg make i am getting this error
>   
> " This program is built for i686-redhat-linux-gnu
> report bugs to <address@hidden >
> make *** [all] Error2 "
> could you please let me know what is the issue.

>From the linux kernel source - Documentation/kbuild/modules.txt:
-----------------------------------------------------------------------
=== 2. How to build external modules

kbuild offers functionality to build external modules, with the
prerequisite that there is a pre-built kernel available with full source.
A subset of the targets available when building the kernel is available
when building an external module.

--- 2.1 Building external modules

        Use the following command to build an external module:

                make -C <path-to-kernel> M=`pwd`

        For the running kernel use:

                make -C /lib/modules/`uname -r`/build M=`pwd`

        For the above command to succeed, the kernel must have been
        built with modules enabled.

        To install the modules that were just built:

                make -C <path-to-kernel> M=`pwd` modules_install

        More complex examples will be shown later, the above should
        be enough to get you started.

-----------------------------------------------------------------------

As you can see from the above you shall useupper case 'C'.

Can I please ask you to post kernel related questions to address@hidden
in the future. This is where the kernel people hangs out.

And do not be shy and post all source + all output next time.

Thanks,
        Sam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]