A/UX userspace emulation on QEMU?

About Qemu-system-m68k, a m68k Mac emulator for Windows, macOS and Linux that can run MacOS 7.1 to 8.1, AUX 3.x and NetBSD

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

A/UX userspace emulation on QEMU?

Post by uyjulian »

Does QEMU support userspace emulation of A/UX programs yet?

One main reason is that I'm looking into porting a newer version of GCC to compile executable for A/UX and it would be much faster to test using the same filesystem as the host instead of copying the executable into the disk image every time I make a change.
Another reason is that the GNU assembler has not fully implemented the features of the A/UX assembler so it would be nice to run the A/UX assembler on the host for the time being.
User avatar
SolraBizna
Space Cadet
Posts: 6
Joined: Mon Sep 27, 2021 1:39 am

Re: A/UX userspace emulation on QEMU?

Post by SolraBizna »

It doesn't, and doing so would be quite difficult. However, I may have another solution to your problem.

A/UX includes an NFSv2 client. It interoperates quite happily with a modern NFS server, as long as NFSv2 is allowed (which it usually is by default) and reserved ports aren't required (which they usually are by default).

To mount a directory on my macOS machine from my A/UX guest, I added the following to "/etc/nfs.conf" on the macOS side:

Code: Select all

nfs.server.mount.require_resv_port = 0
Made a line in "/etc/exports" like:

Code: Select all

/Users/sbizna/path/to/nfs_dir -mapall=sbizna:nobody 1.2.3.4
(where "1.2.3.4" is the IP address of the machine I'm running QEMU on)

After doing that, "sudo nfsd restart" made the NFS server pick up the changes, and I was good to go.

Then, on the A/UX side, I made an entry in "/etc/hosts":

Code: Select all

1.2.3.4 Machostname
(The kernel will refuse to mount a share by IP address, so you do need a hostname. Also, automatic mounting at boot via "/etc/fstab" refuses to work unless the hostname is capitalized, for some reason.)

Then added the "nfs" module to the kernel configuration:

Code: Select all

newconfig nfs
After a reboot, I am henceforth able to mount the remote directory from the A/UX side:

Code: Select all

mount Machostname:/Users/sbizna/path/to/nfs_dir /some/mountpoint
It is even usable from Finder and other Toolbox applications! ...if you change your UID on the A/UX side to match your UID on the macOS side, so that the Toolbox's aggressive client-side permission checks don't get confused.

I hope this is helpful to you, and I'm very excited by the prospect of a recent GCC toolchain for A/UX. :)
User avatar
SolraBizna
Space Cadet
Posts: 6
Joined: Mon Sep 27, 2021 1:39 am

Re: A/UX userspace emulation on QEMU?

Post by SolraBizna »

SolraBizna wrote: Mon Sep 27, 2021 1:55 am Then added the "ufs" module to the kernel configuration:

Code: Select all

newconfig ufs
Ack. This should be "nfs", not "ufs". Accursed dyslexia.

(I'm too much of a newbie to be allowed to edit this post, I think.)
User avatar
Cat_7
Expert User
Posts: 5486
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: A/UX userspace emulation on QEMU?

Post by Cat_7 »

There, edited for you ;-)

Best,
Cat_7
Post Reply