Re: 'hello world' module

From: Edward Macfarlane Smith
Date: Mon Jun 13 2005 - 15:14:25 EST


On Saturday 11 June 2005 13:11, Ilan S. wrote:
> Hello dear professionals!
>
> I would be very thankful if anybody prompt me what's wrong.
> I'm trying to build the "Hello world" module from O'Reilly's "Linux device
> drivers" and that is what I get:
>
> [ilanso@Netvision Kernel]$ make -C /home/ilanso/src/linux-2.6.11.11 M=`pwd`
> make: Entering directory `/home/ilanso/src/linux-2.6.11.11'
> Building modules, stage 2.
> MODPOST
> make: Leaving directory `/home/ilanso/src/linux-2.6.11.11'
> [ilanso@Netvision Kernel]$ ls
> hello.c Makefile
> [ilanso@Netvision Kernel]$
>

Hi Ilan,
I've been working through this book too, not sure why it's not working for
you. Have you actually built the kernel in the directory you're pointing it
at? I was able to use the command:
make -C /usr/src/linux M=`pwd`
where my Makefile had
obj-m := eaglenet.o
The makefile I've generally used that works fine (so you can just type make)
was:
ifneq ($(KERNELRELEASE),)
obj-m := eaglenet.o
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

endif
Where my module was eaglenet.
Regards,
Edward
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/