<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20170720204531156386 { background-color: rgb(255, 255, 255); line-height: initial; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>I have been struck by it for like 2 days.</div><div>I want to cross-compile Mono for a test, and I enter: </div><div><br></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><b>./autogen.sh --prefix=/opt/Mono/mono-4.8.1.0/mono-arm --target=arm-rtems4.11 --host=x86_64-unknown-linux CC=/opt/rtems-4.11.1-release/4.11-tools/bin/arm-rtems4.11-gcc CFLAGS="-qrtems -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/lib -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/xilinx_zynq_zedboard/lib/ -I//opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/xilinx_zynq_zedboard/lib/include --specs bsp_specs -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9"</b><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">It goes well at first, then the error came up:</span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><b>checking for timezone variable... no<br>configure: error: unable to find a way to determine timezone</b><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">I can not really understand the content from config.log</span></div><div><img src="cid:_Foxmail.1@f252d2c8-3400-4223-44bf-e1f41aa20ff3" border="0"></div><div><br></div><div>Can anyone help me with this? Thanks a lot</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Best wishes,</div><div>xuelin.tian@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:russ.haley@gmail.com">Russell Haley</a></div><div><b>Date:</b> 2017-07-14 12:44</div><div><b>To:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian</a>; <a href="mailto:joel@rtems.org">Joel Sherrill</a></div><div><b>CC:</b> <a href="mailto:users@rtems.org">users</a></div><div><b>Subject:</b> Re: Has anyone tried to port Mono to RTEMS</div></div></div><div><div class="FoxDiv20170720204531156386">
                                                                                      <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Thinking about it, Lua is designed to be statically linked into C applications and your scripts are loaded and executed by your application at runtime. This is how lua is plugged into many video games like world or warcraft and roblox. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">From my simplistic understanding of rtems (and everything I just said), that would be the way you would statically link lua into rtems?</div>                                                                                                                                     <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Russ</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div>                                                                                                                                                                                                   <div style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.</div>                                                                                                                                                                                  <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                           <div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From: </b>xuelin.tian@qkmtech.com</div><div><b>Sent: </b>Thursday, July 13, 2017 9:03 PM</div><div><b>To: </b>Russell Haley; Joel Sherrill</div><div><b>Cc: </b>users@rtems.org</div><div><b>Subject: </b>Re: Re: Has anyone tried to port Mono to RTEMS</div></div></td></tr></tbody></table><div style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style="">
<div><span></span>OK, thanks a lot.</div><div>I will go through Lua today, to see if there is something interesting there.</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Best wishes,</div><div>xuelin.tian@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:russ.haley@gmail.com">Russell Haley</a></div><div><b>Date:</b> 2017-07-14 11:57</div><div><b>To:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian</a>; <a href="mailto:joel@rtems.org">Joel Sherrill</a></div><div><b>CC:</b> <a href="mailto:users@rtems.org">users</a></div><div><b>Subject:</b> Re: Has anyone tried to port Mono to RTEMS</div></div></div><div><div class="FoxDiv20170714115950519708" style="background-color: rgb(255, 255, 255); line-height: initial;">
                                                                                      <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Just my opinion on the 'or other vm' comment. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">If your requirement is not strictly mono, I highly suggest something small and simple like Lua. It's a a very efficient vm and is cross compatible with all major platforms. The only requirement for Lua is c99. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">The language is very simple and bare bones. You pick your tools from git or a repository manager called luarocks (luarocks.org). That's where the 'hard part' of Lua comes in. It's very hands on because you need to find or write almost everything you need. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">I am putting together a 'lightweight' IoT platform using Lua 5.3 and a very sophisticated polling library called cqueues. There is an http library called lua-http based on cqueues that contains a client and server implementation of most major http standards including http2 and websockets. The requirements for cqueues are a polling library such as epoll or kqueues (or even poll or select). I'm not sure how well that would plug into rtems. ‎At this point I'm cross compatible for most major Nixs' though. </div>                                                                                                                                     <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Nonetheless, the overhead of mono is not really worth it if you are doing simple things. ‎That's why I switched away from DotNet for my project. If you have code to port, or have DotNet developers, mono makes sense. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">‎Just my opinion. </div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">HTH</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Russ</div><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div>                                                                                                                                                                                                   <div style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.</div>                                                                                                                                                                                  <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                           <div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>From: </b>xuelin.tian@qkmtech.com</div><div><b>Sent: </b>Thursday, July 13, 2017 8:38 PM</div><div><b>To: </b>Joel Sherrill; Russell Haley</div><div><b>Cc: </b>users@rtems.org</div><div><b>Subject: </b>Re: Re: Has anyone tried to port Mono to RTEMS</div></div></td></tr></tbody></table><div style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style="">
<div><span></span>Yes, I am trying to build it from source according to Russell.</div><div><br></div><div>As to .net core, I may not have a deep understanding of it. I think for now, Mono may be the best choice for me, since I need to make it (porting Mono or other VM to rtems) work in a few days. </div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Best wishes,</div><div>xuelin.tian@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:joel@rtems.org">Joel Sherrill</a></div><div><b>Date:</b> 2017-07-13 01:08</div><div><b>To:</b> <a href="mailto:russ.haley@gmail.com">Russell Haley</a></div><div><b>CC:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>; <a href="mailto:users@rtems.org">users@rtems.org</a></div><div><b>Subject:</b> Re: Re: Has anyone tried to port Mono to RTEMS</div></div></div><div><div class="FoxDiv20170714113148021310"><div dir="ltr">The reply from Russell is very good advice. Look forward when porting and<div>make sure you are porting something with a future.</div><div><br></div><div>For Mono, I did exactly what he outlined. I built native. I recall it using a </div><div>fairly normal configure script and I just added --target=XXX-rtems. I might</div><div>have added some CFLAGS but don't recall. </div><div><br></div><div>I focused on the run-time interpreter and ignored the JIT. The run-time</div><div>translated Mono calls into C library and POSIX calls. If there was a </div><div>compilation issue, I tried to fix it where ever it had to be fixed. Always being</div><div>open to adding something to either RTEMS or newlib if possible</div><div>and needed.</div><div><br></div><div>--joel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 11:03 AM, Russell Haley <span dir="ltr"><<a href="mailto:russ.haley@gmail.com" target="_blank">russ.haley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.5em; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">On Tue, Jul 11, 2017 at 9:31 PM, <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a><br>
<<a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>> wrote:<br>
> Dear Joel,<br>
> Recently, I continue to port Mono to RTEMS.<br>
> Porting consists of two parts, according to the Mono documents online, JIT<br>
> engine and OS support.<br>
> JIT part is already done, since I use ARM platform.<br>
> And I am confuesd about OS part and how to build Mono on RTEMS.<br>
> Could you recall any details about how to build Mono on RTEMS? Thank you.<br>
<br>
</span>I'm not sure that's quite right. There are really 3 parts: The<br>
application framework, the 'JIT' (Mono Runtime, or Common Language<br>
Runtime in Microsoft .Net) and the OS specific layer. The application<br>
framework and the JIT are common to all platforms. The OS specific<br>
parts are in the Mono Runtime where it translates the Interediate<br>
Language (IL) to machine specific code at ... er ... runtime. The Mono<br>
Runtime is being slowly replaced by the Roslyn compiler, which is open<br>
source from Microsoft (very very cool stuff).<br>
<br>
Building Mono requires a number of parts, including boot strapping the<br>
build and downloading binaries from nuget (last time I did it,<br>
anyway). I've never attempted to cross compile Mono. I would assume<br>
you would change the make file to point to a cross compiler such as<br>
arm-unknown-gcc (not sure about the RTEMS specifics).<br>
<br>
In my opinion the best bet is to pull the mono repository from GitHub<br>
and build it for your host platform first. Then you could look at<br>
modifying it to build on arm.<br>
<br>
That said, Mono is a dead/dying platform. Microsoft has bought<br>
Xamarian (Mono sponsor company). Now the Mono Dev Team is slowly<br>
porting everything over to the Microsoft .Net Core code. Once the<br>
majority of libraries are converted, they can then write Mono specific<br>
modules for legacy applications and then shuffle everyone over to<br>
DotNet Core. It might be wise to look at using the DotNet Core instead<br>
of Mono. There are a number of reasons to prefer the DotNet Core:<br>
<br>
- Designed to be small and use a package manager to import required<br>
external libraries. This was done with embedded systems in mind.<br>
- Better interpreter: the new interpreters (Rosylin and the other that<br>
I don't remember the name of) are very efficient compared to the Mono<br>
mc.<br>
- More efficient runtime. The Mono Runtime is known to be slow.<br>
<br>
 Here would be a good place to start with the DotNet Core as they have<br>
nightly arm builds.<br>
<br>
<a href="https://stevedesmond.ca/blog/net-core-on-arm" rel="noreferrer" target="_blank">https://stevedesmond.ca/blog/<wbr>net-core-on-arm</a><br>
<br>
<br>
HTH,<br>
<br>
Russ<br>
<div class="HOEnZb"><div class="h5"><br>
> ______________________________<wbr>__<br>
> Best wishes,<br>
> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a><br>
><br>
><br>
> From: Joel Sherrill<br>
> Date: 2017-05-24 20:19<br>
> To: xuelin.tian<br>
> CC: <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
> Subject: Re: Has anyone tried to port Mono to RTEMS<br>
><br>
><br>
> On May 23, 2017 8:58 PM, "<a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>" <<a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>><br>
> wrote:<br>
><br>
> Dear all,<br>
> Is that possible to port Mono to RTEMS? Has anyone tried this before?<br>
> As I notice that there is an open project in RTEMS projects.<br>
><br>
><br>
> Sometime ago, I was asked to provide an estimate for this. It had to be<br>
> between five and ten years ago because we were at the old office but after<br>
> we had done a few years of GSoC. I did enough work preparing the estimate<br>
> where I had the code building without too much effort. I saw the challenge<br>
> as getting the test suite running since you would have to create a test<br>
> harness and build/assembly helper that packaged the interpreted code with<br>
> the interpreter in order to run it. At that time, I envisioned having to<br>
> create a base image and a filesystem image per test.<br>
><br>
> Our POSIX was good enough then to avoid much trouble. It should only be<br>
> easier now since the POSIX support has improved.<br>
><br>
> There were a lot of Mono tests and I expected most to pass quickly. But<br>
> there was no way to know how many issues would be encountered and how many<br>
> root causes there would be. I expected to fix one or two things and then run<br>
> all the tests. That was where I expected time to be consumed.<br>
><br>
> FWIW I recall the GSoC date part because they thought we could magically get<br>
> students to do testing for free on a schedule. :)<br>
><br>
> I hope that helps. It is feasible but the key is testing.<br>
><br>
> --joel<br>
><br>
><br>
> ______________________________<wbr>__<br>
> Best wishes,<br>
> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a><br>
><br>
> ______________________________<wbr>_________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote>
<br><!--end of _originalContent --></div>
</div></div></blockquote>
<br><!--end of _originalContent --></div>
</div></div></blockquote>
</body></html>