diff options
| author | krishenriksen <github@krishenriksen.dk> | 2021-04-07 17:39:23 +0700 |
|---|---|---|
| committer | krishenriksen <github@krishenriksen.dk> | 2021-04-07 17:39:23 +0700 |
| commit | b1e6fa4f2be2567d496884f4bf786991e66bb921 (patch) | |
| tree | b7c1763d680db685e2e8d3090c4cc3cdb0a92a10 | |
| parent | e672641878698a2da9c8b874457da8f8c7dedd74 (diff) | |
| download | box64-b1e6fa4f2be2567d496884f4bf786991e66bb921.tar.gz box64-b1e6fa4f2be2567d496884f4bf786991e66bb921.zip | |
Added RK3326 definitions.
| -rwxr-xr-x | CMakeLists.txt | 10 | ||||
| -rwxr-xr-x | src/include/fileutils.h | 2 | ||||
| -rwxr-xr-x | src/main.c | 2 | ||||
| -rwxr-xr-x | src/tools/fileutils.c | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ac588ce2..9aa0cc3c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,12 @@ cmake_minimum_required(VERSION 3.0) option(RPI4ARM64 "Set to ON if targeting an RaspberryPI4 device with multiarch arm64 and armhf" ${RPI4ARM64}) +option(RK3326 "Set to ON if targeting an Rockchip RK3326 based device" ${RK3326}) option(RK3399 "Set to ON if targeting an Rockchip RK3399 based device" ${RK3399}) option(USE_CCACHE "Set to ON to use ccache if present in the system" ${USE_CCACHE}) option(HAVE_TRACE "Set to ON to have Trace ability (needs ZydisInfo library)" ${HAVE_TRACE}) option(NOGIT "Set to ON if not building from a git clone repo (like when building from a zip download from github)" ${NOGIT}) -if(RK3399 OR RPI4ARM64) +if(RK3399 OR RPI4ARM64 OR RK3326) set(LD80BITS OFF CACHE BOOL "") set(NOALIGN OFF CACHE BOOL "") set(ARM_DYNAREC ON CACHE BOOL "") @@ -47,6 +48,13 @@ if(RPI4ARM64) add_definitions(-pipe -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8) set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8") endif() + +if(RK3326) + add_definitions(-DRK3326) + add_definitions(-marm -mcpu=cortex-a35 -mfpu=neon-vfpv3 -march=armv8-a+crc+simd+crypto -mfloat-abi=hard) + set(CMAKE_ASM_FLAGS "-marm -mcpu=cortex-a35 -mfpu=neon-vfpv3 -march=armv8-a+crc+simd+crypto -mfloat-abi=hard") +endif() + if(RK3399) add_definitions(-DRK3399) add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto) diff --git a/src/include/fileutils.h b/src/include/fileutils.h index 27256909..546ec9d9 100755 --- a/src/include/fileutils.h +++ b/src/include/fileutils.h @@ -16,7 +16,7 @@ char* ResolveFile(const char* filename, path_collection_t* paths); // 1: if file is an x86 elf, 0: if not (or not found) int FileIsX64ELF(const char* filename); -#if defined(RPI) || defined(RK3399) +#if defined(RPI) || defined(RK3399) || defined(RK3326) void sanitize_mojosetup_gtk_background(); #endif diff --git a/src/main.c b/src/main.c index 04e8971b..60961327 100755 --- a/src/main.c +++ b/src/main.c @@ -1013,7 +1013,7 @@ int main(int argc, const char **argv, const char **env) { setupTrace(my_context); // get entrypoint my_context->ep = GetEntryPoint(my_context->maplib, elf_header); -#if defined(RPI) || defined(RK3399) +#if defined(RPI) || defined(RK3399) || defined(RK3326) // before launching emulation, let's check if this is a mojosetup from GOG if (((strstr(prog, "bin/linux/x86/mojosetup") && getenv("MOJOSETUP_BASE")) || strstr(prog, ".mojosetup/mojosetup")) && getenv("GTK2_RC_FILES")) { diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c index 6a964553..870bbd1b 100755 --- a/src/tools/fileutils.c +++ b/src/tools/fileutils.c @@ -77,7 +77,7 @@ int FileIsX64ELF(const char* filename) return 0; } -#if defined(RPI) || defined(RK3399) +#if defined(RPI) || defined(RK3399) || defined(RK3326) void sanitize_mojosetup_gtk_background() { // get GTK2_RC_FILES folder |