This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Common GNU apps (busybox) on ecos possible?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]