Dropbear on bare-metal ARM Cortex-M3?

Grant Edwards grant.b.edwards at gmail.com
Fri Aug 17 05:33:58 WST 2012


On 2012-07-31, Freddie Chopin <freddie_chopin at op.pl> wrote:

> I was wondering whether it's possible (in a reasonable amount of time) to port
> Dropbear to bare-metal platform - one without an OS (like Linux), but with RTOS
> (FreeRTOS) that provides tasks, queues and synchronization (semaphores +
> mutexes) + LwIP TCP/IP stack?
>
> I would require a very minimal implementation of SSH server, without all
> possible encryption options (the code/RAM footprint has to be low) and without
> all possible features - ideally only simpliest SSH server that can pass received
> strings to other parts of code and transfer strings from code via SSH to
> connected client. Of course I'm talking only about command-line interface.
>
> If Dropbear is not a good option for such task, do you have any other
> recommendations?

I've used (non-free) SSL/SSH libraries from Peersec on a platform
similar to what you're describing (using an RTOS different than, but
similar to, FreeRTS).

I haven't looked at dropbear source code in any detail, but I can tell
you that porting network servers written to run on a Unix OS to an
RTOS environment can be _very_ difficult.  The two main problems are
that the servers generally expect to be able to

 1) Call fork() to create a server process for each incoming
    connection.

 2) Call exit() after a connection is closed with the assumption that
    all the resources that were allocated will be auto-magically "freed".

Coming up with fixes/work-arounds for those two issues alone can be
a huge amount of work.

-- 
Grant Edwards               grant.b.edwards        Yow! Used staples are good
                                  at               with SOY SAUCE!
                              gmail.com            



More information about the Dropbear mailing list