Last night I was playing with the cross-compilation environment for the Weebox I’ve built in Scratchbox.
The first thing I’ve tried compiling is MFD itself; just to get a feeling for what kind of problems I might come up against. To be frugal, I’ve set up the Scratchbox ARM emulation enviroment with the uclib C library, which is apparently a lot smaller than glibc, and is more suited to smaller-footprinted applications. Pretty much what I’d want in a 64Mb RAM, 128Mb flash RAM system!
I picked up the MFD source direct from its Subversion repository, and tried to build it…boom, no glibc. Luckily MFD has a patch to build with non glibc calls, which I dutifully installed — much better!
Things I had to note:
src/alisp/alisp.c and src/names.c can safely have the include for removed.--with-tremor so it uses the integer OGG library instead
of the float one (which requires cosf and sinf; neither of which are in the uclib).tag.c in MFD needed a patch, again it was using a header which isn’t in my micro distribution;
again it wasn’t actually needed and could be safely commented out.So far so good — I ended up with an MFD binary in ARM format which ran (under emulation) right up until it needed some sound. Which my current linux box doesn’t have — yet. I’ve ordered a USB sound dongle from Ebay (£5, bargain), and hopefully I’ll be able to test MFD under emulation with it.
I’ve also started talking to Technologic Systems about getting a quote for the hardware. I’ll let you know when I get any information back from them.
All in all, pretty successful for an evening’s sit-in-front-of-TV-idly-compiling :)
Matt Godbolt is a C++ developer living in Chicago. He works for Hudson River Trading on super fun but secret things. He is one half of the Two's Complement podcast. Follow him on Mastodon or Bluesky.