Re: Re: [Fwd: NEWBIE!: What is wrong with this Makefile?]

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

 



I made that change and ran into two issues:
1. I get circular dependency error for sillymod.o
2. I still get sillymod: module license 'unspecified' taints kernel msg. And, printk did not work.

/kmk
=====================
From: "K.R. Foley" <kr@xxxxxxxxxx>
Date: Wed Apr 20 12:08:30 CDT 2005
To: kmkumar@xxxxxxxxxxx
Cc: kernelnewbies@xxxxxxxxxxxx
Subject: Re: [Fwd: NEWBIE!: What is wrong with this Makefile?]

Muthu Kumar wrote:
> I've test module that spans two files. sillymod.c and sillymod_test.c.  
> I use the following Makefile to compile the module under 2.6 kernel.  
>   
> --------------------------------------------------- 
> ifeq ($(KSRC),) 
> KSRC=/lib/modules/2.6.5-1.358custom/build 
> endif 
>  
> obj-m := sillymod.o 
> sillymod-objs := sillymod_test.o 

To start with add sillymod.o the line above like:
sillymod-objs := sillymod_test.o sillymod.o

>  
> build: 
>         make -C $(KSRC) SUBDIRS=`pwd` modules 
>  
> install: 
>         @# completely broken ATM - removes the whole dir 
>         @#make -C $(KSRC) SUBDIRS=`pwd` modules_install 
>         @echo "Install it yourself ..." 
>  
> clean: 
>         @# kbuild can't handle this (yet ?) 
>         @#make -C $(KSRC) SUBDIRS=`pwd` clean 
>         rm -f *.o *.ko *.mod.o *.mod.c .*.{cmd,flags} 
>         rm -rf config.status config.log autom4te*.cache 
>  
>  ---------------------------------- 
>  
> When I insmod sillymod.ko, I get "module license 'unspecified' taints kernel 
> error. And, printk didnt work. 
>  
> If I comment out sillymod-objs line from the Makefile, then I don't get the 
> above error and printk works! 
>  
> The MODULE_LICENSE macro is in sillymod.c. 
>  
> Whats up with this Makefile? 
>  
> Thanks 
> /kmk 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 


-- 
    kr

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux