"pl2303.o"
まず始めに素直に、つないだ。lsmodしてみるも変化なし。
残念ながら認めてもらえない。 dmesg で調べると、こうある。
hub.c: USB new device connect on bus1, assigned device number 2
usb.c: kmalloc IF c3daac00, numif 1
usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
usb.c: USB device number 2 default language ID 0x409
Manufacturer: Prolific Technology Inc.
Product: USB-Serial Controller
usb.c: unhandled interfaces on device
usb.c: USB device 2 (vend/prod 0x4bb/0xa0e) is not claimed by any active driver.
  Length              = 18
  DescriptorType      = 01
  USB version         = 1.10
  Vendor:Product      = 04bb:0a0e
  MaxPacketSize0      = 64
  NumConfigurations   = 1
  Device version      = 0.01
  Device Class:SubClass:Protocol = 00:00:00
    Per-interface classes
Configuration:
  bLength             =    9
  bDescriptorType     =   02
  wTotalLength        = 0027
  bNumInterfaces      =   01
  bConfigurationValue =   01
  iConfiguration      =   00
  bmAttributes        =   80
  MaxPower            =  100mA

  Interface: 0
  Alternate Setting:  0
    bLength             =    9
    bDescriptorType     =   04
    bInterfaceNumber    =   00
    bAlternateSetting   =   00
    bNumEndpoints       =   03
    bInterface Class:SubClass:Protocol =   ff:00:00
    iInterface          =   00
    Endpoint:
      bLength             =    7
      bDescriptorType     =   05
      bEndpointAddress    =   81 (in)
      bmAttributes        =   03 (Interrupt)
      wMaxPacketSize      = 000a
      bInterval           =   01
    Endpoint:
      bLength             =    7

というわけで、またコンパイルをしなくちゃ。
いじるのは /usr/src/linux/drivers/usb/serial/usbserial.c
と思ったけど、これではなかった。いじるのは
/usr/src/linux/drivers/usb/serial/pl2303.c にした。というのは
dmesgの中にManufacturer: Prolific Technology Inc.を発見。
チップがPL2303らしいだからだ。

これを次のようにRSAQ5を追加する。
/usr/src/linux/drivers/usb/serial/pl2303.c

static struct usb_device_id id_table [] = {
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
        { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
        { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
#define IODATA_PRODUCT_ID_RSAQ5       0x0a0e
        { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
        { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
        { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
        { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
        { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
        { }                                     /* Terminating entry */
};


あああ、じつは /usr/src/linux/.configを見たら
# CONFIG_USB_SERIAL is not set
となってた。失敗、失敗。ここは make menuconfig で
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_PL2303=m

にしておかなきゃ。

でき上がった pl2303.c を /lib/modules/2.4.20/kernel/drivers/usb/serial/
に入れる。 % ls してみたら
pl2303.o   suntac_ucablep.o  usbserial.o
と出た。そうだ、 keyspan社のUSBシリアルもたしかあったから、それのモジュールも
次回にはいれておくか。
そうしてから、 # depmod -a をして終了。

つながったら /deb/ttyUSB0 として認識されるハズ。

使い方は、このRSAQ5をリナザウに挿す。lsmodするとpl2303とusbserialの
モジュールが追加されたのがわかる。

実験をしてみました。家には懐かしのRS232Cで動くようなものがほとんど無い。
そうだOpenBlokS(White)にはシリアル(/dev/ttyS0)が出てた。
これに接続して、ちゃんと文字が出力されるか試してみよう。
やわら、家中を探し、OpenBlockS(RJ-45 style)-Serialのケーブル(付属品)
を見つけ、つなげ、
そしてリナザウでは、
% jerm -b 9600 /dev/ttyUSB0 して待機。OpenBlockS(totoro)をリブート。
おおおお、メッセージが出てきた。ちゃんとつながってる。しかも
おまけ、OpenBlockSがブートするときのメッセージも手に入った。
こんなメッセージです。(かなり長い)
シャットダウンからブートアップまでです。しかし、login:のあと
打てない。これはどっちが悪い?

bash-2.05# jerm -b9600 /dev/ttyUSB0
Jerminal v0.8095  Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 candy
Type "Ctrl-M ~ ." to exit.
 ispeed 13 ospeed 13
 -IGNBRK -BRKINT -IGNPAR -PARMRK -INPCK -ISTRIP -INLCR -IGNCR -ICRNL -IXON -IXOFF -IXANY -IMAXBEL
 -OPOST +ONLCR -TABDLY
 cs8 -CSTOPB +CREAD -PARENB -PARODD +HUPCL +CLOCAL -CRTSCTS +ECHOKE +ECHOE -ECHO -ECHONL -ECHOPRT +ECHOCTL -ISIG -ICANON -IEXTEN
 -TOSTOP -FLUSHO -PENDIN -NOFLSH
INUnmounting remote filesystems...
Sending all pr[psw_ioctl] unblocked
ocesses the TERM[psw_ioctl] sig
 signal...
[psw_release] by pid 104
Sending all processes the KILL signal...
Deactivating swap partitions...
Saving random seed to a temporary file...
Saving the system time to hardware clock...
Remounting root filesystem read-only...
Unmounting local filesystems...
Flushing filesystem buffers...
Please stand by while rebooting...
flushing ide devices: hda 
Restarting system.



405GPr 1.2 ROM Monitor (5/25/02) OBS266 1.3

 --------------------- System Info ----------------------
 Processor         = 405GPr (New mode),   PVR: 50910951
 CPU speed         = 266 MHz
 PLB speed         = 133 MHz
 OPB speed         = 66 MHz
 EBC speed         = 66 MHz
 PCI Bus speed     = 33 MHz (Async)
 VCO speed         = 800 MHz
 Feedback Clock    = CPU
 Amount of SDRAM   = 64 MBytes 
 Internal PCI arbiter enabled
 --------------------------------------------------------

 --- Device Configuration ---
 Power-On Test Devices:
   000  Enabled   System Memory [RAM]
   002  Enabled   Ethernet      [ENET]
   003  Enabled   PCI Ethernet  [PCIENET]
 ----------------------------
 Boot Sources:
   001  Enabled   System FLASH  [FLASH]
   002  Enabled   Ethernet      [ENET]
                  LOCAL:  0.0.0.0
                  REMOTE: 255.255.255.255
                  MAC:    000A8501xxxx
   004  Enabled   Serial Port 1 [S1]
                  Baud = 9600
 ----------------------------
 Debugger: Disabled 
 ----------------------------
 -- Automatic Boot --
Booting from [FLASH] System FLASH ...

loaded at:     00500000 00BA2234
relocated to:  00400000 00AA2234
board data at: 00A9F15C 00A9F1A4
relocated to:  00405600 00405648
zimage at:     00405B3F 00509B9C
initrd at:     0050A000 00A9EE1F
avail ram:     00AA3000 04000000

Linux/PPC load: root=/dev/hda1
Uncompressing Linux...done.
Now booting the kernel
Linux version 2.4.26 (root@todo91) (gcc version 3.3.4) #3 Wed Jan 19 08:32:10 JST 2005
OpenBlockS port
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/hda1
Calibrating delay loop... 266.24 BogoMIPS
Memory: 56608k available (1700k kernel code, 636k data, 80k init, 0k highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
i2c-core.o: i2c core module version 2.6.1 (20010830)
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xef600300 (irq = 0) is a 16550A
ttyS01 at 0xef600400 (irq = 1) is a 16550A
HDLC line discipline: version $Revision: 3.7 $, maxframe=4096
N_HDLC line discipline registered.
X1226: I2C based RTC driver.
LARGEEEPROM: I2C based EEPROM driver.
Push switch driver v0.01
[psw_init] Push switch installed on interrupt 26
OBS_LED driver version 0.01
OBS_LED driver version 0.01
GPIO at 0xc5000700
RAMDISK driver initialized: 16 RAM disks of 90112K size 1024 blocksize
loop: loaded (max 8 devices)
emac: IBM OCP EMAC Ethernet driver, version 2.0
Maintained by Benjamin Herrenschmidt 
OBS_LED driver version 0.01
GPIO at 0xc5002700
OBS_LED driver version 0.01
GPIO at 0xc5004700
mal0: Initialized, 2 tx channels, 1 rx channels
eth0: IBM emac, MAC 00:0a:85:01:xx:xx
eth0: Found Generic MII PHY (0x00)
Linux Tulip driver version 0.9.15-pre12 (Aug 9, 2002)
tulip0:  MII transceiver #1 config 1000 status 782d advertising 01e1.
eth1: Davicom DM9102/DM9102A rev 64 at 0xfd00, 00:0A:85:01:xx:xx, IRQ 31.
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
HPT371: IDE controller at PCI slot 00:03.0
HPT371: chipset revision 2
HPT371: not 100% native mode: will probe irqs later
HPT37X: using 33MHz PCI clock
    ide0: BM-DMA at 0xfe08-0xfe0f, BIOS settings: hda:pio, hdb:pio
hda: SAMSUNG MP0402H, ATA DISK drive
blk: queue c02541d8, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0xffe8-0xffef,0xffe6 on irq 30
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 78242976 sectors (40060 MB) w/8192KiB Cache, CHS=4870/255/63, UDMA(100)
Partition check:
 hda: hda1 hda2 hda3 hda4
redwood: flash mapping: 800000 at ff800000
 Amd/Fujitsu Extended Query Table v1.3 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Creating 4 MTD partitions on "IBM Redwood":
0x00000000-0x00010000 : "OpenBlockS Configuration Data"
0x00010000-0x007c0000 : "OpenBlockS Boot Image"
0x007c0000-0x00800000 : "OpenBlockS OpenBIOS"
0x00000000-0x00800000 : "OpenBlockS All Flash"
rtc: unable to get misc minor
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
Linux video capture interface: v1.00
IBM On-chip iic (i2c) algorithm module 2002.30.04
IBM IIC driver v2.0
ibm-iic: using compatibility value for OPB freq, fix your board specific setup
X1226: found X1226 on IBM IIC
Serial EEPROM FOUND at 57
Serial EEPROM FOUND at 51
ibm-iic0: using standard (100 kHz) mode
OBS_LED driver version 0.01
GPIO at 0xc5814700
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
IPv4 over IPv4 tunneling driver
ip_conntrack version 2.1 (512 buckets, 4096 max) - 288 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
ipt_recent v0.3.1: Stephen Frost .  http://snowman.net/projects/ipt_recent/
arp_tables: (C) 2002 David S. Miller
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 5715k freed
VFS: Mounted root (ext2 filesystem).
VFS: Mounted root (ext2 filesystem) readonly.
Trying to move old root to /initrd ... failed
Unmounting old root
Trying to free ramdisk memory ... okay
[prepare_namespace] Executing flashcfg...
[prepare_namespace] Finished executing flashcfg
Freeing unused kernel memory: 80k init
INIT: version 2.85 booting
fsck 1.35 (28-Feb-2004)
/dev/hda1: clean, 38988/2011296 files, 278715/4016242 blocks (check after next mount)
/dev/hda3: clean, 862/1387200 files, 891522/2773220 blocks (check after next mount)
/dev/hda4: clean, 34869/1324512 files, 513486/2646708 blocks (check after next mount)
/dev/hda1 on / type ext2 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=4,mode=620)
/dev/hda3 on /ext1 type ext2 (rw)
/dev/hda4 on /home2 type ext2 (rw)
Adding Swap: 1373548k swap-space (priority -1)
INIT: Entering runlevel: 2
starting network
processing openblocks settings:
openblocks settings done.
hostname: totoro
configuring network interfaces: eth0 eth1.
adding interface aliases:
SIOCADDRT: No such device
SIOCADDRT: No such device
processing openblocks settings:
openblocks settings done.
starting pshd
starting system [psw_ioctl] PSWIOC_WAITPUSH pid 104
logger
 portmapstarting name server
Setting date via ntp.
 6 Jun 16:46:50 ntpdate[118]: no server suitable for synchronization found
.
.
creating runtime link editor directory cache.
clearing /tmp
updating motd.
standard daemons: update cron.
starting network daemons: ntpd sshd dhcpd inetd.
starting local daemons:.
starting OpenBlockS daemons: httpd:880.
starting runled
Wed Jun  6 16:46:54 2007 : Info: Starting - reading configuration files ...
 postfixpostfix/postfix-script: starting the Postfix mail system
Wed Jun  6 16:47:21 JST 2[psw_ioctl] unblocked
[psw_ioctl] sig
[psw_ioctl] PSWIOC_WAITPUSH pid 104

totoro login: