Qemu, NetBSD, and evbarm (VEXPRESS_A15)

Category: Computing Tags: , , , ,

Setup

References

Build tools and kernel for platform

# CVS -current in /usr/src
cd /usr/src
cvs up -A -dP
./build.sh -O ../obj_vexpress_a15/ -T ../tools_vexpress_a15 -U -u -m evbearmv7hf-el tools
./build.sh -O ../obj_vexpress_a15/ -T ../tools_vexpress_a15 -U -u -m evbearmv7hf-el kernel=VEXPRESS_A15

Setup Disk

cd /var/tmp
mkdir qemu
cd qemu
ftp http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-8/201707241040Z/evbarm-earmv7hf/binary/gzimg/armv7.img.gz
gzip -d armv7.img.gz
qemu-img resize armv7.img 20G

Setup network bridge

alc0 is my wired network device. This will not work with WPA personal wifi.

ifconfig bridge0 create
brconfig bridge0 add alc0
ifconfig bridge0 up
ifconfig tap0 create
ifconfig tap0 0.0.0.0 up
brconfig bridge0 add tap0

Startup qemu

I couldn’t get fb console to work for me. If you want to try, then remove -nographic and change console=tty1 to console=fb.

qemu-system-arm \
 -M vexpress-a15 \
 -kernel /usr/obj_vexpress_a15/sys/arch/evbarm/compile/VEXPRESS_A15/netbsd.ub \
 -dtb /usr/obj_vexpress_a15/sys/arch/evbarm/compile/VEXPRESS_A15/vexpress-v2p-ca15-tc1.dtb \
 -sd /var/tmp/qemu/armv7.img \
 -m 512M \
 -append 'root=ld0a console=tty1' \
 -nographic \
 -net nic -net tap,fd=3 3<>/dev/tap0

uname -a

armv7# uname -a
NetBSD armv7 8.99.1 NetBSD 8.99.1 (VEXPRESS_A15) #0: Sun Jul 30 13:35:47 EDT 2017 root@shrimpy.sogubsys.com:/usr/obj_vexpress_a15/sys/arch/evbarm/compile/VEXPRESS_A15 evbarm
armv7#

dmesg

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.99.1 (VEXPRESS_A15) #0: Sun Jul 30 13:35:47 EDT 2017
root@shrimpy.sogubsys.com:/usr/obj_vexpress_a15/sys/arch/evbarm/compile/VEXPRESS_A15
total memory = 512 MB
avail memory = 500 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
timecounter: Timecounters tick every 10.000 msec
armfdt0 (root)
fdt0 at armfdt0: V2P-CA15
fdt1 at fdt0
fdt2 at fdt1: V2M-P1
fdt3 at fdt2
fdt4 at fdt0
cpus0 at fdt0
cpu0 at cpus0: Cortex-A15 r2p1 (Cortex V7A core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB/64B 2-way L1 PIPT Instruction cache
cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
cpu0: 2304KB/64B 16-way write-through L2 PIPT Unified cache
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
cpu1 at cpus0: disabled (unresponsive)
gic0 at fdt0: GIC
armgic0 at gic0: Generic Interrupt Controller, 160 sources (160 valid)
armgic0: 256 Priorities, 128 SPIs, 16 PPIs, 16 SGIs
gtmr0 at fdt0: Generic Timer
armgtmr0 at gtmr0: ARMv7 Generic 64-bit Timer (62500 kHz)
armgtmr0: interrupting on irq 27
timecounter: Timecounter "armgtmr0" frequency 62500000 Hz quality 500
fregulator0 at fdt2: 3V3
fclock0 at fdt2: 32768 Hz fixed clock
fclock1 at fdt2: 1000000 Hz fixed clock
fclock2 at fdt2: 24000000 Hz fixed clock
/dcc at fdt0 not configured
vxsysreg0 at fdt3
/smb@8000000/motherboard/iofpga@3,00000000/sysctl@20000 at fdt3 not configured
/smb@8000000/motherboard/mcc at fdt2 not configured
/smb@8000000/motherboard/vram@2,00000000 at fdt2 not configured
genfb0 at fdt3
genfb0: framebuffer at 0x18000000, size 640x480, depth 32, stride 2560
wsdisplay0 at genfb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
/virtio_mmio@1c130000 at fdt0 not configured
/virtio_mmio@1c130200 at fdt0 not configured
/virtio_mmio@1c130400 at fdt0 not configured
/virtio_mmio@1c130600 at fdt0 not configured
/hdlcd@2b000000 at fdt0 not configured
/memory-controller@2b0a0000 at fdt0 not configured
/memory-controller@7ffd0000 at fdt0 not configured
/dma@7ffb0000 at fdt0 not configured
/pmu at fdt0 not configured
/smb@8000000/motherboard/flash@0,00000000 at fdt2 not configured
/smb@8000000/motherboard/psram@1,00000000 at fdt2 not configured
smsh0 at fdt2: SMSC LAN9118 Rev 1
smsh0: MAC address 52:54:00:12:34:56
ukphy0 at smsh0 phy 1: OUI 0x00800f, model 0x000d, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
smsh0: interrupting on GIC irq 47
/smb@8000000/motherboard/usb@2,03000000 at fdt2 not configured
/smb@8000000/motherboard/leds at fdt2 not configured
/smb@8000000/motherboard/iofpga@3,00000000/i2c@30000 at fdt3 not configured
aaci0 at fdt3: Advanced Audio CODEC
aaci0: ac97: National Semiconductor LM4549 codec; headphone, 18 bit DAC, 18 bit ADC, National Semi 3D
aaci0: ac97: ext id 0x1
audio0 at aaci0: half duplex, playback, mmap
aaci0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
spkr0 at audio0: PC Speaker (synthesized)
wsbell at spkr0 not configured
aaci0: interrupting on GIC irq 43
plmmc0 at fdt3
sdmmc0 at plmmc0
plkmi0 at fdt3: PS2 controller
pckbd0 at plkmi0 (kbd slot)
wskbd0 at pckbd0 mux 1
wskbd0: connecting to wsdisplay0
plkmi0: interrupting on GIC irq 44
plkmi1 at fdt3: PS2 controller
pms0 at plkmi1 (aux slot)
wsmouse0 at pms0 mux 0
plkmi1: interrupting on GIC irq 45
plcom0 at fdt3
plcom0: txfifo disabled
plcom0: console
plcom1 at fdt3
plcom1: txfifo disabled
plcom2 at fdt3
plcom2: txfifo disabled
plcom3 at fdt3
plcom3: txfifo disabled
/smb@8000000/motherboard/iofpga@3,00000000/wdt@f0000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/timer@110000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/timer@120000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/i2c@160000 at fdt3 not configured
plrtc0 at fdt3: RTC
/smb@8000000/motherboard/iofpga@3,00000000/compact-flash@1a0000 at fdt3 not configured
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
ld0 at sdmmc0: <0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>
ld0: 20480 MB, 10402 cyl, 64 head, 63 sec, 512 bytes/sect x 41943040 sectors
ld0: 39056768 trailing sectors not covered by disklabel
ld0: 4-bit width, 12.000 MHz
IPsec: Initialized Security Association Processing.
boot device: ld0
ld0: 39056768 trailing sectors not covered by disklabel
root on ld0a dumps on ld0b
ld0: 39056768 trailing sectors not covered by disklabel
ld0: 39056768 trailing sectors not covered by disklabel
root file system type: ffs
kern.module.path=/stand/evbarm/8.99.1/modules
WARNING: clock gained 6 days
rebooting...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.99.1 (VEXPRESS_A15) #0: Sun Jul 30 13:35:47 EDT 2017
root@shrimpy.sogubsys.com:/usr/obj_vexpress_a15/sys/arch/evbarm/compile/VEXPRESS_A15
total memory = 512 MB
avail memory = 500 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
timecounter: Timecounters tick every 10.000 msec
armfdt0 (root)
fdt0 at armfdt0: V2P-CA15
fdt1 at fdt0
fdt2 at fdt1: V2M-P1
fdt3 at fdt2
fdt4 at fdt0
cpus0 at fdt0
cpu0 at cpus0: Cortex-A15 r2p1 (Cortex V7A core)
cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
cpu0: 32KB/64B 2-way L1 PIPT Instruction cache
cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
cpu0: 2304KB/64B 16-way write-through L2 PIPT Unified cache
vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
cpu1 at cpus0: disabled (unresponsive)
gic0 at fdt0: GIC
armgic0 at gic0: Generic Interrupt Controller, 160 sources (160 valid)
armgic0: 256 Priorities, 128 SPIs, 16 PPIs, 16 SGIs
gtmr0 at fdt0: Generic Timer
armgtmr0 at gtmr0: ARMv7 Generic 64-bit Timer (62500 kHz)
armgtmr0: interrupting on irq 27
timecounter: Timecounter "armgtmr0" frequency 62500000 Hz quality 500
fregulator0 at fdt2: 3V3
fclock0 at fdt2: 32768 Hz fixed clock
fclock1 at fdt2: 1000000 Hz fixed clock
fclock2 at fdt2: 24000000 Hz fixed clock
/dcc at fdt0 not configured
vxsysreg0 at fdt3
/smb@8000000/motherboard/iofpga@3,00000000/sysctl@20000 at fdt3 not configured
/smb@8000000/motherboard/mcc at fdt2 not configured
/smb@8000000/motherboard/vram@2,00000000 at fdt2 not configured
genfb0 at fdt3
genfb0: framebuffer at 0x18000000, size 640x480, depth 32, stride 2560
wsdisplay0 at genfb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
/virtio_mmio@1c130000 at fdt0 not configured
/virtio_mmio@1c130200 at fdt0 not configured
/virtio_mmio@1c130400 at fdt0 not configured
/virtio_mmio@1c130600 at fdt0 not configured
/hdlcd@2b000000 at fdt0 not configured
/memory-controller@2b0a0000 at fdt0 not configured
/memory-controller@7ffd0000 at fdt0 not configured
/dma@7ffb0000 at fdt0 not configured
/pmu at fdt0 not configured
/smb@8000000/motherboard/flash@0,00000000 at fdt2 not configured
/smb@8000000/motherboard/psram@1,00000000 at fdt2 not configured
smsh0 at fdt2: SMSC LAN9118 Rev 1
smsh0: MAC address 52:54:00:12:34:56
ukphy0 at smsh0 phy 1: OUI 0x00800f, model 0x000d, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
smsh0: interrupting on GIC irq 47
/smb@8000000/motherboard/usb@2,03000000 at fdt2 not configured
/smb@8000000/motherboard/leds at fdt2 not configured
/smb@8000000/motherboard/iofpga@3,00000000/i2c@30000 at fdt3 not configured
aaci0 at fdt3: Advanced Audio CODEC
aaci0: ac97: National Semiconductor LM4549 codec; headphone, 18 bit DAC, 18 bit ADC, National Semi 3D
aaci0: ac97: ext id 0x1
audio0 at aaci0: half duplex, playback, mmap
aaci0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
spkr0 at audio0: PC Speaker (synthesized)
wsbell at spkr0 not configured
aaci0: interrupting on GIC irq 43
plmmc0 at fdt3
sdmmc0 at plmmc0
plkmi0 at fdt3: PS2 controller
pckbd0 at plkmi0 (kbd slot)
wskbd0 at pckbd0 mux 1
wskbd0: connecting to wsdisplay0
plkmi0: interrupting on GIC irq 44
plkmi1 at fdt3: PS2 controller
pms0 at plkmi1 (aux slot)
wsmouse0 at pms0 mux 0
plkmi1: interrupting on GIC irq 45
plcom0 at fdt3
plcom0: txfifo disabled
plcom0: console
plcom1 at fdt3
plcom1: txfifo disabled
plcom2 at fdt3
plcom2: txfifo disabled
plcom3 at fdt3
plcom3: txfifo disabled
/smb@8000000/motherboard/iofpga@3,00000000/wdt@f0000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/timer@110000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/timer@120000 at fdt3 not configured
/smb@8000000/motherboard/iofpga@3,00000000/i2c@160000 at fdt3 not configured
plrtc0 at fdt3: RTC
/smb@8000000/motherboard/iofpga@3,00000000/compact-flash@1a0000 at fdt3 not configured
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
ld0 at sdmmc0: <0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>
ld0: 20480 MB, 10402 cyl, 64 head, 63 sec, 512 bytes/sect x 41943040 sectors
ld0: 4-bit width, 12.000 MHz
IPsec: Initialized Security Association Processing.
boot device: ld0
root on ld0a dumps on ld0b
root file system type: ffs
kern.module.path=/stand/evbarm/8.99.1/modules
wsdisplay0: screen 4 added (default, vt100 emulation)