<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>in that case, it isn't the LINUXLIBC6 a better name for these targets (at least in Debian 3.0 or so), I mean, not necessarily embedded speaking. And then what does it mean that is not more or less upward "compatibility".<br>Thanks in advance<br><br>--- El <b>vie, 4/11/11, Jay K <i><jay.krell@cornell.edu></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Jay K <jay.krell@cornell.edu><br>Asunto: Re: [M3devel] adding new target?<br>Para: "Mika Nystrom" <mika@async.caltech.edu>, "m3devel" <m3devel@elegosoft.com><br>Fecha: viernes, 4 de noviembre, 2011 11:35<br><br><div id="yiv106746058">
<style><!--
#yiv106746058 .yiv106746058hmmessage P
{
margin:0px;padding:0px;}
#yiv106746058 body.yiv106746058hmmessage
{
font-size:10pt;font-family:Tahoma;}
--></style><div><div dir="ltr">
Please put "32" in the name of the target? That's just preference/taste, not a requirement. <br><br><br> > cd ../FreeBSD4-I386_FREEBSD <br><br><br> We got confused and are building a host=FreeBSD4 target=I386_FREEBSD backend. <br> I realize that is also confusing. But it is how you can transition from the old target names to the new ones.<br><br><br> > ../src/runtime/common/RTHooks.i3:15: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5 <br><br><br> And then later on we probably confused .ic/.mc files for assembly source or vice versa. <br><br><br> See http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3cc/src/platforms.quake. <br> We should error clearly for what you did. <br><br><br>See also m3-sys/m3middle/src/Target.i3 and Target.m3.<br><br>And for that matter.<br><br> grep -r -i linux m3makefile *quake* <br><br><br>or such. The only occurences are likely in
m3core and libm3.<br><br>But in general, missing support is supposed to error clearly.<br>Even for what you did. Odd.<br><br><br>http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-sys/m3cc/src/m3makefile?rev=1.241;content-type=text%2Fplain<br><br><pre>readonly proc GNU_platform (x) is<br> if Platform_info contains x<br> return Platform_info{x}<br> else<br> error ("GNU platform is not known for \"" & x & "\"")<br> return "unknown-unknown-unknown"<br> end<br>end<br><br></pre>I'm curious to see the start of the m3cc build -- it didn't error?<br><br>This platform list is unfortunate, in that the information is duplicated here and in each target's configuration file.<br>Ideally that wouldn't be the case.<br><br><br>Are you running Linux 2.4 or 2.6?<br>I was running "Tomato" on my MIPS router, and it was 2.4.<br>This might be a small problem.<br>Linux has had pthreads since long before 2.6/NPTL, but we didn't use them, and don't know
if they work adequately.<br>User threads ought to work, if get/set/make/swapcontext are in 2.4.<br><br><br>I strongly suggest we introduce an alternate target, MIPS32_LINUX_USERTHREADS or MIPS32EL_LINUX_USERTHREADS or MIPSEL_LINUX_USERTHREADS. That is, I suggest "userthreads" be part of the target name. Or somesuch. Granted, people won't know what it means if they should pick it, and it might sound "good" to people and they'd pick it accidentally.<br>Perhaps you should just hack m3core/.../m3makefile yourself to build for this platform. But that seems a bit gross.<br><br><br>Maybe MIPSEL_LINUX24?<br><br><br><br> - Jay<br><br><br><div><div id="yiv106746058SkyDrivePlaceholder"></div>> To: m3devel@elegosoft.com<br>> Date: Fri, 4 Nov 2011 00:30:10 -0700<br>> From: mika@async.caltech.edu<br>> Subject: [M3devel] adding new target?<br>> <br>> Hi Jay,<br>> <br>> I know you have mentioned before that it's now "easy" to add a new
target.<br>> I would like to add a target that is already mostly there, I think.<br>> The one I want is mipsel-linux. This is to run on an Asus RT-N16 router<br>> running OpenWRT or DD-WRT. These devices have 500 MHz MIPS processors<br>> and 128 MB of DRAM.<br>> <br>> First before you read this email, are there any instructions for what<br>> I'm trying to do anywhere, beyond your emails? I am using boot1.py<br>> as you suggested.<br>> <br>> What I did was the following (guesses all along):<br>> <br>> made a cm3.cfg which I called MIPSEL_LINUX and put in <br>> m3-sys/cminstall/src/config-no-install:<br>> <br>> ::::<br>> readonly TARGET = "MIPSEL_LINUX" % code generation target<br>> readonly GNU_PLATFORM = "mipsel-linux" % "cpu-os" string for GNU<br>> <br>> SYSTEM_CC = "gcc -gstabs+ -fPIC" % C compiler<br>> SYSTEM_ASM = "as" % Assembler<br>> <br>> m3back_m32 = "" % -m32 not
allowed<br>> <br>> include("MIPSEL.common")<br>> include("Linux.common")<br>> ::::<br>> <br>> where MIPSEL.common contains:<br>> <br>> ::::<br>> <br>> readonly TARGET_ARCH = "MIPS"<br>> readonly TARGET_ENDIAN = "LITTLE" % { "BIG" OR "LITTLE" }<br>> readonly WORD_SIZE = "32BITS" % { "32BITS" or "64BITS" }<br>> <br>> ::::<br>> <br>> Now I don't really know which of these strings are just arbitrary<br>> strings that I'm defining here and which of them have to match<br>> other things (and if so, what they have to match).<br>> <br>> In any case I'm doing something wrong because I do (on a FreeBSD4<br>> machine)...<br>> <br>> ./boot1.py MIPSEL_LINUX<br>> <br>> which runs for a bit and eventually degenerates to<br>> <br>> gmake[1]: Nothing to be done for `all'.<br>> gmake[1]: Leaving directory
`/big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/FreeBSD4-I386_FREEBSD/libdecnumber'<br>> cd ../FreeBSD4-I386_FREEBSD && cd libcpp && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: libcpp.a | tee -a<br>> /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log<br>> cd ../FreeBSD4-I386_FREEBSD && cd libcpp && gmake CFLAGS="-g -O2" MAKE=gmake AUTOCONF=: AUTOMAKE=: LEX='touch lex.yy.c' MAKEINFO=: libcpp.a | tee -a<br>> /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log<br>> gmake: `libcpp.a' is up to date.<br>> 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<br>> m3cg | tee -a /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log<br>> 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<br>> m3cg | tee -a /big/home2/mika/2/cm3-cvs/cm3/m3-sys/m3cc/src/../FreeBSD4-I386_FREEBSD/_m3.log<br>> gmake: `s-modes' is up to date.<br>> gmake: `insn-config.h' is up to date.<br>> gmake: Nothing to be done for `m3cg'.<br>> --- building in FreeBSD4 ---<br>> <br>> new source -> compiling RTHooks.i3<br>> ../src/runtime/common/RTHooks.i3:15: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5<br>> compilation terminated.<br>> m3_backend => 1<br>> m3cc (aka cm3cg) failed compiling: RTHooks.ic<br>> new source -> compiling RT0.i3<br>> ../src/runtime/common/RT0.i3:19: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5<br>> compilation terminated.<br>> m3_backend => 1<br>> m3cc (aka cm3cg) failed compiling: RT0.ic<br>> new source -> compiling
RuntimeError.i3<br>> ../src/runtime/common/RuntimeError.i3:10: fatal error: *** illegal type: 0x6f, at m3cg_lineno 5<br>> compilation terminated.<br>> m3_backend => 1<br>> ...<br>> <br>> Mika<br>> <br></div> </div></div>
</div></blockquote></td></tr></table>