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
Dear Silvain,
On 1/31/10 1:34 PM, Sylvain Ageneau wrote:
Hello,
I'd like to announce that tinyscheme http://tinyscheme.sourceforge.net/home.html 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.
Thank you very much for your efforts.
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.
Please note that libpayload is _not_ released under the GPL, but under the BSD license (just like tinyscheme, btw), so it can not share code with GPL projects.
Please also check http://www.coreboot.org/Development_Guidelines#How_to_contribute, especially the section on signing off patches. :-)
Best regards,
Stefan
Hello Stefan,
Ok, I get your point about the impossibility to merge some of dietlibc into libpayload.
But for purpose of using tinyscheme as a scripting language on top of coreboot, would the fact the interpreter's executable is linked against GPL code also make any scheme script using it necessarily GPL ?
In the patches I sent you, the dietlibc part is kept separate from libpayload. In any case, I'll see if I can remove the dietlibc dependency, I had actually started to implement some of the missing functions before I found out about dietlibc.
Regards, Sylvain
________________________________ De : Stefan Reinauer stepan@coresystems.de À : coreboot@coreboot.org; sylvain_ageneau@yahoo.fr Envoyé le : Dim 31 Janvier 2010, 11 h 12 min 27 s Objet : Re: [coreboot] Tinyscheme ported to coreboot/libpayload
Dear Silvain,
On 1/31/10 1:34 PM, Sylvain Ageneau wrote:
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.
Thank you very much for your efforts.
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.
Please note that libpayload is _not_ released under the GPL, but under the BSD license (just like tinyscheme, btw), so it can not share code with GPL projects.
Please also check http://www.coreboot.org/Development_Guidelines#How_to_contribute, especially the section on signing off patches. :-)
Best regards,
Stefan
Sylvain Ageneau wrote:
But for purpose of using tinyscheme as a scripting language on top of coreboot, would the fact the interpreter's executable is linked against GPL code also make any scheme script using it necessarily GPL ?
What GPL code do you mean?
In any case, if you create a GPL payload out of libpayload+dietlibc+tinyscheme then that is an interpreter, and any code you execute using that interpreter can have a different license since they are not, in fact, linked together.
In the patches I sent you, the dietlibc part is kept separate from libpayload. In any case, I'll see if I can remove the dietlibc dependency, I had actually started to implement some of the missing functions before I found out about dietlibc.
That would be great. libpayload has already reused code from other BSD-licensed projects, in particular HelenOS IIRC, so possibly you can find another source of some of the code at least.
//Peter