Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binfmt configuration not registered on Debian (sid) #419

Open
CalcProgrammer1 opened this issue Jul 20, 2021 · 3 comments
Open

binfmt configuration not registered on Debian (sid) #419

CalcProgrammer1 opened this issue Jul 20, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@CalcProgrammer1
Copy link
Sponsor

CalcProgrammer1 commented Jul 20, 2021

I have installed both Box86 and Box64 on my Rock Pi 4B (Armbian Sid) and then used multiarch support to install i386 mesa-utils. The expectation is that glxgears would run without calling 'box86 glxgears'. Instead, I get exec format error.

I fixed it by making the following files:

/usr/share/binfmts/box86.conf:

package box86
interpreter /usr/local/bin/box86
magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff

/usr/share/binfmts/box64.conf:

package box64
interpreter /usr/local/bin/box64
magic \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff

Seems Debian uses a different format than what box86/64's installer puts in /etc/binfmts.d.

After rebooting, I can open i386 applications without manually invoking box86.

@ptitSeb
Copy link
Owner

ptitSeb commented Jul 20, 2021

I use the format that seemed official: https://man7.org/linux/man-pages/man5/binfmt.d.5.html

My lsb_release -a gives me "Ubuntu 20.04 focal"
That's strange the format just evolved and is not compatible? How should I do to support both?

EDIT
This seems to be the update-binfmts format : https://manpages.debian.org/testing/binfmt-support/update-binfmts.8.en.html

Still unsure how to handle both formats.

@CalcProgrammer1
Copy link
Sponsor Author

Looks like it might be two different systems then, systemd's binfmt capability and binfmt-support. They appear to have different formats. Perhaps just install both, or maybe test to see which directory exists (/etc/binfmt.d or /usr/share/binfmts).

@ptitSeb ptitSeb added the enhancement New feature or request label Oct 11, 2022
@DarkevilPT
Copy link

@CalcProgrammer1 where did that came from? and where/how can we keep that "hack" updated? that helps also to get steam running on arm64 versions of chromiumos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants