Daniel Beer Atom | RSS | About


24 Jan 2012

Often, libraries need to be modified before they can be used in an embedded system. These patches add or fix functionality for specific uses of various popular open source software packages.

Wherever possible, these patches are sent upstream to the maintainer of the original package. However, some patches are unsuitable for inclusion in the mainstream version, or take a long time to be included. The patches below fall into one of these two categories:

Shapelib on ARM CPUs

Some ARM CPUs use a method of byte ordering for double-precision floating point which is not what Shapelib expects. As a result, data read and written with an unmodified version of Shapelib will corrupt ESRI Shapefiles. Applying this patch to version 1.2.10 will fix that problem, and make cross-compilation easier.

PPTP Client support for Cisco routers

PPTP Client is an implementation of Microsoft’s Point-to-Point Tunneling Protocol for Linux and BSD systems. The latest version (1.7.2) fails to connect to some Cisco routers, because it numbers connection IDs from 0, whereas the Cisco routers silently ignore IDs of 0. This simple patch fixes the problem, and allows interoperability with Cisco routers.

BusyBox on ARM/uCLinux

The most common toolchain for ARM/uCLinux systems is Snapgear’s arm-elf-gcc. The most common package for providing system utilities, BusyBox, can’t be compiled without extensive modification. Fortunately, it’s already done for version 1.10.1, using this patch.

DirectFB support for 90 degree rotation

Embedded devices often use landscape LCD screens (as they’re more common) in a portrait orientation and rotate the image 90 degrees before display. If you want to use the GTK+ UI toolkit on an embedded device via DirectFB, you need to modify DirectFB. This patch causes the display of the primary surface to be rotated 90 degrees clockwise (with version 1.1.0). It’s intended only for use with GTK+, as it sacrifices some of DirectFB’s other functionality to make this happen. If you need counter-clockwise rotation, you need to change the GBLIT_ROTATE macro in src/gfx/generic.c.

Quake 1 GPS output

It’s useful to be able to simulate a GPS without having to move around. If you download the Quake 1 GPL source code and apply this patch series, it adds a new “GPS” command to the Quake console, which you can use to produce GPS output on stderr. If you start Quake redirecting stderr out of a serial port, you have a GPS simulator on your PC. The patch series is intended to be applied using “quilt push -a”, but if you don’t have quilt, simply apply the patches in the order they appear in the “series” file.