[M3devel] adding new target?
Mika Nystrom
mika at async.caltech.edu
Fri Nov 4 08:30:10 CET 2011
Hi Jay,
I know you have mentioned before that it's now "easy" to add a new target.
I would like to add a target that is already mostly there, I think.
The one I want is mipsel-linux. This is to run on an Asus RT-N16 router
running OpenWRT or DD-WRT. These devices have 500 MHz MIPS processors
and 128 MB of DRAM.
First before you read this email, are there any instructions for what
I'm trying to do anywhere, beyond your emails? I am using boot1.py
as you suggested.
What I did was the following (guesses all along):
made a cm3.cfg which I called MIPSEL_LINUX and put in
m3-sys/cminstall/src/config-no-install:
::::
readonly TARGET = "MIPSEL_LINUX" % code generation target
readonly GNU_PLATFORM = "mipsel-linux" % "cpu-os" string for GNU
SYSTEM_CC = "gcc -gstabs+ -fPIC" % C compiler
SYSTEM_ASM = "as" % Assembler
m3back_m32 = "" % -m32 not allowed
include("MIPSEL.common")
include("Linux.common")
::::
where MIPSEL.common contains:
::::
readonly TARGET_ARCH = "MIPS"
readonly TARGET_ENDIAN = "LITTLE" % { "BIG" OR "LITTLE" }
readonly WORD_SIZE = "32BITS" % { "32BITS" or "64BITS" }
::::
Now I don't really know which of these strings are just arbitrary
strings that I'm defining here and which of them have to match
other things (and if so, what they have to match).
In any case I'm doing something wrong because I do (on a FreeBSD4
machine)...
./boot1.py MIPSEL_LINUX
which runs for a bit and eventually degenerates to
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/FreeBSD4-I386_FREEBSD/libdecnumber'
cd ../FreeBSD4-I386_FREEBSD && cd libcpp && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: libcpp.a | tee -a
/big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log
cd ../FreeBSD4-I386_FREEBSD && cd libcpp && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: libcpp.a | tee -a
/big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log
gmake: `libcpp.a' is up to date.
cd ../FreeBSD4-I386_FREEBSD && cd gcc && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: s-modes insn-config.h
m3cg | tee -a /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log
cd ../FreeBSD4-I386_FREEBSD && cd gcc && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: s-modes insn-config.h
m3cg | tee -a /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log
gmake: `s-modes' is up to date.
gmake: `insn-config.h' is up to date.
gmake: Nothing to be done for `m3cg'.
--- building in FreeBSD4 ---
new source -> compiling RTHooks.i3
../src/runtime/common/RTHooks.i3:15: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5
compilation terminated.
m3_backend => 1
m3cc (aka cm3cg) failed compiling: RTHooks.ic
new source -> compiling RT0.i3
../src/runtime/common/RT0.i3:19: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5
compilation terminated.
m3_backend => 1
m3cc (aka cm3cg) failed compiling: RT0.ic
new source -> compiling RuntimeError.i3
../src/runtime/common/RuntimeError.i3:10: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5
compilation terminated.
m3_backend => 1
...
Mika
More information about the M3devel
mailing list