Raspberry Pi?

New to Moai? Get started here with our best tips and tutorials.

Raspberry Pi?

Postby telarium » Mon Jun 04, 2012 2:01 pm

Hello, I'm thinking of developing my app in Windows and trying to run it on a Raspberry Pi. Before I actually buy one, I wanted to check first if there was any reason why it would not support compiled Moai code. The system will be running Debian, and like I said, I'll be using Windows to do the actual development and compiling.

It seems like it would work, but I wanted to make sure there were no surprises later on...
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby anddrewscott » Mon Jun 04, 2012 3:03 pm

If it runs on Debian, then read this thread on Moai compatibilit with Debian: moai-on-debian-t738/
anddrewscott
 
Posts: 153
Joined: Fri Sep 02, 2011 7:39 am

Re: Raspberry Pi?

Postby telarium » Mon Jun 04, 2012 3:42 pm

So, dumb question, but do you have to compile from within Debian? I was hoping to compile it from my Windows machine, and then just load the resulting binary on the Pi.
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby ibisum » Tue Jun 05, 2012 1:08 am

Once you've built the MOAI host binary for Debian-ARM (for Raspberry Pi), you don't have to rebuild it ever again and can re-use the MOAI host binary for every project - copying the Lua sources over to your rPi is all you need to do to 'install' your app - but you do of course first need to get the MOAI host compiled.

I myself have "Port MOAI to AngstromOS for the Open Pandora game console" on my personal MOAI TODO list, where its been for a few months now. With the new work on Debian builds for MOAI, the step gets a little closer, but I fear that things won't work out of the box right now - there is still some work to get the gluthost (linux target) ready for use with AngstromOS/Debian distribution GLES binary issues. I'll be working on the Pandora stuff sooner or later, and will update as soon as I get a working build - I believe your work on Debian-rPi as a target and my work with PandoraOS (Angstrom) will benefit each other.
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby telarium » Wed Jun 06, 2012 8:02 am

Might be too advanced for me to figure out on my own. Are there any ARM Linux varieties that are supported out of the box for Moai? Arch or Fedora?
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby ibisum » Thu Jun 07, 2012 12:44 am

Probably Debian-ARM (and Ubuntu) would be a simple target to get working .. maybe not so easy for AngstromOS and so on, but doable. I've done a lot of porting work to Angstrom, and I think MOAI on such platforms as the rPi and the Pandora console would be well worth the effort .. so I'll do a little work on this once other things settle down, I think ..
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby tnlogy » Thu Jun 14, 2012 2:51 am

Any success on running moai on raspberry pi?
User avatar
tnlogy
 
Posts: 17
Joined: Wed Mar 07, 2012 10:22 am

Re: Raspberry Pi?

Postby ibisum » Thu Jun 14, 2012 3:01 am

Not me, personally - I don't have an rPi, since I do have Beagleboards, Pandaboards, and the Open Pandora game console .. but I will start a project next week to get the moai host built for these platforms, and undoubtedly this will help rPi users too. Stay tuned.
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby jgroman » Thu Jun 14, 2012 4:14 am

Well, I managed to compile MOAI on rPi running Raspbian (Debian compiled for ARMv6+VFP). Didn't have time to test it yet, though. I guess it will be necessary to patch MOAI to use Broadcom GLES libraries before it will be of any use on rPi.
Just FYI, list of packages I had to install before compiling (I might have missed some):
Code: Select all
  1. cmake liblua5.1-0-dev libcurl4-openssl-dev libfreetype6-dev freeglut3-dev libxmu-dev libxi-dev libexpat1-dev libglew-dev chipmunk-dev libtinyxml-dev libpng12-dev libjpeg8-dev libjansson-dev

jgroman
 
Posts: 12
Joined: Fri Nov 18, 2011 5:54 am

Re: Raspberry Pi?

Postby ibisum » Thu Jun 14, 2012 4:56 am

Ah cool! Would be interesting to know if it works .. I'd be quite happily surprised if it did!
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby telarium » Thu Jun 14, 2012 1:33 pm

Got my Pi last night. Was able to get about 50% of the way through compiling on device (taking several hours) before it died related to Chipmunk.

jgroman, did you end up removing Chipmunk support to get it to compile? Otherwise, I may try installing the packages you listed again just to make sure I wasn't missing something.
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby telarium » Fri Jun 15, 2012 9:42 am

Okay, granted I'm still a bit rusty with Linux, but I can't seem to install the chipmunk-dev or libjansson-dev packages, due to it being unable to find them. Any idea why this would be the case? Even after I update and try to install.

pi@raspberrypi:/Desktop$ sudo aptitude install libjansson-dev
Couldn't find any package whose name or description matched "libjansson-dev"
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby jgroman » Sun Jun 17, 2012 1:36 am

telarium, what distro you use on your RasPi? Not sure about libjansson, but chipmunk is not available in squeeze for sure. You'll need at least wheezy to successfully compile MOAI without any source modification. And since Lua makes heavy use of floating point stuff, I'd recommend you'd give Raspbian a spin. Standard Debian from RasPi site is armel based and doesn't use floating point arithmetics unit.

I am compiling MOAI on RasPi just now because my SD card died a horrible death. Will post here if there will be any new compilation problems.
jgroman
 
Posts: 12
Joined: Fri Nov 18, 2011 5:54 am

Re: Raspberry Pi?

Postby jgroman » Sun Jun 17, 2012 4:47 am

OK, so compilation took almost exactly one hour on non-overclocked Pi running Raspbian with recent kernel.

I tried to run a few samples:
- hello-moai: Segmentation fault, seems to be related to font loading
- anim/anim-basic: empty MOAI window
- deck/scriptDeck: sort of works, but fps is not all that great
Seems to me it is using software OpenGL emulation only.

MOAI definitely needs to be patched to use Broadcom GLES libraries before it will be usable on RasPi.
jgroman
 
Posts: 12
Joined: Fri Nov 18, 2011 5:54 am

Re: Raspberry Pi?

Postby telarium » Sun Jun 17, 2012 8:10 am

I was just using Debian Squeeze. I suppose I will change if I'm really determined to get Moai working, but it sounds like it's not in a useable state right now.
telarium
 
Posts: 11
Joined: Mon Jun 04, 2012 1:55 pm

Re: Raspberry Pi?

Postby ibisum » Mon Jun 18, 2012 1:02 am

MOAI definitely needs to be patched to use Broadcom GLES libraries before it will be usable on RasPi.


Can you not just do something like "LD_PRELOAD=/usr/lib/libGLES.so ./maoi" or is your RaspPi build doing static linking?
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby jgroman » Mon Jun 18, 2012 4:43 am

ibisum, I think that would not be enough. I believe one needs to include Broadcom specific libraries into source code and explicitly call some proprietary initialisation and other stuff. Also currently there is no X driver for Pi and calls for getting display surface need to be changed to not use X and go straight to EGL. But I am far from being an expert in this area and I might be completely wrong here.

See code in this example, look for bcm_, vc_ and dispman_ prefixes. Those are proprietary to Broadcom.
jgroman
 
Posts: 12
Joined: Fri Nov 18, 2011 5:54 am

Re: Raspberry Pi?

Postby ibisum » Mon Jun 18, 2012 5:39 am

Thats an un-cool situation, indeed. I am spoiled by AngstromOS/PandoraOS: its a lot easier to use GLES1.1/2.0 in that environment. Oh well, hope it gets sorted out - and in the meantime I will look at building MOAI for Pandaboard ES (UbuntuOS) in the next week or so ..
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby ibisum » Wed Sep 19, 2012 8:19 am

Well .. I've got a Raspberry Pi, and am sitting here watching moai-dev (linux branch) compile .. I guess its going to take a few hours at this pace, but maybe it will produce a binary at the end of it, who knows .. ;)
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info
User avatar
ibisum
 
Posts: 1003
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Raspberry Pi?

Postby Ascorbius » Sat Mar 16, 2013 9:42 am

Any luck with this?

It'd be great if there was a binary for the host - compiled and working with the Raspberry Pi

I'd be very intersted to check the performance of my game wth it.

(posted from my raspberry Pi)
User avatar
Ascorbius
 
Posts: 14
Joined: Mon Feb 11, 2013 2:52 pm

Next

Return to New Users

Who is online

Users browsing this forum: No registered users and 0 guests

x