ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > OpenPandora Port > How to compile for OpenPandora
How to compile for OpenPandora
  Author    Thread Reply to topic
Risca



Joined: 07 May 2012
Posts: 9
How to compile for OpenPandora 

Hi,

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):
https://pyra-handheld.com/boards/threads/crosscompiler-toolchain-based-on-openpandora-org-ipks.65592/
Make sure the cross-compiler tools are in the PATH.

2. Checkout the sources

code:

git clone --depth 1 https://github.com/scummvm/scummvm



3. Make some changes
code:

diff --git a/configure b/configure
index cd79adfce6..2a9e132be5 100755
--- a/configure
+++ b/configure
@@ -1547,7 +1547,7 @@ neuros)
 openpandora)
        _host_os=linux
        _host_cpu=arm
-       _host_alias=arm-angstrom-linux-gnueabi
+       _host_alias=arm-none-linux-gnueabi
        ;;
 ppc-amigaos)
        _host_os=amigaos



4. Configure
code:

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:

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:

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?
 Reply with quote  
Post Wed Nov 08, 2017 5:34 pm 
 View user's profile Send private message
Risca



Joined: 07 May 2012
Posts: 9
 

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.
 Reply with quote  
Post Wed Nov 08, 2017 8:24 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge