RaspberryPi4にNetBSD/aarch64を試す

  1. http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/gzimg/arm64.img.gz をダウンロード
  2. gzcat arm64.img.gz | sudo dd of=/dev/sd1d bs=32kmicroSDカードに書き込み
  3. microSDカードを挿す
  4. 6、8、10番ピンにUARTのGND、TX、RXを繋ぐ(CubieBoard2で使っているやつを拝借)
  5. USBコネクタを挿して電源投入

んで流れた起動メッセージがこれ。カーネルを読み込んで起動しているところまでは良いけども、どうもmicroSDである/dev/ld0が見えないらしい。

[   1.0000000] NetBSD/evbarm (fdt) booting ...
[   1.0000000] pool redzone disabled for 'kmem-04096'
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.99.46 (GENERIC64) #0: Mon Feb 10 03:23:29 UTC 2020
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
[   1.0000000] total memory = 3941 MB
[   1.0000000] avail memory = 3807 MB
[   1.0000000] pool redzone disabled for 'buf4k'
[   1.0000000] pool redzone disabled for 'buf64k'
[   1.0000000] armfdt0 (root)
[   1.0000000] simplebus0 at armfdt0: Raspberry Pi 4 Model B Rev 1.2
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] simplebus2 at simplebus0
[   1.0000000] cpus0 at simplebus0
[   1.0000000] simplebus3 at simplebus0
[   1.0000000] cpu0 at cpus0: Cortex-A72 r0p3 (Cortex V8-A core)
[   1.0000000] cpu0: package 0, core 0, smt 0
[   1.0000000] cpu0: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[   1.0000000] cpu0: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[   1.0000000] cpu0: Dcache line 64, Icache line 64
[   1.0000000] cpu0: L1 48KB/64B 3-way read-allocate PIPT Instruction cache
[   1.0000000] cpu0: L1 32KB/64B 2-way write-back read-allocate write-allocate PIPT Data cache
[   1.0000000] cpu0: L2 1024KB/64B 16-way write-back read-allocate write-allocate PIPT Unifiede
[   1.0000000] cpu0: revID=0x0, PMCv3, 4k table, 64k table, 16bit ASID
[   1.0000000] cpu0: auxID=0x10000, FP, CRC32, NEON, rounding, NaN propagation, denormals, 32xd
[   1.0000000] cpu1 at cpus0: Cortex-A72 r0p3 (Cortex V8-A core)
[   1.0000000] cpu1: package 0, core 1, smt 0
[   1.0000000] cpu2 at cpus0: Cortex-A72 r0p3 (Cortex V8-A core)
[   1.0000000] cpu2: package 0, core 2, smt 0
[   1.0000000] cpu3 at cpus0: Cortex-A72 r0p3 (Cortex V8-A core)
[   1.0000000] cpu3: package 0, core 3, smt 0
[   1.0000000] simplebus4 at simplebus1
[   1.0000000] gic0 at simplebus1: GIC
[   1.0000000] armgic0 at gic0: Generic Interrupt Controller, 256 sources (247 valid)
[   1.0000000] armgic0: 16 Priorities, 224 SPIs, 7 PPIs, 16 SGIs
[   1.0000000] fclock0 at simplebus2: 54000000 Hz fixed clock (osc)
[   1.0000000] bcmcprman0 at simplebus1: BCM283x Clock Controller
[   1.0000000] bcmaux0 at simplebus1
[   1.0000000] fclock1 at simplebus2: 480000000 Hz fixed clock (otg)
[   1.0000000] bcmicu0 at simplebus1: Multiprocessor
[   1.0000000] gtmr0 at simplebus0: Generic Timer
[   1.0000000] gtmr0: interrupting on GIC irq 27
[   1.0000000] armgtmr0 at gtmr0: Generic Timer (54000 kHz, virtual)
[   1.0000030] gregulator0 at simplebus0: vdd-sd-io
[   1.0000030] gregulator0: cannot get pin 0
[   1.0000030] plcom0 at simplebus1: ARM PL011 UART
[   1.0000030] plcom0: txfifo disabled
[   1.0000030] plcom0: interrupting on GIC irq 153
[   1.0000030] com0 at simplebus1: BCM AUX UART, working fifo
[   1.0000030] com0: console
[   1.0000030] com0: interrupting on GIC irq 125
[   1.0000030] mmcpwrseq0 at simplebus0: couldn't get reset GPIOs
[   1.0000030] /soc/dsi@7e209000 at simplebus1 not configured
[   1.0000030] bcmgpio0 at simplebus1: GPIO controller 2838
[   1.0000030] bcmgpio0: pins 0..31 interrupting on GIC irq 145
[   1.0000030] bcmgpio0: pins 32..58 interrupting on GIC irq 146
[   1.0000030] gpio0 at bcmgpio0: 58 pins
[   1.0000030] /soc/firmware/gpio at simplebus4 not configured
[   1.0000030] /soc/power at simplebus1 not configured
[   1.0000030] /phy at simplebus0 not configured
[   1.0000030] bcmmbox0 at simplebus1: VC mailbox
[   1.0000030] bcmmbox0: interrupting on GIC irq 65
[   1.0000030] vcmbox0 at bcmmbox0
[   1.0000030] /scb/ethernet@7d580000 at simplebus3 not configured
[   1.0000030] /soc/timer@7e003000 at simplebus1 not configured
[   1.0000030] /soc/txp@7e004000 at simplebus1 not configured
[   1.0000030] bsciic0 at simplebus1: Broadcom Serial Controller
[   1.0000030] bsciic0: interrupting on GIC irq 149
[   1.0000030] iic0 at bsciic0: I2C bus
[   1.0000030] sdhc0 at simplebus1: SDHC controller
[   1.0000030] sdhc0: interrupting on GIC irq 158
[   1.0000030] bsciic1 at simplebus1: Broadcom Serial Controller
[   1.0000030] bsciic1: interrupting on GIC irq 149
[   1.0000030] iic1 at bsciic1: I2C bus
[   1.0000030] /soc/vec@7e806000 at simplebus1 not configured
[   1.0000030] dwctwo0 at simplebus1: USB controller
[   1.0000030] dwctwo0: interrupting on GIC irq 105
[   1.0000030] bcmdmac0 at simplebus1: DMA0 DMA2 DMA4 DMA5 DMA6 DMA7
[   1.0000030] bcmpmwdog0 at simplebus1: Power management, Reset and Watchdog controller
[   1.0000030] /soc/pwm@7e20c800 at simplebus1 not configured
[   1.0000030] /soc/emmc2@7e340000 at simplebus1 not configured
[   1.0000030] /soc/mailbox@7e00b840 at simplebus1 not configured
[   1.0000030] /chosen at simplebus0 not configured
[   1.0000030] armpmu0 at simplebus0: Performance Monitor Unit
[   1.0000030] gpioleds0 at simplebus0: ACT
[   1.0000030] cpu2: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[   1.0000030] cpu2: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[   1.2828385] cpu2: Dcache line 64, Icache line 64
[   1.2828385] cpu2: L1 48KB/64B 3-way read-allocate PIPT Instruction cache
[   1.2928308] cpu2: L1 32KB/64B 2-way write-back read-allocate write-allocate PIPT Data cache
[   1.3028318] cpu2: L2 1024KB/64B 16-way write-back read-allocate write-allocate PIPT Unifiede
[   1.3128316] cpu2: revID=0x0, PMCv3, 4k table, 64k table, 16bit ASID
[   1.3128316] cpu2: auxID=0x10000, FP, CRC32, NEON, rounding, NaN propagation, denormals, 32xd
[   1.3328329] cpu1: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[   1.3328329] cpu1: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[   1.3428347] cpu1: Dcache line 64, Icache line 64
[   1.3528339] cpu1: L1 48KB/64B 3-way read-allocate PIPT Instruction cache
[   1.3528339] cpu1: L1 32KB/64B 2-way write-back read-allocate write-allocate PIPT Data cache
[   1.3628348] cpu1: L2 1024KB/64B 16-way write-back read-allocate write-allocate PIPT Unifiede
[   1.3728348] cpu1: revID=0x0, PMCv3, 4k table, 64k table, 16bit ASID
[   1.3828371] cpu1: auxID=0x10000, FP, CRC32, NEON, rounding, NaN propagation, denormals, 32xd
[   1.3928360] cpu3: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[   1.3928360] cpu3: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[   1.4028375] cpu3: Dcache line 64, Icache line 64
[   1.4128372] cpu3: L1 48KB/64B 3-way read-allocate PIPT Instruction cache
[   1.4128372] cpu3: L1 32KB/64B 2-way write-back read-allocate write-allocate PIPT Data cache
[   1.4228382] cpu3: L2 1024KB/64B 16-way write-back read-allocate write-allocate PIPT Unifiede
[   1.4328382] cpu3: revID=0x0, PMCv3, 4k table, 64k table, 16bit ASID
[   1.4428392] cpu3: auxID=0x10000, FP, CRC32, NEON, rounding, NaN propagation, denormals, 32xd
[   1.4528393] sdhc0: SDHC 3.0, rev 153, PIO, 250000 kHz, HS 3.3V, re-tuning mode 1, 1024 bytes
[   1.4628412] sdmmc0 at sdhc0 slot 0
[   1.4628412] usb0 at dwctwo0: USB revision 2.0
[   1.4828431] armpmu0: interrupting on GIC irq 48
[   1.4828431] armpmu0: interrupting on GIC irq 49
[   1.4928429] armpmu0: interrupting on GIC irq 50
[   1.5028433] armpmu0: interrupting on GIC irq 51
[   1.5128434] uhub0 at usb0: NetBSD (0000) DWC2 root hub (0000), class 9/0, rev 2.00/1.00, ad1
[   1.6428481] sdmmc0: 4-bit width, 50.000 MHz
[   1.6428481] sdmmc0: SDIO function
[   1.6528478] bwfm0 at sdmmc0 function 1
[   1.6628529] (manufacturer 0x2d0, product 0xa9a6) at sdmmc0 function 2 not configured
[   1.6628529] (manufacturer 0x2d0, product 0xa9a6, standard function interface code 0x2) at sd
[   2.2328699] WARNING: 2 errors while detecting hardware; check system log.
[   2.2439641] boot device: <unknown>
[   2.2439641] unknown device major 0xffffffffffffffff
[   2.2439641] root device:

NYC*BUG dmesgd を見る限りだと去年の9月と12月で動作報告があるので、なにかしら設定を間違えたか単にこの後で何かバグったのか。

Date From (nickname) *BSD (derived) Description
2019-09-01 mlelstv NetBSD RPI4 4GB
2019-12-30 jmcneill NetBSD NetBSD/evbarm 9.99.31 on Raspberry Pi 4 Model B (4GB, ACPI)

dmesgだけ見るとリビジョン表記が全員バラバラなのは気付いたけど流石にそこまで影響しないよなぁ…おそらく技適対応やUSBの給電回りの修正で1.2になったんだと思うし。

Date
2019-09-01 simplebus0 at armfdt0: Raspberry Pi 4 Model B Rev 1.1
2019-12-30 simplebus0 at armfdt0: Sony UK Raspberry Pi 4 Model B
今回 simplebus0 at armfdt0: Raspberry Pi 4 Model B Rev 1.2