Building a plugin for MOD Duo and MOD Duo X
This is a quick start guide to get an LV2 plugin running in a MOD Duo device. Let's cut the chatter and get started.
This information is well described elsewhere. The SDK assumes that you have a working lv2 plugin for desktop linux. If you haven't gotten that far, you should start with these links:
Prepare build tools
This section needs to be updated with DuoX information
In order to run a plugin in the MOD Duo we must compile it for its specific architecture.
The Duo uses an ARMv7 processor running a very basic and stripped-down version of Linux.
Several audio-related libraries are included (fftw, libsndfile, libresample, etc) as well as generic libraries (boost, eigen, qt5core, etc).
We currently provide a custom build system that gives developers a similar system to what's available inside the Duo.
Do not use a regular Linux system, it might lead to issues due to mismatching library versions.
$ git clone git://github.com/moddevices/mod-plugin-builder $ cd mod-plugin-builder $ ./bootstrap.sh
This process should take at least 1 hour, probably more depending on your CPU. When it finishes you'll be able to build plugins for Duo.
See this HowTo for more information about docker and mod-plugin-builder.
Build using buildroot '.mk' files
Leo's question to build the text here: buildroot is an alternative when building plugins to be published, such as the cross-compiler toolchain? Or the toolchain is just for local development and if you want to build the plugin to be published you will always need to use buildroot?
See this guide on how to use buildroot to build plugins.
For local development of plugins using buildroot can be bothersome and confusing.
You can use the cross-compiler and toolchain directly instead of going through buildroot methods.
Note that this expects that your source code build system is cross-compile friendly (ie, no hardcoded compiler and paths and uses pkg-config to find extra libraries).
Also this only works on a real Linux system, without using docker.
The setup is as simple as: (adjust as needed)
$ . ~/mod-plugin-builder/local.env $ make
The local.env file will setup your Linux compiler environment variables (such as CC, CXX, CFLAGS, etc) to use mod-plugin-builder files.
If everything goes well, the resulting binaries will be ARMv7, MOD Duo compatible.
Quick example plugin
A quick example plugin is available inside mod-plugin-builder in make -C plugins/package/eg-amp-lv2/source/, which works with this cross-compilation setup.
Building this example plugin is as simple as:
$ . ~/mod-plugin-builder/local.env $ make -C ~/mod-plugin-builder/plugins/package/eg-amp-lv2/source
That's it! After this the eg-amp.lv2 bundle is ready to be deployed into a MOD unit.