Cross Compiling TM Source - nthallen/monarch GitHub Wiki

This topic warrants a much longer discussion, but for now I will just note the high points.

The DAS and DASng build systems are all based on in-tree builds. If we are compiling for more than one architecture, then we need more than one (presumably identical) source tree.

The native build is the same as it ever was:

  • appgen
  • make
  • make distribution or distribute

To cross compile, you must dot-execute a setup script that defines all the key Make variables that define the compilers and tools. That script must also define the environment variables:

  • CROSS_COMPILE (probably set to the architecture prefix, e.g. arm-linux-gnueabihf-)
  • CROSS_STAGE (set to the staging directory containing le-dasng's bin, lib, share and include directories for the target are located.

Note that currently if CROSS_COMPILE is defined and CROSS_STAGE is not, then the le-dasng staging directory defaults to /opt/linkeng/am335x.

Future Work

We need an out-of-tree build capability, making it possible to compile for all necessary target architectures from a single source tree.

We also need to fix the command-client/command-server negotiation so that a client compiled for one architecture can talk to a server compiled for another.