busybox and small scripting languages on FreeBSD ? (was Re: 80
Mb / enough for 7.x? OK to delete /stand/ and /modules/ ?)
louie at transsys.com
Sun Aug 3 14:26:23 UTC 2008
On Aug 2, 2008, at 6:56 PM, 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.
>> If we're ever to consider building images for flash parts (not
>> 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
>> something I find appealing).
> related to this thread -- does anyone have experience in trying
> to build busybox on FreeBSD ?
> 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;
> a library to play with sockets...
I'd also suggest looking at Lua, as someone else mentioned. It's BSD
licensed, and written explicitly for small footprint, embedded
There's a port to the Lego Mindstorms controller, for example. The
Lua language is written in ANSI C, and has a small set of well defined
interfaces to the OS for opening files, memory allocation, etc.
There are a number of web based Lua application environments; google for
"Lua Kepler" for one such example. There's also a couple of Wiki
written in Lua.
I think of Lua as the sort of tool you might use these days as
Tcl some years ago.
It also would be suitable for replacing FORTH in /boot/loader as
that's still small and compact enough, with many fewer sharp edges
More information about the freebsd-stable