Code Monkey home page Code Monkey logo

Comments (5)

ptitSeb avatar ptitSeb commented on September 27, 2024

I'm not sure I understand: if BOX64_VERSION is set to something not 0, the program passed to box64 should be launch without box64?
How is that supposed to work? If you launch a x86_64 program, binfmt will redirect to box64, that, if BOX64_VERSION is set will redirect to launch natively, wich, with binfmt, will redirect to box64 and will loop indefently? Or am I missing something?

from box64.

josch avatar josch commented on September 27, 2024

No, the program should not launch at all. That's what QEMU_VERSION does as well. If QEMU_VERSION is set in the environment, then the program will not launch and qemu itself will just print its version string and exit.

Here is what qemu does if QEMU_VERSION is set:

https://gitlab.com/qemu-project/qemu/-/blob/master/linux-user/main.c?ref_type=heads#L419

from box64.

ptitSeb avatar ptitSeb commented on September 27, 2024

I'm really confused on what use case this could serve.

The is BOX64_EXIT that just exit box64 that is define. It's only on rcfile for now but could be extended to command line too I guess

from box64.

josch avatar josch commented on September 27, 2024

Yes, if I could set BOX64_EXIT=1 as an environment variable, that would solve this issue as well.

I described the use-case in my initial message. Let me rephrase:

  1. I have a tool like arch-test which is supposed to tell me whether architecture X can be executed or not. The tool allows me to disable binfmt misc support in user-space for known emulators like qemu or wine using environment variables. It doesn't support box64 yet, because it does not yet have such an environment variable as qemu and wine have. If box64 would gain such an environment variable, then arch-test could gain support for box64 as well. Currently, when having box64 installed, the output of arch-test -n ${arch} is incorrect because arch-test cannot disable box64.
  2. I have a tool which knows that if box64 is the one doing the x86_64 emulation, it will break (for example because it runs the foreign architecture binaries inside a chroot where box64 is not available and box64 is not compiled statically). That tool would like to be able to give the user a descriptive error message about the fact that right now, x86_64 is emulated box64 and that cannot work. Currently, it cannot find out whether box64 is the binfmt_misc provider.

I can propose a pull request that implements BOX64_VERSION equivalent to what QEMU_VERSION does for qemu if you like.

from box64.

ptitSeb avatar ptitSeb commented on September 27, 2024

You can submit a PR yes.

from box64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.