From owner-freebsd-questions@FreeBSD.ORG Wed Sep 15 20:46:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1A8916A4CE for ; Wed, 15 Sep 2004 20:46:26 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6971743D48 for ; Wed, 15 Sep 2004 20:46:26 +0000 (GMT) (envelope-from henrik.w.lund@broadpark.no) Received: from [10.0.0.3] (52.80-202-129.nextgentel.com [80.202.129.52]) by mail.broadpark.no (Postfix) with ESMTP id 625383D10; Wed, 15 Sep 2004 22:47:04 +0200 (MEST) Message-ID: <41492821.8070000@broadpark.no> Date: Wed, 15 Sep 2004 22:44:01 -0700 From: Henrik W Lund User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: nb, en-us, en MIME-Version: 1.0 To: Tim Pushor References: <41487642.3090409@crossthread.com> In-Reply-To: <41487642.3090409@crossthread.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: LCD Support in kernel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 20:46:26 -0000 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