diff options
| author | Mikhail Petranov <ctz81979@pm.me> | 2021-11-24 10:43:12 +0000 |
|---|---|---|
| committer | Mikhail Petranov <ctz81979@pm.me> | 2021-11-24 10:43:12 +0000 |
| commit | 11dae594a3e1867ec48db05fdc3289a5aa645cad (patch) | |
| tree | fc768820cf6915ef5939bee45076dab8e53f35f7 | |
| parent | 5918fe4b5899c841cc171df8089b960f736d1308 (diff) | |
| download | box64-11dae594a3e1867ec48db05fdc3289a5aa645cad.tar.gz box64-11dae594a3e1867ec48db05fdc3289a5aa645cad.zip | |
Added support for LX2160A CPU
| -rwxr-xr-x | CMakeLists.txt | 7 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-lx2160a | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-lx2160a-DEBUG | 44 |
3 files changed, 94 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa3f146f..e2fff53e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ option(PHYTIUM "Set to ON if targeting an Phytium (D2000 or FT2000/4) based devi option(SD845 "Set to ON if targeting a Snapragon 845 based device" ${SD845}) option(LARCH64 "Set to ON if targeting an Loongarch64 based device" ${LARCH64}) option(PPC64LE "Set to ON if targeting an PowerPC 64 LE based device" ${PPC64LE}) +option(LX2160A "Set to ON if targeting an LX2160A based device" ${LX2160A}) 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(NOLOADADDR "Set to ON to avoid fixing the load address of Box64" OFF) @@ -27,7 +28,7 @@ if(PPC64LE) set(NOALIGN OFF CACHE BOOL "") set(ARM_DYNAREC OFF CACHE BOOL "") endif() -if(RK3399 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845) +if(RK3399 OR RPI4ARM64 OR RK3326 OR TEGRAX1 OR PHYTIUM OR SD845 OR LX2160A) set(LD80BITS OFF CACHE BOOL "") set(NOALIGN OFF CACHE BOOL "") set(ARM_DYNAREC ON CACHE BOOL "") @@ -94,6 +95,10 @@ elseif(LARCH64) set(CMAKE_ASM_FLAGS "-pipe -march=loongarch64") elseif(PPC64LE) add_definitions(-DPPC64LE) +elseif(LX2160A) + add_definitions(-DLX2160A) + add_definitions(-pipe -march=armv8-a+crypto+crc -mcpu=cortex-a72+crypto) + set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crypto+crc -mcpu=cortex-a72+crypto") elseif(ARM_DYNAREC) set(CMAKE_ASM_FLAGS "-pipe -march=armv8-a+crc+simd+crypto") endif() diff --git a/pkgbuilds/PKGBUILD-lx2160a b/pkgbuilds/PKGBUILD-lx2160a new file mode 100644 index 00000000..4172bdb0 --- /dev/null +++ b/pkgbuilds/PKGBUILD-lx2160a @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-lx2160a-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}") +conflicts=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-lx2160a-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-lx2160a-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DLX2160A=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-lx2160a-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-lx2160a-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} diff --git a/pkgbuilds/PKGBUILD-lx2160a-DEBUG b/pkgbuilds/PKGBUILD-lx2160a-DEBUG new file mode 100644 index 00000000..ecdc808d --- /dev/null +++ b/pkgbuilds/PKGBUILD-lx2160a-DEBUG @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP <parjailu@gmail.com> +# Author: Sebastien Chevalier <ptitseb@box86.org> +pkgname=box64-lx2160a-git +pkgver=1116.9243ea4 +pkgrel=1 +pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." +arch=('aarch64') +url="https://github.com/ptitSeb/box64" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}") +conflicts=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-lx2160a-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-lx2160a-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DLX2160A=1 -DCMAKE_BUILD_TYPE=Debug + fi +} + +build() { + cd "$srcdir/${pkgname%-lx2160a-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-lx2160a-git}/build" + make DESTDIR="${pkgdir}/" install + # /usr/local/bin isn't in PATH by the default, + # we should move it to /usr/bin + cd ${pkgdir} + mv usr/local/bin/ usr/bin/ + # cleanup when dir is empty + rmdir usr/local || exit 0 +} |