NetBSD/evbearmv7hf-el VEXPRESS_A15カーネルをqemu-system-armで動かす

Jared McNeillさんがNetBSD/evbarmのVEXPRESS_A15カーネルをqemu-system-arm -M vexpress-a15で動かせるようにしてくれた。 fdt(4)を使うようになったのが注目点なのかもしれないが、私としてはqemuのSDカードエミュレーションがNetBSDから使えるようになったことに注目している。 以前、INTEGRATOR_CPカーネルやGUMSTIXカーネルを起動させた際には、SDカードコントローラーの想定しない状態変化をNetBSDが設定しようとしてエラーになり、使えなかったような記憶があるためだ。

INTEGRATOR_CPカーネルやGUMSTIXカーネルは後ほど試してみるとして、まずはにある内容をやってみた。 qemuは、pkgsrc/emulators/qemuからインストールしたqemu-2.9.0nb1であり、ホストはNetBSD/amd64 8.99.1である。


$ cd /usr/src
$ cvs up -dPA
$ ./ -U -O /usr/world/8.99.1/evbearmv7hf-el/obj -T  /usr/world/8.99.1/evbearmv7hf-el/tools -D  /usr/world/8.99.1/evbearmv7hf-el/destdir -R  /usr/world/8.99.1/evbearmv7hf-el/release -u -x -j 4 -m evbearmv7hf-el release


$ mkdir ~/tmp
$ cd ~/tmp
$ cp /usr/world/8.99/evbearmv7hf-el/release/evbarm/binary/gzimg/armv7.img.gz .
$ gunzip armv7.img.gz
$ cp /usr/world/8.99/evbearmv7hf-el/release/evbarm/binary/kernel/vexpress-v2p-ca15-tc1.dtb.gz .
$ gunzip vexpress-v2p-ca15-tc1.dtb.gz

$ dd if=/dev/zero of=sdcard.img bs=1m count=2048
$ dd if=armv7.img of=sdcard.img bs=1m conv=notrunc


$ qemu-system-arm -M vexpress-a15 -kernel netbsd-VEXPRESS_A15.ub -dtb vexpress-v2p-ca15-tc1.dtb -nographic -sd sdcard.img -append 'root=ld0a'
WARNING: Image format was not specified for 'sdcard.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
audio: Could not init `oss' audio driver
[ Kernel symbol table missing! ]
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) #1: Thu Jun 29 15:22:18 JST 2017
total memory = 128 MB
avail memory = 121 MB
sysctl_createv: sysctl_create(machine_arch) returned 17
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
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@08000000/motherboard/iofpga@3,00000000/sysctl@020000 at fdt3 not configured
/smb@08000000/motherboard/mcc at fdt2 not configured
/smb@08000000/motherboard/vram@2,00000000 at fdt2 not configured
genfb0 at fdt3
wsdisplay0 at genfb0 kbdmux 1
/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@08000000/motherboard/flash@0,00000000 at fdt2 not configured
/smb@08000000/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@08000000/motherboard/usb@2,03000000 at fdt2 not configured
/smb@08000000/motherboard/leds at fdt2 not configured
/smb@08000000/motherboard/iofpga@3,00000000/i2c@030000 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
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@08000000/motherboard/iofpga@3,00000000/wdt@0f0000 at fdt3 not configured
/smb@08000000/motherboard/iofpga@3,00000000/timer@110000 at fdt3 not configured
/smb@08000000/motherboard/iofpga@3,00000000/timer@120000 at fdt3 not configured
/smb@08000000/motherboard/iofpga@3,00000000/i2c@160000 at fdt3 not configured
plrtc0 at fdt3: RTC
/smb@08000000/motherboard/iofpga@3,00000000/compact-flash@1a0000 at fdt3 not configured
ld0 at sdmmc0: <0xaa:0x5859:QEMU!:0x01:0xdeadbeef:0x062>
ld0: 2048 MB, 1040 cyl, 64 head, 63 sec, 512 bytes/sect x 4194304 sectors
ld0: 4-bit width, 12.000 MHz
boot device: ld0
root on ld0a dumps on ld0b
root file system type: ffs




Vaio Pro 11/13用のサードパーティーのACアダプター

Windows 7 Professional用のNFSクライアントを使う (NFS 4.1のみ)