Closed ikcikoR closed 2 months ago
This isn't really a problem for proot-distro to solve. Either:
You can install Box64/Box86 inside whatever distribution you are using via proot-distro
I did that in the past, but then running anything more than a single binary with it is an absolute pain in the arse.
On top of that: By default if a binary starts another binary, you can't wrap that with a script since it happens using system calls. From my research, redirecting that to an emulator binary normally requires binfmt_misc kernel feature, which is either disabled or inaccessible to users on Android devices from what I'm aware, and Proot is designed specifically to provide that feature.
Or we package them on Termux in which case that still wouldn't allow you to just take an arbitrary rootfs and run it on proot-distro through Box64.
So about that, I guess my main question (as somebody not advanced enough to fully understand Proot's code) is:
Box64/86 packaging aside, is Proot support limited to only qemu and blink, or does it implementing binfmt_misc mean that any emulator binary can be passed to Proot using a launch argument (or a script, such as this very repo) after all?
I'm saying packaging aside, because as you've mentioned Termux build target is indeed already in the upstream CMake file of Box64, and I have already succesfully complied and installed it in Termux on my phone, and packaging it should be quite simple indeed and might most likely be done in future.
As I said, I'm not advanced/experienced enough with this and proot's repo, but if my question above is correct, wouldn't adding Box64 support be theoretically as simple as just copying the functionality of PROOT_DISTRO_X64_EMULATOR=BLINK
feature in proot-distro and then adjusting it slightly, providing us with something like PROOT_DISTRO_X64_EMULATOR=BOX
that acts as a wrapper for a simple proot + box64 setup for running those arbitrary rootfs-es?
does it implementing binfmt_misc mean that any emulator binary can be passed to Proot using a launch argument
Proot itself supports only QEMU. blink
was modified in order to be compatible with it.
Feature description
Box64 allows running x86_64 binaries on aarch64 systems and it's way faster than qemu. I'm not sure how difficult it would be to add support for it into proot-distro nor if it can be done on proot-distro level at all to be honest, but it'd be a great feature if it worked out. With the little knowledge I have, seeing that you can already choose between blink and qemu gives me a bit of hope that this is relatively doable? box86 also exists and could potentially be handy, but x86_64 is the biggest deal for obvious reasons.