Re: Problems with building own module

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

 



Hello Ben!

So your Kconfig file looks something like this

> config DVB_DRIVER
>         tristate "DVB Driver"
>         depends on <something>
>         help
>         DVB Driver module

and your v4l/.config file contains a line saying

> CONFIG_DVB_DRIVER=m

I noticed that in your Makefile you have written

> obj-$(CONFIG_DVB_DRIVER)     := dvb-driver.o

but it should rather be

> obj-$(CONFIG_DVB_DRIVER)     += dvb-driver.o

Cheers,
Christian.

Ben Backx wrote:
> Hi,
> 
> I was able to enable my module in "make config" (though only by removing the
> ieee1394 dependancy), but even then, no module is compiled :-(
> 
> 
> Greetings,
> Ben
> 
> -----Original Message-----
> From: Christian Praehauser [mailto:cpraehaus@xxxxxxxxxxxxxx] 
> Sent: 20 December 2007 12:06
> To: Ben Backx
> Cc: linux-dvb@xxxxxxxxxxx
> Subject: Re:  Problems with building own module
> 
> Hello!
> 
> Did you do a "make config" and enabled your module for the build process?
> 
> Cheers,
> Christian.
> 
> Ben Backx wrote:
>> Hi,
>>
>>  
>>
>> I'm almost finished with the beta of a new driver, but the final part is 
>> giving me a headache.
>>
>> I created my own Makefile, and as long as I compile with that Makefile, 
>> everything goes fine (except insmodding, but perhaps this goes better 
>> when I build the module together with the rest of the v4l-tree).
>>
>> First, my system specs:
>>
>> It's an AMD Athlon XP 2500+ with Ubuntu 7.10 and standard kernel of 
>> Ubuntu (version 2.6.22-14).
>>
>>  
>>
>> The makefile I created looks something like this:
>>
>>  
>>
>> *obj-m += dvb-driver.o*
>>
>> * *
>>
>> *dvb-driver-objs := driver.o otherfile.o another.o*
>>
>> * *
>>
>> *EXTRA_CFLAGS := -I/usr/src/linux-source-2.6.22/drivers/ieee1394*
>>
>> *EXTRA_CFLAGS += -I/usr/src/linux-source-2.6.22/drivers/media/dvb/dvb-core
> *
>> *EXTRA_CFLAGS += -I/usr/src/linux-headers-$(shell uname -r)*
>>
>> *EXTRA_CFLAGS += -I/usr/src/linux-headers-$(shell uname -r)/include*
>>
>> * *
>>
>> *all:*
>>
>> *                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) 
>> modules*
>>
>> * *
>>
>> *clean:*
>>
>> *                make -C /lib/modules/$(shell uname -r)/build M=$(PWD) 
>> clean*
>>
>> * *
>>
>> Compilation using this file goes fine.
>> So, I modified this file as is stated in README.patches and created 
>> something like this:
>>
>>  
>>
>> *obj-$(CONFIG_DVB_DRIVER)     := dvb-driver.o*
>>
>> **
>>
>> *dvb-driver-objs := driver.o otherfile.o another.o*
>>
>> * *
>>
>> *EXTRA_CFLAGS := -I/usr/src/linux-source-2.6.22/drivers/ieee1394*
>>
>> *EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core*
>>
>> **
>>
>> *driver.c: driver.h otherfile.h another.h*
>>
>> *otherfile.c: otherfile.h driver.h*
>>
>> *another.c: another.h otherfile.h*
>>
>> * *
>>
>> I added all the source-files to the directory dvb-driver in the folder 
>> linux/drivers/media/dvb off the v4l-dvb-tree.
>>
>> Then, I modified linux/drivers/media/dvb/Makefile so it contains the 
>> folder of my driver. Finally, I added "source 
>> "drivers/media/dvb/dvb-driver/Kconfig" to linux/drvers/media/dvb/Kconfig.
>>
>>  
>>
>> Now, when I try to build the complete library, there's no dvb-driver.o 
>> (or any other off the .o-files) created. Some source-files are copied to 
>> the v4l-directory, but no object is created.
>>
>> Can anyone help me out with this? Because I'm rather stuck for the moment
> L
>>  
>>
>>  
>>
>> Greetings,
>>
>> Ben
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> linux-dvb mailing list
>> linux-dvb@xxxxxxxxxxx
>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
> 
> 


-- 
Christian Praehauser <cpraehaus@xxxxxxxxxxxxxx>
|| //\\//\\ || Multimedia Communications Group,
||//  \/  \\|| Department of Computer Sciences, University of Salzburg
http://www.cosy.sbg.ac.at/~cpraehaus/
http://www.network-research.org/
http://www.uni-salzburg.at/

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux