LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-07-2007, 08:18 PM   #1
bravotsx
LQ Newbie
 
Registered: Jul 2007
Location: Berkeley, CA
Distribution: Fedora
Posts: 7

Rep: Reputation: 0
How do you use the make command for building a driver module?


Hi! I downloaded the highpoint 464 raid open source drivers from their website - http://www.highpoint-tech.com/USA/bios_rr464.htm

when I try to run make, I get the following error message. Please help!

I'm not sure how to use make - all I know is that after figuring out how to make the driver disk for 2.6.15, I couldn't use the .ko for that version - I got an error like invalid module format.

-------------------------------------------
[root@terrance-596254 hpt374]# uname -a
Linux terrance-596254.domain_not_set.invalid 2.6.20-1.2320.fc5 #1 Tue Jun 12 18:50:38 EDT 2007 i686 athlon i386 GNU/Linux
[root@terrance-596254 hpt374]# make KERNELDIR=/usr/src/linux-2.6.20-1
grep: /usr/src/linux-2.6.20-1/include/linux/version.h: No such file or directoryexpr: syntax error
gcc -DDRIVER_VERSION=\"2.17\" -DLIST_H_INCLUDED -DMODVERSIONS -DMODULE -DLINUX -D_LINUX_ -D__KERNEL__=1 -DCONFIG_PCI -DRR154X -DNO_CROSS_CTRL=0 -DSUPPORT_ARRAY -DSUPPORT_OLD_ARRAY -DDBG=0 -Wall -O2 -Wstrict-prototypes -fomit-frame-pointer -I. -I/usr/src/linux-2.6.20-1/include -I/usr/src/linux-2.6.20-1/drivers/scsi -c hpt.c -o hpt.o
make: gcc: Command not found
make: *** [hpt.o] Error 127
[root@terrance-596254 hpt374]#
-------------------------------------------
 
Old 07-07-2007, 09:26 PM   #2
hanafibj
LQ Newbie
 
Registered: Jul 2007
Posts: 1

Rep: Reputation: 0
introduction

i'm hanafibj, newbie for linux. i'm so interested in this os, but i've lack of knowledge for it. i've been trying install openSuSe then successful. in this forum i do really like to have support from this forum. thanks.
 
Old 07-07-2007, 09:59 PM   #3
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by bravotsx
make: gcc: Command not found
Do you have gcc installed on your system? If not, you can probably easily install it through your package manager. You might also need to install kernel headers if they are not already installed. If you need help with your package manager you should let us know which distro you are using.
 
Old 07-07-2007, 10:06 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by hanafibj
i'm hanafibj, newbie for linux. i'm so interested in this os, but i've lack of knowledge for it. i've been trying install openSuSe then successful. in this forum i do really like to have support from this forum. thanks.
Hi hanafibj,

I think you may have posted this in the wrong place. There is a forum for introducing yourself which you can find by clicking here. In any case, you should probably start your own thread.
 
Old 07-07-2007, 10:14 PM   #5
bravotsx
LQ Newbie
 
Registered: Jul 2007
Location: Berkeley, CA
Distribution: Fedora
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by blackhole54
Do you have gcc installed on your system? If not, you can probably easily install it through your package manager. You might also need to install kernel headers if they are not already installed. If you need help with your package manager you should let us know which distro you are using.
i'm using FC5 - I suppose once I figure this out, I can use FC7.

yeah, I realized GCC wasn't installed. Also I didn't have the version.h (or the entire kernal source for that matter) installed. So far I've downloaded both.

is there a security advantage with using fc7 over fc5 w/ all the updates?

omg..i did yum install gcc, then tried make again..and i got this...

Quote:
[root@terrance-596254 hpt374]# make KERNELDIR=/usr/src/linux-2.6.20-1 RR154X=0
grep: /usr/src/linux-2.6.20-1/include/linux/version.h: No such file or directory
expr: syntax error
gcc -DDRIVER_VERSION=\"2.17\" -DLIST_H_INCLUDED -DMODVERSIONS -DMODULE -DLINUX -D_LINUX_ -D__KERNEL__=1 -DCONFIG_PCI -DNO_CROSS_CTRL=0 -DSUPPORT_ARRAY -DSUPPORT_OLD_ARRAY -DDBG=0 -Wall -O2 -Wstrict-prototypes -fomit-frame-pointer -I. -I/usr/src/linux-2.6.20-1/include -I/usr/src/linux-2.6.20-1/drivers/scsi -c hpt.c -o hpt.o
In file included from hpt.c:1:
/usr/include/linux/config.h:5:2: error: #error Incorrectly using glibc headers for a kernel module
In file included from hpt.c:5:
/usr/include/linux/modversions.h:1:2: error: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: error: #error but rather headers from the appropriate kernel package.
/usr/include/linux/modversions.h:3:2: error: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: error: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: error: #error to build against the currently-running kernel.
In file included from /usr/include/linux/sched.h:13,
from hpt.c:8:
/usr/include/linux/times.h:7: error: expected specifier-qualifier-list before ‘clock_t’
In file included from /usr/include/linux/sched.h:14,
from hpt.c:8:
/usr/include/linux/timex.h:148: error: field ‘time’ has incomplete type
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from hpt.c:8:
/usr/include/asm/signal.h:107: error: expected specifier-qualifier-list before ‘sigset_t’
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/sched.h:25,
from hpt.c:8:
/usr/include/asm/siginfo.h:48: error: expected specifier-qualifier-list before ‘clock_t’
In file included from /usr/include/linux/sched.h:65,
from hpt.c:8:
/usr/include/linux/time.h:10: error: expected specifier-qualifier-list before ‘time_t’
/usr/include/linux/time.h:18: error: expected specifier-qualifier-list before ‘time_t’
In file included from /usr/include/linux/sched.h:69,
from hpt.c:8:
/usr/include/asm/processor.h:73: error: array type has incomplete element type
In file included from /usr/include/linux/blkdev.h:8,
from /usr/include/linux/blk.h:4,
from hpt.c:12:
/usr/include/asm/io.h:4:2: warning: #warning <asm/io.h> is deprecated, use <sys/io.h> instead
In file included from hpt.c:12:
/usr/include/linux/blk.h:13:2: error: #endif without #if
hpt.c:17:22: error: linux/mm.h: No such file or directory
In file included from /usr/include/linux/interrupt.h:9,
from hpt.c:18:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from hpt.c:18:
/usr/include/linux/interrupt.h:12:25: error: asm/hardirq.h: No such file or directory
/usr/include/linux/interrupt.h:13:25: error: asm/softirq.h: No such file or directory
hpt.c:22:26: error: linux/string.h: No such file or directory
hpt.c:27:24: error: linux/slab.h: No such file or directory
hpt.c:29:25: error: linux/delay.h: No such file or directory
hpt.c:34:25: error: linux/timer.h: No such file or directory
In file included from hpt.c:45:
/usr/include/asm/dma.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dma_spin_lock’
/usr/include/asm/dma.h: In function ‘claim_dma_lock’:
/usr/include/asm/dma.h:143: error: ‘dma_spin_lock’ undeclared (first use in this function)
/usr/include/asm/dma.h:143: error: (Each undeclared identifier is reported only once
/usr/include/asm/dma.h:143: error: for each function it appears in.)
/usr/include/asm/dma.h: In function ‘release_dma_lock’:
/usr/include/asm/dma.h:149: error: ‘dma_spin_lock’ undeclared (first use in this function)
In file included from hpt.c:45:
/usr/include/asm/dma.h:298:2: warning: #warning Using kernel headers in userspace!
In file included from hpt.c:47:
/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include <endian.h> instead!
hpt.c:49:25: error: asm/uaccess.h: No such file or directory
hpt.c:64:18: error: scsi.h: No such file or directory
hpt.c:79:19: error: hosts.h: No such file or directory
hpt.c:84:16: error: sd.h: No such file or directory
hpt.c: At top level:
hpt.c:135: warning: ‘struct Scsi_Host’ declared inside parameter list
hpt.c:135: warning: its scope is only this definition or declaration, which is probably not what you want
hpt.c: In function ‘sd_inuse’:
hpt.c:137: error: ‘Scsi_Device’ undeclared (first use in this function)
hpt.c:137: error: ‘SDptr’ undeclared (first use in this function)
hpt.c:137: error: dereferencing pointer to incomplete type
In file included from entry.c:7,
from hpt.c:161:
oslinux.h: At top level:
oslinux.h:94: error: expected specifier-qualifier-list before ‘Scsi_Cmnd’
oslinux.h:141: error: expected specifier-qualifier-list before ‘dma_addr_t’
oslinux.h:155: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_lock’
In file included from hpt.c:161:
entry.c:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘DPC_Request_Nums’
entry.c:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘DpcQueueLock’
entry.c:88: error: variable ‘hpt_notify_wt’ has initializer but incomplete type
entry.c:88: error: ‘MUTEX_LOCKED’ undeclared here (not in a function)
entry.c:90: error: variable ‘hpt_queue_wt’ has initializer but incomplete type
entry.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_lock’
entry.c:105: error: expected ‘)’ before ‘*’ token
entry.c:115: error: expected declaration specifiers or ‘...’ before ‘ulong’
entry.c:115: warning: ‘struct notifier_block’ declared inside parameter list
entry.c:116: error: variable ‘hpt_notifier’ has initializer but incomplete type
entry.c:117: warning: excess elements in struct initializer
entry.c:117: warning: (near initialization for ‘hpt_notifier’)
entry.c:117: warning: excess elements in struct initializer
entry.c:117: warning: (near initialization for ‘hpt_notifier’)
entry.c:118: warning: excess elements in struct initializer
entry.c:118: warning: (near initialization for ‘hpt_notifier’)
entry.c: In function ‘GetStamp’:
entry.c:125: error: ‘jiffies’ undeclared (first use in this function)
entry.c: In function ‘Irq_Handler’:
entry.c:145: error: ‘io_request_lock’ undeclared (first use in this function)
entry.c:146: error: ‘driver_lock’ undeclared (first use in this function)
entry.c:150: error: dereferencing pointer to incomplete type
entry.c:156: error: dereferencing pointer to incomplete type
entry.c:156: warning: implicit declaration of function ‘atomic_read’
entry.c:156: error: ‘DPC_Request_Nums’ undeclared (first use in this function)
entry.c: At top level:
entry.c:191: error: expected ‘)’ before ‘*’ token
entry.c: In function ‘Check_Idle_Call’:
entry.c:197: warning: implicit declaration of function ‘up’
entry.c:205: warning: implicit declaration of function ‘printk’
entry.c:214: error: dereferencing pointer to incomplete type
entry.c:216: error: ‘Scsi_Cmnd’ undeclared (first use in this function)
entry.c:216: error: ‘SCpnt’ undeclared (first use in this function)
entry.c:216: error: expected expression before ‘)’ token
entry.c:216: error: dereferencing pointer to incomplete type
entry.c:217: warning: implicit declaration of function ‘Release_SC’
entry.c:217: error: dereferencing pointer to incomplete type
entry.c:218: error: ‘OsSendCommand’ undeclared (first use in this function)
entry.c: At top level:
entry.c:222: error: expected ‘)’ before ‘*’ token
entry.c:234: error: expected ‘)’ before ‘*’ token
entry.c:251: error: expected ‘)’ before ‘*’ token
entry.c:264: error: expected ‘)’ before ‘*’ token
entry.c:288: warning: ‘struct scsi_cmnd’ declared inside parameter list
entry.c: In function ‘scsicmd_buf_put’:
entry.c:290: error: dereferencing pointer to incomplete type
entry.c: At top level:
entry.c:301: error: expected declaration specifiers or ‘...’ before ‘u8’
entry.c:301: error: expected declaration specifiers or ‘...’ before ‘u32’
entry.c:301: error: expected declaration specifiers or ‘...’ before ‘u32’
entry.c: In function ‘fill_msense_rw_recovery’:
entry.c:303: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘page’
entry.c:303: error: ‘page’ undeclared (first use in this function)
entry.c:303: error: expected expression before ‘]’ token
entry.c:304: error: ‘u32’ undeclared (first use in this function)
entry.c:304: error: expected ‘;’ before ‘buf_len’
entry.c:306: error: ‘buf_len’ undeclared (first use in this function)
entry.c:306: error: ‘bufflen’ undeclared (first use in this function)
entry.c:307: warning: implicit declaration of function ‘memcpy’
entry.c:307: warning: incompatible implicit declaration of built-in function ‘memcpy’
entry.c:307: error: ‘p’ undeclared (first use in this function)
entry.c: At top level:
entry.c:312: error: expected declaration specifiers or ‘...’ before ‘u8’
entry.c:312: error: expected declaration specifiers or ‘...’ before ‘u32’
entry.c:312: error: expected declaration specifiers or ‘...’ before ‘u32’
entry.c: In function ‘fill_msense_caching’:
entry.c:314: error: ‘u8’ undeclared (first use in this function)
entry.c:314: error: expected ‘;’ before ‘page’
entry.c:319: error: ‘u32’ undeclared (first use in this function)
entry.c:319: error: expected ‘;’ before ‘buf_len’
entry.c:324: error: ‘page’ undeclared (first use in this function)
entry.c:328: error: ‘buf_len’ undeclared (first use in this function)
entry.c:328: error: ‘bufflen’ undeclared (first use in this function)
entry.c:329: warning: incompatible implicit declaration of built-in function ‘memcpy’
entry.c:329: error: ‘p’ undeclared (first use in this function)
entry.c: At top level:
entry.c:334: error: expected ‘)’ before ‘*’ token
entry.c:349: error: expected declaration specifiers or ‘...’ before ‘Scsi_Cmnd’
entry.c: In function ‘do_mode_sense’:
entry.c:351: error: ‘u8’ undeclared (first use in this function)
entry.c:351: error: ‘cdb’ undeclared (first use in this function)
entry.c:351: error: ‘SCpnt’ undeclared (first use in this function)
entry.c:351: error: ‘p’ undeclared (first use in this function)
entry.c:351: warning: left-hand operand of comma expression has no effect
entry.c:366: error: ‘DRIVER_INVALID’ undeclared (first use in this function)
entry.c:366: error: ‘SUGGEST_ABORT’ undeclared (first use in this function)
entry.c:366: error: ‘DID_ABORT’ undeclared (first use in this function)
entry.c:370: error: ‘MODE_SENSE’ undeclared (first use in this function)
entry.c:372: warning: implicit declaration of function ‘scsicmd_buf_get’
entry.c:377: warning: implicit declaration of function ‘memset’
entry.c:377: warning: incompatible implicit declaration of built-in function ‘memset’
entry.c:381: error: too many arguments to function ‘fill_msense_rw_recovery’
entry.c:385: error: too many arguments to function ‘fill_msense_caching’
entry.c:389: warning: implicit declaration of function ‘fill_msense_ctlmode’
entry.c:393: error: too many arguments to function ‘fill_msense_rw_recovery’
entry.c:394: error: too many arguments to function ‘fill_msense_caching’
entry.c:413: error: ‘DID_OK’ undeclared (first use in this function)
entry.c: At top level:
entry.c:423: error: expected ‘)’ before ‘*’ token
entry.c:549: error: expected ‘)’ before ‘*’ token
entry.c:605: error: expected ‘)’ before ‘*’ token
entry.c:616: error: expected ‘)’ before ‘*’ token
entry.c: In function ‘launch_worker_thread’:
entry.c:633: warning: implicit declaration of function ‘kernel_thread’
entry.c:634: warning: implicit declaration of function ‘down’
entry.c: At top level:
entry.c:644: error: expected ‘)’ before ‘*’ token
entry.c:820: error: expected ‘)’ before ‘*’ token
entry.c: In function ‘hpt3xx_cleanup’:
entry.c:900: error: ‘driver_lock’ undeclared (first use in this function)
entry.c:910: warning: implicit declaration of function ‘del_timer’
entry.c:912: warning: implicit declaration of function ‘kfree’
entry.c:924: warning: implicit declaration of function ‘free_irq’
entry.c: In function ‘hpt3xx_Release’:
entry.c:937: warning: implicit declaration of function ‘unregister_reboot_notifier’
entry.c:938: warning: implicit declaration of function ‘scsi_unregister’
entry.c: At top level:
entry.c:952: error: expected ‘)’ before ‘*’ token
entry.c:982: error: expected declaration specifiers or ‘...’ before ‘ulong’
entry.c:983: error: conflicting types for ‘hpt_halt’
entry.c:115: error: previous declaration of ‘hpt_halt’ was here
entry.c: In function ‘hpt_halt’:
entry.c:984: error: ‘SYS_RESTART’ undeclared (first use in this function)
entry.c:984: error: ‘SYS_HALT’ undeclared (first use in this function)
entry.c:984: error: ‘SYS_POWER_OFF’ undeclared (first use in this function)
entry.c:985: error: ‘NOTIFY_DONE’ undeclared (first use in this function)
entry.c:989: error: ‘NOTIFY_OK’ undeclared (first use in this function)
entry.c: In function ‘fOsBuildSgl’:
entry.c:995: error: ‘Scsi_Cmnd’ undeclared (first use in this function)
entry.c:995: error: ‘SCpnt’ undeclared (first use in this function)
entry.c:995: error: expected expression before ‘)’ token
entry.c:1030: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1030: error: dereferencing pointer to incomplete type
entry.c:1032: warning: implicit declaration of function ‘page_address’
entry.c:1032: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1032: error: dereferencing pointer to incomplete type
entry.c:1032: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1032: error: dereferencing pointer to incomplete type
entry.c:1036: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1036: error: dereferencing pointer to incomplete type
entry.c:1050: warning: implicit declaration of function ‘pci_map_sg’
entry.c:1050: error: dereferencing pointer to incomplete type
entry.c:1051: warning: implicit declaration of function ‘scsi_to_pci_dma_dir’
entry.c:1056: warning: implicit declaration of function ‘sg_dma_address’
entry.c:1056: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1056: error: dereferencing pointer to incomplete type
entry.c:1058: warning: implicit declaration of function ‘sg_dma_len’
entry.c:1058: error: invalid use of undefined type ‘struct scatterlist’
entry.c:1058: error: dereferencing pointer to incomplete type
entry.c:1065: warning: implicit declaration of function ‘pci_map_single’
entry.c:1065: error: dereferencing pointer to incomplete type
entry.c: In function ‘fOsCommandDone’:
entry.c:1081: error: ‘Scsi_Cmnd’ undeclared (first use in this function)
entry.c:1081: error: ‘SCpnt’ undeclared (first use in this function)
entry.c:1081: error: expected expression before ‘)’ token
entry.c:1085: warning: implicit declaration of function ‘pci_unmap_sg’
entry.c:1086: error: dereferencing pointer to incomplete type
entry.c:1092: warning: implicit declaration of function ‘pci_unmap_single’
entry.c:1093: error: dereferencing pointer to incomplete type
entry.c:1103: error: ‘DID_OK’ undeclared (first use in this function)
entry.c:1107: error: ‘DID_BAD_TARGET’ undeclared (first use in this function)
entry.c:1111: error: ‘DID_BUS_BUSY’ undeclared (first use in this function)
entry.c:1119: error: ‘DID_NO_CONNECT’ undeclared (first use in this function)
entry.c:1123: error: ‘DID_RESET’ undeclared (first use in this function)
entry.c:1127: error: ‘DRIVER_INVALID’ undeclared (first use in this function)
entry.c:1127: error: ‘SUGGEST_ABORT’ undeclared (first use in this function)
entry.c:1127: error: ‘DID_ABORT’ undeclared (first use in this function)
entry.c:1131: warning: implicit declaration of function ‘ScsiDone’
entry.c: In function ‘OsSetDeviceTable’:
entry.c:1150: warning: incompatible implicit declaration of built-in function ‘memcpy’
entry.c: In function ‘SetInquiryData’:
entry.c:1156: error: ‘TYPE_DISK’ undeclared (first use in this function)
entry.c:1187: warning: incompatible implicit declaration of built-in function ‘memcpy’
entry.c: In function ‘hpt_worker_thread’:
entry.c:1225: error: variable ‘semQueue’ has initializer but incomplete type
entry.c:1225: error: storage size of ‘semQueue’ isn’t known
entry.c:1226: error: variable ‘sem’ has initializer but incomplete type
entry.c:1226: error: storage size of ‘sem’ isn’t known
entry.c:1236: warning: implicit declaration of function ‘daemonize’
entry.c:1261: warning: implicit declaration of function ‘sprintf’
entry.c:1261: warning: incompatible implicit declaration of built-in function ‘sprintf’
entry.c:1261: error: ‘current’ undeclared (first use in this function)
entry.c:1275: warning: implicit declaration of function ‘down_interruptible’
entry.c:1280: error: dereferencing pointer to incomplete type
entry.c:1284: error: ‘DpcQueueLock’ undeclared (first use in this function)
entry.c:1288: warning: implicit declaration of function ‘atomic_inc’
entry.c:1288: error: ‘DPC_Request_Nums’ undeclared (first use in this function)
entry.c:1294: warning: implicit declaration of function ‘atomic_dec_and_test’
entry.c:1295: error: ‘driver_lock’ undeclared (first use in this function)
entry.c:1296: error: dereferencing pointer to incomplete type
entry.c:1305: warning: implicit declaration of function ‘schedule’
entry.c:1312: warning: implicit declaration of function ‘signal_pending’
entry.c:1226: warning: unused variable ‘sem’
entry.c:1225: warning: unused variable ‘semQueue’
entry.c: In function ‘hpt_queue_dpc’:
entry.c:1346: error: ‘DpcQueueLock’ undeclared (first use in this function)
entry.c: At top level:
entry.c:1366: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘driver_template’
In file included from hpt.c:161:
entry.c:1405:25: error: scsi_module.c: No such file or directory
entry.c: In function ‘pcicfg_read_byte’:
entry.c:1412: warning: implicit declaration of function ‘pcibios_read_config_byte’
entry.c: In function ‘pcicfg_read_word’:
entry.c:1418: warning: implicit declaration of function ‘pcibios_read_config_word’
entry.c: In function ‘pcicfg_read_dword’:
entry.c:1424: warning: implicit declaration of function ‘pcibios_read_config_dword’
entry.c: In function ‘pcicfg_write_byte’:
entry.c:1429: warning: implicit declaration of function ‘pcibios_write_config_byte’
entry.c: In function ‘pcicfg_write_word’:
entry.c:1433: warning: implicit declaration of function ‘pcibios_write_config_word’
entry.c: In function ‘pcicfg_write_dword’:
entry.c:1437: warning: implicit declaration of function ‘pcibios_write_config_dword’
entry.c: In function ‘StallExec’:
entry.c:1569: error: ‘MAX_UDELAY_MS’ undeclared (first use in this function)
entry.c:1569: warning: implicit declaration of function ‘udelay’
entry.c:1569: warning: implicit declaration of function ‘mdelay’
entry.c: In function ‘fOsPhysicalAddress’:
entry.c:1574: warning: implicit declaration of function ‘virt_to_bus’
entry.c: In function ‘os_alloc_page’:
entry.c:1575: warning: implicit declaration of function ‘kmalloc’
entry.c:1575: error: ‘GFP_ATOMIC’ undeclared (first use in this function)
entry.c:1575: warning: return makes pointer from integer without a cast
entry.c: In function ‘os_alloc_dma_page’:
entry.c:1576: error: ‘GFP_ATOMIC’ undeclared (first use in this function)
entry.c:1576: warning: return makes pointer from integer without a cast
entry.c: In function ‘os_printk’:
entry.c:1620: error: ‘va_list’ undeclared (first use in this function)
entry.c:1620: error: expected ‘;’ before ‘ap’
entry.c:1622: warning: implicit declaration of function ‘va_start’
entry.c:1622: error: ‘ap’ undeclared (first use in this function)
entry.c:1623: warning: implicit declaration of function ‘vsprintf’
entry.c:1624: warning: implicit declaration of function ‘va_end’
entry.c: In function ‘os_memcmp’:
entry.c:1628: warning: implicit declaration of function ‘memcmp’
entry.c: In function ‘os_memcpy’:
entry.c:1629: warning: incompatible implicit declaration of built-in function ‘memcpy’
entry.c: In function ‘os_memset’:
entry.c:1630: warning: incompatible implicit declaration of built-in function ‘memset’
entry.c: In function ‘os_strlen’:
entry.c:1631: warning: implicit declaration of function ‘strlen’
entry.c:1631: warning: incompatible implicit declaration of built-in function ‘strlen’
In file included from hpt.c:162:
hptproc.c: In function ‘hpt_set_asc_info’:
hptproc.c:47: warning: implicit declaration of function ‘strncmp’
hptproc.c:52: error: ‘driver_lock’ undeclared (first use in this function)
hptproc.c:98: warning: passing argument 1 of ‘sd_inuse’ from incompatible pointer type
hptproc.c: In function ‘hpt_set_info’:
hptproc.c:250: warning: implicit declaration of function ‘verify_area’
hptproc.c:250: error: ‘VERIFY_READ’ undeclared (first use in this function)
hptproc.c:256: error: ‘VERIFY_WRITE’ undeclared (first use in this function)
hptproc.c:275: error: ‘GFP_ATOMIC’ undeclared (first use in this function)
hptproc.c:275: warning: assignment makes pointer from integer without a cast
hptproc.c:281: warning: implicit declaration of function ‘copy_from_user’
hptproc.c:295: warning: implicit declaration of function ‘copy_to_user’
hptproc.c: In function ‘hpt_copy_mem_info’:
hptproc.c:352: warning: incompatible implicit declaration of built-in function ‘memcpy’
hptproc.c: In function ‘hpt_copy_info’:
hptproc.c:368: error: ‘va_list’ undeclared (first use in this function)
hptproc.c:368: error: expected ‘;’ before ‘args’
hptproc.c:372: error: ‘args’ undeclared (first use in this function)
hptproc.c: In function ‘hpt_copy_disk_info’:
hptproc.c:387: warning: incompatible implicit declaration of built-in function ‘memcpy’
hptproc.c: In function ‘hpt_copy_array_info’:
hptproc.c:459: warning: incompatible implicit declaration of built-in function ‘sprintf’
hptproc.c:463: warning: incompatible implicit declaration of built-in function ‘sprintf’
hptproc.c: In function ‘get_sd_name’:
hptproc.c:484: error: ‘Scsi_Device’ undeclared (first use in this function)
hptproc.c:484: error: ‘SDptr’ undeclared (first use in this function)
hptproc.c:487: error: dereferencing pointer to incomplete type
hptproc.c:494: warning: incompatible implicit declaration of built-in function ‘sprintf’
hptproc.c: In function ‘hpt_get_info’:
hptproc.c:558: warning: incompatible implicit declaration of built-in function ‘memset’
In file included from ioctl.c:6,
from hpt.c:163:
gui_lib.c: In function ‘get_array_info’:
gui_lib.c:119: warning: incompatible implicit declaration of built-in function ‘memcpy’
gui_lib.c: In function ‘get_disk_info’:
gui_lib.c:329: warning: incompatible implicit declaration of built-in function ‘memcpy’
gui_lib.c: In function ‘hpt_get_driver_capabilities’:
gui_lib.c:338: warning: incompatible implicit declaration of built-in function ‘memset’
gui_lib.c: In function ‘hpt_get_controller_info’:
gui_lib.c:408: warning: implicit declaration of function ‘strcpy’
gui_lib.c:408: warning: incompatible implicit declaration of built-in function ‘strcpy’
gui_lib.c:408: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
gui_lib.c:429: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
gui_lib.c:435: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
gui_lib.c:440: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
gui_lib.c:453: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness
...

Last edited by bravotsx; 07-07-2007 at 10:26 PM.
 
Old 07-08-2007, 06:27 AM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by bravotsx
Code:
grep: /usr/src/linux-2.6.20-1/include/linux/version.h: No such file or directory

In file included from hpt.c:1:
/usr/include/linux/config.h:5:2: error: #error Incorrectly using glibc headers for a kernel module
In file included from hpt.c:5:
/usr/include/linux/modversions.h:1:2: error: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: error: #error but rather headers from the appropriate kernel package.
/usr/include/linux/modversions.h:3:2: error: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: error: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: error: #error to build against the currently-running kernel.
I don't think I have ever compiled a driver other than as part of a kernel compile, so I am kind of fishing around here. I think what I have quoted above might be suggesting what the problem is. You still don't seem to have a version.h file, or else as the subsequent messages suggest, you aren't pointing to the correct include files. So ... You say you installed gcc. Did you also install the kernel source you downloaded? And is that kernel 2.6.20-1? Since you didn't compile your own kernel, you might need to copy the config file (if there is one) from your /boot directory to /usr/src/linux-2.6.20-1/.config. It is also possible that since you didn't compile your own source, it is a separate headers package you need instead of the kernel source. Look to see where the symlink /lib/modules/$(uname -r)/build points.

Beyond that, if the above errors don't go away perhaps there is a problem with the make file. Or perhaps somebody with more experience with this needs to help you.

Also, your posts will probably be a little easier to read and work with if you use code tags for posting computer output rather than using quote tags. The hash symbol (#) at the top of the advanced reply box will wrap highlighted text in code tags.

EDIT: Wrt your question about FC5 vs F7, if FC5 is no longer supported (I don't know) there would definitely be a security advantage in using the supported version.

Last edited by blackhole54; 07-08-2007 at 06:31 AM.
 
Old 07-08-2007, 07:26 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Quote:
entry.c:1569: error: ‘MAX_UDELAY_MS’ undeclared (first use in this function)
This makes me think that the kernel-develop-$(uname -r) package isn't installed.
Please read the module sources README file if you haven't already. It should tell you what you need to do.
 
Old 07-09-2007, 12:49 PM   #8
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
bravotsx,

I just ran across this article which is an introduction to device drivers under Linux. The first part of the article describes actually compiling an out-of-tree kernel module, including the packages you need to have installed. Specific mention is made of Fedora. You might want to look give it a look.
 
  


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
Need Help Building Driver Module From Source doctorcisco Programming 4 04-01-2007 12:51 PM
Building an ATI driver module Elomis Linux - Software 2 01-12-2005 02:50 PM
How to make a soundcard use driver module escargot22026 Linux - Hardware 6 08-19-2004 05:56 PM
make command for driver produces error and blames stdio.h! Veivann Linux - Newbie 5 03-11-2004 06:02 PM
ALSA driver installation: problem with 'make' command la_crack Linux - Software 5 10-31-2003 02:15 PM


All times are GMT -5. The time now is 12:33 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