public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Common GNU apps (busybox) on ecos possible?
@ 2005-10-17 22:49 Ghazan Haider
  2005-10-18  7:00 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Ghazan Haider @ 2005-10-17 22:49 UTC (permalink / raw)
  To: ecos-discuss

Hi all.

I'm awaiting my spiffy new Olimex lpc2138, and cant
wait to get ecos running on it. Given the POSIX
interface and eCos' whole niche market, I have some
questions...

Can you run small gnu-compliant apps on eCos?
Specifically busybox and things like vi, ash etc?

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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Common GNU apps (busybox) on ecos possible?
  2005-10-17 22:49 [ECOS] Common GNU apps (busybox) on ecos possible? Ghazan Haider
@ 2005-10-18  7:00 ` Andrew Lunn
  2005-10-18 14:35   ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2005-10-18  7:00 UTC (permalink / raw)
  To: Ghazan Haider; +Cc: ecos-discuss

On Mon, Oct 17, 2005 at 03:49:46PM -0700, Ghazan Haider wrote:
> Hi all.
> 
> I'm awaiting my spiffy new Olimex lpc2138, and cant
> wait to get ecos running on it. Given the POSIX
> interface and eCos' whole niche market, I have some
> questions...
> 
> Can you run small gnu-compliant apps on eCos?
> Specifically busybox and things like vi, ash etc?
> 
> 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.

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

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....

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...

        Andrew

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] Re: Common GNU apps (busybox) on ecos possible?
  2005-10-18  7:00 ` Andrew Lunn
@ 2005-10-18 14:35   ` Grant Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2005-10-18 14:35 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-18 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-17 22:49 [ECOS] Common GNU apps (busybox) on ecos possible? Ghazan Haider
2005-10-18  7:00 ` Andrew Lunn
2005-10-18 14:35   ` [ECOS] " Grant Edwards

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).