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

cross-architecture #11

Open
kapilhp opened this issue Mar 19, 2021 · 8 comments
Open

cross-architecture #11

kapilhp opened this issue Mar 19, 2021 · 8 comments
Assignees

Comments

@kapilhp
Copy link

kapilhp commented Mar 19, 2021

It may be possible to run cross architecture binaries using qemu-user.

Even though this means emulation, it would be helpful since ARM machines are mostly slower currently than server-class x86 machines.

@m040601
Copy link

m040601 commented Mar 20, 2021

Another vote for this one.

Came here super excited with the prospect of using outrun between my tiny raspberry pi's and arm chromebooks (both arm 32 and arm 64) , and my beefy x64 systems. I' using Archlinux.

Then I bumped into the README:

Since the software to be executed is copied from your own machine to the remote machine, it must be binary compatible. It’s not possible to set up a session from an x86 machine to an ARM machine, for example.

Just like kapillhp, I also suspect this might be possible. But i need to study it further.

There are so many many tools and related concepts.
Qemu, binfmt, user static, emulation vs virtualization, distcc .... etc ...

Was wondering if Alexander Overvoorde could add a few extra words and thoughts about this. You already wrote a superb README, so maybe open up the wiki for extra documentation ?

@Overv
Copy link
Owner

Overv commented Mar 22, 2021

I haven't played with user emulation before but looking at documentation like this it seems feasible to integrate into outrun itself, assuming that the target system is already set up properly for it.

The use case you mention is quite compelling and I hadn't thought about it before. I have a Raspberry Pi myself so I will experiment with this and see what would be the easiest way to get this to run.

On the topic of the wiki, I think it'd be best to start building some knowledge through Q&A in the issues first, so that we can discover what would be the most interesting to document.

@Overv Overv self-assigned this Mar 22, 2021
@kapilhp
Copy link
Author

kapilhp commented Mar 23, 2021

Thanks for giving it a chance!

@Overv
Copy link
Owner

Overv commented Apr 2, 2021

I just did some experiments with running ARM executables on an x86_64 machine and vice versa (not with outrun, but just copying statically compiled ones) and I have a rough idea of how to implement this with outrun now. Assuming that you've installed a binary like qemu-arm-static on the remote system when connecting from ARM to x86_64, for example, it should be reasonably straightforward to support this functionality.

I just need to set up a fresh Raspberry Pi to properly prototype this since the one I have right now is far too slow to provide a pleasant development experience.

Update: I was able to get this working from a Pi Zero to my Arch desktop with a more than 30x speed up in FFMPEG! The only thing I had to do was disable these 3 lines and install the QEMU static binaries on the Raspberry Pi.

@m040601
Copy link

m040601 commented May 6, 2021

I was able to get this working from a Pi Zero to my Arch desktop with a more than 30x speed up in FFMPEG!

This is great ! Exactly what I was suspecting.

Any more recent experiments you might have been doing lately ?

Any chance of adding these tips, hints and the necessary pre requisites step by step to the README ?

@ValTM
Copy link

ValTM commented Jul 21, 2021

Hey, @Overv , any update on how to run multiarch? I really want to stop troubling my raspberry pi for certain workloads when I got a 5900X.

@Overv
Copy link
Owner

Overv commented Jul 24, 2021

See my instructions at the end of my last comment. You can edit the __main__.py file where outrun is installed on the desktop to patch out the architecture check by deleting those lines.

If you can't find that file then you can figure out where it's installed this way:

$ python
Python 3.9.6 (default, Jun 30 2021, 10:22:16) 
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import outrun
>>> outrun
<module 'outrun' from '/home/overv/projects/outrun/outrun/__init__.py'>

Other than that you need to install the QEMU binaries on the raspberry pi. Install the three packages listed here:

$ apt-get install -y qemu qemu-user-static binfmt-support

I'll add official support/instructions sometime soon.

@drcursor
Copy link

Any plan to officially support this ? I would love to use this as a way to offload x64 workloads from a Linux VM under M1.

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

No branches or pull requests

5 participants