Hi,
The probelm is solved.
The directory "/root/munees/work/test" contains source code "test.c" and "Makefile".
In file "Makefile",
obj-m := test.o
In the command line, i have entered:
make -C /usr/src/linux-2.6.20a SUBDIRS=/root/munees/work/test modules
test.ko successfully created
and "insmod test.ko" is working fine.
Thanks for your support.
Thanks & Regards,
Munees.
Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
On Tue, 2006-03-28 at 20:30 -0800, munees waran wrote:
>
> Hi All,
>
> I have developed hello world program in Red hat linux (kernel version
> 2.4). Then I tried to port it in suse linux (kernel version 2.6).
>
> I got the following error:
> insmod: error inserting 'hello.o' :-l Invalid module format
>
> Pls help me to resolve this issue.
>
you mis-built the module for 2.6, you need a very different makefile for
a 2.6 kernel. See Documentation/kbuild for details and examples
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.