A 4k demo framework for Raspberry Pi
Tasty-pastry is a work-in-progress demo framework for the Raspberry Pi. This is a long term project, but there are some useful gems already that might be of use to others. The size-oriented linking and fast ESSL trig primitives are believed to be state of the art on Raspberry Pi.
- C framework to initialise OpenGL ES
- 4k optimised link process
- Executable packer
- OpenGL ES shader language fast sin and cos primitives
The link and pack process shrinks executables to a fraction of their original size.
- Removal of debug information
- Removal of sections unnecessary for execution
- Removal of section table itself (courtesy sstrip)
Raspbian Wheezy ships with gzip, bzip2 and best of all xz. The best compression ratios were achieved using xz with the legacy LZMA format, which has a smaller header. Tasty-pastry uses a bash decompression stub to decompress, execute, delete and exit. One file is written in /tmp, and deleted on exit.
- LZMA based packer (gzip and bzip2 also available)
- 54 byte decompression stub (53 for gzip)
Videocore, the Raspberry Pi GPU, lacks accelerated support for a lot of natives. All trigonometry is calculated longhand. Tasty-pastry provides new trig functions that execute in half the time, but still return results to 0.1% error or less.
- OpenGL ES init code based on hello_triangle from Broadcom
- Executable packer idea based on You Massive Clod by parcelshit^fearmoths
- Sstrip from ELFkickers by Brian Raiter of Muppetlabs