diff options
| author | leonpano2006 <leonpano20060507@gmail.com> | 2024-01-25 23:04:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-25 23:04:20 +0100 |
| commit | 0ee5174e18631815137e59c0a8f7fd6a38f484d3 (patch) | |
| tree | b5de6ea30d3c0a4f76e2bd2f1ca26f836eb63ea2 | |
| parent | 0004f193251f9e2a3eec9866a1caaaca58fe0141 (diff) | |
| download | box64-0ee5174e18631815137e59c0a8f7fd6a38f484d3.tar.gz box64-0ee5174e18631815137e59c0a8f7fd6a38f484d3.zip | |
add optimize build flag for Jetson orin and xavier (#1219)
* add optmized options for Jetson xavier and orin * Update CMakeLists.txt * Update COMPILE.md add info for build on jetson orin and xavier
| -rw-r--r-- | CMakeLists.txt | 14 | ||||
| -rw-r--r-- | docs/COMPILE.md | 16 |
2 files changed, 28 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1acfd053..3c044efd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,8 @@ 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(TEGRA_T194 "Set to ON if targeting an Tegra Xavier based device" ${TEGRA_T194}) +option(TEGRA_T234 "Set to ON if targeting an Tegra Orin based device" ${TEGRA_T234}) option(PHYTIUM "Set to ON if targeting an Phytium (D2000 or FT2000/4) based device" ${PHYTIUM}) option(SD845 "Set to ON if targeting a Snapragon 845 based device" ${SD845}) option(SD888 "Set to ON if targeting a Snapragon 888 based device" ${SD888}) @@ -64,13 +66,13 @@ endif() if(RPI5ARM64PS16K) set(RPI5ARM64 ON CACHE BOOL "") endif() -if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RPI5ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR SD888 OR SD8G2 OR LX2160A OR M1 OR ARM64 OR ADLINK) +if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RPI5ARM64 OR RK3326 OR TEGRAX1 OR TEGRA_T194 OR TEGRA_T234 OR PHYTIUM OR SD845 OR SD888 OR SD8G2 OR LX2160A OR M1 OR ARM64 OR ADLINK) set(LD80BITS OFF CACHE BOOL "") set(NOALIGN OFF CACHE BOOL "") set(ARM_DYNAREC ON CACHE BOOL "") set(RV64_DYNAREC OFF CACHE BOOL "") endif() -if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR SD888 OR SD8G2 OR LX2160A OR ADLINK) +if(RK3399 OR RK3588 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR TEGRA_T194 OR TEGRA_T234 OR PHYTIUM OR SD845 OR SD888 OR SD8G2 OR LX2160A OR ADLINK) set(PAGE16K OFF CACHE BOOL "") endif() if(RK3399 OR ODROIDN2 OR RPI3ARM64 OR RPI4ARM64 OR RPI5ARM64) @@ -166,6 +168,14 @@ elseif(TEGRAX1) add_definitions(-DTEGRAX1) add_definitions(-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a57+crypto) set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a57+crypto") +elseif(TEGRA_T194) + add_definitions(-DTEGRA_T194) + add_definitions(-pipe -march=armv8.2-a+fp16+simd+crypto+predres -mcpu=cortex-a76+crypto -mtune=cortex-a76) + set(CMAKE_ASM_FLAGS "-pipe -march=armv8.2-a+fp16+simd+crypto+predres -mcpu=cortex-a76+crypto -mtune=cortex-a76") +elseif(TEGRA_T234) + add_definitions(-DTEGRA_T234) + add_definitions(-pipe -march=armv8.2-a+fp16+simd+crypto+predres -mcpu=cortex-a78ae+crypto -mtune=cortex-a78ae) + set(CMAKE_ASM_FLAGS "-pipe -march=armv8.2-a+fp16+simd+crypto+predres -mcpu=cortex-a78ae+crypto -mtune=cortex-a78ae") elseif(PHYTIUM) add_definitions(-DPHYTIUM) add_definitions(-pipe -march=armv8.1-a+crc+simd+crypto) diff --git a/docs/COMPILE.md b/docs/COMPILE.md index dbba30f3..1fa65614 100644 --- a/docs/COMPILE.md +++ b/docs/COMPILE.md @@ -93,6 +93,22 @@ Using a 64bit OS: -D TEGRAX1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo ``` +#### for Jetson Xavier/T194 + +Using a 64bit OS: + +``` +-D TEGRA_T194=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo +``` + +#### for Jetson Orin/T234 + +Using a 64bit OS: + +Caution: please use gcc-11 or higher, older gcc dosen't know cortex-a78ae +``` +-D TEGRA_T234=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo +``` #### for ODROID N2/N2+ |