[Toybox] FreeBSD porting, removing bashisms

Zack Breckenridge zbrdge at gmail.com
Tue Mar 29 19:56:14 PDT 2016


So to actually follow through on something I've suggested on this list and
because after going back through the thread I noticed the Linux emulation
layer was already mentioned, I went ahead and tried to compile Toybox under
Ubuntu 14.04 under Docker under FreeBSD, and was successful with:

make defconfig
make
make install

However 'make test' had perhaps a 30% failure rate and I'm not sure if this
was due to Ubuntu, Docker, or FreeBSD. Here's some sample error messages:

....
FAIL: Hostname - Set, Get and then Reset
ifconfig: ioctl 8913: Invalid argument
ifconfig: ioctl 8913: Invalid argument
FAIL: ifconfig dummy0 down and if config /-only
ifconfig: ioctl 8913: Invalid argument
FAIL: ifconfig dummy0 up
ifconfig: ioctl 8916: Invalid argument
FAIL: ifconfig dummy0 10.240.240.240
ifconfig: ioctl 891c: Invalid argument
FAIL: ifconfig dummy0 netmask 255.255.240.0
ifconfig: ioctl 891a: Invalid argument
FAIL: ifconfig dummy0 broadcast 10.240.240.255
ifconfig: ioctl 8916: Invalid argument
FAIL: ifconfig dummy0 default
ifconfig: ioctl 8922: Invalid argument
FAIL: ifconfig dummy0 mtu 1269
FAIL: ifconfig dummy0 add ::2 -- too small mtu
ifconfig: ioctl 8922: Invalid argument
FAIL: ifconfig dummy0 mtu 2000
ifconfig: socket 2 0: Protocol not supported
FAIL: ifconfig dummy0 add ::2
ifconfig: socket 2 0: Protocol not supported
FAIL: ifconfig dummy0 del ::2
ifconfig: ioctl 8913: Invalid argument
FAIL: Hostname - Set, Get and then Reset
ifconfig: ioctl 8913: Invalid argument
...

If there's any interest in continuing to test on this, I'd be glad to
investigate further. Perhaps by trying with a different Linux
implementation under emulation to start.

- Zack

> On Mar 29, 2016 7:01 PM, "Zack Breckenridge" <zbrdge at gmail.com> wrote:
>>
>> One interesting development to note, which I've been meaning to attempt
to test Toybox against for some time, is the recent updates in FreeBSD
11-CURRENT to support more Linux syscalls in the Linux amd64 binary
emulation layer (
https://svnweb.freebsd.org/base?view=revision&revision=283424), seemingly
for supporting a Docker port to FreeBSD.
>>
>> Of course this is not nearly the same thing as porting Toybox to BSD,
but may be at the least a "new" platform on which Toybox will Just Work?
>>
>> - Zack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160329/b7754d28/attachment-0004.htm>


More information about the Toybox mailing list