Re: 'hello world' module

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

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux