From owner-freebsd-stable@FreeBSD.ORG Sat Aug 2 23:07:48 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47CEC106567C for ; Sat, 2 Aug 2008 23:07:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id EA4288FC1B for ; Sat, 2 Aug 2008 23:07:47 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from Macintosh-4.local ([10.0.0.194]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m72N7lYX028357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Aug 2008 16:07:47 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4894E8C3.5060004@freebsd.org> Date: Sat, 02 Aug 2008 16:07:47 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Luigi Rizzo References: <372128.56919.qm@web51502.mail.re2.yahoo.com> <20080802.002039.58462077.imp@bsdimp.com> <4894A9D8.2090606@freebsd.org> <20080802225643.GA84798@onelab2.iet.unipi.it> In-Reply-To: <20080802225643.GA84798@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: fbsd2@yahoo.com, freebsd-stable@freebsd.org Subject: Re: busybox and small scripting languages on FreeBSD ? (was Re: 80 Mb / enough for 7.x? OK to delete /stand/ and /modules/ ?) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2008 23:07:48 -0000 Luigi Rizzo wrote: > On Sat, Aug 02, 2008 at 11:39:20AM -0700, Sam Leffler wrote: > ... >> I've been looking at nanobsd for a couple of applications and working to >> reduce the footprint of the images without hacking special rules. With > ... >> If we're ever to consider building images for flash parts (not compact >> flash) then we'll need to do a lot of work to pare down the bloat--or >> replace current apps w/ special purpose replacements a la busybox (not >> something I find appealing). > > related to this thread -- does anyone have experience in trying > to build busybox on FreeBSD ? My last experience w/ busybox was >1 year ago and I'm not sure I was using anything close to up to date, but...it was utterly linux-specific. Given what it does and what I saw in the code I'd be more inclined to write one from scratch. But having said that I'm not really sure it's worthwhile; I think I'd rather put effort into putting some of the existing tools on a diet (possibly under #ifdefs) and then use crunchgen. I'm pretty sure you'd come up with something higher quality and with a similar footprint. > > Also, what would you suggest as a small scripting language to be used > in this kind of platform for implementing CGI scripts (and preferably > able to use sockets/select) ? > > The various perl/python/php and friend are in the 10MB range once you > pick up a little bit of libraries (sockets etc) and the tangle of > modules they require; awk (which is present in busybox) is ok-ish for > some things, but doing > I/O and calling external programs with it is very unfriendly; > javascript/spidermonkey is on the 500KB range but it doesn't have > a library to play with sockets... Not sure about scripting languages but what's really needed is a lightweight http solution that supports ssl. This can go a long way before you get to php et. al. My last project of this sort used tinyhttp (I think, whichever one Jeff Pozkanzer did) and php. But we didn't try to fit in flash, we used compact flash parts. I think tinyhttpd+php is also what m0n0wall and pfsense use but haven't looked in a while. Sam