Linux-x86 host, linux-arm target
Once you have a proper cross-compiling setup, download EPICS and extract the tarball:
curl -O http://www.aps.anl.gov/epics/download/base/baseR3.14.10.tar.gz
tar -zxvf baseR3.14.10.tar.gz
Epics needs to know where its base will be.
And it needs to know what the host arch is before it can start. Strangely, it doesn't detect this.
Now you'll need to set up the configuration. EPICS spreads its config files all over the place, but unless you have special needs not covered here, this is what you need to change.
Set up configure/CONFIG_SITE
Our cross-compiling toolchain is in /usr/local/arm-linux-gnu. Set up configure/os/CONFIG_SITE.linux-x86.linux-arm
- GNU_DIR = /usr/local/arm-linux-gnu
Our gcc and other programs are named, for example, arm-linux-gnu-gcc, instead of arm-linux-gcc. So, we have to fix how the makefiles look for programs. Fortunately, it's easy: Set up configure/os/CONFIG.Common.linux-arm
- GNU_TARGET = arm-linux-gnu
Now you'll have a set of binaries for both the host and the target, found under bin/$ARCH. Confirm that cross-compilation worked as intended by running
Which should return something along these lines:
bin/linux-arm/softIoc: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, not stripped