printk is not my friend

Charles Brown charles.brown at sensis.com
Mon Apr 5 19:02:38 UTC 2010


OK. so if i 'touch driver.c', leave it empty, and do this in the makefile'

ifneq ($(KERNELRELEASE),)
       obj-m := driver.o
       driver-objs := hello.o cdev.o

everything is happy.

--CB

Charles Brown wrote:
> my problem seems to be a Makefile issue.  Following LDD3, i had started
> a char driver file (cdev.c), which i planned to add to hello.c, and i'd
> done this in the makefile;
> 
> ifneq ($(KERNELRELEASE),)
>      obj-m := hello.o
>      hello-objs := cdev.o
> 
> if i take out that 'cdev.o' it works.  I re-read that section of LDD3,
> "If, instead, you have a module called module.ko that is generated from
> two source files (called, say, file1.c and file2.c), the correct
> incantation would be:
> 
> obj-m := module.o
> module-objs := file1.o file2.o
> 
> So, i tried this;
> 
> ifneq ($(KERNELRELEASE),)
>      obj-m := module.o
>      hello-objs := hello.o cdev.o
> 
> but make says, "No rule to make diver.c".
> 
> --CB
> 
> 
>
-
This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 
-                                                                                                                                                                                                                                                       




More information about the kernel-team mailing list