Hello,

I'd like to announce that tinyscheme can now run as a coreboot payload.

TinyScheme is a lightweight Scheme interpreter that implements as large a subset of R5RS as was possible without getting very large and complicated. It is meant to be used as an embedded scripting interpreter for other programs. As such, it does not offer IDEs or extensive toolkits although it does sport a small top-level loop, included conditionally. A lot of functionality in TinyScheme is included conditionally, to allow developers freedom in balancing features and footprint. Programmatically, foreign functions in C can be added and values can be defined in the Scheme environment.

Tinyscheme's author is Dimitrios Souflis.

The resulting payload is 90kb. It takes about 250k heap size.

The port was quite straightforward, most of the needed fonctionality needed was already in libpayload. It was probably possible to adapt tinyscheme to run on an unmodified libpayload but it didn't seem difficult to take the needed C functions from dietlibc (mostly stdio / math stuff) so I went that way instead (just needed to make some stubs for some low level functions like read/write). I don't know what your policy is with respect to integrating code from another GPL project but it looks like quite a bit of dietlibc could be easily integrated into libpayload. Some stuff uses syscalls and the like but other code doesn't require any fancy OS functionality.

I've attached the needed patches to this mail + a Makefile to download what's needed. Just do make; make run (hopefully). I also included a precompiled payload suitable for qemu.

It should work on an x86 linux distribution. I don't have access to a coreboot supported motherboard so I've only tested it on qemu.

Regards,
Sylvain Ageneau