Re: Problems with building own module

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

 



The second CFLAGS-rule of the modified makefile looks like this off-course:

EXTRA_CFLAGS += -I/usr/src/linux-source-2.6.22/drivers/media/dvb/dvb-core

 

Apparently, something went wrong during copy-paste :-s

 

From: linux-dvb-bounces@xxxxxxxxxxx [mailto:linux-dvb-bounces@xxxxxxxxxxx] On Behalf Of Ben Backx
Sent: 20 December 2007 10:09
To: linux-dvb@xxxxxxxxxxx
Subject: Problems with building own module

 

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

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

  Powered by Linux