Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-31-2005, 03:25 AM
|
#1
|
Member
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31
Rep:
|
Lexmark X5250 install on Debian
Aaarrrggghhh... Another hardware component irritating me... Ok.. I need some help here... This is what the README file says about the install (the file can be found here: http://www.lexmark.com/US/products/i...nux/index.html)
Quote:
BASIC INSTALLATION
==================
Lexmark USB scanner device driver package includes the following files:
- lxkscanner.c
- lxkscanner.h
- lxkscanner_load
- Makefile
- README
In general, to install Lexmark USB scanner device driver, follow
the steps below:
1) tar xvfz LEXUSB-SCANNER-1.0-1.TAR.GZ
2) cd LEXUSB-SCANNER-1.0-1
3) Depending on the distribution, run one of the following:
(Note that this still depends on the kernel version installed in the system)
- make (for Red Hat 8.0 & 9.0)
- make INCLUDE=/usr/src/linux-2.4.19.SuSE/include (for SuSE 8.1)
- make INCLUDE=/usr/src/linux-2.4.20.SuSE/include (for SuSE 8.2)
- make INCLUDE=/usr/src/linux-2.4.21-99-include/default/include (for SuSE 9.0)
- make INCLUDE=/usr/src/linux-2.4.19-16mdk/include (for Mandrake 9.0)
- make INCLUDE=/usr/src/linux-2.4.21-0.13mdk/include (for Mandrake 9.1)
- make INCLUDE=/usr/src/linux-2.4.22-10mdk/include (for Mandrake 9.2)
4) make install
Note: This device driver was tested and verified in the following
distributions:
- Red Hat 8.0
- Red Hat 9.0
- Mandrake 9.0
- Mandrake 9.1
- Mandrake 9.2
- SuSE 8.1
- SuSE 8.2
- SuSE 9.0
|
What do you think I should do seeing as though I'm using Debian?
EDIT: The README file also mentions the requirement of Kernel Development Libraries.. Now I tried looking this up in Aptitude.. But nothing.. what is the package name for the Kernel Development Libraries?
|
|
|
07-31-2005, 10:55 AM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Rep:
|
At least you need the header files that were used to compile your kernel. If you unpack a kernel source they are in subdirectory include/linux. That's what all the INCLUDE= stuff is there for. If you are using a debian kernel there should be a matching package with these files (package kernel-headers-<more stuff dep. on your kernel>). Install this and point the 'INCLUDE=' option at it as in the examples you quoted.
If you compiled your own kernel - well, you know where the source code is
I'm not sure either what they mean by kernel development libraries. Can't hurt to just run 'make' and find out what's missing that way.
|
|
|
07-31-2005, 05:40 PM
|
#3
|
Member
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
Thanks... But what if I used a precompiled kernel with the help of apt? Then I don't really have the source.. .or do I?
|
|
|
07-31-2005, 06:22 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Rep:
|
There should be a matching package called kernel-headers-<something>, where the <something> matches the kernel version. You should apt-get install it and check where it dumps its files. That will give you the 'INCLUDE' directory to use with 'make'.
|
|
|
09-04-2005, 06:42 AM
|
#5
|
Member
Registered: Jul 2005
Location: Denmark
Distribution: Debian
Posts: 31
Original Poster
Rep:
|
Ok.. I've compiled my own kernel.. and I tried typing the following (I also included the error):
Michael:/home/mondus/LEXUSB-SCANNER-1.0-1# make INCLUDE=/usr/src/linux-2.6.12.5/include/
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux-2.6.12.5/include/ -include /usr/src/linux-2.6.12.5/include//linux/modversions.h -c lxkscanner.c
cc1: error: /usr/src/linux-2.6.12.5/include//linux/modversions.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/smp.h:18,
from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:6:25: error: mach_mpspec.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/smp.h:18,
from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:8: error: 'MAX_MP_BUSSES' undeclared here (not in a function)
/usr/src/linux-2.6.12.5/include/asm/mpspec.h:22: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.12.5/include/linux/smp.h:19,
from /usr/src/linux-2.6.12.5/include/linux/sched.h:26,
from /usr/src/linux-2.6.12.5/include/linux/module.h:10,
from lxkscanner.h:31,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/smp.h:71:26: error: mach_apicdef.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/linux/irq.h:21,
from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/irq.h:16:25: error: irq_vectors.h: Ingen sådan fil eller filkatalog
In file included from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/linux/irq.h:72: error: 'NR_IRQS' undeclared here (not in a function)
In file included from /usr/src/linux-2.6.12.5/include/linux/irq.h:74,
from /usr/src/linux-2.6.12.5/include/asm/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/hardirq.h:6,
from /usr/src/linux-2.6.12.5/include/linux/interrupt.h:11,
from /usr/src/linux-2.6.12.5/include/linux/usb.h:15,
from lxkscanner.h:54,
from lxkscanner.c:358:
/usr/src/linux-2.6.12.5/include/asm/hw_irq.h:28: error: 'NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from lxkscanner.c:358:
lxkscanner.h:129: error: syntax error before 'devfs_handle_t'
lxkscanner.h:129: warning: no semicolon at end of struct or union
lxkscanner.h:132: error: syntax error before 'scn_minor'
lxkscanner.h:132: warning: data definition has no type or storage class
lxkscanner.h:141: error: syntax error before '}' token
lxkscanner.h:143: error: syntax error before 'usb_devfs_handle'
lxkscanner.h:143: warning: data definition has no type or storage class
lxkscanner.h:155: warning: 'packed' attribute ignored
lxkscanner.c: In function 'irq_scanner':
lxkscanner.c:373: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'open_scanner':
lxkscanner.c:391: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:391: error: (Each undeclared identifier is reported only once
lxkscanner.c:391: error: for each function it appears in.)
lxkscanner.c:391: error: syntax error before 'scn_minor'
lxkscanner.c:395: error: 'MOD_INC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c:405: error: 'MOD_DEC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c:412: error: dereferencing pointer to incomplete type
lxkscanner.c:414: error: dereferencing pointer to incomplete type
lxkscanner.c:424: error: dereferencing pointer to incomplete type
lxkscanner.c:430: error: dereferencing pointer to incomplete type
lxkscanner.c:436: error: dereferencing pointer to incomplete type
lxkscanner.c:438: error: dereferencing pointer to incomplete type
lxkscanner.c:445: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'close_scanner':
lxkscanner.c:458: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:458: error: syntax error before 'scn_minor'
lxkscanner.c:472: error: dereferencing pointer to incomplete type
lxkscanner.c:473: error: dereferencing pointer to incomplete type
lxkscanner.c:478: error: dereferencing pointer to incomplete type
lxkscanner.c:480: error: 'MOD_DEC_USE_COUNT' undeclared (first use in this function)
lxkscanner.c: In function 'write_scanner':
lxkscanner.c:495: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:495: error: syntax error before 'scn_minor'
lxkscanner.c:505: error: dereferencing pointer to incomplete type
lxkscanner.c:507: error: dereferencing pointer to incomplete type
lxkscanner.c:509: error: dereferencing pointer to incomplete type
lxkscanner.c:511: error: dereferencing pointer to incomplete type
lxkscanner.c:524: error: dereferencing pointer to incomplete type
lxkscanner.c:529: error: dereferencing pointer to incomplete type
lxkscanner.c:567: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'read_scanner':
lxkscanner.c:582: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:582: error: syntax error before 'scn_minor'
lxkscanner.c:593: error: dereferencing pointer to incomplete type
lxkscanner.c:595: error: dereferencing pointer to incomplete type
lxkscanner.c:597: error: dereferencing pointer to incomplete type
lxkscanner.c:599: error: dereferencing pointer to incomplete type
lxkscanner.c:616: error: dereferencing pointer to incomplete type
lxkscanner.c:616: error: dereferencing pointer to incomplete type
lxkscanner.c:640: error: dereferencing pointer to incomplete type
lxkscanner.c:640: error: dereferencing pointer to incomplete type
lxkscanner.c:649: error: dereferencing pointer to incomplete type
lxkscanner.c:654: error: 'USB_ST_DATAUNDERRUN' undeclared (first use in this function)
lxkscanner.c:687: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'ioctl_scanner':
lxkscanner.c:697: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:697: error: syntax error before 'scn_minor'
lxkscanner.c:706: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'probe_scanner':
lxkscanner.c:837: error: 'kdev_t' undeclared (first use in this function)
lxkscanner.c:837: error: syntax error before 'scn_minor'
lxkscanner.c:905: error: request for member 'altsetting' in something not a structure or union
lxkscanner.c:913: error: 'struct usb_interface_descriptor' has no member named 'endpoint'
lxkscanner.c:1059: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1064: error: invalid application of 'sizeof' to incomplete type 'struct scn_usb_data'
lxkscanner.c:1066: error: dereferencing pointer to incomplete type
lxkscanner.c:1073: error: dereferencing pointer to incomplete type
lxkscanner.c:1075: error: dereferencing pointer to incomplete type
lxkscanner.c:1079: error: dereferencing pointer to incomplete type
lxkscanner.c:1079: error: too few arguments to function 'usb_submit_urb'
lxkscanner.c:1089: error: dereferencing pointer to incomplete type
lxkscanner.c:1097: error: dereferencing pointer to incomplete type
lxkscanner.c:1099: error: dereferencing pointer to incomplete type
lxkscanner.c:1109: error: dereferencing pointer to incomplete type
lxkscanner.c:1114: error: dereferencing pointer to incomplete type
lxkscanner.c:1116: error: dereferencing pointer to incomplete type
lxkscanner.c:1122: error: dereferencing pointer to incomplete type
lxkscanner.c:1126: error: dereferencing pointer to incomplete type
lxkscanner.c:1127: error: dereferencing pointer to incomplete type
lxkscanner.c:1130: error: dereferencing pointer to incomplete type
lxkscanner.c:1131: error: dereferencing pointer to incomplete type
lxkscanner.c:1133: error: dereferencing pointer to incomplete type
lxkscanner.c:1134: error: dereferencing pointer to incomplete type
lxkscanner.c:1135: error: dereferencing pointer to incomplete type
lxkscanner.c:1136: error: dereferencing pointer to incomplete type
lxkscanner.c:1137: error: dereferencing pointer to incomplete type
lxkscanner.c:1139: error: dereferencing pointer to incomplete type
lxkscanner.c:1141: error: dereferencing pointer to incomplete type
lxkscanner.c:1142: error: 'DEVFS_FL_DEFAULT' undeclared (first use in this function)
lxkscanner.c:1143: error: dereferencing pointer to incomplete type
lxkscanner.c:1146: error: dereferencing pointer to incomplete type
lxkscanner.c: In function 'disconnect_scanner':
lxkscanner.c:1162: error: dereferencing pointer to incomplete type
lxkscanner.c:1164: error: dereferencing pointer to incomplete type
lxkscanner.c:1166: error: dereferencing pointer to incomplete type
lxkscanner.c:1169: error: dereferencing pointer to incomplete type
lxkscanner.c:1169: error: dereferencing pointer to incomplete type
lxkscanner.c:1171: error: dereferencing pointer to incomplete type
lxkscanner.c:1172: error: dereferencing pointer to incomplete type
lxkscanner.c:1175: error: dereferencing pointer to incomplete type
lxkscanner.c:1176: error: dereferencing pointer to incomplete type
lxkscanner.c:1177: error: dereferencing pointer to incomplete type
lxkscanner.c: At top level:
lxkscanner.c:1185: warning: initialization from incompatible pointer type
lxkscanner.c:1186: warning: initialization from incompatible pointer type
lxkscanner.c:1187: error: unknown field 'fops' specified in initializer
lxkscanner.c:1187: warning: initialization from incompatible pointer type
lxkscanner.c:1188: error: unknown field 'minor' specified in initializer
lxkscanner.c:1188: warning: initialization makes pointer from integer without a cast
make: *** [lxkscanner.o] Fejl 1
I've tried with include/linux instead.. but that just gives me even more errors!
|
|
|
09-07-2005, 11:02 PM
|
#6
|
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Rep:
|
It appears that the code you are trying to compile is specific to a 2.4 kernel. The missing file modversions.h is present in the 2.4 kernel code but not the 2.6 code.
|
|
|
All times are GMT -5. The time now is 08:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|