View previous topic :: View next topic |
Author |
Message |
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Jan 23, 2008 1:39 am Post subject: Help with compiling a driver |
|
|
I'm trying to install a driver for my CWlinux LCD screen that I got from here http://www.cwlinux.com/downloads/lcd/driver/. These are the errors I'm getting when I try to compile it via make. The one thing I noticed is it says linux-2.4 on the top. And I use a 2.6 kernel. Do I edit the make file or what? Or will this driver just not work for me?
Code: | gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -DCPU=586 -march=i586 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -DMODULE -c pl2303.c
pl2303.c:12:26: error: linux/config.h: No such file or directory
In file included from /usr/include/linux/signal.h:4,
from pl2303.c:15:
/usr/include/asm/signal.h:13: error: conflicting types for 'sigset_t'
/usr/include/sys/select.h:38: error: previous declaration of 'sigset_t' was here
In file included from /usr/include/signal.h:246,
from /usr/include/asm-generic/siginfo.h:4,
from /usr/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:5,
from pl2303.c:15:
/usr/include/bits/sigaction.h:26: error: redefinition of 'struct sigaction'
/usr/include/bits/sigaction.h:32: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
In file included from /usr/include/signal.h:348,
from /usr/include/asm-generic/siginfo.h:4,
from /usr/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:5,
from pl2303.c:15:
/usr/include/bits/sigstack.h:36: error: expected identifier before numeric constant
/usr/include/bits/sigstack.h:51: error: redefinition of 'struct sigaltstack'
pl2303.c:18:24: error: linux/init.h: No such file or directory
pl2303.c:19:24: error: linux/slab.h: No such file or directory
pl2303.c:22:30: error: linux/tty_driver.h: No such file or directory
pl2303.c:23:28: error: linux/tty_flip.h: No such file or directory
pl2303.c:24:26: error: linux/module.h: No such file or directory
pl2303.c:25:28: error: linux/spinlock.h: No such file or directory
pl2303.c:26:23: error: linux/usb.h: No such file or directory
In file included from pl2303.c:33:
usb-serial.h:72: error: expected specifier-qualifier-list before 'wait_queue_head_t'
usb-serial.h:117: error: field 'driver_list' has incomplete type
usb-serial.h:127: warning: 'struct file' declared inside parameter list
usb-serial.h:127: warning: its scope is only this definition or declaration, which is probably not what you want
usb-serial.h:128: warning: 'struct file' declared inside parameter list
usb-serial.h:131: warning: 'struct file' declared inside parameter list
usb-serial.h:132: warning: 'struct termios' declared inside parameter list
usb-serial.h: In function 'serial_paranoia_check':
usb-serial.h:164: warning: implicit declaration of function 'dbg'
pl2303.c: At top level:
pl2303.c:42: warning: 'struct file' declared inside parameter list
pl2303.c:43: warning: 'struct file' declared inside parameter list
pl2303.c:45: warning: 'struct termios' declared inside parameter list
pl2303.c:47: warning: 'struct file' declared inside parameter list
pl2303.c:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
pl2303.c:58: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
pl2303.c:63: warning: data definition has no type or storage class
pl2303.c:63: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
pl2303.c:63: warning: parameter names (without types) in function declaration
pl2303.c:70: error: 'prolific_sa_table' undeclared here (not in a function)
pl2303.c:78: warning: initialization from incompatible pointer type
pl2303.c:79: warning: initialization from incompatible pointer type
pl2303.c:83: warning: initialization from incompatible pointer type
pl2303.c:84: warning: initialization from incompatible pointer type
pl2303.c: In function 'prolific_sa_startup':
pl2303.c:137: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:137: warning: implicit declaration of function 'kmalloc'
pl2303.c:137: error: 'GFP_KERNEL' undeclared (first use in this function)
pl2303.c:137: error: (Each undeclared identifier is reported only once
pl2303.c:137: error: for each function it appears in.)
pl2303.c:138: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:140: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:148: error: dereferencing pointer to incomplete type
pl2303.c:149: warning: implicit declaration of function 'info'
pl2303.c:149: error: dereferencing pointer to incomplete type
pl2303.c:151: warning: implicit declaration of function 'init_waitqueue_head'
pl2303.c:151: error: 'struct usb_serial_port' has no member named 'write_wait'
pl2303.c: In function 'prolific_sa_shutdown':
pl2303.c:164: error: 'struct usb_serial_port' has no member named 'open_count'
pl2303.c:169: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:170: warning: implicit declaration of function 'kfree'
pl2303.c:170: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c: At top level:
pl2303.c:174: warning: 'struct file' declared inside parameter list
pl2303.c:175: error: conflicting types for 'prolific_sa_open'
pl2303.c:42: error: previous declaration of 'prolific_sa_open' was here
pl2303.c: In function 'prolific_sa_open':
pl2303.c:178: error: expected ')' before string constant
pl2303.c:180: warning: implicit declaration of function 'spin_lock_irqsave'
pl2303.c:180: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c:182: error: 'struct usb_serial_port' has no member named 'open_count'
pl2303.c:183: error: 'MOD_INC_USE_COUNT' undeclared (first use in this function)
pl2303.c:193: error: dereferencing pointer to incomplete type
pl2303.c:194: warning: implicit declaration of function 'usb_submit_urb'
pl2303.c:195: warning: implicit declaration of function 'err'
pl2303.c:197: error: dereferencing pointer to incomplete type
pl2303.c:202: warning: implicit declaration of function 'spin_unlock_irqrestore'
pl2303.c:202: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c: At top level:
pl2303.c:207: warning: 'struct file' declared inside parameter list
pl2303.c:208: error: conflicting types for 'prolific_sa_close'
pl2303.c:43: error: previous declaration of 'prolific_sa_close' was here
pl2303.c: In function 'prolific_sa_close':
pl2303.c:211: error: expected ')' before string constant
pl2303.c:213: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c:215: error: 'struct usb_serial_port' has no member named 'open_count'
pl2303.c:216: error: 'MOD_DEC_USE_COUNT' undeclared (first use in this function)
pl2303.c:218: error: 'struct usb_serial_port' has no member named 'open_count'
pl2303.c:220: warning: implicit declaration of function 'usb_unlink_urb'
pl2303.c:226: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c: In function 'prolific_sa_read_int_callback':
pl2303.c:231: error: dereferencing pointer to incomplete type
pl2303.c:232: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:234: error: dereferencing pointer to incomplete type
pl2303.c:237: error: dereferencing pointer to incomplete type
pl2303.c:247: error: dereferencing pointer to incomplete type
pl2303.c:257: error: 'TIOCM_DSR' undeclared (first use in this function)
pl2303.c:262: error: 'TIOCM_CTS' undeclared (first use in this function)
pl2303.c:267: error: 'TIOCM_RI' undeclared (first use in this function)
pl2303.c:272: error: 'TIOCM_CD' undeclared (first use in this function)
pl2303.c: At top level:
pl2303.c:302: warning: 'struct termios' declared inside parameter list
pl2303.c:303: error: conflicting types for 'prolific_sa_set_termios'
pl2303.c:45: error: previous declaration of 'prolific_sa_set_termios' was here
pl2303.c: In function 'prolific_sa_set_termios':
pl2303.c:305: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:306: error: dereferencing pointer to incomplete type
pl2303.c:307: error: dereferencing pointer to incomplete type
pl2303.c:311: error: expected ')' before string constant
pl2303.c:314: error: 'CBAUD' undeclared (first use in this function)
pl2303.c:316: error: 'B0' undeclared (first use in this function)
pl2303.c:317: error: 'TIOCM_DTR' undeclared (first use in this function)
pl2303.c:317: error: 'TIOCM_RTS' undeclared (first use in this function)
pl2303.c:318: warning: implicit declaration of function 'usb_control_msg'
pl2303.c:318: warning: implicit declaration of function 'usb_sndctrlpipe'
pl2303.c:318: error: 'HZ' undeclared (first use in this function)
pl2303.c:322: error: 'CRTSCTS' undeclared (first use in this function)
pl2303.c:329: error: 'B150' undeclared (first use in this function)
pl2303.c:330: error: 'B300' undeclared (first use in this function)
pl2303.c:331: error: 'B600' undeclared (first use in this function)
pl2303.c:332: error: 'B1200' undeclared (first use in this function)
pl2303.c:333: error: 'B2400' undeclared (first use in this function)
pl2303.c:334: error: 'B4800' undeclared (first use in this function)
pl2303.c:335: error: 'B9600' undeclared (first use in this function)
pl2303.c:336: error: 'B19200' undeclared (first use in this function)
pl2303.c:337: error: 'B38400' undeclared (first use in this function)
pl2303.c:338: error: 'B115200' undeclared (first use in this function)
pl2303.c:339: error: 'B230400' undeclared (first use in this function)
pl2303.c:340: error: 'B460800' undeclared (first use in this function)
pl2303.c:354: error: 'PARENB' undeclared (first use in this function)
pl2303.c:354: error: 'PARODD' undeclared (first use in this function)
pl2303.c:362: error: 'CSIZE' undeclared (first use in this function)
pl2303.c:365: error: 'CS5' undeclared (first use in this function)
pl2303.c:366: error: 'CS6' undeclared (first use in this function)
pl2303.c:367: error: 'CS7' undeclared (first use in this function)
pl2303.c:368: error: 'CS8' undeclared (first use in this function)
pl2303.c:373: error: 'CSTOPB' undeclared (first use in this function)
pl2303.c:389: error: expected ')' before string constant
pl2303.c: In function 'prolific_sa_break_ctl':
pl2303.c:400: error: 'HZ' undeclared (first use in this function)
pl2303.c: At top level:
pl2303.c:409: warning: 'struct file' declared inside parameter list
pl2303.c:410: error: conflicting types for 'prolific_sa_ioctl'
pl2303.c:47: error: previous declaration of 'prolific_sa_ioctl' was here
pl2303.c: In function 'prolific_sa_ioctl':
pl2303.c:413: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:416: error: expected ')' before string constant
pl2303.c:421: error: 'TIOCMGET' undeclared (first use in this function)
pl2303.c:423: warning: implicit declaration of function 'put_user'
pl2303.c:426: error: 'TIOCMSET' undeclared (first use in this function)
pl2303.c:427: error: 'TIOCMBIS' undeclared (first use in this function)
pl2303.c:428: error: 'TIOCMBIC' undeclared (first use in this function)
pl2303.c:429: warning: implicit declaration of function 'get_user'
pl2303.c:434: error: 'TIOCM_RTS' undeclared (first use in this function)
pl2303.c:443: error: 'HZ' undeclared (first use in this function)
pl2303.c:455: error: 'TIOCM_DTR' undeclared (first use in this function)
pl2303.c:479: error: 'TIOCMIWAIT' undeclared (first use in this function)
pl2303.c:485: error: 'TIOCGICOUNT' undeclared (first use in this function)
pl2303.c:493: error: 'ENOIOCTLCMD' undeclared (first use in this function)
pl2303.c: In function 'prolific_set_dcr_state':
pl2303.c:508: error: 'struct usb_serial_port' has no member named 'private'
pl2303.c:510: error: expected ')' before string constant
pl2303.c:512: error: 'HZ' undeclared (first use in this function)
pl2303.c: In function 'prolific_sa_write':
pl2303.c:537: error: expected ')' before string constant
pl2303.c:540: error: expected ')' before string constant
pl2303.c:552: error: dereferencing pointer to incomplete type
pl2303.c:553: warning: implicit declaration of function 'schedule'
pl2303.c:555: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c:561: warning: implicit declaration of function 'copy_from_user'
pl2303.c:561: error: dereferencing pointer to incomplete type
pl2303.c:564: warning: implicit declaration of function 'memcpy'
pl2303.c:564: warning: incompatible implicit declaration of built-in function 'memcpy'
pl2303.c:564: error: dereferencing pointer to incomplete type
pl2303.c:568: warning: implicit declaration of function 'FILL_BULK_URB'
pl2303.c:568: warning: implicit declaration of function 'usb_sndbulkpipe'
pl2303.c:569: error: dereferencing pointer to incomplete type
pl2303.c:576: error: expected ')' before string constant
pl2303.c:577: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c:581: error: 'struct usb_serial_port' has no member named 'port_lock'
pl2303.c: In function 'prolific_sa_write_bulk_callback':
pl2303.c:591: error: dereferencing pointer to incomplete type
pl2303.c:594: error: expected ')' before string constant
pl2303.c:597: error: expected ')' before string constant
pl2303.c:601: error: dereferencing pointer to incomplete type
pl2303.c:602: error: expected ')' before string constant
pl2303.c:606: warning: implicit declaration of function 'queue_task'
pl2303.c:606: error: 'struct usb_serial_port' has no member named 'tqueue'
pl2303.c:606: error: 'tq_immediate' undeclared (first use in this function)
pl2303.c:607: warning: implicit declaration of function 'mark_bh'
pl2303.c:607: error: 'IMMEDIATE_BH' undeclared (first use in this function)
pl2303.c: At top level:
pl2303.c:612: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'prolific_sa_init'
pl2303.c:618: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'prolific_sa_exit'
pl2303.c:623: warning: data definition has no type or storage class
pl2303.c:623: warning: type defaults to 'int' in declaration of 'module_init'
pl2303.c:623: warning: parameter names (without types) in function declaration
pl2303.c:624: warning: data definition has no type or storage class
pl2303.c:624: warning: type defaults to 'int' in declaration of 'module_exit'
pl2303.c:624: warning: parameter names (without types) in function declaration
pl2303.c:626: error: expected declaration specifiers or '...' before string constant
pl2303.c:626: warning: data definition has no type or storage class
pl2303.c:626: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
pl2303.c:626: warning: function declaration isn't a prototype
pl2303.c:627: error: expected declaration specifiers or '...' before string constant
pl2303.c:627: warning: data definition has no type or storage class
pl2303.c:627: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
pl2303.c:627: warning: function declaration isn't a prototype
pl2303.c:629: error: expected ')' before string constant
pl2303.c:630: error: expected ')' before string constant
make: *** [pl2303.o] Error 1
|
|
|
Back to top |
|
|
Nick C Guru
Joined: 18 Mar 2005 Posts: 526 Location: Portsmouth, England
|
Posted: Wed Jan 23, 2008 1:58 am Post subject: |
|
|
well, the file is over 5 years old now according to your link and all the errors claim missing files, so im guessing it wont work on new (or any) 2.6.x kernel.
Have you tried to see if there is any newer support? There is some lcd screen support in newer 2.6.23 and .24 kernels from what ive seen while looking, perhaps a place to start looking if you havnt already?
Just ran a quick search through portage and try taking a look at lcdproc, it appears to have a cwlinux use_expand flag that may work for you. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved.
www.monkeydust.net |
|
Back to top |
|
|
mjf55 Guru
Joined: 25 Aug 2007 Posts: 372
|
Posted: Wed Jan 23, 2008 2:24 am Post subject: |
|
|
d4mo, As Nick C said, this driver is over 5 years old. (although CWlinux shows it to be current) I am no expert but your linux simlink in /etc/src should point to your correct kernel, so I would replace the first line in the makefile ( /etc/src/linux2.4/include ) with Code: | /etc/src/linux/include | You may get further. BUT, look at your error output: Code: | gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -DCPU=586 -march=i586 -Wall -Wstrict-prototypes -O2 | Notice the -D__KERNEL__. The complier is not resolving this. ( unless pointing to the correct include file magically fixes it.)
As I said, I no expert, but this is my $0.14 worth (2 cents adjusted for inflation).
Searching the CWlinux LCD, there appear to be later rivers, but I an not exactly sure what lcd you have. Check out this link https://ssl.bulix.org/projects/lcd4linux/wiki/CwLinux and poke around from there. You may find a better driver. _________________ Mark
No longer a n00b, but still a 'Kool Kid' wannabe |
|
Back to top |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Jan 23, 2008 2:57 am Post subject: |
|
|
Well here's the thing. I can get it to work with the kernel module. I didn't realize the driver was so old, but I was going to give it a shot, because when using the screen with LCDproc I get weird artifacts on the screen. Like it's not updating correctly or something. There will be black boxes that will remain even after the screen switches. |
|
Back to top |
|
|
mjf55 Guru
Joined: 25 Aug 2007 Posts: 372
|
Posted: Wed Jan 23, 2008 9:37 am Post subject: |
|
|
Just out of curiosity, what is the size of this LCD screen and what do you do with it. thanks _________________ Mark
No longer a n00b, but still a 'Kool Kid' wannabe |
|
Back to top |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Jan 23, 2008 2:34 pm Post subject: |
|
|
It's a CWlinux 12232 USB display. It's graphical, but I'm not sure of that resolution but as a character screen it's 20x4. I'm using it with LCDd and LCDproc to display the default information. But It just looks terrible. On some screens the tops row scrolls, somethings are formatted right. When I go to the next screen it will keep some black blocks randomly on the screen. It's almost like it doesn't refresh or redraw the whole screen properly.
Even if I just have LCDd running, and try to go to a menu(on the screen is self with the built in buttons) I still get the artifacts. |
|
Back to top |
|
|
mjf55 Guru
Joined: 25 Aug 2007 Posts: 372
|
|
Back to top |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Jan 23, 2008 5:23 pm Post subject: |
|
|
Thank mjf55. I'll have to try that. I assume I'll have to edit that diff statement, right? |
|
Back to top |
|
|
mjf55 Guru
Joined: 25 Aug 2007 Posts: 372
|
Posted: Wed Jan 23, 2008 5:30 pm Post subject: |
|
|
EDIT: follow this link for patch instructions: --->http://www.cpqlinux.com/patch.html _________________ Mark
No longer a n00b, but still a 'Kool Kid' wannabe |
|
Back to top |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Wed Jan 23, 2008 8:01 pm Post subject: |
|
|
So I patched those files and then recompile...correct? |
|
Back to top |
|
|
mjf55 Guru
Joined: 25 Aug 2007 Posts: 372
|
Posted: Wed Jan 23, 2008 11:00 pm Post subject: |
|
|
Correct. Then install them. Then it should work like a champ. _________________ Mark
No longer a n00b, but still a 'Kool Kid' wannabe |
|
Back to top |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Thu Jan 24, 2008 2:06 pm Post subject: |
|
|
mjf55 wrote: | Correct. Then install them. Then it should work like a champ. |
Thanks mjf55. It works great now. No artifacts or anything. The only thing that is wrong now is, after it's been on for a couple of hourse the whole screen goes black and freezes up. I haven't really looked into it yet. I don't know if it's the server or the client messing up. |
|
Back to top |
|
|
|