How to build Jool kernel module on/for Turris 1.x?

Dear all, ahoj vsichni,

Jool.mx is a NAT64/SIIT service, allowing you to build IPv6-only LANs with access to the IPv4 internet.

It has prebuilt packages for OpenWRT (http://jool.mx/en/openwrt.html), but the packages are not available in Turris repositories. As the software depends on the installed kernel (needs to be installed as a kernel module), I’d like to build the package from sources now. For that, however, there are lots of dependencies.

I didn’t find the kernel headers in the Turris repo (or didn’t search well), so I can’t figure out on where to start with the build.

How does anyone build kernel modules for Turris? Any hints?
Thanks.

Radek