Page 1 of 1

A/UX userspace emulation on QEMU?

Posted: Wed Sep 22, 2021 2:58 am
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.

Re: A/UX userspace emulation on QEMU?

Posted: Mon Sep 27, 2021 1:55 am
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. :)

Re: A/UX userspace emulation on QEMU?

Posted: Mon Oct 04, 2021 8:26 am
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.)

Re: A/UX userspace emulation on QEMU?

Posted: Mon Oct 04, 2021 9:19 am
by Cat_7
There, edited for you ;-)

Best,
Cat_7

Re: A/UX userspace emulation on QEMU?

Posted: Tue Aug 08, 2023 7:16 pm
by emendelson
I tried this on Ventura, but got an "access denied" message in A/UX. Probably I misread the instructions, but has anyone else tried to get this working in Ventura?

Also, are the default settings in "newconfig nfs" the right ones?

Re: A/UX userspace emulation on QEMU?

Posted: Mon Jan 01, 2024 7:00 pm
by SolraBizna
My setup is still working, through Ventura and now Sonoma. There may have been something I needed to change but I didn't write it down if so. :(

I don't remember "newconfig nfs" needing any adjustments.