go under rtems on arm?

60 views
Skip to first unread message

Steve Simon

unread,
Jan 17, 2020, 8:41:23 AM1/17/20
to golang-nuts

Hi all,

There was an RTEMS port as a GSOC project about 10 years ago, this was a port of gccgo to x86.

I would like to be able to run go apps under RTEMS on Arm, but have no real understanding of the effort required
to do so. Would anyone be able to summerize in a few sentences?

I could use an external linux box to run my app and access RTEMS over the wire but it would be cleaner and easier
to maintain if I could run my go app hosted on RTEMS itself.

Thanks for any/all help,

-Steve

Ian Lance Taylor

unread,
Jan 17, 2020, 9:56:45 AM1/17/20
to Steve Simon, golang-nuts
This would be a port to a new, entirely different, operating system.
If you look at the runtime package, it would require writing entirely
new versions of os_linux.go and sys_linux_arm. You would likely need
something to replace netpoll_epoll.go; I forget how RTEMS handles
select/poll. You would need a new implementation of the syscall
package, appropriate for RTEMS. More broadly, anywhere you see a
*_linux.go or *_unix.go file in the standard library, you would likely
need a new implementation.

So: a fair amount of work, but certainly doable. As you say, it was
done once before, although porting gccgo was likely easier than
porting the gc toolchain.

Hope this helps.

Ian

Steve Simon

unread,
Jan 19, 2020, 10:39:31 AM1/19/20
to golang-nuts
thanks Ian,

i hadn't realised that rtems is really a “single main that runs forever” class
of rtos - i thought it was more akin to qnx.

go is not going to work natively on this product range,
though we will run it on a separate vm, and already
run a similar app under linux on other products.

an this is ignoring the effort of porting the runtime.

Thanks for your help,

-Steve
Reply all
Reply to author
Forward
0 new messages