If you’re using an ultra-low power system with a VIA x86-64 CPU for Tiny Core Linux, chances are the video chip is also made by VIA. There are no hardware-accelerated display drivers readily available for the pure 64-bit version of Tiny Core Linux, however, it is possible to build a 64-bit version from source and install them on a real machine.

Tiny Core Linux does have all the packages required to build kernel (operating system core) modules from source. This means we can build them on a Virtual Machine, package them up, and then transfer them to a real computer:

Built OpenChrome Binaries for x64 Linux
Built OpenChrome Binaries for x64 Linux

InformationThroughout this build, if you want to review package installations, you can use the tce-ab command with no arguments, then follow the on-screen instructions.

Fetch the Latest Drivers from Source

Firstly, let’s use Git to clone the latest drivers:

tce-load -wi git
git clone https://github.com/freedesktop/openchrome-xf86-video-openchrome.git
cd openchrome-xf86-video-openchrome/

Working Through the Configuration Dependency Tree

The goal is to get autogen.sh (which runs configure) to set up the build environment, so we can then make the binaries and package them into a SquashFS archive for installation on a real machine. If you run autogen now, you’ll find it returns:

./autogen.sh: line 9: autoreconf: not found

To sort out the initial dependency issues, run:

tce-load -wi autoconf automake m4 util-macros libtool-dev gcc sed

Trying autogen again results in:

configure: error: C compiler cannot create executables
See 'config.log' for more details

Checking the logs and scrolling back reveals:

/usr/local/bin/ld: cannot find crt1.o: No such file or directory

In addition to that:

/usr/local/bin/ld: cannot find crti.o: No such file or directory

To get these missing files, we should install the missing libc-dev dependencies:

tce-load -wi glibc_base-dev

The configuration will now complete with a syntax error, but this is caused by the prior issues with a missing pkg-config. We can resolve those problems by entering:

tce-load -wi pkg-config

Next packages like xorg-server, xproto, fontsproto and glproto are not found. We can satisfy all of these by installing the Xorg (GUI) development packages:

tce-load -wi xorg-server-dev

This also installs other packages we need, i.e. xproto, fontsproto, glproto, randrproto, renderproto, videoproto, xextproto and libX11-dev.

Another attempt at autogen.sh nearly finishes, but results in Package 'dri' (...) not found, which can be found in Xorg’s development kit for hardware acceleration:

tce-load -wi Xorg-7.7-3d-dev

The configuration will now get further. However, now the C pre-processor sanity check fails, and checking config.log again reveals this is because some kernel header files are missing. To get these, run:

tce-load -wi compiletc

Finally, autogen completes, and we didn’t have to alter any C code or fix any build scripts!

Make the Project

Next, we need to compile and link the C project, and build the binaries. We’ll run autogen again, but with compilation flags optimised for faster execution. We want our drivers to be as fast as possible:

mkdir /tmp/build
make clean
CFLAGS="-O3" ./autogen.sh --prefix=/tmp/build

Compiling OpenChrome Binaries for x64 Linux
Compiling OpenChrome Binaries for x64 Linux

Install the Project

Now, we should separate the binaries and install them in the build folder:

sudo make install

You can now find the files in /tmp/build.

Build a Tiny Core Linux TCZ Extension

You can create a Tiny Core Linux extension (a SquashFS image) like this:

tce-load -wi squashfs-tools
cd /tmp
mksquashfs build/ openchrome.tcz

The new extension will now be at /tmp/openchrome.tcz. This can now be installed and used on a real computer.

For me, the completed OpenChrome driver archive was exactly 200KB.