openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

Added linuxarmv6 Makefile and platform variant for cross-compiling for t... #150

Closed leonrd closed 10 years ago

leonrd commented 11 years ago

...he raspberry pi using arm-unknown-linux-gnueabi and arm-linux-gnueabihf.

Tested using a raspbian rootfs on:

  1. VirtualBox image using Ubuntu Server 12.04 32bit with the official toolchain from https://github.com/raspberrypi/tools
  2. Mac OSX 10.7.5 using a toolchain built with the following script: https://github.com/ptoinson/crosstool-arm-osx

Note: the rootfs should have openframeworks codecs and dependecies installed, as well as libc6-dev

Usage:

  1. Edit libs/openFrameworksCompiled/project/Makefile following the instructions in it => make -j4
  2. Edit apps/devApps/raspberrypi_hello_world_gles2/Makefile following the instructions in it => make -j4
  3. Upload raspberrypi_hello_world_gles2/bin/ to the rpi
  4. Run!
bakercp commented 11 years ago

Btw, it should pick up the custom CC / CXX automatically -- i'll check it out.

leonrd commented 11 years ago

Just patched this last night, and I wasn't able to walk through all the makefiles. It's a proof of concept. I would love it if you guys would take it as an example and make a proper Makefile.

bakercp commented 11 years ago

Well, you've done it exactly how I imagined it would/should be done. There are a few little things to sort out, but this looks great and will be a nice alternative to distcc.

leonrd commented 11 years ago

Glad to hear.

I'll provide, in the following week, an OSX sparseimage and an Ubuntu VirtualBox VM with the required tools. The VM seems like a better option right now, though, since you can use qemu-arm-static and chroot into the rootfs to install the dependecies. If anyone can help me out to do the same thing on OSX, it would be great.

danzeeeman commented 11 years ago

OMG you are a god!!!

danzeeeman commented 11 years ago

Once I have some free time I'll look into this...unless someone beats me to it (which I highly suggest!)

leonrd commented 11 years ago

Ok, so I figured out why I had to target the ABIs : there are "recursive" calls to make in compile.core.mk and others. Added the overrides in the main Makefile, you just have to uncomment and edit the paths. After that, running a simple "make" should suffice in building both libopenFrameworks.a and libopenFrameworksDebug.a.

Linking the examples still doesn't work (with neither toolchains). But I'm working on it.

leonrd commented 11 years ago

raspberrypi_hello_world_gles2 example built on either OSX or Ubuntu, runs like butter ... on pi.

leonrd commented 11 years ago

Don't know if it's the right place to post this, but as promised, here's an early version of helper images: Edit: it seems I cannot seed torrent files. See below for the alternative.

Both contain toolchains and the rootfs with the necessary adjustments (installed dependencies, some soft links for a couple of files, etc.). A minimal readme is provided. Hopefully it's just as easy as downloading and running. So do take them for a spin.

danzeeeman commented 11 years ago

torrents were deleted? :(

On Sun, Apr 7, 2013 at 11:49 AM, Leonard Chioveanu <notifications@github.com

wrote:

Don't know if it's the right place to post this, but as promised, here's an early version of helper images:

Both contain toolchains and the rootfs with the necessary adjustments (installed dependencies, some soft links for a couple of files, etc.). A minimal readme is provided. Hopefully it's just as easy as downloading and running. So do take them for a spin.

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/150#issuecomment-16017355 .

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

leonrd commented 11 years ago

Yeah, sorry, they were useless since I'm blocked by my ISP. Uploading to Mega right now, and hopefully that'll work ok.

But it will take a about an hour.

leonrd commented 11 years ago

Unless someone has a better alternative?

jvcleave commented 11 years ago

I have an "unlimited" account on dreamhost I don't mind using

leonrd commented 11 years ago

That sounds great. Just uploaded to Mega, tested, and the download speed seems ok. But it allows only 6 simultaneous downloads

Here are the links:

danzeeeman commented 11 years ago

I'm going to toss them on my storage server and link them to makeitdoathing.com

On Sun, Apr 7, 2013 at 1:14 PM, Leonard Chioveanu notifications@github.comwrote:

That sounds great. Just uploaded to Mega, tested, and the download speed seems ok. But it allows only 6 simultaneous downloads

Here are the links:

— Reply to this email directly or view it on GitHubhttps://github.com/openFrameworks-RaspberryPi/openFrameworks/pull/150#issuecomment-16018996 .

"I believe in science. Unlike mathematical theorems, scientific results can't be proved. They can only be tested again and again, until only a fool would not believe them.

I cannot prove that electrons exist, but I believe fervently in their existence. And if you don't believe in them, I have a high voltage cattle prod I'm willing to apply as an argument on their behalf. Electrons speak for themselves."

-- Seth Lloyd: Quantum Mechanical Engineer, MIT

/.

arturoc commented 10 years ago

i've added something similar to this in develop, i'm closing the issue will post instructions in the site