Re: FreeBSD main on Apple M2 Ultra, likely via use of VM(s): any notes?
- In reply to: Alex Samorukov : "Re: FreeBSD main on Apple M2 Ultra, likely via use of VM(s): any notes?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Aug 2023 06:43:58 UTC
On Aug 27, 2023, at 22:13, Alex Samorukov <samm@freebsd.org> wrote: > On 2023/08/28 06:56, Mark Millard wrote: >> Is anyone using FreeBSD [main] on an Apple M2 Ultra (likely that would >> be via a VM)? If yes, is anyone willing to comment on the VM used to >> host FreeBSD, how it is used with FreeBSD, what works vs. not, or the >> like? > I am using M1, don't think that difference will be significant. I just figured that if something works on the M2 Ultra, it likes works on the rest. Going the other way might be somewhat more likely to not (yet) support the M2. Thus how I worded the question. But notes based on the other M1/M2 contexts are good to. In that respect, my wording ended up as over specific. > FreeBSD works very well on UTM, which is nothing but a wrapper for QEMU. You can also run it directly in QEMU, e.g. like this: > > qemu-system-aarch64 \ > -M virt \ > -drive file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd,format=raw,if=pflash,readonly=on \ > -smp 4 \ > -accel hvf \ > -cpu host \ > -m 1G \ > -drive file=FreeBSD-13.1-RELEASE-arm64-aarch64.qcow2,if=virtio,cache=writethrough,format=qcow2 \ > -net user,hostfwd=tcp::10022-:22 \ > -net nic -device ramfb -device nec-usb-xhci,id=xhci -device usb-kbd \ > -nographic -serial mon:studio > > USB emulation works as expected, at least I was able to pass usb-com device. About loading from external media - I think it may work, however, I never tested and I see very little sense in doing that. My testing-usage via the exact same media being used in multiple distinct contexts may well be rather unusual. Still, it is something I deliberately do. > One of the fun findings - you can't run FreeBSD/Armv[67] chroot on such FreeBSD as the host CPU does not have 32-bit commands, so it is not possible to use such a host for building armv7 packages natively. Yep, no aarch32/armv7 support via hvf. >> A point of interest would be if the VM environment can boot normal >> external USB3 media that is also able to be used to boot FreeBSD on >> other aarch64 systems (not just booting via VM usage). > Thanks for the notes. It has pointed out some things I'd not-noticed already. === Mark Millard marklmi at yahoo.com