一応、マルチユーザまで。
LiteX VexRiscvのおかげで、SDカードやネットワークのハードウェア側のドライバは1ミリも書かずに実現できてるのがつまらん大きい。
うっかり素の11.0(の直前?)ベースにしてしまったので、Spurious interrupt on CPU ipl 5 が出まくっているが、無視して欲しい。
__ _ __ _ __
/ / (_) /____ | |/_/
/ /__/ / __/ -_)> <
/____/_/\__/\__/_/|_|
Build your hardware, easily!
(c) Copyright 2012-2026 Enjoy-Digital
(c) Copyright 2007-2015 M-Labs
BIOS CRC passed (82f8e6a0)
LiteX git sha1: e4a641d39
--================ SoC =================--
CPU: VexRiscv @ 100MHz
BUS: wishbone 32-bit data/32-bit addr
CSR: 32-bit data big ordering
ROM: 64.0KiB
SRAM: 8.0KiB
L2: 8.0KiB
SDRAM: 256.0MiB 16-bit @ 800MT/s (CL-6 CWL-5)
MAIN RAM: 256.0MiB
--=========== Initialization ===========--
Ethernet init...
Local IP: 192.168.1.50
Initializing SDRAM @0x40000000...
Switching SDRAM to software control.
Read leveling:
m0, b00: |00000000000000000000000000000000| delays: -
m0, b01: |00000000000000000000000000000000| delays: -
m0, b02: |11111111111110000000000000000000| delays: 06+-06
m0, b03: |00000000000000011111111111111000| delays: 22+-06
m0, b04: |00000000000000000000000000000000| delays: -
m0, b05: |00000000000000000000000000000000| delays: -
m0, b06: |00000000000000000000000000000000| delays: -
m0, b07: |00000000000000000000000000000000| delays: -
best: m0, b03 delays: 22+-06
m1, b00: |00000000000000000000000000000000| delays: -
m1, b01: |00000000000000000000000000000000| delays: -
m1, b02: |11111111111110000000000000000000| delays: 06+-06
m1, b03: |00000000000000001111111111111000| delays: 22+-06
m1, b04: |00000000000000000000000000000000| delays: -
m1, b05: |00000000000000000000000000000000| delays: -
m1, b06: |00000000000000000000000000000000| delays: -
m1, b07: |00000000000000000000000000000000| delays: -
best: m1, b03 delays: 22+-06
Switching SDRAM to hardware control.
Memtest at 0x40000000 (2.0MiB)...
Write: 0x40000000-0x40200000 2.0MiB
Read: 0x40000000-0x40200000 2.0MiB
Memtest OK
Memspeed at 0x40000000 (Sequential, 2.0MiB)...
Write speed: 37.1MiB/s
Read speed: 48.7MiB/s
--================ Boot ================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
Booting from SDCard in SD-Mode...
Booting from boot.json...
Copying iop.bin to 0x4f000000 (31888 bytes)...
[########################################]
Executing booted program at 0x4f000000
--============== Liftoff! ==============--
[iop] m68k-virtio IOP firmware
[iop] sdboot: kernel netbsd
[iop] virtio-blk: sdcard, 62333952 sectors
[iop] eth phy 1: link up, 100M full
[iop] virtio-net: liteeth, mac 52:54:00:12:34:56
[iop] m68k start: entry 00002000 bootinfo 0036fbe4 ram 240MB
[ 1.0000000] Initialized Goldfish TTY console @ 0xff008000
[ 1.0000000] Memory segment 0: addr=0x003b5000 size=0x0ec4b000
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[ 1.0000000] 2024, 2025, 2026
[ 1.0000000] 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 11.0 (VIRT_FPGA) #3: Sat Oct 10 18:50:31 JST 2026
[ 1.0000000] est@ursula:/home/est/opt/build/netbsd-virt68k/obj/sys/arch/virt68k/compile/VIRT_FPGA
[ 1.0000000] Qemu 6.0.1: MC68040+MMU, 4k+4k on-chip physical I/D caches
[ 1.0000000] total memory = 240 MB
[ 1.0000000] avail memory = 230 MB
[ 1.0000000] mainbus0 (root)
[ 1.0000000] gfpic0 at mainbus0 addr 0xff000000: Google Goldfish PIC
[ 1.0000000] gfpic0: interrupting at IPL 1
[ 1.0000000] gfpic1 at mainbus0 addr 0xff001000: Google Goldfish PIC
[ 1.0000000] gfpic1: interrupting at IPL 2
[ 1.0000000] gfpic2 at mainbus0 addr 0xff002000: Google Goldfish PIC
[ 1.0000000] gfpic2: interrupting at IPL 3
[ 1.0000000] gfpic3 at mainbus0 addr 0xff003000: Google Goldfish PIC
[ 1.0000000] gfpic3: interrupting at IPL 4
[ 1.0000000] gfpic4 at mainbus0 addr 0xff004000: Google Goldfish PIC
[ 1.0000000] gfpic4: interrupting at IPL 5
[ 1.0000000] gfpic5 at mainbus0 addr 0xff005000: Google Goldfish PIC
[ 1.0000000] gfpic5: interrupting at IPL 6
[ 1.0000000] gfrtc0 at mainbus0 addr 0xff006000: Google Goldfish RTC + timer
[ 1.0000000] gfrtc0: hardclock interrupting at gfpic5 irq 1 (IPL 6)
[ 1.0000000] gfrtc0: Using as delay() timer.
[ 1.0000000] gfrtc1 at mainbus0 addr 0xff007000: Google Goldfish RTC + timer
[ 1.0000000] gfrtc1: using as Time of Day Register.
[ 1.0000000] gftty0 at mainbus0 addr 0xff008000: Google Goldfish TTY
[ 1.0000000] gftty0: console
[ 1.0000000] gftty0: interrupting at gfpic0 irq 32 (IPL 1)
[ 1.0000000] virtctrl0 at mainbus0 addr 0xff009000: Qemu Virtual System Controller
[ 1.0000000] virtctrl0: features=0x00000001
[ 1.0000000] virtio0 at mainbus0 addr 0xff01fc00
[ 1.0000000] virtio0: VirtIO-MMIO-v2
[ 1.0000000] virtio0: network device (id 1, rev. 0x01)
[ 1.0000000] vioif0 at virtio0: features: 0x100000020<V1,MAC>
[ 1.0000000] vioif0: Ethernet address 52:54:00:12:34:56
[ 1.0000000] virtio0: interrupting at gfpic4 irq 31 (IPL 5)
[ 1.0000000] virtio1 at mainbus0 addr 0xff01fe00
[ 1.0000000] virtio1: VirtIO-MMIO-v2
[ 1.0000000] virtio1: block device (id 2, rev. 0x01)
[ 1.0000000] ld0 at virtio1: features: 0x100000244<V1,FLUSH,BLK_SIZE,SEG_MAX>
[ 1.0000000] ld0: max 62 segs of max 65536 bytes
[ 1.0000000] virtio1: interrupting at gfpic4 irq 32 (IPL 5)
[ 1.0000000] ld0: 30436 MB, 7729 cyl, 128 head, 63 sec, 512 bytes/sect x 62333952 sectors (0 bytes/physsect)
[ 1.0000000] Spurious interrupt on CPU ipl 5
[ 1.0000000] WARNING: system needs entropy for security; see entropy(7)
[ 1.0000000] No statclock; using hardclock.
[ 1.0000000] Initialzing hardclock: freq=100 Hz, interval=10000 usec
[ 2.5500030] swwdog0: software watchdog initialized
[ 2.5800030] root on ld0a dumps on ld0b
[ 2.6300030] root file system type: ffs
[ 2.6400030] kern.module.path=/stand/virt68k/11.0/modules
[ 5.9900030] entropy: best effort
Tue Oct 13 10:08:24 JST 2026
Starting root file system check:
/dev/rld0a: file system is clean; not checking
Setting sysctl variables:
ddb.onpanic: 1 -> 0
swapctl: setting dump device to /dev/ld0b
swapctl: adding /dev/ld0b as swap device at priority 0
Starting file system checks:
[ 90.7900030] entropy: ready
Loaded entropy from /var/db/entropy-file.
Waiting for entropy...done
Setting tty flags.
Starting network.
Hostname: m68k-virt
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
Waiting for duplicate address detection to finish...
Starting dhcpcd.
Building databases: dev[ 243.9600030] Spurious interrupt on CPU ipl 5
, utmp, utmpx.
Starting syslogd.
Setting date via ntp.
Mounting all file systems...
Clearing temporary files.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
swapctl: setting dump device to /dev/ld0b
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting local daemons:.
Updating motd.
Starting sshd.
[ 498.5100030] Spurious interrupt on CPU ipl 5
Starting cron.
Tue Oct 13 11:38:41 JST 2026
NetBSD/virt68k (m68k-virt) (constty)
login: [ 721.3700030] Spurious interrupt on CPU ipl 5
[ 1031.4400030] Spurious interrupt on CPU ipl 5
[ 1100.7800030] Spurious interrupt on CPU ipl 5
[ 1101.2100030] Spurious interrupt on CPU ipl 5
[ 1289.6900030] Spurious interrupt on CPU ipl 5
[ 1290.1200030] Spurious interrupt on CPU ipl 5
[ 1341.4800030] Spurious interrupt on CPU ipl 5
root
Oct 13 11:53:42 m68k-virt login: ROOT LOGIN (root) on tty constty
Last login: Tue Oct 13 11:20:15 2026 on constty
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
2024, 2025, 2026
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 11.0 (VIRT_FPGA) #3: Sat Oct 10 18:50:31 JST 2026
We recommend that you create a non-root account and use su(1) for root access.
m68k-virt# time sh -c 'echo "scale=2000; 4*a(1)" | bc -l' > /dev/null
[ 1651.5200030] Spurious interrupt on CPU ipl 5
[ 1876.3200030] Spurious interrupt on CPU ipl 5
[ 1961.5500030] Spurious interrupt on CPU ipl 5
[ 2176.3400030] Spurious interrupt on CPU ipl 5
[ 2306.1600030] Spurious interrupt on CPU ipl 5
[ 2476.3600030] Spurious interrupt on CPU ipl 5
[ 2495.1600030] Spurious interrupt on CPU ipl 5
[ 2495.5900030] Spurious interrupt on CPU ipl 5
[ 2581.6400030] Spurious interrupt on CPU ipl 5
[ 2582.0500030] Spurious interrupt on CPU ipl 5
[ 2909.6900030] Spurious interrupt on CPU ipl 5
[ 3097.9000030] Spurious interrupt on CPU ipl 5
[ 3098.3200030] Spurious interrupt on CPU ipl 5
[ 3098.7400030] Spurious interrupt on CPU ipl 5
[ 3201.7500030] Spurious interrupt on CPU ipl 5
[ 3469.2000030] Spurious interrupt on CPU ipl 5
[ 3511.8000030] Spurious interrupt on CPU ipl 5
[ 3511.9700030] Spurious interrupt on CPU ipl 5
[ 3543.2300030] Spurious interrupt on CPU ipl 5
[ 3543.5000030] Spurious interrupt on CPU ipl 5
[ 3700.6200030] Spurious interrupt on CPU ipl 5
[ 3701.0400030] Spurious interrupt on CPU ipl 5
[ 3821.8200030] Spurious interrupt on CPU ipl 5
2271.86 real 1673.47 user 431.55 systems
m68k-virt# time sh -c 'echo "scale=2000; e(1)" | bc -l' > /dev/null
[ 4131.8600030] Spurious interrupt on CPU ipl 5
[ 4576.9900030] Spurious interrupt on CPU ipl 5
[ 4717.3500030] Spurious interrupt on CPU ipl 5
[ 4872.7600030] Spurious interrupt on CPU ipl 5
[ 4906.5200030] Spurious interrupt on CPU ipl 5
[ 5176.6000030] Spurious interrupt on CPU ipl 5
[ 5177.0100030] Spurious interrupt on CPU ipl 5
[ 5320.0500030] Spurious interrupt on CPU ipl 5
[ 5320.4500030] Spurious interrupt on CPU ipl 5
[ 5371.0400030] Spurious interrupt on CPU ipl 5
[ 5508.8200030] Spurious interrupt on CPU ipl 5
[ 5509.6700030] Spurious interrupt on CPU ipl 5
1735.05 real 1602.91 user 7.28 sys
m68k-virt# [ 5681.0700030] Spurious interrupt on CPU ipl 5
[ 5869.9300030] Spurious interrupt on CPU ipl 5
m68k-virt# df
Filesystem 1K-blocks Used Avail %Cap Mounted on
/dev/ld0a 30447932 228358 28697178 1% /
tmpfs 32768 4 32764 1% /tmp
kernfs 1 1 0 100% /kern
ptyfs 1 1 0 100% /dev/pts
procfs 4 4 0 100% /proc
m68k-virt# cat /proc/cpuinfo
CPU: 68040
MMU: 68040
FPU: none(soft float)
m68k-virt# uname -rms
NetBSD 11.0 virt68k
m68k-virt#
m68k-virt# [ 5991.1400030] Spurious interrupt on CPU ipl 5
m68k-virt# shutdown -p now
Shutdown NOW!
shutdown: [pid 2100]
m68k-virt# wall: You have write permission turned off; no reply possible
*** FINAL System shutdown message from root@m68k-virt ***
System going down IMMEDIATELY
Oct 13 13:09:25 m68k-virt shutdown: poweroff by root:
System shutdown time has arrived
About to run shutdown hooks...
Stopping cron.
Saved entropy to /var/db/entropy-file.
Forcibly unmounting /tmp
Removing block-type swap devices
swapctl: removing /dev/ld0b as swap device
Tue Oct 13 13:10:52 JST 2026
Done running shutdown hooks.
Oct 13 13:10:59 m68k-virt syslogd[743]: Exiting on signal 15
[ 6111.2000030] syncing disks... done
[ 6111.4400030] unmounting file systems...
[ 6111.9800030] Spurious interrupt on CPU ipl 5
[ 6117.0700030] unmounting done
[ 6117.0700030] halted
[iop] m68k halt: HALT
iop>
速いんだか遅いんだかよくわからないけれど、大まかには680×0の実機に近い速度で動いてる気はする。あえて近づけてるのではなく、現状はこれ以上速くならない。(理屈上は40MHzなんだけど、タイミングが怪しいところとかは適当に変えてあるのでホンモノと同じ速度ではない。)
積み残しは多いけれど、ここまででしばらくお預け。