From 6a4169d7471432d9b9c852ea9a7f1350df6fb58c Mon Sep 17 00:00:00 2001 From: fewtarius Date: Sun, 5 Mar 2023 12:09:43 -0500 Subject: [PATCH] Work on box86/64 continues. --- packages/compat/box64/package.mk | 7 ++++++- packages/compat/box64/profile.d/98-box64 | 7 +++++++ packages/compat/box86/config/box86.box86rc | 5 ----- packages/compat/box86/package.mk | 7 ++++++- packages/compat/box86/profile.d/98-box86 | 8 ++++++++ packages/jelos/sources/post-update | 9 +++++++++ 6 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 packages/compat/box64/profile.d/98-box64 create mode 100644 packages/compat/box86/profile.d/98-box86 diff --git a/packages/compat/box64/package.mk b/packages/compat/box64/package.mk index 948a2a1af..7533e52ca 100644 --- a/packages/compat/box64/package.mk +++ b/packages/compat/box64/package.mk @@ -21,7 +21,12 @@ makeinstall_target() { cp ${PKG_BUILD}/.${TARGET_NAME}/box64 ${INSTALL}/usr/bin cp ${PKG_BUILD}/tests/bash ${INSTALL}/usr/bin/bash-x64 + mkdir -p ${INSTALL}/usr/config + cp ${PKG_DIR}/config/box64.box64rc ${INSTALL}/usr/config/box64.box64rc + + mkdir -p ${INSTALL}/etc + ln -sf /storage/.config/box64.box64rc ${INSTALL}/etc/box64.box64rc + mkdir -p ${INSTALL}/etc/binfmt.d cp -f ${PKG_DIR}/config/box64.conf ${INSTALL}/etc/binfmt.d/box64.conf - cp -f ${PKG_DIR}/config/box64.box64rc ${INSTALL}/etc/box64.box64rc } diff --git a/packages/compat/box64/profile.d/98-box64 b/packages/compat/box64/profile.d/98-box64 new file mode 100644 index 000000000..3ae06fd66 --- /dev/null +++ b/packages/compat/box64/profile.d/98-box64 @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2020-present Fewtarius + +export BOX64_PREFER_EMULATED=1 +export BOX64_LD_LIBRARY_PATH="/usr/share/box64/lib" +export BOX64_BASH="/usr/bin/bash-x64" +export BOX64_LOG=0 diff --git a/packages/compat/box86/config/box86.box86rc b/packages/compat/box86/config/box86.box86rc index a17051e30..1d5e76870 100644 --- a/packages/compat/box86/config/box86.box86rc +++ b/packages/compat/box86/config/box86.box86rc @@ -6,11 +6,6 @@ # Linux process # - -BOX86_LD_LIBRARY_PATH="/usr/share/box86/lib" -BOX86_BASH="/usr/bin/bash-x86" -BOX86_LOG=0 - [7z] # Those are safe to use on 7z and give a bit of a boost BOX86_DYNAREC_SAFEFLAGS=0 diff --git a/packages/compat/box86/package.mk b/packages/compat/box86/package.mk index 3067beac8..a0ac10379 100644 --- a/packages/compat/box86/package.mk +++ b/packages/compat/box86/package.mk @@ -42,7 +42,12 @@ makeinstall_target() { ;; esac + mkdir -p ${INSTALL}/usr/config + cp ${PKG_DIR}/config/box86.box86rc ${INSTALL}/usr/config/box86.box86rc + + mkdir -p ${INSTALL}/etc + ln -sf /storage/.config/box86.box86rc ${INSTALL}/etc/box86.box86rc + mkdir -p ${INSTALL}/etc/binfmt.d cp -f ${PKG_DIR}/config/box86.conf ${INSTALL}/etc/binfmt.d/box86.conf - cp ${PKG_DIR}/config/box86.box86rc ${INSTALL}/etc/box86.box86rc } diff --git a/packages/compat/box86/profile.d/98-box86 b/packages/compat/box86/profile.d/98-box86 new file mode 100644 index 000000000..a03217044 --- /dev/null +++ b/packages/compat/box86/profile.d/98-box86 @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (C) 2020-present Fewtarius + +export BOX86_PREFER_EMULATED=1 +export BOX86_LD_LIBRARY_PATH="/usr/share/box86/lib" +export BOX86_BASH="/usr/bin/bash-x86" +export BOX86_LOG=0 +alias box86='LD_LIBRARY_PATH=/usr/lib32:/usr/lib32/gles /usr/bin/box86' diff --git a/packages/jelos/sources/post-update b/packages/jelos/sources/post-update index a4d986c0a..568838375 100644 --- a/packages/jelos/sources/post-update +++ b/packages/jelos/sources/post-update @@ -180,3 +180,12 @@ fi ### Force everyone to the stable repo set_setting updates.branch stable + +### Configure box86/64 defaulta +for BOX in box86 box64 +do + if [ ! -e "/storage/.config/${BOX}.${BOX}rc" ] + then + cp -f /usr/config/${BOX}.${BOX}rc /storage/.config/ + fi +done