From owner-freebsd-arm@freebsd.org Sun Oct 7 19:15:10 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1859410C9FBD for ; Sun, 7 Oct 2018 19:15:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-34.consmr.mail.ne1.yahoo.com (sonic317-34.consmr.mail.ne1.yahoo.com [66.163.184.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABFE99070E for ; Sun, 7 Oct 2018 19:15:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: CTLKtfIVM1lTgponTBTGi7Sho627GE7In2aMmPjk3SUQsoyCyDSXUIqBso3HGS8 T9Qi3tzBYDVLcJCMs51CW8xkPfKH3VvOS5zGSktkNjZ9aNYgGhqSObLCdSEGTaCyIFGFEGmu6OZ0 .Ct7sEr6gbNALj09mJs0nE6wxma4Fp7igXj6r30MGusoALGkcTpywtvQKGNG1GCXdM6KULDG7KXn PI31KJvgbcOnh5x0uWwraMkVpvGziH0yS0jnwAAARoBlxdKe3XWObPzvlBQMIBbuPDXShndsktC8 A1WaHSFvpqYo7cQcu7QLTnd5cyzRmIs4czFUK2k6PWkEP4odLzQT82x3xfX4TuvMRPGa1va2LE4L yRN9WpHaZKMPWevp0s9majv5_lmMq4EwJ6VaT5eygN7fyHjVuz.d2Tp7R0gxzQxgMkEUVdPAtjyO PDcaMZxwgK2NGfupUWdgoaniPLokpX_tkOWtfPfa6atEAKbK4Y_iNQpOxePryoDi46xeb9RsmFj4 i0DYJTIbZaHuKnRoFT7k.XC0j9WDSZ0.bYOIuagpZSMhf5CLYni6zGCe31Ab0n.CfJL9_jNSPqti VXXVP2Q01qfHydTFDVBZQ53X1ZTr_2s.RIaciEYHZMKyJ3WYdfa7VHn9Hvdp9CA9WDJWmyN6jh3W sYabojHuP.Rbj.VZeeTH.lwFFJ66ryD1Lc4VvyGVC_lzMgPbAX81.l3e5v5Et0CzqN6qXWPUD9y3 QnVdJuIY4kBYOH8cDbE40Hq0byOHBCGLmeG.vljeGnhc8YQ01wY74S.xyP0jX4W4eliNI1ri2DGz FXbL1z9w7cWwsz18TzRsTHMsHT5oIvca6MNfA9LeFl99tNe4KjhpaenzpSImlVZ0bWXiRM4tkWts 2.LSu.eW_on2SiteyTpbk9yz_HcLxyJ9.fyXJQFVBjvVevIkijH4IA9JyD1lDuh9e7099J8HU6qx tYzo7Nd30p82Uq.4csF1zp1tQZUoLAmXUZPfx3YcS8AEwzFB3izHT71G.cY1GogBMX8qmwz2ZrQR KtFI1IpdV4jhpq6jfXVfva1INeG1txbovL6EwlGEyag-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sun, 7 Oct 2018 19:15:03 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.101]) ([76.115.7.162]) by smtp416.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e2a7333a320352434cea53262a3be320 for ; Sun, 07 Oct 2018 19:15:00 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: FYI: I finally got FreeBSD 12 booted under qemu/kvm with general Ethernet access (on a MACCHIATObin running linux) Message-Id: Date: Sun, 7 Oct 2018 12:14:59 -0700 To: freebsd-arm X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 19:15:10 -0000 Getting the general Ethernet access going involved on the linux environment for the experiment running head -r339076 under qemu/kvm: # ip link add br0 type bridge # ip link set eth2 master br0 The following file is not generic to all linux's (neither are the eth2 references): # more /etc/network/interfaces.d/br0 auto br0 iface br0 inet dhcp bridge_ports eth2 bridge_stp off bridge_maxwait 0 bridge_fd 0 iface br0 inet6 auto accept_ra 1 # more /etc/qemu-ifup #!/bin/sh set -x if [ -n "$1" ];then ip tuntap add $1 mode tap user `whoami` ip link set $1 up sleep 0.5s ip link set $1 master br0 exit 0 else echo "Error: no interface specified" exit 1 fi I had built a more recent qemu than was the default install for the environment. Thus the path below. (I've omitted the MAC address that I used.) # qemu-2.11.1/bin/debug/native/aarch64-softmmu/qemu-system-aarch64 \ -M virt,gic-version=2 \ -m 12288M -cpu host,pmu=off -smp 3 -enable-kvm \ -bios QEMU_EFI.fd \ -serial telnet::4444,server -nographic \ -drive if=none,format=raw,file=vm.raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -device e1000,netdev=net0,mac=OMITTED \ -netdev tap,id=net0 (While I've tried a bunch of variations, I could easily be doing something wrong invoking a qemu-system-aarch64 .) Other notes/problems: Unfortunately, like every past attempt at such where I used -cpu host, -smp, and -enable-kvm on a few Linux-booted systems where I've tried such, processes are subject to occasional, random illegal instruction and segmentation fault program crashes. (The host linux has no such problems.) True even before getting Ethernet access working in FreeBSD. sh, cron, vi, pkg, etc. with trackbacks of the call stacks for the same program being generally widely varying from one to the next. Even fairly early boot processes occasionally fail --and also late processes during shutdown. It does seem to be able to sit idle over night without generating any *.core files, at least sometimes. In active use it has process crashes far more frequently. Building software is not reasonable to do. Just getting pkg to download and install something tends to be a retry-many-times context. I have one /var/crash/ entry from a very late process crash, but getting a copy out of the virtual machine would likely be problematical. The system is non-debug but with symbols. Historically debug kernel builds did not help me identify anything specific. But I've not tried in this specific environment (yet). (And my investigations tend to have a large dose of learn-as-I-go instead of primarily being directly-apply-what-I-know. So I'm not all that likely to identify anything rapidly.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)