From nobody Mon Aug 28 05:13:15 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RYzGs4cT9z4qqVC for ; Mon, 28 Aug 2023 05:13:25 +0000 (UTC) (envelope-from samm@freebsd.org) Received: from reindeer.net-art.cz (reindeer.net-art.cz [IPv6:2001:15e8:110:513c::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "reindeer.net-art.cz", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYzGs2QYNz4SyY for ; Mon, 28 Aug 2023 05:13:25 +0000 (UTC) (envelope-from samm@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: by reindeer.net-art.cz (Postfix, from userid 65534) id 3A2F75F372; Mon, 28 Aug 2023 06:13:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on reindeer X-Spam-Level: X-Spam-Status: No, score=-1.2 required=10.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from owl.net-art.cz (unknown [IPv6:2a03:6920:0:10::101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "owl.net-art.cz", Issuer "R3" (not verified)) by reindeer.net-art.cz (Postfix) with ESMTPS id BDD495EF50; Mon, 28 Aug 2023 06:13:15 +0100 (BST) Received: from [::1] (account samm@net-art.cz HELO webmail.net-art.cz) by owl.net-art.cz (CommuniGate Pro SMTP 6.1.20) with ESMTPA id 2040995; Mon, 28 Aug 2023 07:13:15 +0200 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Date: Mon, 28 Aug 2023 07:13:15 +0200 From: Alex Samorukov To: Mark Millard Cc: freebsd-arm Subject: Re: FreeBSD main on Apple M2 Ultra, likely via use of VM(s): any notes? In-Reply-To: References: Message-ID: <0c0b4f1fdcbd5683b211ac51d8cddc30@freebsd.org> X-Sender: samm@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4RYzGs2QYNz4SyY X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24806, ipnet:2001:15e8::/32, country:CZ] 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. 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. 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. > 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).