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

Not really an issue - Rather HOW TO use binfmt_misc to allow execution of Amiga binaries using Vamos from AmiTools on Linux :D #209

Open
aiobofh opened this issue Jul 16, 2024 · 0 comments

Comments

@aiobofh
Copy link

aiobofh commented Jul 16, 2024

So... I just wanted to give you guys a small tip on how to make it super simple and convenient to run Amiga executables on any Linux-machine with binfmt_misc capabilities. Just like any Amiga executable was a native ELF or script with a shebang. Super ergonimic.

This will allow probably allow you to add a Workbench-installation C-folder to your path and do Amiga-scripting (to some degree) at your normal shell terminal in your Linux machine :D basically :D.

Prerequisit: You will need a ~/.vamosrc correctly configured for an AmigaDOS/Workbench installation somewhere on your file system. You can also have a .vamosrc in your "current dir" if you're cross-compiling, or e.g. using SAS/C or DevPac to build Amiga executables using Vamos as well... then you just start your program like so: ./my_program like it was any other ELF executable.

One-shot (lost at reboot)

The following will register a binfmt_misc executable type for Amiga binaries, that will start using Vamos.

echo ":Amiga:M::\x00\x00\x03\xf3::$(which vamos):" | sudo tee /proc/sys/fs/binfmt_misc/register

To unregister it again just do the following:

echo -1 | sudo tee /proc/sys/fs/binfmt_misc/Amiga

Permanent configuration

First figure out where your system finds vamoses absolute path using which vamos

For example this could be /usr/sbin/vamos

As root or using sudo or run0 edit /etc/binfmt.d/Amiga.conf and add the following line to it:

`:Amiga:M::\x00\x00\x03\xf3::/path/you/got/from/which/vamos:

And then restart systemd-binfmt.service using:

systemctl restart systemd-binfmt.service

So... Do with it what you like - and. Sorry for posting this in the issues :D

Hugs!
/AiO

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

1 participant