[Lcd-linux] Fwd: Re-vitalizing lcd-linux for Raspberry Pi?
Brought to you by:
mjona
From: Mattia Jona-L. <mat...@gm...> - 2013-09-17 14:49:49
|
Hi, yes, LCD-Linux was written for HD44780 displays connected to a parallel port but all the parallel port related functions are in the hd44780 driver. Actually the driver assumes some sort of abstract input/output port that happens to be the parallel port but can be the GPIO or the I2C port as well. You just need to modify the two __read_display/__write_displayfunctions in the hd44780 driver and of course to provide appropriate functions to open (init_port) and close (cleanup_port) the communication port. No need to touch the lcd-linux file. Coming to your compilation issue, the problem seems to be that the Makefile script does not recognize your kernel sources as post-2.4 sources and that's because you have "3.7.9-01010-gc1bd951" as string version. When I wrote the script I assumed the string version to be the version number only. Anyway, just edit the lcd-linux Makefile and define KERNEL_VERSION to 3.7.9 and KERNEL_SRC_DIR to the correct kernel source path (seems to be /lib/modules/3.7.9-01010-gc1bd951/build). This should fix the compiler issue. I tried with no problems with a pristine 3.7.9 kernel. Regards, Mattia On Tue, Sep 17, 2013 at 2:12 PM, Sven Geggus <li...@fu...>wrote: > Hello, > > looking for a more generic Solution than this one: > http://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi > (lots of userland GPIO fiddling) > > I found http://lcd-linux.sourceforge.net/ > > I would prefer using this because this would allow for running ncurses > compatible applications on HD44780 compatible displays, right? > > Two Questions: > > * Is it possible to compile your code for recent Kernels? Raspberry Pi is > currently at 3.6.x AFAIR > > For now I ended up with the following error: > lcd-linux-0.13.9/ > make > - KERNEL_SRC_DIR: /lib/modules/3.7.9-01010-gc1bd951/build > - DESTDIR: /lib/modules/3.7.9-01010-gc1bd951/misc > make TOPDIR= wd -f wd/Makefile -C lcd-linux lcd-linux.o > make[1]: Entering directory /home/geg/download/lcd-linux-0.13.9/lcd-linux' > touch /home/geg/download/lcd-linux-0.13.9/include/lcd-linux.ver > gcc -D__KERNEL__ -DMODULE > -I/lib/modules/3.7.9-01010-gc1bd951/build/include > -I/home/geg/download/lcd-linux-0.13.9/include -Wall -Wstrict-prototypes > -Wno-trigraphs -O2 -fno-common -fomit-frame-pointer -pipe > -fno-strict-aliasing -include > "/home/geg/download/lcd-linux-0.13.9/include/lcd-linux.ver" -include > "/home/geg/download/lcd-linux-0.13.9/include/ asename lcd-linux.o .o.ver" > -DEXPORT_SYMTAB -c lcd-linux.c -o > /home/geg/download/lcd-linux-0.13.9/modules/lcd-linux.o > In file included from > /lib/modules/3.7.9-01010-gc1bd951/build/include/linux/thread_info.h:11:0, > from > /lib/modules/3.7.9-01010-gc1bd951/build/include/linux/preempt.h:9, > from > /lib/modules/3.7.9-01010-gc1bd951/build/include/linux/spinlock.h:50, > from > /lib/modules/3.7.9-01010-gc1bd951/build/include/linux/semaphore.h:13, > from lcd-linux.c:50: > /lib/modules/3.7.9-01010-gc1bd951/build/include/linux/bug.h:4:21: fatal > error: asm/bug.h: No such file or directory compilation terminated. > make[1]: *** [lcd-linux.o] Error 1 > make[1]: Leaving directory /home/geg/download/lcd-linux-0.13.9/lcd-linux' > make: *** [default] Error 2 > > * Am I right in the assumption, that your code has been written for a > HD44780 connected to a parallel port? If so, how much effort would it be to > port your code to the generic Kernel GPIO or even I2C Interface? > > Regards > > Sven > > -- > Das allgemeine Persönlichkeitsrecht (Art. 2 Abs.1 i.V.m. Art.1 Abs. 1GG) > umfasst das Grundrecht auf Gewährleistung der Vertraulichkeit und > Integrität > informationstechnischer Systeme. (BVerfG, 1BvR 370/07) > /me is giggls@ircnet, http://sven.gegg.us/ on the Web > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, > SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack > includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > Lcd-linux-users mailing list > Lcd...@li... > https://lists.sourceforge.net/lists/listinfo/lcd-linux-users > |