Add box86 and box64 to our ARM devices.

This commit is contained in:
fewtarius 2023-03-03 12:12:24 -05:00
parent 5c4c045e92
commit d2893dc007
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
6 changed files with 81 additions and 11 deletions

View file

@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius
PKG_NAME="box64"
PKG_VERSION="cabcca2"
PKG_ARCH="aarch64"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/ptitSeb/box64"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain gl4es"
PKG_LONGDESC="Box64 lets you run x86_64 Linux programs (such as games) on non-x86_64 Linux systems, like ARM."
PKG_TOOLCHAIN="cmake"
PKG_CMAKE_OPTS_TARGET+=" -DCMAKE_BUILD_TYPE=Release"
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/box64 ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/etc/binfmt.d
ln -fs /storage/.config/box64.conf ${INSTALL}/etc/binfmt.d/box64.conf
mkdir ${INSTALL}/usr/config
touch ${INSTALL}/usr/config/box64.conf
}

View file

@ -0,0 +1,40 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius
PKG_NAME="box86"
PKG_VERSION="11535da"
PKG_ARCH="arm aarch64"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/ptitSeb/box86"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain gl4es"
PKG_LONGDESC="Box86 lets you run x86 Linux programs (such as games) on non-x86 Linux systems, like ARM."
PKG_TOOLCHAIN="cmake"
PKG_CMAKE_OPTS_TARGET+=" -DCMAKE_BUILD_TYPE=Release"
case ${TARGET_ARCH} in
aarch64)
make_target() {
true
}
;;
esac
makeinstall_target() {
case ${TARGET_ARCH} in
arm)
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_BUILD}/.${TARGET_NAME}/box86 ${INSTALL}/usr/bin
;;
aarch64)
mkdir -p ${INSTALL}/usr/bin
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/${PKG_NAME}-*/.install_pkg/usr/bin/* ${INSTALL}/usr/bin
;;
esac
mkdir -p ${INSTALL}/etc/binfmt.d
ln -fs /storage/.config/box86.conf ${INSTALL}/etc/binfmt.d/box86.conf
mkdir ${INSTALL}/usr/config
touch ${INSTALL}/usr/config/box86.conf
}

View file

@ -1,18 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
# Copyright (C) 2023-present Fewtarius
PKG_NAME="gl4es"
PKG_VERSION="83b074dcb0028e239da2ad9789db80cc1d5f2544"
PKG_SHA256="2031be77b49398cdf945c110e59530a48113c35fd69c0a7381be21fc9eaccc79"
PKG_GIT_CLONE_BRANCH="sk_hacks"
PKG_SITE="https://github.com/JohnnyonFlame/gl4es"
PKG_VERSION="c156cc6"
PKG_SITE="https://github.com/ptitSeb/gl4es"
PKG_LICENSE="GPL"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain ${OPENGLES}"
PKG_LONGDESC=" GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4. "
PKG_LONGDESC="OpenGL 2.x functionality for GLES2.0 accelerated Hardware"
PKG_TOOLCHAIN="cmake-make"
pre_configure_target() {
PKG_CMAKE_OPTS_TARGET=" -DNOX11=1 -DODROID=1 -DGBM=ON -DCMAKE_BUILD_TYPE=Release "
PKG_CMAKE_OPTS_TARGET=" -DGBM=ON -DCMAKE_BUILD_TYPE=Release "
if [ ! "${DISPLAYSERVER}" = "x11" ]
then
PKG_CMAKE_OPTS_TARGET+=" -DNOX11=1"
else
PKG_DEPENDS_TARGET+=" libX11"
fi
}

View file

@ -4,6 +4,6 @@
PKG_NAME="arm32"
PKG_LICENSE="Apache-2.0"
PKG_SITE="www.jelos.org"
PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware libusb unzip socat p7zip file ${OPENGLES} SDL2 SDL2_gfx SDL2_image SDL2_mixer SDL2_net SDL2_ttf retroarch pcsx_rearmed flycast"
PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware libusb unzip socat p7zip file ${OPENGLES} SDL2 SDL2_gfx SDL2_image SDL2_mixer SDL2_net SDL2_ttf retroarch pcsx_rearmed flycast box86"
PKG_SECTION="virtual"
PKG_LONGDESC="Root package used to build and create 32-bit userland"

View file

@ -34,12 +34,12 @@ case "${DEVICE}" in
LIBRETRO_CORES+=" bsnes-hd"
;;
RK3588)
PKG_DEPENDS_TARGET+=" dolphin dolphinsa aethersx2 mame pcsx_rearmed"
PKG_DEPENDS_TARGET+=" dolphin dolphinsa aethersx2 mame pcsx_rearmed box86 box64"
LIBRETRO_CORES+=" bsnes-hd"
PKG_EMUS+=" yabasanshiroSA"
;;
RK3566)
PKG_DEPENDS_TARGET+=" common-shaders glsl-shaders pcsx_rearmed"
PKG_DEPENDS_TARGET+=" common-shaders glsl-shaders pcsx_rearmed box86 box64"
PKG_EMUS="moonlight openbor pico-8 PPSSPPSDL vicesa dolphinsa yabasanshiroSA"
;;
esac

View file

@ -762,7 +762,7 @@ CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ELFCORE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
# CONFIG_BINFMT_MISC is not set
CONFIG_BINFMT_MISC=y
CONFIG_COREDUMP=y
#