LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2008, 05:22 AM   #1
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
problem in makefile...


Hello,
i am new to linux..i have an error in makefile...actually i want to compile the usbcore module using "make"...but i didnt get the .ko file....the compilation process of "make" is given below...

sharief@sharief-desktop:~/Desktop/drivers/core$ make
make -C /lib/modules/2.6.26/build M=/home/sharief/Desktop/drivers/core modules
make[1]: Entering directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
Building modules, stage 2.
MODPOST 0 modules
make[1]: Leaving directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
sharief@sharief-desktop:~/Desktop/drivers/core$


but when i compile the "helloworld" module its working ....its given below

sharief@sharief-desktop:~/Desktop/a$ make
make -C /lib/modules/2.6.26/build M=/home/sharief/Desktop/a modules
make[1]: Entering directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
CC [M] /home/sharief/Desktop/a/a.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/sharief/Desktop/a/a.mod.o
LD [M] /home/sharief/Desktop/a/a.ko
make[1]: Leaving directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'


what is the problem in the first make file...how to clear that error....i am using Ubuntu 7.10...kernel version 2.6.26

Last edited by shariefbe; 12-07-2008 at 05:24 AM.
 
Old 12-07-2008, 12:58 PM   #2
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
This is my makefile:

usbcore-objs := usb.o hub.o hcd.o urb.o message.o driver.o \
config.o file.o buffer.o sysfs.o endpoint.o \
devio.o notify.o generic.o quirks.o

ifeq ($(CONFIG_PCI),y)
usbcore-objs += hcd-pci.o
endif

ifeq ($(CONFIG_USB_DEVICEFS),y)
usbcore-objs += inode.o devices.o
endif

obj-$(CONFIG_USB) += usbcore.o

ifeq ($(CONFIG_USB_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
 
Old 12-07-2008, 10:56 PM   #3
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
can anyone explain what it is?

CONFIG_PCI
CONFIG_USB_DEVICEFS
CONFIG_USB
CONFIG_USB_DEBUG
EXTRA_CFLAGS += -DDEBUG


Explain this please...or tell the link where it is explained clearly..i didnt find any link in the net...somebody help me

Last edited by shariefbe; 12-07-2008 at 11:24 PM.
 
Old 12-08-2008, 01:10 PM   #4
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
sorry....i am new to linux....if i ask any stupid thing forgive me..

whether i have to use "obj-m := usbcore.o"

but i have obj-$(CONFIG_USB) += usbcore.o
is it different?if i have to put your code "obj-m := usbcore.o" in my makefile means where to put that in my makefile...kindly help me...Thanks for your patience reply
 
Old 12-21-2008, 12:46 AM   #5
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
Can anyone tell me what is the error in this make :

sharief@sharief-desktop:~/Desktop/drivers/host$ make
make -C /lib/modules/2.6.26/build M=/home/sharief/Desktop/drivers/host modules
make[1]: Entering directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
CC [M] /home/sharief/Desktop/drivers/host/pci-quirks.o
CC [M] /home/sharief/Desktop/drivers/host/ehci-hcd.o
CC [M] /home/sharief/Desktop/drivers/host/isp116x-hcd.o
CC [M] /home/sharief/Desktop/drivers/host/ohci-hcd.o
CC [M] /home/sharief/Desktop/drivers/host/uhci-hcd.o
CC [M] /home/sharief/Desktop/drivers/host/sl811-hcd.o
CC [M] /home/sharief/Desktop/drivers/host/sl811_cs.o
CC [M] /home/sharief/Desktop/drivers/host/u132-hcd.o
/home/sharief/Desktop/drivers/host/u132-hcd.c:250:30: error: ../misc/usb_u132.h: No such file or directory
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘read_roothub_info’:

/home/sharief/Desktop/drivers/host/u132-hcd.c:432: error: implicit declaration of function ‘usb_ftdi_elan_read_pcimem’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘u132_hcd_monitor_work’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:503: error: implicit declaration of function ‘ftdi_elan_gone_away’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘edset_input’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:587: error: implicit declaration of function ‘usb_ftdi_elan_edset_input’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘edset_setup’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:597: error: implicit declaration of function ‘usb_ftdi_elan_edset_setup’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘edset_single’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:607: error: implicit declaration of function ‘usb_ftdi_elan_edset_single’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘edset_output’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:617: error: implicit declaration of function ‘usb_ftdi_elan_edset_output’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘u132_hcd_configure_input_recv’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:957: error: implicit
declaration of function ‘usb_ftdi_elan_edset_empty’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘u132_hcd_endp_work_scheduler’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:1378: error: implicit declaration of function ‘usb_ftdi_elan_edset_flush’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘u132_periodic_reinit’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:1545: error: implicit declaration of function ‘usb_ftdi_elan_write_pcimem’
/home/sharief/Desktop/drivers/host/u132-hcd.c: In function ‘u132_hcd_start’:
/home/sharief/Desktop/drivers/host/u132-hcd.c:1816: error: dereferencing pointer to incomplete type
/home/sharief/Desktop/drivers/host/u132-hcd.c:1818: error: dereferencing pointer to incomplete type
make[2]: *** [/home/sharief/Desktop/drivers/host/u132-hcd.o] Error 1
make[1]: *** [_module_/home/sharief/Desktop/drivers/host] Error 2
make[1]: Leaving directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
make: *** [all] Error 2
sharief@sharief-desktop:~/Desktop/drivers/host
$
 
Old 12-23-2008, 12:46 PM   #6
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
I cleared all the errors...but modules is not installing....getting the below errors....

sharief@sharief-desktop:~/Desktop/drivers/host$ modprobe ehci-hcd
FATAL: Module ehci_hcd not found.
sharief@sharief-desktop:~/Desktop/drivers/host$ modprobe uhci-hcd
FATAL: Module uhci_hcd not found.
sharief@sharief-desktop:~/Desktop/drivers/host$ modprobe ohci-hcd
FATAL: Module ohci_hcd not found.


can anyone help me what to do....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
makefile problem sancho1980 Linux - General 9 08-06-2007 09:22 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 04:57 AM
Another problem with Makefile lucs Slackware 3 02-14-2005 06:06 PM
Problem with Makefile lucs Slackware 7 02-11-2005 10:18 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration