Using an Upstream Kernel

N.B. work in progress

These instructions show how to use a mainline kernel (not the standard TS vendor supplied or Debian kernel trees), you should be aware the mainline kernel only currently supports the:

This means things like the ADC and SD slots are not supported.


My working git tree lurks at

A number of patches I produced that I really need to get back to and fix I have made available too.

Future Work


I'm working on overhauling the FPGA support in the kernel and exploring using Device Tree to describe the loaded FPGA bitstream. This means that:

It is straight forward to use the 'gpio-nand' driver and if we can work out how to ask the CPLD to power the SD slots the 'mmcspi' driver (coupled with 'spigpio') can be used to provide SD card support.

Technologic Systems Statement

I asked Technologic Systems for the following:

To both these requests, TS declined to provide the answers. The bitstreams apparently can be reverse engineered (now I am no HDL engineer but I thought...) which is why they will not put them on the FTP site, whilst questions in regards to the SD slot powering were unfortunately overlooked/unnoticed. If you find, as a customer of TS, that having these features would be handy to you, then please email them so they can register the interest, feed that back into management and show there is demand for this.


Cooking a Custom Kernel

You will need an armel toolchain, such as done by following my Installing an Emdebian Cross Compiling Toolchain instructions, before continuing.

Prepare the devicetree kernel:

$ git clone git://
$ cd ts78xx
$ git checkout rtc-m48t86

The branches available are (in acending order of 'latest' code):

You will want to use my .config file.

Select the configuration options you want and compile your kernel:

$ alias amake="ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make"
$ amake menuconfig
$ amake
$ INSTALL_MOD_PATH=../linux-modules amake modules_install

N.B. enabling MV_XOR (the DMA engine) will cause your system to crash on start due to unaligned memory access (a bug I am yet to find the time or interest to track down)

Now install your kernel:

$ tar -C linux-modules -zcf linux-modules.tar.gz .
$ [unpack linux-modules.tar.gz on your TS-7800 into /]

$ wget
# dd if=sd-mbr.dd of=/dev/mmcblk0
# blockdev --rereadpt /dev/mmcblk0
# { cat ts78xx/arch/arm/boot/zImage ts78xx/arch/arm/boot/dts/orion5x-ts7800.dtb; dd if=/dev/zero; } | dd of=/dev/mmcblk0p2

Non-Devicetree Kernel

If for some strange reason you prefer the non-devicetree kernel, then you should use the following to prime the SD card:

# { devio 'wl 0xe3a01c06,4' 'wl 0xe3811074,4'; cat ts78xx/arch/arm/boot/zImage; dd if=/dev/zero; } | dd of=/dev/mmcblk0p2