Thursday, July 30, 2009

HAL sucks

So you have a touchscreen, and a 'modern' X11 installation.

Your 'modern' X11 knows that actually configuring devices is something that people who live in caves do. 'Modern' X11s use HAL!

Unfortunately, the nice 'modern' X11 installation is borked. It's talking to HAL which is telling it to use inputs/event0. Which doesn't actually exist.

So the question is: How do you tell it to use /dev/inputs/event2 which is a working touchscreen?

Ahh, you might ask. What you really do is spend far too much time searching google and eventually arrive at:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <match key="input.product" contains="Touchscreen">
    <merge key="input.x11_driver" type="string">evdev</merge>
    <merge key="input.x11_options.SwapAxes" type="string">true</merge>
    <merge key="input.x11_options.InvertX" type="string">true</merge>

Which you install in /etc/hal/fdi/policy/touchscreen.fdi

Of course. it was obvious from the very start that this was the thing to do, no? And the documentation has zero mistakes or misspellings in it. A remarkable end it achieves by being non-existant.

Sunday, July 12, 2009

Rust as far as the eye can see.

Having many adventures trying to compile a new kernel for the DevKit8000

embest haven't submitted the board support to mainline and after reverse engineering their patches, it's easy to see why!

The diff is littered with random patches to random files (that aren't used), #if 0'ed code, and cruft like:

-       debug = cfg->debug;
+       //debug = cfg->debug;
+       debug = 1;
        warn = (orig != reg);
-       if (debug || warn)
+       //if (debug || warn)
It's been about  two hours work to separate out the parts that actually do something, and port them forward to a 2.6.30 kernel.

Which brings me to a confession: I just realized it's been something like 3 years since I last ran 'make menuconfig' on a linux kernel. The rust! It burns!!

Saturday, July 11, 2009


I recently ordered a DevKit8000 development board for use in an embedded image processing project I'm looking at.

My DevKit8000 arrived yesterday. I bought the "yes, I will have fries with that" version, so it has the 7" touchscreen, more cables than you can poke a stick at, 512MB sd card, a USB hub,  and 2 power wall-wart power supplies.

Total cost was $AUD420 including DHL shipping of ~ $AUD80. The price for the board board is comparable with the BeagleBoard, but the shipping was cheaper and easier from China than it would have been from DigiKey! So I'm pretty happy with the price.

One of the power supplies has a USA plug, the other is something European.
The one with the USA plug is apparently the board power supply, the other is probably the USB hub power supply (at least, the plug doesn't fit the board).

The board itself had Windows CE loaded in NAND flash out of the box, which sent me on a 4 hour trail of destruction trying to replace it with linux. This was mostly due to me not realising that the sd-card that comes with the board is junk, and in addition to being unreliable, doesn't function at the 3.3V the OMAP processor requires for it to be booted from.

Not realising that, I thought that I must be doing something wrong (which given the .. umm.. erratic number of the board documentation wasn't unlikely) and so tried all sorts of things in an effort to re-flash the NAND X-loader, cumulating in formatting the NAND flash and rendering the board entirely unbootable. Waving aside the blue air, I finally did what I should have done to start with, and use a known-good SD card. Which instantly booted correctly, taking another 2 minutes for me to reflash the x-loader, u-boot, uImage and filesystem. *&^*&^*&^&*!!!!!!!

With the board actually booting and running linux, it was much more useful. It immediately come up on the ethernet with an ifconfig+route making it a lot faster to move images around than the sd-card sneakernet I had been using.

The CD that comes with it has a port of Android which functions rather well and was useful is checking that the touchscreen actually works.

The hardware appears to be fairly close to the beagleboard, except that it also includes an on-board ethernet, and a ZIF socket for a camera input.

There's a couple of odd things: The host USB port (as opposed to the OTG USB port) appears to be missing a chip. The pattern is there for it on the board, and all the pad have solder on them, just not chip. This is not entirely unexpected: The USB Host port isn't listed in the feature list, and the BeagleBoard people have had trouble getting it reliable.

The more concerning one is that one of the power regulators (TPS73701) has a terrible soldering job done on it. It looks like there may have been a solder mask problem and FAR too much solder paste was dumped on. The tab is swimming in solder, and leads look like they didn't quite reach temperature to fully melt the paste. This is one of a two parallel regulators, and the other one is spotless, so I'm a little puzzled as to what went wrong with this one. Both are running the same temperature so it appears they're both working, it just looks terrible.

Other than that, the rest of the board looks clean and well put together.

Now I'm off to setup a cross compiler environment!

Belated files

Very belatedly getting around to posting these.

The Eagle CAD files for the relay driver board is now posted at