about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-18 09:09:40 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-18 09:09:40 +0100
commit65992746d32fcaafe4e1b104b75cb2d4fc0dbcab (patch)
tree448c1067a1415491bcd16b5ffb7224b868458752
parentcbd4c6408492e0d85317c94bd1d28252c014e46c (diff)
downloadbox64-65992746d32fcaafe4e1b104b75cb2d4fc0dbcab.tar.gz
box64-65992746d32fcaafe4e1b104b75cb2d4fc0dbcab.zip
Added RK3588 profile
-rwxr-xr-xCMakeLists.txt13
-rwxr-xr-xdocs/COMPILE.md15
2 files changed, 24 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e35de1ec..16f9e1a2 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ option(RPI3ARM64 "Set to ON if targeting an RaspberryPI3 device with multiarch a
 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(RK3588 "Set to ON if targeting an Rockchip RK3588(S) based device" ${RK3588})
 option(ODROIDN2 "Set to ON if targeting an Odroid-N2 device" ${ODROIDN2})
 option(TEGRAX1 "Set to ON if targeting an Tegra X1 based device" ${TEGRAX1})
 option(PHYTIUM "Set to ON if targeting an Phytium (D2000 or FT2000/4) based device" ${PHYTIUM})
@@ -41,12 +42,12 @@ if(PPC64LE)
     set(ARM_DYNAREC OFF CACHE BOOL "")
     set(PAGE16K OFF CACHE BOOL "")
 endif()
-if(RK3399 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR LX2160A OR M1)
+if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR LX2160A OR M1)
     set(LD80BITS OFF CACHE BOOL "")
     set(NOALIGN OFF CACHE BOOL "")
     set(ARM_DYNAREC ON CACHE BOOL "")
 endif()
-if(RK3399 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR LX2160A)
+if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR LX2160A)
     set(PAGE16K OFF CACHE BOOL "")
 endif()
 if(M1 OR LARCH64)
@@ -109,8 +110,12 @@ elseif(RK3326)
     set(CMAKE_ASM_FLAGS  "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a35+crypto")
 elseif(RK3399)
     add_definitions(-DRK3399)
-    add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto)
-    set(CMAKE_ASM_FLAGS  "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crypto")
+    add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72.cortex-a53+crypto)
+    set(CMAKE_ASM_FLAGS  "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72.cortex-a53+crypto")
+elseif(RK3588)
+    add_definitions(-DRK3588)
+    add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a76.cortex-a55+crypto)
+    set(CMAKE_ASM_FLAGS  "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a76.cortex-a55+crypto")
 elseif(ODROIDN2)
     add_definitions(-DODROIDN2)
     add_definitions(-march=armv8-a+crc+simd+crypto -mcpu=cortex-a73.cortex-a53+crypto)
diff --git a/docs/COMPILE.md b/docs/COMPILE.md
index c6da6b9c..377a465f 100755
--- a/docs/COMPILE.md
+++ b/docs/COMPILE.md
@@ -27,6 +27,21 @@ If it's the first install, you also need:
 sudo systemctl restart systemd-binfmt

 ```

 

+#### for RK3588 / RK3588S

+

+Using a 64bit OS:

+```

+git clone https://github.com/ptitSeb/box64

+cd box64

+mkdir build; cd build; cmake .. -DRK3588=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+make -j4

+sudo make install

+```

+If it's the first install, you also need:

+```

+sudo systemctl restart systemd-binfmt

+```

+

 #### for Raspberry Pi 3

 

 Warning, you need a 64bit OS: