Running FreeBSD-12.0-CURRENT-arm64-aarch64-20180226-r330034.vmdk with --enable-kvm under qemu-system-aarch64: how to enable networking?

Mark Millard marklmi26-fbsd at yahoo.com
Sun Mar 4 06:33:34 UTC 2018


Based on https://wiki.freebsd.org/arm64/QEMU I've done
my first experiments with running FreeBSD via the likes
of:

qemu-system-aarch64 -m 14336M -cpu host -smp 3 \
                    -M virt,gic-version=2 \
                    -bios QEMU_EFI.fd \
                    -serial telnet::4444,server -nographic \
                    -drive if=none,file=FreeBSD-12.0-CURRENT-arm64-aarch64-20180226-r330034.vmdk,id=hd0 \
                    -device virtio-blk-device,drive=hd0 \
                    --enable-kvm

on a (Cortex-A72 based) MACCHIATOBin Double Shot (Rev 1.3)
that I now have access to. The MACCHIATOBin is booted with:

Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.52-armada-17.10.1-gc645ecc aarch64)
. . .
# uname -ap
Linux pod0 4.4.52-armada-17.10.1-gc645ecc #1 SMP PREEMPT Thu Jan 25 05:36:06 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux


I've not figure out how to get networking to work
inside FreeBSD. If I try also listing in the command
above:

                    -device virtio-net-device,netdev=net0 \
                    -netdev user,id=net0 \

it always hangs up after "Feeding entropy":

load: 1.26  cmd: ifconfig 220 [running] 3.91r 0.00u 2.58s 40% 2572k
load: 1.37  cmd: ifconfig 220 [running] 15.10r 0.00u 14.93s 93% 2572k
load: 1.37  cmd: ifconfig 220 [running] 19.44r 0.00u 19.12s 100% 2572k
load: 1.34  cmd: ifconfig 220 [running] 20.60r 0.00u 20.18s 93% 2572k
load: 1.34  cmd: ifconfig 220 [running] 21.71r 0.00u 21.49s 95% 2572k
load: 1.34  cmd: ifconfig 220 [running] 22.50r 0.00u 22.27s 100% 2572k
. . .

Apparently this is associated with the default:

# more /etc/rc.conf
hostname="freebsd"
ifconfig_DEFAULT="DHCP inet6 accept_rtadv"

(dhcp is what I hope to use.)

On the Ubuntu side of things the network is configured via:

# ls -ld /etc/network/interfaces.d/*
-rw-r--r-- 1 root root 177 Mar  3 23:29 /etc/network/interfaces.d/eth2

# more /etc/network/interfaces.d/eth2
auto eth2
iface eth2 inet dhcp

(eth2 is the 1 Gbit/sec Ethernet interface, no attempt at use
of the other, faster ones. eth2 seems to work fine in Ubuntu.
Ubuntu does not seem to be having problems of itself.)



Other problems:

# find / -name "*.core" -print
/root/top.core
/root/csh.core
/sh.core

FreeBSD randomly gets cores (but there is no gdb present to
look at them with --and I do not have enough working to build
gdb via ports).

I've also had problems during "shutdown -p now" . . .

Stopping devd.
Waiting for PIDS: 203
load: 0.28  cmd: sh 720 [biowr] 15.13r 0.00u 0.28s 1% 4196k
sleep: about 72 second(s) left out of the original 90
load: 0.21  cmd: sh 720 [biowr] 26.40r 0.00u 0.48s 1% 7516k
sleep: about 61 second(s) left out of the original 90
Segmentation fault (core dumped)
Writing entropy file:.
Writing early boot entropy file:.
.
Mar  4 02:59:55 freebsd syslogd: exiting on signal 15
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `bufdaemon' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop... 


Another example . . .

Terminated
Mar  4 04:25:00 freebsd syslogd: exiting on signal 15
Mar  4 04:25:00 init: fatal signal: Segmentation fault
init died (signal 0, exit 11)
panic: Going nowhere without my init!
cpuid = 0
time = 1520137530
KDB: stack backtrace:
db_trace_self() at db_trace_self_wrapper+0x28
	 pc = 0xffff000000632564  lr = 0xffff0000000bffc0
	 sp = 0xffff0000402395e0  fp = 0xffff0000402397f0

db_trace_self_wrapper() at vpanic+0x184
	 pc = 0xffff0000000bffc0  lr = 0xffff000000354af8
	 sp = 0xffff000040239800  fp = 0xffff000040239880

vpanic() at panic+0x44
	 pc = 0xffff000000354af8  lr = 0xffff000000354ba8
	 sp = 0xffff000040239890  fp = 0xffff000040239910

panic() at exit1+0xd14
	 pc = 0xffff000000354ba8  lr = 0xffff000000313b64
	 sp = 0xffff000040239920  fp = 0xffff000040239990

exit1() at sys_sys_exit+0x10
	 pc = 0xffff000000313b64  lr = 0xffff000000312e4c
	 sp = 0xffff0000402399a0  fp = 0xffff0000402399a0

sys_sys_exit() at do_el0_sync+0x8bc
	 pc = 0xffff000000312e4c  lr = 0xffff00000064d59c
	 sp = 0xffff0000402399b0  fp = 0xffff000040239a70

do_el0_sync() at handle_el0_sync+0x74
	 pc = 0xffff00000064d59c  lr = 0xffff0000006349f4
	 sp = 0xffff000040239a80  fp = 0xffff000040239b90

handle_el0_sync() at 0x310a0
	 pc = 0xffff0000006349f4  lr = 0x00000000000310a0
	 sp = 0xffff000040239ba0  fp = 0x0000ffffffffe340

KDB: enter: panic
[ thread pid 1 tid 100002 ]
Stopped at      0x94e40:        undefined       54000042
db> 



For reference:

U-Boot 2017.03-armada-17.10.1 (Oct 15 2017 - 14:03:12 +0300)

Model: MACCHIATOBin-8040
Clock:  CPU     2000 [MHz]
        DDR     1200 [MHz]
        FABRIC  1200 [MHz]
        MSS     200  [MHz]
DRAM:  16 GiB

# lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             2
CPU max MHz:           2000.0000
CPU min MHz:           100.0000
Hypervisor vendor:     (null)
Virtualization type:   full


===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)



More information about the freebsd-arm mailing list