How to compile for OpenPandora

Subforum for discussion and help with ScummVM's OpenPandora port

Moderator: ScummVM Team

Post Reply
Posts: 10
Joined: Mon May 07, 2012 10:33 pm

How to compile for OpenPandora

Post by Risca » Wed Nov 08, 2017 5:34 pm


I've been experimenting with cross-compiling ScummVM for my OpenPandora. I got it working, but it was not as straightforward as I'd hoped. Here is a small summary how.

1. Install a cross-compiler. I used the install script from here and updated it to download CodeSourcery 2013.11 (gcc-4.8.1): ... pks.65592/
Make sure the cross-compiler tools are in the PATH.

2. Checkout the sources

Code: Select all

git clone --depth 1
3. Make some changes

Code: Select all

diff --git a/configure b/configure
index cd79adfce6..2a9e132be5 100755
--- a/configure
+++ b/configure
@@ -1547,7 +1547,7 @@ neuros)
-       _host_alias=arm-angstrom-linux-gnueabi
+       _host_alias=arm-none-linux-gnueabi
4. Configure

Code: Select all

CXXFLAGS="-isystem ${PNDSDK}/usr/include" CC=arm-none-linux-gnueabi-gcc LD=arm-none-linux-gnueabi-ld AS=arm-none-linux-gnueabi-as CXX=arm-none-linux-gnueabi-g++ ./configure --backend=openpandora --host=openpandora --enable-c++11 --with-sdl-prefix=${PNDSDK}/usr --disable-debug --enable-release --enable-optimizations --opengl-mode=any --with-alsa-prefix=${PNDSDK}/usr --with-ogg-prefix=${PNDSDK}/usr --with-vorbis-prefix=${PNDSDK}/usr --with-mad-prefix=${PNDSDK}/usr --with-zlib-prefix=${PNDSDK}/usr --with-jpeg-prefix=${PNDSDK}/usr --with-png-prefix=${PNDSDK}/usr --with-theoradec-prefix=${PNDSDK}/usr --with-freetype2-prefix=${PNDSDK}/usr --with-faad-prefix=${PNDSDK}/usr
5. Compile

Code: Select all

make -j9
6. Deploy on the OpenPandora in whichever way most suitable. I used SCP.

This seemed way more complicated than I thought.
The CXXFLAGS was needed to get rid of a torrent of compiler warnings about redefined defines (if that makes sense).
I tried specifying --host=arm-none-linux-gnueabi to the configure script but then I had to build it with

Code: Select all

make AS=arm-none-linux-gnueabi-as
Additionally, the OpenPandora customization (D-PAD support) was not built. The original toolchain script would download CodeSourcery 2011.09 (gcc-4.6) which would give me a torrent of other compiler warnings. Of course, that was before I did the CXXFLAGS trick so it could be possible that the older toolchain works without warnings as well.

Am I doing it wrong?

Posts: 10
Joined: Mon May 07, 2012 10:33 pm

Post by Risca » Wed Nov 08, 2017 8:24 pm

Doing the CXXFLAGS trick got rid of the warning spam from the old CodeSourcery 2011.09 toolchain.

I'm surprised by the difference in size between toolchains:
  • CodeSourcery 2011.09 - 44 MB (34 MB stripped)
  • CodeSourcery 2013.11 - 38 MB (29 MB stripped)
  • CodeSourcery 2013.11 (C++11 enabled) - 38 MB (29 MB stripped, 8 bytes bigger than without C++11 enabled)
That's almost 15 % reduction in binary size going from 2011.09 to 2013.11! Enabling C++11 support did basically no difference in binary size. At least not on ARM.

Post Reply