Christian Mauderer
2016-Feb-04 14:19 UTC
Evaluating a port to RTEMS (embedded OS with single address space and no processes)
Am 04.02.2016 um 14:46 schrieb Roland Mainz:> On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer > <christian.mauderer at embedded-brains.de> wrote: >> 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. >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: christian.mauderer at 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
2016-Feb-04 16:42 UTC
Evaluating a port to RTEMS (embedded OS with single address space and no processes)
On Thu, Feb 4, 2016 at 7:49 PM, Christian Mauderer < christian.mauderer at embedded-brains.de> wrote:> Am 04.02.2016 um 14:46 schrieb Roland Mainz: > > On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer > > <christian.mauderer at embedded-brains.de> wrote: > >> 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. > > > > 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: christian.mauderer at 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. > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev >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
2016-Feb-05 12:00 UTC
Evaluating a port to RTEMS (embedded OS with single address space and no processes)
Am 04.02.2016 um 17:42 schrieb Shinose:> > On Thu, Feb 4, 2016 at 7:49 PM, Christian Mauderer > <christian.mauderer at embedded-brains.de > <mailto:christian.mauderer at embedded-brains.de>> wrote: > > Am 04.02.2016 um 14:46 schrieb Roland Mainz: > > On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer > > <christian.mauderer at embedded-brains.de > <mailto:christian.mauderer at embedded-brains.de>> wrote: > >> 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. > > > > 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 > > > 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.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: christian.mauderer at 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
2016-Feb-05 13:27 UTC
Evaluating a port to RTEMS (embedded OS with single address space and no processes)
On Thu, Feb 4, 2016 at 5:42 PM, Shinose <shinose at gmail.com> wrote:> On Thu, Feb 4, 2016 at 7:49 PM, Christian Mauderer > <christian.mauderer at embedded-brains.de> wrote: >> Am 04.02.2016 um 14:46 schrieb Roland Mainz: >> > On Thu, Feb 4, 2016 at 1:40 PM, Christian Mauderer >> > <christian.mauderer at embedded-brains.de> wrote:[snip]> 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) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)