Skip to content

box64: add package#15494

Open
agorgl wants to merge 1 commit intobatocera-linux:masterfrom
agorgl:box64
Open

box64: add package#15494
agorgl wants to merge 1 commit intobatocera-linux:masterfrom
agorgl:box64

Conversation

@agorgl
Copy link
Copy Markdown
Contributor

@agorgl agorgl commented Feb 27, 2026

Adds box64 util package for aarch64 targets.
This will allow running x86_64 windows games through wine in the future.

Tested by writing and compiling this sample program in my x86_64 machine:

> cat main.c
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("hello there, I'm a x86_64 program\n");
    return 0;
}
> gcc -o sample main.c
> ./sample
hello there, I'm a x86_64 program

then copying it over to my raspberry pi 4b running batocera that includes the box64 package and running:

# box64 sample
[BOX64] Box64 arm64 v0.4.0 nogit with Dynarec built on Feb 27 2026 07:37:30
[BOX64] Dynarec for ARM64, with extension: ASIMD CRC32
[BOX64] Running on Cortex-A72 with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 54.0 MHz emulating 3.4 GHz
[BOX64] Didn't detect 48bits of address space, considering it's 39bits
[BOX64] Counted 23 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/bin/:/sbin/:/usr/bin/:/usr/sbin/
[BOX64] Looking for sample
[BOX64] Dynarec for ARM64, with extension: ASIMD CRC32
[BOX64] Running on Cortex-A72 with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 54.0 MHz emulating 3.4 GHz
[BOX64] Rename process to "sample"
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) libresolv.so.2
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
hello there, I'm a x86_64 program

# lsmod | grep -i bin
# mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
# lsmod | grep -i bin
binfmt_misc            16384  1
# while IFS= read -r line; do echo $line > /proc/sys/fs/binfmt_misc/register; done <<<"$(grep -v '^#' /etc/binfmt.d/box64.conf)"

# ./sample
[BOX64] Box64 arm64 v0.4.0 nogit with Dynarec built on Feb 27 2026 07:37:30
[BOX64] Dynarec for ARM64, with extension: ASIMD CRC32
[BOX64] Running on Cortex-A72 with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 54.0 MHz emulating 3.4 GHz
[BOX64] Didn't detect 48bits of address space, considering it's 39bits
[BOX64] Counted 23 Env var
[BOX64] Library search path:
[BOX64] Binary search path: ./:bin/:/bin/:/sbin/:/usr/bin/:/usr/sbin/
[BOX64] Looking for ./sample
[BOX64] Dynarec for ARM64, with extension: ASIMD CRC32
[BOX64] Running on Cortex-A72 with 4 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 54.0 MHz emulating 3.4 GHz
[BOX64] Rename process to "sample"
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) libresolv.so.2
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
hello there, I'm a x86_64 program

@agorgl
Copy link
Copy Markdown
Contributor Author

agorgl commented Feb 27, 2026

I have also tested running the windows x86_64 game teeworlds through x86_64 wine (wine-tkg-staging build), that is wrapped by box64 binfmt, and it seems to work fine on my raspberry pi 4b!

@lbrpdx lbrpdx added the 44 label Feb 27, 2026
Adds box64 util package for aarch64 targets.
This will allow running x86_64 windows games through wine in the future.

Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
@agorgl
Copy link
Copy Markdown
Contributor Author

agorgl commented Feb 28, 2026

Added configuration flags for the rest of the supported targets and included the package to the system utilities group for the non x86_any targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants