Notes

Home About Contact Archive
GitHub LinkedIn Twitter CoBUG.org

Using a picoLCD 256×64 on OpenBSD 4.7

Bit of hacking to get the picoLCD working on OpenBSD
Posted on Thu, 12 Jan 2012 12:00:00 MST by Aaron Bieber
Tags: OpenBSD

The first thing you will notice if you connect your fancy picoLCD 256×64 to your OpenBSD box, is that it shows up as a Human Interface Device.

Unfortunately libusb doesn’t know what to do with devices on bsd systems that are NOT using the ugen driver:

 464     if (strncmp(di.udi_devnames[0], "ugen", 4) != 0)
 465       /* best not to play with things we don't understand */
 466       continue;

Fine libusb! We will have to come up with another way to use this screen! OR! We could tell OpenBSD to use ugen when ever it sees the lcd! :D

To do that – you need the the OpenBSD source, knowledge of how to build Open’s kernel, and my patch! Getting the source is beyond the scope of this little post.. so you will have to rtfm that action.

  1. cd to the usb source directory: cd /usr/src/sys/dev/usb
  2. Download the patch ( md5: 85e7498826635c612ede672f5e295e7a ): picoLCD256x64.patch
  3. Apply said patch: patch -p1 < picoLCD256x64.patch
  4. pkg_add libusb
  5. Compile your kernel, install and reboot!
  6. Once you are running your freshly compiled kernel, download the lcd4linux-256×64 source from http://picolcd.com/drivers/ . Apply this patch ( md5: 3852103e3e5a13a3cd6b0c49389688f6 ): lcd4linux-256×64.patch, compile ( You will have to play around with the plugins as some of them use linux’s proc fs and are not compatible with OpenBSD ).

Now check out the sample config files and have fun!


Made by qbit. Subscribe via RSS / Atom | Generated using boring and these files.
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A 4AF0 1F81 112D 62A9 ADCE
proof.