Cuberite Forum
Cross compile Cuberite for Raspberry Pi - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Cross compile Cuberite for Raspberry Pi (/thread-1675.html)

Pages: 1 2 3


RE: Cross compile mc server for raspberry pi - xoft - 10-12-2015

This thread deserved a stick. Here you go.
[Image: Stick.png?version=2e27e22cfa3a789e14fb71cda00aa4b3]


RE: Cross compile mc server for raspberry pi - Seadragon91 - 10-12-2015

Thank youBig Grin
Will look to update this thread, because of the name change and a few others small thingsTongue


RE: Cross compile Cuberite for Raspberry Pi - Seadragon91 - 06-21-2017

I think this is now obsolete, or?


RE: Cross compile Cuberite for Raspberry Pi - xoft - 06-21-2017

Somewhat. It just needs a little updating - the ToLua++ executable is no longer needed. It still has a great step-by-step detailed guide for installing the crosscompiling tools, which is a great help.


RE: Cross compile Cuberite for Raspberry Pi - Seadragon91 - 06-21-2017

Yes tolua++ it no longer needed, but now it's required to have lua installed.


RE: Cross compile Cuberite for Raspberry Pi - Seadragon91 - 07-02-2017

Updated the tutorial:
  • Added the packages that needs to be installed and why
  • Use x64 cross compiler 
  • Formated the commands / output with shcode - looks better



RE: Cross compile Cuberite for Raspberry Pi - Babushka23 - 08-19-2017

Would this work for oDroid-C2 as well? What changes would I need to make to compile this for/deploy this on my oDroid-C2?


RE: Cross compile Cuberite for Raspberry Pi - bearbin - 08-19-2017

A similar method works but it requires a different set of libraries and configuration files.


RE: Cross compile Cuberite for Raspberry Pi - Seadragon91 - 09-25-2019

Updated the tutorial:
  • No need to get the raspberry pi tools from github, there are now the packages gcc-arm-linux-gnueabihf and g++-arm-linux-gnueabihf that contains the cross compiler
  • Updated the example output of fdisk -l
  • Updated the content for pi.cmake



RE: Cross compile Cuberite for Raspberry Pi - konradybcio - 12-29-2019

Since Raspberry Pi isn't really the most powerful piece of hardware, you might want to play around with compiler optimization flags. Adding:

"-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -mfpu=neon-fp-armv8" for RPi3 64-bit
"-O2 -pipe -mcpu=cortex-a7 -mfpu=neon-vfpv4" for RPi2/3 32-bit
"-march=armv8-a+crc -mtune=cortex-a72 -O2 -pipe" for RPi4 64-bit

to CFLAGS/CXXFLAGS should increase performance at least slightly. These sets of flags come from Gentoo wiki or other Gentoo-on-Pi projects.


-ftree-vec
torize shouldn't also hurt for any of these


-pipe pretty much just speeds up the build

-march/-mtune/-mcpu/-mfpu will cook the code specifically for a given platform so as to squeeze all the juice off of it

-O2 is an optimization level that shouldn't break anything, more brave of you could try -O3 (I haven't noticed major problems directly connected with it)
-flto enables link time optimizations, which could be an another source of performance gains, but I haven't tested whether that works yet.

If building the project with these flags doesn't introduce any errors, perhaps they could be incorporated in official builds, but that'd increase the number of images built, and I'm not sure whether CI and/or devs would be comfortable with that.



EDIT: btw, I'm using latest GCC9 to build, so I'm not sure whether all of these options are present in older compiler revisions (I've seen mentions of gcc4 somewhere on project's github)