* 9vx vs qemu + 9pi or 9pc (was Re: [9fans] NIX experience)
@ 2025-01-07 8:37 Skip Tavakkolian
2025-01-07 15:24 ` Mat Kovach
0 siblings, 1 reply; 3+ messages in thread
From: Skip Tavakkolian @ 2025-01-07 8:37 UTC (permalink / raw)
To: 9fans
Regarding the status of 9vx on macOS and m1, I would suggest an
alternative: use 9front or 9legacy with qemu. I use the 9legacy amd64
image with qemu on an M1 regularly and even that runs reasonably fast
for my taste.
In the last few hours I tried to bring up the 9pi4 kernel using
'qemu-system-aarch64 -machine raspi4b ...' to compare amd64 vs arm64
emulations on M1. Unfortunately it gets stuck somewhere on accessing
the disk image; I couldn't bring up raspbian bookworm either and
others reported similar issues. Once that's fixed, I would guess that
9pi4 on qemu/M1 might be slightly faster than 9pc.
If anyone wants to try bringing up 9pi4 on macos/m1, here are my rough notes:
- Download 9Pi SD image (9legacy.rpi.bz2) from https://9legacy.org/download.html
$ bunzip2 9legacy.rpi.bz2
$ qemu-img resize -f raw 9legacy.rpi 1G # or qemu will complain
$ hdiutil attach -nomount 9legacy.rpi
$ mkdir -p ~/A
$ diskutil mount -mountPoint ~/A /dev/diskXXsY # the FAT partition
$ cp ~/A/9pi4 .
$ cp ~/A/bcm-2711-rpi-4-b.dtb .
$ diskutil unmount /dev/diskXXsY
$ hdiutil detach /dev/diskXX
$ qemu-system-aarch64 -machine raspi4b -dtb bcm2711-rpi-4-b.dtb -kernel 9pi4 \
-drive file=9legacy.rpi,if=sd,format=raw \
-append 'readparts=1 nobootprompt=local user=glenda'
On Mon, Jan 6, 2025 at 2:52 PM Ben Huntsman <ben@huntsmans.net> wrote:
>
> Hi guys-
> I don't mean to take too much of a tangent, but since the nix-os repo includes a pre-built copy of 9vx for OSX, has anyone looked at updating 9vx to be able to compile on newer Mac OS versions? One of the big problems is that it's very 32-bit which Apple doesn't support compiling for anymore...
>
> Thank you!
>
> -Ben
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta0815af2ea24cbbc-M31728313e14dc0aeb25bee24
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 9vx vs qemu + 9pi or 9pc (was Re: [9fans] NIX experience)
2025-01-07 8:37 9vx vs qemu + 9pi or 9pc (was Re: [9fans] NIX experience) Skip Tavakkolian
@ 2025-01-07 15:24 ` Mat Kovach
2025-01-07 16:56 ` Jacob Moody
0 siblings, 1 reply; 3+ messages in thread
From: Mat Kovach @ 2025-01-07 15:24 UTC (permalink / raw)
To: Gabriel Díaz López de la Llave via 9fans
I had to use:
$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount 9legacy.rpi
Or the image wasn't recognized.
I tried a quick startup but just got a blank screen. I don't have much time to take a look, but I'll do so later this evening.
Thanks for this.
--
Mat Kovach
mek@mek.cc
On Tue, Jan 7, 2025, at 03:37, Skip Tavakkolian wrote:
> Regarding the status of 9vx on macOS and m1, I would suggest an
> alternative: use 9front or 9legacy with qemu. I use the 9legacy amd64
> image with qemu on an M1 regularly and even that runs reasonably fast
> for my taste.
>
> In the last few hours I tried to bring up the 9pi4 kernel using
> 'qemu-system-aarch64 -machine raspi4b ...' to compare amd64 vs arm64
> emulations on M1. Unfortunately it gets stuck somewhere on accessing
> the disk image; I couldn't bring up raspbian bookworm either and
> others reported similar issues. Once that's fixed, I would guess that
> 9pi4 on qemu/M1 might be slightly faster than 9pc.
>
> If anyone wants to try bringing up 9pi4 on macos/m1, here are my rough notes:
>
> - Download 9Pi SD image (9legacy.rpi.bz2) from https://9legacy.org/download.html
> $ bunzip2 9legacy.rpi.bz2
> $ qemu-img resize -f raw 9legacy.rpi 1G # or qemu will complain
> $ hdiutil attach -nomount 9legacy.rpi
> $ mkdir -p ~/A
> $ diskutil mount -mountPoint ~/A /dev/diskXXsY # the FAT partition
> $ cp ~/A/9pi4 .
> $ cp ~/A/bcm-2711-rpi-4-b.dtb .
> $ diskutil unmount /dev/diskXXsY
> $ hdiutil detach /dev/diskXX
> $ qemu-system-aarch64 -machine raspi4b -dtb bcm2711-rpi-4-b.dtb -kernel 9pi4 \
> -drive file=9legacy.rpi,if=sd,format=raw \
> -append 'readparts=1 nobootprompt=local user=glenda'
>
> On Mon, Jan 6, 2025 at 2:52 PM Ben Huntsman <ben@huntsmans.net> wrote:
>>
>> Hi guys-
>> I don't mean to take too much of a tangent, but since the nix-os repo includes a pre-built copy of 9vx for OSX, has anyone looked at updating 9vx to be able to compile on newer Mac OS versions? One of the big problems is that it's very 32-bit which Apple doesn't support compiling for anymore...
>>
>> Thank you!
>>
>> -Ben
>>
>> 9fans / 9fans / see discussions + participants + delivery options Permalink
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta0815af2ea24cbbc-M35d0b7771e6faa7b980fcc56
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 9vx vs qemu + 9pi or 9pc (was Re: [9fans] NIX experience)
2025-01-07 15:24 ` Mat Kovach
@ 2025-01-07 16:56 ` Jacob Moody
0 siblings, 0 replies; 3+ messages in thread
From: Jacob Moody @ 2025-01-07 16:56 UTC (permalink / raw)
To: 9fans
On this note, 9front does have an arm64 qemu kernel which is designed specifically to be
able to make use of the Hypervisor.framework available on modern macs and Linux KVM.
The relevant pieces of the FQA are: https://fqa.9front.org/fqa3.html#3.3.1.1.1
This section also includes what is required for running this with the mac hardware
acceleration, the only thing I might add is that when using that you'll want to use
'-cpu host' instead of what's there. I imagine the performance (and power draw) would
be much better compared to emulating arm64 or amd64 in userspace.
Thanks,
Moody
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta0815af2ea24cbbc-M0f2eb73873e6bce4d7dc4ba0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-07 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-07 8:37 9vx vs qemu + 9pi or 9pc (was Re: [9fans] NIX experience) Skip Tavakkolian
2025-01-07 15:24 ` Mat Kovach
2025-01-07 16:56 ` Jacob Moody
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).