LS-GL:シリアルコンソール


HDD の交換に成功したので、次はシリアルコンソールに挑戦する。

ピンアサイン

LS-GL のマザーボードを良くみると、 J1 のところに
1:TXD
2:RXD
3:VCC
4:GND
と、シルク印刷がしてあった。
J1 がシリアルに間違いないであろう。

未実装のチップ抵抗

ところが、 その回りには未実装のチップ抵抗のパターンがたくさんあり、 白リンクステーションシリーズの例からいうと いずれかをショートしなければならないはず。

コネクタの取り付け

とりあえず、J1 にコネクタだけつけてみた。

ダメモトで起動

白リンクステーションシリーズ用の 9-KE 改コネクタを接続、

TeraTermPro を起動、 LS-GL の電源を入れた。

何か出たぞ.

文字化けは通信パラメータがくい違っているからか。

通信パラメータ

試行錯誤の結果、
Baud rate115200
Data8 bit
ParityNone
Stop1 bit
Flow controlnone
で、いっけん正常に表示されるようになった。

ブート時の出力



=== BUFFALO LS-GL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_GL LE 

U-Boot 1.1.1 (Jun 12 2006 - 10:32:00) Marvell version: 1.10.8

DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB 
[256kB@fffc0000] [0kB@f8000000] ## Unknown FLASH at f8000000: Size = 0x00000000 = 0 MB
Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz 
Orion 1 streaming disabled 
SysClock = 200Mhz , TClock = 166Mhz 


USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]

Marvell Serial ATA Adapter
Intergrated Sata device found
  Device 1: OK
Model: QUANTUM FIREBALLP AS20.5                 Firm: A1Y.1300 Ser#: 892034275708        
            Type: Hard Disk
            Capacity: 19595.9 MB = 19.1 GB (40132503 x 512)

hit any key to switch tftp boot.
Hit any key to stop autoboot:  0

Reset IDE: 
Marvell Serial ATA Adapter
Intergrated Sata device found
  Device 1: OK
Model: QUANTUM FIREBALLP AS20.5                 Firm: A1Y.1300 Ser#: 892034275708        
            Type: Hard Disk
            Capacity: 19595.9 MB = 19.1 GB (40132503 x 512)

Using device ide1, partition 1

Loading from block device ide device 1, partition 1: Name: hdb1
  Type: U-Boot  File:/uImage.buffalo

1790920 bytes read
Using device ide1, partition 1

Loading from block device ide device 1, partition 1: Name: hdb1
  Type: U-Boot  File:/initrd.buffalo

4390003 bytes read
<>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.12.6-arm1
   Created:      2006-06-11   5:33:30 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1790856 Bytes =  1.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2006-06-11   5:51:49 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4389939 Bytes =  4.2 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.01
CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSGL ---
Uncompressing Linux........................................................................................................
............ done, booting the kernel.
Linux version 2.6.12.6-arm1 (root@develop) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #75 Sun Jun 11 14:33:2
4 JST 2006
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 200000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3 

Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.01
PID hash table entries: 1024 (order: 10, 16384 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 110592KB available (3066K code, 513K data, 112K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 15360K
NET: Registered protocol family 16
FLASH boardId = 12
Flash bankwidth 1, base ff800000, size 400000
BUFFALO LS_GL FLASH size 4096[KB]

  Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_GL 

 Detected Tclk 166664740 and SysClk 200000000 
Marvell USB EHCI Host controller #0: c1702bc0
Marvell USB EHCI Host controller #1: c1702a40
pexBarOverlapDetect: winNum 2 overlap current 0
mvPexInit:Warning :Bar 2 size is illigal
it will be disabled
please check Pex and CPU windows configuration
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
use IDMA acceleration in copy to/from user buffers. used channels 2 and 3 
Done. 
cesadev_init(c0011304)
mvCesaInit: sessions=640, queue=32, pSram=f0000000
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
SGI XFS with no debug enabled
Initializing Cryptographic API
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 3 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Marvell Gigabit Ethernet Driver 'egiga':
  o Ethernet descriptors in DRAM
  o DRAM SW cache-coherency
  o Checksum offload enabled
  o Loading network interface ** egiga_init_module (0)
'eth0' 
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
  Vendor: QUANTUM   Model: FIREBALLP AS20.5  Rev: A1Y.
  Type:   Direct-Access                      ANSI SCSI revision: 03
SCSI device sda: 40132503 512-byte hdwr sectors (20548 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 40132503 512-byte hdwr sectors (20548 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0
physmap flash device: 400000 at ff800000
>jedec_probe
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
ehci_platform ehci_platform.4523: EHCI Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: park 0
ehci_platform ehci_platform.4523: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: park 0
ehci_platform ehci_platform.16781: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v2.2
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON V2 (C) BUFFALO INC. V.1.00 installed.
NET: Registered protocol family 2
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
---- in linuxrc ---
Mon Aug  7 20:39:25 JST 2006
err: >AnalyzeRecvPacket:This is invalid RespCode.(code=244)
CheckDevices
linuxrc:choose operation (timeout 4[s])
 1:RamRoot other:HddRoot  ? -HddRoot-
XFS mounting filesystem sda2
PRODUCTID=0x00000009 PRODUCTID=0x00000009
KERNEL:2006/6/11 14:33:21
HDD:2006/6/15 10:15:16
-- CopyFromInitrdToHdd --
cp: /etc/init.d/develop.sh: No such file or directory
checking local disk....
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
/dev/ls_disk1_1: clean, 17/49152 files, 70455/196592 blocks
done
XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... failed
Unmounting old root
Trying to free ramdisk memory ... okay
Freeing init memory: 112K
init started:  BusyBox v1.1.1 (2006.06.11-04:13+0000) multi-call binary
Starting pid 268, console /dev/ttyS0: '/etc/init.d/rcS'
--- rcStart (hddroot) ---
Mon Aug  7 20:39:31 JST 2006
** step1 **
=====  exec:checkroot.sh  =====
mount: /dev/pts already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
mkdir: Cannot create directory `/var/lock': File exists
ln: /var/spool/cron/cron: File exists
rm: /var/lock/perfmon: is a directory
rm: /var/lock/printing: is a directory
rm: /var/lock/subsys: is a directory
Adding 125928k swap on /dev/ls_disk1_5.  Priority:-1 extents:1
=====  exec:create_devlink.sh  =====
=====  exec:procps.sh  =====
=====  exec:devpts.sh  =====
=====  exec:sethostname.sh  =====
/etc/init.d/sethostname.sh: line 13: LS-GL: command not found
configure files from Buffalo parameters.
=====  exec:restore_config.sh  =====
Update configuration files
Restore previous configuration files
** step2 **
=====  exec:networking.sh  =====
/etc/init.d/networking.sh: line 13: LS-GL: command not found
create network files..
IP=[dhcp], netmask=[], dgw=[], dns1=[], dns2=[]
killall: dhcpcd: no process killed
route: SIOC[ADD|DEL]RT: No such process
Configuration network interface: lo eth0
requesting DHCP  tout=30[s]
eth0: link down
eth0: link up<5>, full duplex<5>, speed 100 Mbps<5>
/etc/dhcpc/dhcpcd.exe ::: /etc/dhcpc/dhcpcd-eth0.info up
dhcpcd.exe: interface eth0 has been configured with old IP=192.168.1.38
/etc/init.d/sethostname.sh: line 13: LS-GL: command not found
configure files from Buffalo parameters.
=====  exec:syslog.sh  =====
Starting system logger: 
Starting kernel logger: 
=====  exec:inetd.sh  =====
Starting inetd:=====  exec:kernelmon.sh  =====
Starting kernelmon:=====  exec:miconmon.sh  =====
miconmon 1.00b3 started (Builddate May 27 2006 23:04:05)
=====  exec:mount_share.sh  =====
/usr/local/bin/kernelmon_exec.sh: line 13: LS-GL: command not found
XFS mounting filesystem sda6
share
=====  exec:diskmon.sh  =====
diskmon ver.1.01
f_type=0x58465342
total_size=19704823808 free_byes=19704496128
=====  exec:errormon.sh  =====
Starting errormon:set_fan_speed_nonlinear>now_temperature=37[deg]
now_fanspeed=stop
set_fan_speed_nonlinear>setted_fanspeed=stop
errormon ver.1.00b4(BuildDate Jun  7 2006 13:57:11) Started
/usr/local/bin/kernelmon_exec.sh: line 13: LS-GL: command not found
=====  exec:hotplug.sh  =====
ls: /proc/scsi/usb-storage/: No such file or directory
=====  exec:ups  =====
** step3 **
=====  exec:micon_setup.sh  =====
=====  exec:atalk.sh  =====
/etc/init.d/atalk.sh: line 13: LS-GL: command not found
atalk is OFF
=====  exec:ftpd.sh  =====
/etc/init.d/ftpd.sh: line 13: LS-GL: command not found
ftp is OFF
=====  exec:httpd.sh  =====
start
Starting HTTPD services: /usr/local/apache/bin/apachectl start: httpd started

=====  exec:smb.sh  =====
/etc/init.d/smb.sh: line 13: LS-GL: command not found
Starting SMB services: configure samba
optarg:samba
LoadConfFileString:key=[ad_dns] not found in /etc/melco/info.
file:/etc/samba/smb.conf
file:/etc/pam_smb.conf

Starting NMB services: 
=====  exec:clientUtil_servd.sh  =====
Starting clientUtil_server:starting on eth0
=====  exec:lsprcvd.sh  =====
Starting lsprcvd:=====  exec:daemonwatch.sh  =====
Starting daemonwatch:watch list file : /etc/daemonwatch.list
=====  exec:cron.sh  =====
Start services: crond=====  exec:logchkd.sh  =====
Starting logchkd:logchkd ver.1.00(Jun 11 2006) started
=====  exec:bootcomplete.sh  =====
Starting pid 659, console /dev/ttyS0: '/sbin/getty'

BUFFALO INC. LinkStation series LS-GL(IESADA)
UDE login: 
TeraTerm への受信はうまく動いているようだ。

ログイン

TeraTerm からの送信ができているのか確認するため、 ログインしてみる。
BUFFALO INC. LinkStation series LS-GL(IESADA)
UDE login: root
Password: 
root@UDE:~# 
送信も問題なし。

ということは、チップ抵抗のショートは全く必要なし。

繰り返しになるが、 ハックよけの形跡が全く見受けられない。
ピンアサインがシルク印刷までしてある。
ハックよけどころか、「ハック歓迎」に改心したかのよう。 ちょっと拍子抜け。おもしろくない(憤)

シャットダウン時の出力

電源スイッチを押してシャットダウンする。
BUFFALO INC. LinkStation series LS-GL(IESADA)
UDE login: Starting pid 672, console /dev/ttyS0: '/etc/init.d/rcDown'
--- rcDown ---
=====  exec:shutdown_start.sh  =====
called shutdown_start /etc/init.d/shutdown_start.sh
=====  exec:shutdown_proc.sh  =====
Stop logchkd:done.
Stop services: crondStop daemonwatch:done.
/etc/init.d/atalk.sh: line 13: LS-GL: command not found
Stop servecies: atalkd afpd
/sbin/hotplug [module]
/sbin/hotplug [module]
/sbin/hotplug [module]
Can't unregister UDE:Workstation@*
Can't unregister UDE:netatalk@*
killall: atalkd: no process killed
killall: afpd: no process killed
killall: papd: no process killed
/sbin/hotplug [module]
ERROR: Module p8022 does not exist in /proc/modules
/sbin/hotplug [module]
/sbin/hotplug [module]
Stop lsprcvd:/etc/init.d/shutdown_proc.sh: line 8: /etc/init.d/clientUtil_server.sh: No such file or directory
/etc/init.d/ftpd.sh: line 13: LS-GL: command not found
Shutting down FTPD services: killall: proftpd: no process killed


stop
Shutting down HTTPD services: /usr/local/apache/bin/apachectl stop: httpd stopped

/etc/init.d/smb.sh: line 13: LS-GL: command not found
Shutting down SMB services: 
Shutting down NMB services: 
Shutting down WINBIND services: killall: winbindd: no process killed

Shutting down PAMSMBD services: killall: pamsmbd: no process killed

/etc/init.d/networking.sh: line 13: LS-GL: command not found
Deconfiguration network interface: lo eth0
Stop inetd:done.
Stop kernelmon:done.
Stop errormon:done.
Save current configuration files
tar: Removing leading '/' from member names
tar: Removing leading '/' from member names
Stop logchkd:done.
=====  exec:umount_disk.sh  =====
killing all servers..
/etc/init.d/smb.sh: line 13: LS-GL: command not found
Shutting down SMB services: 
Shutting down NMB services: 
Shutting down WINBIND services: killall: winbindd: no process killed

Shutting down PAMSMBD services: killall: pamsmbd: no process killed

/etc/init.d/ftpd.sh: line 13: LS-GL: command not found
Shutting down FTPD services: killall: proftpd: no process killed


/etc/init.d/atalk.sh: line 13: LS-GL: command not found
Stop servecies: atalkd afpd
/sbin/hotplug [module]
/sbin/hotplug [module]
/sbin/hotplug [module]
Can't unregister UDE:Workstation@*
Can't unregister UDE:netatalk@*
killall: atalkd: no process killed
killall: afpd: no process killed
killall: papd: no process killed
/sbin/hotplug [module]
ERROR: Module p8022 does not exist in /proc/modules
/sbin/hotplug [module]
/sbin/hotplug [module]
killing all daemons
Stop daemonwatch:done.
killall: rsync: no process killed
stop
Shutting down HTTPD services: /usr/local/apache/bin/apachectl stop: httpd (no pid file) not running

killall: sshd: no process killed
\n==== unmounting all disks ====
umount2: Invalid argument
umount: /mnt/usbdisk1: Illegal seek
umount2: Invalid argument
umount: /mnt/usbdisk2: not mounted
umount: /dev/usbdisk1_1: not found
umount: /dev/usbdisk2_1: not found
=====  exec:sendsigs.sh  =====
Shutting down kernel logger: 
Shutting down system logger: 
Starting pid 815, console /dev/ttyS0: '/bin/umount'
The system is going down NOW !!
Sending SIGTERM toSending SIGKILL to all processes.
The system is halted.
Synchronizing SCSI cache for disk sda: 
System halted.
>miconCntl_PowerOff
>miconCntl_ShutdownWait



LS-GL:S-ATA アダプタの電源
ハックの記録
LinkStation/玄箱 をハックしよう

LS-GL:EM モード

Copyright (C) 2006 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市