User Tools

Site Tools


proton:raspi_setup

This is an old revision of the document!


Experimental and for linux pros only

These steps are what I use to compile stuff by copying things from my Windows computer. A normal user would probably just grab the svn tree.

Step 1: Make OpenGL ES 1/2 work on the Raspberry Pi 2 or 3. Strangely, as of June 18th 2016 the versions you can get with apt-get are compiled with the wrong flags so it won't work with the hardware acceleration. Useless. So we will install our own SDL2.

I did this with the latest version of Raspbian (Jessie I think).

  • Give the video card more memory on the pi. Run raspi-config and give it 128 or 256 (good for the pi3)
  • Install cmake on the pi (sudo apt-get install cmake)
  • Do “sudo rpi-update” to make sure your firmware is updated
  • Do the following from a shell window to install SDL2 from source:
cd ~ 
sudo apt-get install libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile1-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake
wget https://www.libsdl.org/release/SDL2-2.0.4.tar.gz 
tar zxvf SDL2-2.0.4.tar.gz 
cd SDL2-2.0.4 && mkdir build && cd build 
../configure --host=armv7l-raspberry-linux-gnueabihf --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl 
make -j 4 
sudo make install 

To test your GL ES, do this with a local shell (not a remote shell window.. although maybe that works, dunno)

cd ~/SDL2-2.0.4/test
g++ -o testgles2  testgles2.c `sdl2-config --cflags --libs`
./testgles2

If stuff is setup right, you'll see some triangles or something rendering smoothly.

Step 2: Proton stuff

  • Install linux tools for Windows, rsync and ssh should work from the command line
  • Setup a ssh key pair so you don't have to type passwords
  • Edit SetupVars.bat and edit the IP to the pi
  • Run CopyStuffToPi.bat. There should now be a ~/proton tree on the pi
  • RTBareBones/CopyStuffToPiAndCompileLoop.bat and it should update that example and compile it in a loop

If you look at the RTBarebones/linux dir you'll see the CMakeLists.txt file autodetect the pi and sets up GLES 1.1 headers stuff for it.

proton/raspi_setup.1466241238.txt.gz · Last modified: 2016/06/18 09:13 by seth