LCD Support in kernel

Henrik W Lund henrik.w.lund at broadpark.no
Wed Sep 15 13:46:26 PDT 2004


Tim Pushor wrote:

> Hi all,
>
> I am planning on purchasing a crystalfontz LCD panel to be able to 
> have a rudimentary interface with the system without having a 
> keyboard/monitor/shell.
>
> I'm not sure whether to go the serial or USB route. What I want to do 
> is to be able to display status as the system is coming up, then have 
> a user level application accept input from the panel and display 
> various statistics, then when the system is brought down, for the 
> panel to notify the user that it is safe to turn off the machine.
>
> For the startup and shutdown I would need to hack stuff into the 
> kernel. I have done a fair bit of C programming over the years, but 
> never worked in the kernel. So I have 2 real questions:
>
> Would it be easier to control the USB or Serial panel from the Kernel?
> And - does anyone have any recommendations as to where I could even 
> start looking in the kernel to do what I want?
>
> Thanks,
> Tim
>
> (Please CC: me as I am not subscribed to this list - Thanks!) 

Greetings!

I'd guess that the serial version would be the way to go, since FreeBSD 
has builtin support for displaying to serial console (typically used for 
headless systems, allowing admins to use a serial communications program 
like HyperTerminal under Windows for out- and input). This is, of 
course, assuming that the LCD panel interfaces like a serial terminal. 
If it does, you've got about half the job done, as FreeBSD will happily 
print bootup and shutdown information out-of-the-box.

Further, if it announces touches to the screen as regular keypresses, 
you're even luckier. All that really would remain for you to do was to 
write the UI (as I don't think a ready-made solution exists for what you 
want. I may be wrong, though). If this is to be a GUI (on top of X, that 
is), you'd have to find out if X will display to serial terminal. If it 
doesn't, I'm sure any idea you can come up with is just as good/better 
than mine. ;-)

Worst case scenario; the LCD screen interfaces like a toaster. My best 
bet would be to do a kernel module. More info on how to do those can be 
found here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/index.html

I encourage others to elaborate (and correct me, of course) as they see 
fit. Not having done much actual work on FreeBSD myself, what I propose 
here is what my programmer's mind sees as probable based on what 
documentation and experimenting I have seen and done.

Hope this helps! :-)
-Henrik W Lund


More information about the freebsd-questions mailing list