[Toybox] FreeBSD porting, removing bashisms

Rob Landley rob at landley.net
Tue Mar 29 16:01:41 PDT 2016


On 03/29/2016 02:58 PM, Ed Maste wrote:
> I'm interested in seeing a FreeBSD port of toybox. I see in the
> archives that this has been discussed in the past but I didn't find
> any real progress. I wonder if others are (still) interested in a
> FreeBSD port?

I'm interested, but it's not a current priority for me in the rush to
1.0. Still if somebody started working on it...

When I tried it myself, the kconfig subdirectory wouldn't build. Other
people seemed to get beyond that by installing gmake.

There's also a bunch of Linux Standard Base headers #included from
toys.h, which bsd may not have. (Most bsds have a linux emulation layer
these days, but I don't know how that works in with building stuff
natively...)

> I had a quick look at the current state. As is commonly the case the
> first issue I encountered is scripts that expect bash to be available
> in /bin/bash, and using bashisms in a #!/bin/sh script. Is there an
> interest in patches to address these?

I've intentionally kept bashisms in the scripts because toybox's
built-in shell (toysh, currently just a stub) is intended to provide a
"reasonable bash replacement". (About the same level of bash extensions
beyond posix that our that sed or ls implementations have beyond posix.)

Running its own build scripts is thus an obvious early development goal.

I've meant to start on that "after next release" for 3 releases now, but
it's becoming important at $DAYJOB (which needs a better shell than the
old uclinux ones the prototypes are currently using).

Rob

 1459292501.0


More information about the Toybox mailing list