diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-11-24 13:07:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-24 13:07:42 +0100 |
| commit | 40c58241eac0603b87847ec60ac1ea2870e101ac (patch) | |
| tree | 9b26001a46df6403f691d022e0d304963ceab30b | |
| parent | 5918fe4b5899c841cc171df8089b960f736d1308 (diff) | |
| parent | 194c346c18a11c754c788ec52c5fef388f163b9e (diff) | |
| download | box64-40c58241eac0603b87847ec60ac1ea2870e101ac.tar.gz box64-40c58241eac0603b87847ec60ac1ea2870e101ac.zip | |
Merge pull request #177 from mikptz/main
Add support for LX2160A based devices
| -rwxr-xr-x | CMakeLists.txt | 7 | ||||
| -rwxr-xr-x | docs/COMPILE.md | 16 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-lx2160a | 44 | ||||
| -rw-r--r-- | pkgbuilds/PKGBUILD-lx2160a-DEBUG | 44 |
4 files changed, 110 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/docs/COMPILE.md b/docs/COMPILE.md index 67ad8187..55379ccc 100755 --- a/docs/COMPILE.md +++ b/docs/COMPILE.md @@ -116,6 +116,22 @@ If it's the first install, you also need: sudo systemctl restart systemd-binfmt ``` +#### for LX2160A + +Using a 64bits OS: + +``` +git clone https://github.com/ptitSeb/box64 +cd box64 +mkdir build; cd build; cmake .. -DLX2160A=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo +make -j$(nproc) +sudo make install +``` +If it's the first install, you also need: +``` +sudo systemctl restart systemd-binfmt +``` + #### for x86_64 Linux `mkdir build; cd build; cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make -j$(nproc)` 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 +} |