From f76669b61c86d1ba38ac6c983d563d50ece28738 Mon Sep 17 00:00:00 2001 From: Franklin S Cooper Jr Date: Fri, 26 Sep 2014 18:59:24 -0500 Subject: [PATCH 1/3] CMakeLists.txt: Add ARM based Linux PLATFORM_ARCH * Don't assume all Linux systems are strictly x86. * Add values when Linux is used on an ARM device Signed-off-by: Franklin S Cooper Jr --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b0837097..ed51d9c384 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,7 +391,11 @@ if(USE_FFMPEG AND NOT DEFINED FFMPEG_BUILDDIR) elseif(MACOSX) set(PLATFORM_ARCH "macosx/x86_64") elseif(LINUX) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) + if(ARMV7) + set(PLATFORM_ARCH "linux/armv7") + elseif(ARM) + set(PLATFORM_ARCH "linux/arm") + elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(PLATFORM_ARCH "linux/x86_64") else() set(PLATFORM_ARCH "linux/x86") From 08303678a46986062287eba7db52710fc5415dee Mon Sep 17 00:00:00 2001 From: Franklin S Cooper Jr Date: Fri, 26 Sep 2014 19:02:32 -0500 Subject: [PATCH 2/3] CMakeLists.txt: Add BB as a supported board * Some of the configuration needs to be tweaked when building for a Beaglebone and Beaglebone Black. * Unlike the Raspberry PI there aren't any files to check against to determine at build time if this is being built for the Raspberry PI. Therefore, create a variable that the user has to pass in (-DBB:BOOL=ON) that will tell CMAKE to build PPSSPPSDL for the BB/BBB. * This will also make it alot easier for users to cross compile for this device Signed-off-by: Franklin S Cooper Jr --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed51d9c384..103d02fb96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,13 @@ if(RPI) set(MOBILE_DEVICE OFF) endif() +if(BB) + set(MOBILE_DEVICE OFF) + set(ARMV7 ON) + set(USING_FBDEV ON) +endif() + + if(USING_EGL) # Default to GLES2 but could be GL. set(USING_GLES2 ON) @@ -73,6 +80,7 @@ option(ANDROID "Set to ON if targeting an Android device" ${ANDROID}) option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY}) option(IOS "Set to ON if targeting an iOS device" ${IOS}) option(MAEMO "Set to ON if targeting a Maemo (N900) device" ${MAEMO}) +option(BB "Set to ON if targeting a Beaglebone/Beaglebone Black device" ${BB}) # :: Environments option(USING_EGL "Set to ON if target environment uses EGL" ${USING_EGL}) option(USING_FBDEV "Set to ON if target environment uses fbdev (eg. Pandora)" ${USING_FBDEV}) @@ -669,7 +677,11 @@ set(nativeExtra) set(nativeExtraLibs) if(ARMV7) - set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9") + if(BB) + set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a8") + else() + set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9") + endif() set(nativeExtra ${nativeExtra} native/math/fast/fast_matrix_neon.S) endif() From 50b8debead304385abb00a1500eee1e79a832a33 Mon Sep 17 00:00:00 2001 From: Franklin S Cooper Jr Date: Fri, 26 Sep 2014 19:07:34 -0500 Subject: [PATCH 3/3] MemArena.cpp: Fix Bus Error when running on Beaglebone/Beaglebone Black * Similar to commit 178891b57608a8df1541b3f7fc6ee83ad1b50989 when running the emulator a "Bus Error" would be given andn will cause a seg fault immediately. * When running on the BB change the path of the ram temp file to a valid location. Signed-off-by: Franklin S Cooper Jr --- Common/MemArena.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Common/MemArena.cpp b/Common/MemArena.cpp index 1414afe549..2dbf2a17dd 100644 --- a/Common/MemArena.cpp +++ b/Common/MemArena.cpp @@ -99,6 +99,8 @@ int ashmem_unpin_region(int fd, size_t offset, size_t len) // do not make this "static" #ifdef MAEMO std::string ram_temp_file = "/home/user/gc_mem.tmp"; +#elif defined(BB) +std::string ram_temp_file = "/home/root/gc_mem.tmp"; #else std::string ram_temp_file = "/tmp/gc_mem.tmp"; #endif