From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5636 invoked by alias); 18 Oct 2005 14:35:36 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 5603 invoked by uid 22791); 18 Oct 2005 14:35:32 -0000 Received: from mail.networksolutionsemail.com (HELO mail.networksolutionsemail.com) (205.178.146.50) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Tue, 18 Oct 2005 14:35:32 +0000 Received: (qmail 3873 invoked by uid 78); 18 Oct 2005 14:35:30 -0000 Received: from unknown (HELO rivatek.dnsalias.net) (67.52.40.201) by mail8.netsol.inquent.com with SMTP; 18 Oct 2005 14:35:30 -0000 Received: by rivatek.dnsalias.net (Postfix, from userid 501) id EC4863DACB; Tue, 18 Oct 2005 09:36:54 -0500 (CDT) To: ecos-discuss@ecos.sourceware.org From: Grant Edwards In-Reply-To: <20051018070002.GC7087@lunn.ch> References: <20051017224946.36413.qmail@web50608.mail.yahoo.com> <20051018070002.GC7087@lunn.ch> Date: Tue, 18 Oct 2005 14:35:00 -0000 Message-Id: <20051018143654.EC4863DACB@rivatek.dnsalias.net> Subject: [ECOS] Re: Common GNU apps (busybox) on ecos possible? X-SW-Source: 2005-10/txt/msg00128.txt.bz2 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