getting Erlang to run on an embedded powerpc 860
matthias@REDACTED
matthias@REDACTED
Thu Oct 19 12:17:42 CEST 2000
Hi,
I now have Erlang running on an embedded powerpc board, but the way I
got it running seems "somewhat unsatisfying", maybe people here have
some better ideas.
The board:
Motorola PPC860 CPU
Runs a cut-down linux
Does *not* have a native development environment, e.g. no
'make', no 'perl', no gcc.
The PPC860 is "almost" compatible with the PowerPC CPUs found in
macintosh machines. In practice, binaries compiled for, e.g. a PPC603
will crash on the 860. So I have to cross compile.
Approach #1: Try to understand autoconf. Modify the configure
stuff so that it makes makefiles suitable for cross
compilation. After a frustrating day fighting with this
I decided to leave playing with autoconf for braver people.
Approach #2: Run configure on my x86 machine, and then
let some scripts run through the source tree and
'fix' the Makefiles.
In more detail:
./configure
find . -name Makefile -exec mung \{\} \;
vi make/i686-pc-linux-gnu/otp.mk
vi erts/emulator/i686-pc-linux-gnu/Makefile
make noboot
fiddle with some -L paths which caused make to fail
make noboot
copy over the library .beams from my x86 version
done
'mung' is a script which runs the makefiles through a few sed filters
which change all occurences of CC = gcc to CC = powerpc-linux-gcc and
do similar things to LD, AR, RANLIB and so on.
This approach seems unsatisfying for two reasons. Firstly 'configure'
might have set some CPU-dependent flag, e.g. x86 is little endian and
PPC is big endian. Since the resulting Erlang "seems to work ok" on
the 860 I'll just assume that's not the case. Secondly it feels like a
gigantic hack, though seeing that Patrik's approach to compiling for
VxWorks isn't much more sophisticated made me feel better ;-)
Comments? Suggestions?
Matthias
More information about the erlang-questions
mailing list