この記事は、NetBSD Advent Calendar 2025の7日目の記事です。
はじめに
2025年10月9日のmanu@のコミットと関連するコミットで、UEFIブートの際にuftdi(4)として認識されるUSBシリアルコンバーターをconsoleとして利用できるようになっていました。 ちょうど手元にFTDI製のチップを使ったUSBシリアルコンバーターを持っていましたので、試してみました。
本来は、DDBとかも使えるらしいのですが、今回はシリアルコンソール経由でログインするのみです。
初期設定
NetBSD/amd64 l11.99.4をインストールしたラップトップに、Windows 11 25H2上のPuTTYからログインしてみます。 単にログインするだけであれば、NetBSD側で以下のように設定すれば良いでしょう。
# vi /etc/ttys (snip) ttyU0 "/usr/libexec/getty std.115200" vt100 on secure
こうすれば、115200 bpsで通信するPuTTYでloginプロンプトを得ることができます。 具体的には下図のように設定します。
この設定は、以下の設定をしても必要ですので、この時点で設定して置くのが良いでしょう。
ucom0 at uftdi0をconsoleに設定する
以下のように認識されるデバイスをNetBSD側に接続してあります。
uftdi0 at uhub9 port 1 configuration 1 interface 0 uftdi0: FTDI (0x0403) USB HS SERIAL CONVERTER (0x6001), rev 1.10/4.00, addr 4 ucom0 at uftdi0 portno 0
その上で再起動させ、UEFIブートローダーで以下のように設定して、起動させます。
> kconsdev ucom0,115200 > boot
Windows 11上のPuTTYでは、ucom0が認識される所からブートメッセージが表示されます。
[ 3.7030449] ucom0: console
[ 4.1930474] uhidev1 at uhub8 port 2 configuration 1 interface 0
[ 4.1930474] uhidev1: ActionStar (0x2101) product 0201 (0x0201), rev 1.10/1.00, addr 5, iclass 3/0
[ 4.2030475] uhid7 at uhidev1: input=2, output=2, feature=0
[ 4.7030507] uhidev2 at uhub8 port 3 configuration 1 interface 0
[ 4.7030507] uhidev2: Logitech (0x046d) USB Receiver (0xc53f), rev 2.00/55.02, addr 6, iclass 3/1
[ 4.7130541] ukbd0 at uhidev2
[ 4.7130541] wskbd1 at ukbd0 mux 1
[ 4.7330511] uhidev3 at uhub8 port 3 configuration 1 interface 1
[ 4.7330511] uhidev3: Logitech (0x046d) USB Receiver (0xc53f), rev 2.00/55.02, addr 6, iclass 3/1
[ 4.7430515] uhidev3: 8 report ids
[ 4.7430515] ums0 at uhidev3 reportid 2: 16 buttons, W and Z dirs
[ 4.7430515] wsmouse2 at ums0 mux 0
[ 4.7430515] uhid8 at uhidev3 reportid 3: input=4, output=0, feature=0
[ 4.7430515] uhid9 at uhidev3 reportid 4: input=1, output=0, feature=0
[ 4.7430515] uhid10 at uhidev3 reportid 8: input=1, output=0, feature=0
[ 4.7430515] uhidev4 at uhub8 port 3 configuration 1 interface 2
[ 4.7430515] uhidev4: Logitech (0x046d) USB Receiver (0xc53f), rev 2.00/55.02, addr 6, iclass 3/0
[ 9.7530773] uhidev4: no report descriptor
[ 9.7530773] swwdog0: software watchdog initialized
[ 9.7530773] usb8 at vhci0: USB revision 2.0
[ 9.7730770] uhub10 at usb8: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.7730770] usb9 at vhci1: USB revision 2.0
[ 9.7930776] uhub11 at usb9: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.7930776] usb10 at vhci2: USB revision 2.0
[ 9.8130773] uhub12 at usb10: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.8130773] usb11 at vhci3: USB revision 2.0
[ 9.8330781] uhub13 at usb11: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.8330781] usb12 at vhci4: USB revision 2.0
[ 9.8530774] uhub14 at usb12: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.8530774] usb13 at vhci5: USB revision 2.0
[ 9.8730810] uhub15 at usb13: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.8730810] usb14 at vhci6: USB revision 2.0
[ 9.8930773] uhub16 at usb14: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.8930773] usb15 at vhci7: USB revision 2.0
[ 9.9130776] uhub17 at usb15: NetBSD (0x0000) VHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[ 9.9130776] WARNING: 4 errors while detecting hardware; check system log.
[ 9.9130776] boot device: ld0
[ 9.9130776] root on dk1 dumps on dk2
[ 9.9130776] root file system type: ffs
[ 9.9130776] kern.module.path=/netbsd/modulesystem type: ffTue Dec 9 10:46:12 -00 2025
9130776] root file system type: ffTue Dec 9 10:46:12 -00 2025
Starting root file system check:
/dev/rdk1: file system is clean; not checking
Starting devpubd.
Setting sysctl variables:
ddb.onpanic: 1 -> 0
swapctl: setting dump device to /dev/dk2
swapctl: adding /dev/dk2 as swap device at priority 0
Starting file system checks:
/dev/rdk4: file system is clean; not checking
/dev/rdk3: file system is clean; not checking
Loaded entropy from /var/db/entropy-file.
Waiting for entropy...done
Setting tty flags.
Starting network.
Hostname: castella
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
Waiting for duplicate address detection to finish...
Building databases: dev, utmp, utmpx.
Keyboard encoding -> us.swapctrlcaps
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Checking quotas: done.
swapctl: setting dump device to /dev/dk2
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting local daemons:.
Updating motd.
Starting pcscd.
/etc/rc.d/pcscd exited with code 1
Starting powerd.
Starting sshd.
Starting postfix.
postfix/postlog: starting the Postfix mail system
Starting multiskkserv.
Setting mixerctl variables...
mixerctl: field record.mic2 does not exist
Starting inetd.
Starting dbus.
Starting cupsd.
Starting cron.
The following components reported failures:
/etc/rc.d/pcscd
See /var/run/rc.log for) (ttyU0)
login:
代わりに、NetBSDのディスプレイにはloginプロンプトのみが表示されます。
pcscdの起動が失敗するのは別の問題なようです。

0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。