[Toybox] BSD support

Owen Shepherd owen.shepherd at e43.eu
Tue Jan 21 10:45:12 PST 2014


> From: rob at landley.net (Rob Landley) [mailto:rob at landley.net (Rob 
> Landley)]
> Sent: 21 January 2014 04:41
> Subject: [Toybox] BSD support
>
> Many moons ago somebody ported busybox to newlib+libgloss running on 
> bare metal. It didn't go upstream and has probably bit-rotted by now, 
> but
it
> was a concern for a while. I also note that u-boot uses busybox hush 
> as
its
> command shell.
> 
> Somebody on the #toybox IRC on freenode is working on a bsd-licensed 
> bootloader (https://github.com/gdboot/gandr/blob/master/LICENSE) and 
> making toysh run on there (and then making toysh not suck) sounds like 
> fun to me. :)

* Ear tweaks *

Well, that's interesting to hear. It certainly sounds doable, but it will
need some glue. Gandr's interface somewhat resembles POSIX (Most function
definitions follow POSIX where logical), but also somewhat doesn't (No file
descriptors - you just play with the raw pointers to the objects).

Provided C Library (for apps, and also used somewhat internally) will be
PDCLib, because (A) that's my baby and (B) because Newlib's code quality is
atrocious, straight on top of the native API (So no emulation of file
descriptors internally). Its' pretty flexible though, so implementing a
lightweight POSIX shim is well within the realm of possibility. (PDCLib is
ISO C - not POSIX)

No virtual memory and no multitasking, which obviously makes pipes fun to
implement (Though the MS-DOS command shell managed to simulate them to an
extent using files, perhaps the same could be done using memory buffers, as
long as you aren't doing anything bidirectional).

I'm not sure its' the best fit. I've always planned a shell, but mostly for
investigating the hardware during board bring up and as part of a "recovery
console", not really as something that should be involved during most boots.
Doesn't need to be powerful.

(Apologies for any duplicates. I first tried sending this from the wrong
account to the wrong E-Mail address...)


 1390329912.0


More information about the Toybox mailing list