About Monkey 2 › Forums › Monkey 2 Projects › Raspberry Pi binaries
This topic contains 12 replies, has 6 voices, and was last updated by 
 Simon Armstrong 2 years, 8 months ago.
- 
		AuthorPosts
 - 
		
			
				
July 1, 2016 at 4:25 am #1486
After a bit of head scratching I have just finished building mx2cc for pi.
https://github.com/nitrologic/monkey2/blob/master/bin/mx2cc_pi
To build this binary I did a full build on linux desktop and used scp to copy the modified monkey2 folder to the pi.
I then added a cmake script and a script inside this folder:
~/monkey2/src/mx2cc/mx2cc.buildv1.0.0/build_cache/mx2cc.1.00
Extra bits are for unused native broadcom EGL device layer.
CMakeLists.txt
Shell12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061cmake_minimum_required(VERSION 2.8.9)project(monkey2)IF(PI)add_definitions( -D__PI__)SET(CMAKE_SYSTEM_NAME Linux)SET(CMAKE_SYSTEM_VERSION 1)SET(CMAKE_C_COMPILER gcc-4.9)SET(CMAKE_CXX_COMPILER g++-4.9)SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -std=c++11")ENDIF(PI)include_directories(/home/pi/monkey2/modules/monkey/native)file(GLOB mx2cc_src/home/pi/monkey2/modules/std/std.buildv1.0.0/build_cache/desktop_release_linux/*.cpp/home/pi/monkey2/modules/libc/libc.buildv1.0.0/build_cache/desktop_release_linux/*.cpp/home/pi/monkey2/modules/stb-image/stb-image.buildv1.0.0/build_cache/desktop_release_linux/*.cpp/home/pi/monkey2/modules/stb-image-write/stb-image-write.buildv1.0.0/build_cache/desktop_release_linux/*.cpp/home/pi/monkey2/modules/miniz/miniz.buildv1.0.0/build_cache/desktop_release_linux/*.cpp/home/pi/monkey2/modules/hoedown/hoedown.buildv1.0.0/build_cache/desktop_release_linux/*.cpp*.cpp/home/pi/monkey2/modules/monkey/native/*.cpp/home/pi/monkey2/modules/stb-image/native/*.c/home/pi/monkey2/modules/stb-image-write/native/*.c/home/pi/monkey2/modules/std/misc/native/*.cpp/home/pi/monkey2/modules/std/fiber/native/*.cpp/home/pi/monkey2/modules/std/libc/native/*.cpp/home/pi/monkey2/modules/miniz/native/*.c/home/pi/monkey2/modules/hoedown/hoedown/src/*.c)file(GLOB mx2cc_h*.h)IF(PI)include_directories(/opt/vc/include/opt/vc/include/interface/vmcs_host/linux/opt/vc/include/interface/vcos/pthreads)ADD_EXECUTABLE( mx2cc_pi${mx2cc_src}${mx2cc_h})target_link_libraries(mx2cc_pi rt pthread)# find_library(EGL_LIB EGL /opt/vc/lib)# find_library(GLES_LIB GLESv2 /opt/vc/lib)# find_library(BCM_LIB bcm_host /opt/vc/lib)# target_link_libraries(mx2cc_pi pthread asound ${EGL_LIB} ${GLES_LIB} ${BCM_LIB})ENDIF(PI)buildpi.sh
Shell12345678910111213141516171819#!/bin/bash# needs debian-jessie with libasound2-dev libudev-devstart=$SECONDSsrc=$(pwd)target=$src/binset -eif [ ! -d $target ]; thenmkdir $targetficd $targetcmake -D"CMAKE_BUILD_TYPE=Release" -D"PI=1" -G"Unix Makefiles" $srcmake -j 8#makels -l .elapsed=$(($SECONDS-$start))echo "Task Complete elapsed="$(($elapsed/60))":"$(($elapsed%60))July 1, 2016 at 4:49 am #1491Have now added changes to common.sh and building modules slowly….
As this is just a fork of the main repo to use monkey2 on pi do following from the pi home folder:
git clone https://github.com/nitrologic/monkey2
cd monkey2/scripts
./updatemods
etc.
July 1, 2016 at 5:03 am #1493Still going. No errors so far. This is worse than loading from cassette tape…
July 1, 2016 at 5:08 am #1494Haha! Needs the flashing loader! Miss lots of stuff from the good old days but not that one.
Is that a Pi 3 Simon?
July 1, 2016 at 5:16 am #1495A PI 2.
and still going…
I do like the way the green light blinks at me and I have 8×8 disco lights hat which will be going back on soon enough…
July 1, 2016 at 7:07 am #1507Thanks.
Nice!
July 1, 2016 at 7:51 pm #1575Any report on how well this worked?
Did everything build? Can simple projects be built? What about mojo projects?
July 3, 2016 at 2:01 am #1623Just committed working version.
Some issues still with input but SDL2 egl2 display is all go so mojo is a gogo!
July 3, 2016 at 1:43 pm #1637Woot! I sense a “Monkey Boy” rpi0 portable console project in the future…
July 19, 2016 at 10:06 am #2273Simon Thank you for this work, Monkey is so suited to this platform.
Just tried:
git clone https://github.com/nitrologic/monkey2
cd monkey2/scripts
./updatemods.sh
On a Raspberry Pi3, apart from a required “apt-get install libudev-dev” & “libsdl2-dev” everything built OK. Just need to work out what to do next
July 19, 2016 at 10:56 pm #2289I will be posting a version of ted that can run if located in /monkey2/bin folder.
Until then:
~/monkey2/bin/mx2cc_pi makeapp test.monkey2
should build and run an app from the terminal
July 20, 2016 at 6:00 pm #2304Very cool, this gives me an idea an Android target might be not-so-far-away.
July 25, 2016 at 12:11 am #2403More issues than expected to get this release done, fingers crossed
https://github.com/nitrologic/m2/blob/master/releases/README.md
:=
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.