From owner-freebsd-embedded@FreeBSD.ORG Sat Nov 10 18:52:00 2007 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CFCD16A421 for ; Sat, 10 Nov 2007 18:52:00 +0000 (UTC) (envelope-from tmclaugh@sdf.lonestar.org) Received: from straycat.dhs.org (c-24-60-173-77.hsd1.ma.comcast.net [24.60.173.77]) by mx1.freebsd.org (Postfix) with ESMTP id C0D4513C4A8 for ; Sat, 10 Nov 2007 18:51:59 +0000 (UTC) (envelope-from tmclaugh@sdf.lonestar.org) Received: from [192.168.1.118] (tomcat.straycat.dhs.org [192.168.1.118]) by straycat.dhs.org (8.13.8/8.13.8) with ESMTP id lAAHZ3s2024665 for ; Sat, 10 Nov 2007 12:35:04 -0500 (EST) From: Tom McLaughlin To: freebsd-embedded@FreeBSD.org Content-Type: multipart/mixed; boundary="=-Ywx6wDFBdYM8mist56KQ" Date: Sat, 10 Nov 2007 12:35:03 -0500 Message-Id: <1194716103.7555.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Cc: Subject: Re: ITuner picoLCD 20x2 support X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2007 18:52:00 -0000 --=-Ywx6wDFBdYM8mist56KQ Content-Type: text/plain Content-Transfer-Encoding: 7bit > Hi all, > > I'm looking at building a wi-fi point using an ALIX.1c board and I'm > currently evaluating cases for it. I noticed this fine case but I'm > wondering if anyone has any experience getting the LCD display working on > it which is an ITuner picoLCD 20x2: > > http://www.mini-box.com/M200-LCD-Enclosure > > A quick look through usbdevs shows an entry that should recognize it. We > have lcdproc in ports which has a driver (though, not built by the port > currently) for it but it relies on the vendor supplied usblcd library > which is at least available via source. Before I spend twice as much as > the model below it I'd like to know if anyone has had any luck with it. Okay, attached is a port for the driver. I had to "work around" our lack usb_get_driver_np() and usb_detach_kernel_driver_np() in libusb. By "work around" I mean "comment out" since I couldn't find any patches in the ports tree as an example of how to patch this correctly, only googled comments about doing that to get other devices to work on FreeBSD. I'd like to fix this correctly though. If anyone has one of these hanging around please let me know if it works. Thanks. tom -- | tmclaugh at sdf.lonestar.org tmclaugh at FreeBSD.org | | FreeBSD http://www.FreeBSD.org | --=-Ywx6wDFBdYM8mist56KQ Content-Disposition: attachment; filename=usblcd-0.1.4.shar Content-Type: text/plain; name=usblcd-0.1.4.shar; charset=UTF-8 Content-Transfer-Encoding: 7bit # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ./usblcd # ./usblcd/Makefile # ./usblcd/distinfo # ./usblcd/pkg-descr # ./usblcd/files # ./usblcd/files/patch-lib_hid.c # ./usblcd/files/patch-autogen.c # ./usblcd/pkg-plist # echo c - ./usblcd mkdir -p ./usblcd > /dev/null 2>&1 echo x - ./usblcd/Makefile sed 's/^X//' >./usblcd/Makefile << 'END-of-./usblcd/Makefile' X# New ports collection makefile for: usblcd X# Date created: 10 November 2007 X# Whom: tom McLaughlin X# X# $FreeBSD$ X# X XPORTNAME= usblcd XPORTVERSION= 0.1.4 XCATEGORIES= devel XMASTER_SITES= http://resources.mini-box.com/online/picoLCD%2020x2%20(OEM)/Software/Linux/Binaries/ XDISTNAME= ${PORTNAME}-src-${PORTVERSION} XEXTRACT_SUFX= .tgz X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X XMAINTAINER= tmclaugh@FreeBSD.org XCOMMENT= Library for the Mini-Box picoLCD 2x20 USB display X XLIB_DEPENDS= usb:${PORTSDIR}/devel/libusb X XUSE_LDCONFIG= yes XUSE_AUTOTOOLS= libtool:15 automake:19 autoconf:261 XGNU_CONFIGURE= yes XCONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} XCONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ X LDFLAGS="-L${LOCALBASE}/lib" X Xpost-patch: X @${REINPLACE_CMD} 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' ${WRKSRC}/Makefile.am X Xpre-configure: X @cd ${WRKSRC}; ${AUTOTOOLS_ENV} ${SH} ./autogen.sh X X.include END-of-./usblcd/Makefile echo x - ./usblcd/distinfo sed 's/^X//' >./usblcd/distinfo << 'END-of-./usblcd/distinfo' XMD5 (usblcd-src-0.1.4.tgz) = d4b6e4fca4006dab3fca99c948756880 XSHA256 (usblcd-src-0.1.4.tgz) = e3a37fda1145d41998385dfd34d55793ff2788e33c220e5882c487369d9af4d9 XSIZE (usblcd-src-0.1.4.tgz) = 76712 END-of-./usblcd/distinfo echo x - ./usblcd/pkg-descr sed 's/^X//' >./usblcd/pkg-descr << 'END-of-./usblcd/pkg-descr' XThe Mini-Box USB LCD is an intelligent 2x20 character USB LCD display Xmodule with InfraRed receiver and keypad interface. It has a built in X8x5 dots ASCII character font with 8 used definable characters and Xprovides 8 GPO (General Purpose Output) pins. Internal EEPROM allows Xfirmware upgrading and splash screen definition. On power on XMini-Box USB LCD is able to show up to 10 user defined splash screns Xwith custom timing, order and led/gpo status. X XWWW: http://www.mini-box.com/picoLCD-20x2-OEM END-of-./usblcd/pkg-descr echo c - ./usblcd/files mkdir -p ./usblcd/files > /dev/null 2>&1 echo x - ./usblcd/files/patch-lib_hid.c sed 's/^X//' >./usblcd/files/patch-lib_hid.c << 'END-of-./usblcd/files/patch-lib_hid.c' X--- lib/hid.c.orig 2006-12-07 15:30:30.000000000 -0500 X+++ lib/hid.c 2007-11-10 10:46:24.621463000 -0500 X@@ -140,13 +140,13 @@ X X signal(SIGTERM, release_usb_device); X X- ret = usb_get_driver_np((*hiddev)->handle, 0, buf, sizeof(buf)); X+/* ret = usb_get_driver_np((*hiddev)->handle, 0, buf, sizeof(buf)); X X if (ret == 0) { X printf("interface 0 already claimed by driver \"%s\", attempting to detach it\n", buf); X ret = usb_detach_kernel_driver_np((*hiddev)->handle, 0); X printf("usb_detach_kernel_driver_np returned %d\n", ret); X- } X+ }*/ X ret = usb_claim_interface((*hiddev)->handle, 0); X if (ret != 0) { X printf("claim failed with error %d\n", ret); END-of-./usblcd/files/patch-lib_hid.c echo x - ./usblcd/files/patch-autogen.c sed 's/^X//' >./usblcd/files/patch-autogen.c << 'END-of-./usblcd/files/patch-autogen.c' X--- autogen.sh.orig 2006-01-08 23:03:23.000000000 -0500 X+++ autogen.sh 2007-11-10 11:57:45.181418000 -0500 X@@ -58,15 +58,15 @@ X echo "Generating configuration files for $package, please wait...." X X echo " aclocal $ACLOCAL_FLAGS" X-aclocal $ACLOCAL_FLAGS X+$ACLOCAL $ACLOCAL_FLAGS X echo " autoheader" X-autoheader X+$AUTOHEADER X echo " libtoolize --automake" X-libtoolize --automake X+$LIBTOOLIZE --automake X echo " automake --add-missing" X-automake --add-missing X+$AUTOMAKE --add-missing X echo " autoconf" X-autoconf X+$AUTOCONF X X cd $olddir X-$srcdir/configure "$@" && echo X+#$srcdir/configure "$@" && echo END-of-./usblcd/files/patch-autogen.c echo x - ./usblcd/pkg-plist sed 's/^X//' >./usblcd/pkg-plist << 'END-of-./usblcd/pkg-plist' Xbin/usblcd Xinclude/driver.h Xinclude/usblcd.h Xinclude/usblcd_util.h Xinclude/widgets.h Xlib/libusblcd.a Xlib/libusblcd.la Xlib/libusblcd.so Xlib/libusblcd.so.0 Xlibdata/pkgconfig/libusblcd.pc END-of-./usblcd/pkg-plist exit --=-Ywx6wDFBdYM8mist56KQ--