Discussion:
Evaluating a port to RTEMS (embedded OS with single address space and no processes)
(too old to reply)
Christian Mauderer
9 years ago
Permalink
Hello,

I am searching a SSH server for remote administration of an embedded
application running on RTEMS (https://www.rtems.org). This environment
has neither virtual memory nor user and kernel space. So this is like an
application running in kernel mode only.

Would it be possible to run (a very basic version of) OpenSSH in such an
environment using e.g. threads instead of forking new subprocesses? Is
there already some known similar configuration (e.g. on another embedded
OS)?

Kind regards

Christian Mauderer
--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: ***@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Christian Mauderer
9 years ago
Permalink
...
Hello Luca Filipozzi,

of course you are right: I should have mentioned that my colleague
posted nearly the same question on the dropbear mailing list.

Dropbear is one of the alternatives that we are evaluating. Currently we
are not sure which one would be easier to port. It seems that dropbear
would be at least possible to port.

One difference is that OpenSSH has an integrated SFTP solution while as
far as i know dropbear would need an extra application for that.

Kind regards

Christian Mauderer
--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: ***@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Roland Mainz
9 years ago
Permalink
On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer
Post by Christian Mauderer
I am searching a SSH server for remote administration of an embedded
application running on RTEMS (https://www.rtems.org). This environment
has neither virtual memory nor user and kernel space. So this is like an
application running in kernel mode only.
Would it be possible to run (a very basic version of) OpenSSH in such an
environment using e.g. threads instead of forking new subprocesses? Is
there already some known similar configuration (e.g. on another embedded
OS)?
Well, not much harder than a port to the original m68k AmigaOS or most
of the military-oriented embedded OSes... not hard but lots of work
(unless you have an existing POSIX(-like) layer emulation), mostly
related to resource tracking and the socket stuff.

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
Christian Mauderer
9 years ago
Permalink
...
Hello Roland,

thanks for the quick answer. I must have overlooked these ports. I have
mostly seen the list of full Unixes on this page:

http://www.openssh.com/portable.html

After your hint, I noted that there are a lot more ports in the sources.
Is there some kind of porting guide or a hint where to begin reading
documentation?

If we would create a port: Would it be theoretically possible to
contribute it to the official sources?

For the POSIX-layer: RTEMS implements a part of the POSIX standard (or
at least of the embedded subset of POSIX). But like I said it doesn't
have processes but only threads.

Kind Regards

Christian Mauderer
--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: ***@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Shinose
9 years ago
Permalink
On Thu, Feb 4, 2016 at 7:49 PM, Christian Mauderer <
...
Hi,

We have successfully ported OpenSSH along with SFTP-Server for a Greenhills
platform, where it was only having single address space and threads.

But I could say it was really a painful work to resolve the global
variables and data structures to each threads.

We have used a total of 3 threads including the SFTP Server.

Thanks,
Shinose.
Christian Mauderer
9 years ago
Permalink
...
Hello Shinose,

thanks for your feedback. It's good to know that it is possible and
someone has already done something similar.

Kind regards

Christian Mauderer
--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: ***@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Roland Mainz
9 years ago
Permalink
Post by Shinose
On Thu, Feb 4, 2016 at 7:49 PM, Christian Mauderer
Post by Roland Mainz
On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer
[snip]
Post by Shinose
We have successfully ported OpenSSH along with SFTP-Server for a Greenhills
platform, where it was only having single address space and threads.
But I could say it was really a painful work to resolve the global variables
and data structures to each threads.
Gnnn... bit offtopic, but that reminds me of the two regrets the
original UNIX authors had:
1. Avoid spelling error and write creat() as create() - would have
saved lots of emails...
2. Global variables in the K&R C language, more or less inherited from
BCPL - caused *pain* over (first in the linker, than everywhere else)
and over again...

That said, global variables aren't the only issue, there are other
global resources like signals and other per-process or per-thread
properties which need to be tracked.

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
Christian Mauderer
9 years ago
Permalink
Hello Cedric,

thanks for the info regarding fork and the resource tracking.

I'll just have to find out, how to avoid the fork() in the sshd.

By the way: Is there any reason that you've sent the mails off list?
Otherwise it would be good if we could send it to the list too so that
someone who reads the thread can get this information too.

Kind regards

Christian Mauderer


Note: This answers accidentally slipped off the list. I've decided to
send it to the list too after sorting this out with Cedric.
...
--
--------------------------------------------
embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: ***@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
Loading...