public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Re: Common GNU apps (busybox) on ecos possible?
Date: Tue, 18 Oct 2005 14:35:00 -0000	[thread overview]
Message-ID: <20051018143654.EC4863DACB@rivatek.dnsalias.net> (raw)
In-Reply-To: <20051018070002.GC7087@lunn.ch>

In gmane.os.ecos.general, you wrote:

>> Can you run small gnu-compliant apps on eCos?

It depends on the app.  For a single instance of a
single-threaded application, it may be possible.  

In general, it's difficult.

>> Specifically busybox and things like vi, ash etc?

It will be virtually impossible to use busybox to do anything
useful.  You should be able to get a single instance of it
running, but you won't be able to do anything other than use
built-in commands.

>> GCC is used for ecos, and these simpler apps are quite
>> portable and use (AFAIK) nothing Linux or BSD specific in the
>> API. In short, I wonder if you can run a standalone ecos
>> system with some desktop-like tools like you can with QNX,
>> uclinux, minix and the likes.

No.

> I don't know of anybody who has done this. 

At a previous employer we ported one Linux/BSD server-type app.
It was a nasty hack, and there were all sorts of features that
didn't work.

> There are some of the problems you need to address:
>
> No exec[l|lp|le|v|vp] functions. So there is no way to create
> a process using the normal POSIX API.
>
> There is no concept of a process. eCos is all thread based.
> This has a few concequencies:
>
> Global variables are global across all programs since they are
> linked into the same image....

Exactly.  Those restrictions are a complete port-killer for
anything that needs to fork another process -- either another
instance of itself (many servers do this) or another program
(shells do this).

> There is no resouce tracking. When a Unix process exists any
> memory it has allocated is freed, files it has open are closed
> etc. eCos has none of this, so you are likely to suffer from
> memory leaks and file descriptor leaks etc...

IOW, it's not possible in practice to run something like
busybox.  You could possibly run an instance of vi, but you
could probably never exit or re-start it without rebooting.

Think of it this way: an eCos system consists of a
_single_application_ (albiet a multi-threaded one).  That
application has the kernel and network stack linked into it
(the kernel and stack are just libraries).

That applications starts at power-up, and runs until reset.

If you have a _single_ Posix app that you want to run 100% of
the time, you could probably hack it up enough to get it
running on eCos.

-- 
Grant Edwards                   grante             Yow!  Are BOTH T.V.S on??
                                  at               
                               visi.com            

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2005-10-18 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 22:49 [ECOS] " Ghazan Haider
2005-10-18  7:00 ` Andrew Lunn
2005-10-18 14:35   ` Grant Edwards [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051018143654.EC4863DACB@rivatek.dnsalias.net \
    --to=grante@visi.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).