LS-HGLAN V2

IDE chip が ITE8211 に変更された後期型 LS-HGLAN。フラッシュROM に ST M29DW324DB が使用されている。TopJTAG Flash Programmerで読み込みはできたが、消去ができず、書き込みができなかった。

#ref(): File not found: "M29DW324DB-DT.pdf" at page "LinkStation/TeraStation/玄箱/LS-HGLAN V2"

デフォルトローダ

背面のSWを押しながら電源投入したときの起動メッセージ。

******* Product Information *******
----------------------------------
Product Name: HD-HGLAN(IEMITSU)
          VER: 2.08
         Date: 2006/2/9 12:0:6
----------------------------------
Firmware check: OK.
zimage_start=FFC0006C, zimage_size=000D0FA4

Linux/PPC load: root=/dev/hda1
Uncompressing Linux...done.
Now booting the kernel
KERNELBASE=c0000000 r6=900030 r7=90003e
cmd_line=root=/dev/hda1
--- cmd=root=/dev/ram0 
Memory BAT mapping: BAT2=128Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.20_mvl31-ppc_linkstation (root@sugai-linux) (gcc version 2.95.3 20010315 (release/MontaVista)) #1 Thu, 09 Feb 2006 11:56:26 +0900
BUFFALO Network Attached Storage Series
(C) 2002-2005 BUFFALO INC.
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram0 
OpenPIC Version 1.2 (1 CPUs and 10 IRQ sources) at 80040000
decrementer frequency = 32.768000 MHz 
Calibrating delay loop... 174.48 BogoMIPS
Memory: 125420k available (1448k kernel code, 568k data, 76k init, 0k highmem)
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 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
LSP Revision 1
Starting kswapd
Disabling the Out Of Memory Killer
Journalled Block Device driver loaded
pty: 256 Unix98 ptys configured
BUFFALO INC. RTC driver ver 1.00
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x80004600 (irq = 25) is a ST16650
ttyS01 at 0x80004500 (irq = 24) is a ST16650
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
IT8212: IDE controller on PCI bus 00 dev 60
IT8212: chipset revision 19
IT8212: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xbffed0-0xbffed7, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xbffed8-0xbffedf, BIOS settings: hdc:pio, hdd:pio
hda: ST3120814A, ATA DISK drive
ide0 at 0xbffef8-0xbffeff,0xbffef6 on irq 17
blk: queue c0206038, I/O limit 4095Mb (mask 0xffffffff)
hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=14593/255/63, UDMA(100)
Partition check:
 hda: hda1 hda2 hda3
RAMDISK driver initialized: 16 RAM disks of 15000K size 1024 blocksize
eth0: RTL8169s/8110s Gigabit Ethernet driver 2.2+1 at 0xc9000f00, 00:0d:0b:xx:xx:xx, IRQ 16
eth0: Auto-negotiation Enabled.
eth0: 1000Mbps Full-duplex operation.
SCSI subsystem driver Revision: 1.00
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
physmap flash device: 400000 at ffc00000
Search for id:(20 20) interleave(1) type(1)
Search for id:(20 20) interleave(1) type(1)
Search for id:(00 00) interleave(1) type(1)
Search for id:(20 5d) interleave(1) type(2)
Found: ST M29W324DB
linkstation_flash: Found 1 x16 devices at 0x0 in 8-bit mode
number of JEDEC chips: 1
Using physmap partition definition
Creating 5 MTD partitions on "linkstation_flash":
0x00000000-0x00300000 : "mtd0"
0x00300000-0x00370000 : "mtd1"
0x00370000-0x00380000 : "mtd2"
0x00380000-0x00400000 : "mtd3"
0x00000000-0x00400000 : "mtd4"
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
ehci_hcd 00:0e.2: PCI device 1033:00e0
ehci_hcd 00:0e.2: irq 19, pci mem c9002f00
usb.c: new USB bus registered, assigned bus number 1
PCI: 00:0e.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, BUFFALO:it must be zero for PPC8241/8245
ehci_hcd 00:0e.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 5 ports detected
usb-ohci.c: USB OHCI at membase 0xc9004000, IRQ 19
usb-ohci.c: usb-00:0e.0, PCI device 1033:0035
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 3 ports detected
usb-ohci.c: USB OHCI at membase 0xc9006000, IRQ 19
usb-ohci.c: usb-00:0e.1, PCI device 1033:0035
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: AppleTalk 0.18a for Linux NET4.0
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 2014k freed
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 76k init
kmod: failed to exec /sbin/modprobe -s -k char-major-4, errno = 2
INIT: version 2.78 booting
EXT2-fs warning: checktime reached, running e2fsck is recommended
[: 0: unexpected operator
Mounting local filesystems...
none on /dev/pts type devpts (rw,gid=5,mode=20)
Cleaning: /tmp .
Configuration network interface: lo eth0
Starting system log daemon: syslogd klogd.
INIT: Entering runlevel: 2
Starting AP serv daemon:AP serv starting on eth0
Starting internet superserver: inetd.
Start services: ppc_uartd


BUFFALO INC. Link Station series HD-HGLAN (IEMITSU)

HD-HGLAN-EM login: root
Password: 

EM mode

なんと EMモードの root のパスワードはあれと一緒だった?(要検証)

U-Bootのインストール

M29DW324DB をサポートするフリーの JTAG ツールを見つけられなかったので、直接 U-Boot をインストールする。しかし、いきなり書き込むのは危険なので、U-boot bootloader - NAS-Central Buffalo - The Linkstation Wikiの手順にしたがって、RAM版→ROM版の順にテストしながらインストールする。

準備

RAM版は loader.o を使用して起動するので、フラッシュに内蔵されたカーネルのバージョンに対応する loader.o が必要。

uloader

$ cd workdir
$ wget http://www.linuxnotincluded.pwp.blueyonder.co.uk/linkstation/downloads/uloader-2.4.20.tar.gz
$ tar zxvf uloader-2.4.20.tar.gz
$ ls -al uloader-2.4.20
合計 40
drwxr-xr-x 2 itou-r itou-r 4096 2006-09-03 00:57 .
drwxr-xr-x 3 itou-r itou-r 4096 2010-05-18 14:25 ..
-rw-r--r-- 1 itou-r itou-r 1827 2006-08-26 22:06 Makefile
-rw-r--r-- 1 itou-r itou-r 2139 2005-01-09 21:24 README.loader
-rwxr-xr-x 1 itou-r itou-r   92 2006-09-03 00:57 u-boot-load-hg.sh
-rw-r--r-- 1 itou-r itou-r 4561 2006-08-26 22:07 uloader.o
-rw-r--r-- 1 itou-r itou-r 2930 2006-08-19 07:11 uloader_boot.S
-rw-r--r-- 1 itou-r itou-r 5160 2006-08-26 22:07 uloader_mod.c

起動用のスクリプト u-boot-load-hg.sh では、loader.o や RAM版 U-Boot の u-boot-hg.ram.bin が /mnt/share に存在するようになっているので、loader.o を HD-HGLAN V2 の起動用HDDの /mnt/share にコピーしておく。

rootのパスワード

Buffalo謹製カーネルでブートした後に、u-boot-load-hg.sh を起動して U-Boot を動かすので、root 権限でログインできなければいけない。今回はシリアルコンソールを使ったので、telnet等をインストールする必要はなく、単に /etc/passwd の root のパスワードを消去した。

RAM版

Debian Lenny上 でセルフコンパイルしたバイナリは FLASH: のところでハングアップしてしまったので、nas-central.org で公開されているコンパイル済みのバイナリを使用した。
u-boot-hg.ram.bin をダウンロードして、/mnt/share/ に配置する。

$ cd /hogehoge/share
$ wget http://downloads.buffalo.nas-central.org/LSHG_PPC/Bootloader/Uboot/Precompiled/u-boot-hg.ram.bin

Buffalo謹製カーネルでブートした後に、u-boot-load-hg.sh を実行する。

# cd /mnt/share
# ./u-boot-load-hg.sh

U-Boot がメモリに読み込まれ、U-Boot が起動してくる。初期状態のコンソールは netconsole であるが、NIC の初期化のところまではシリアルコンソールにも表示される。さらにシリアルコンソールを使用したい場合は、電源用 LED がゆっくりと点滅している時に電源スイッチを押して、LEDが暗くなった後に点灯するまで押し続けて、離す。その後、背面のリセットスイッチを2回押すと、シリアルコンソールに '=>' というプロンプトが表示される。

この状態で、stin, stdout, stderr の3つの環境変数の値を serial に変更して、saveenv すれば、次回からはシリアルコンソールが標準コンソールになる。

flinfo

=> flinfo

Bank # 1: Flash chip: STMICRO M29W324DB

CFI Query Results:
Primary Vendor Command Set: 0x0002 (AMD/Fujitsu Standard)
Primary Algorithm Table at 0x0040
Alternate Vendor Command Set: 0x0000 (None)
No Alternate Algorithm Table
Vcc Min.: 2.7 V
Vcc Max.: 3.6 V
Vpp Min.: 11.5 V
Vpp Max.: 12.5 V
Typical byte/word write timeout: 16 us
Maximum byte/word write timeout: 256 us
Full buffer write not supported
Typical block erase timeout: 1024 ms
Maximum block erase timeout: 8192 ms
Chip erase not supported
Device size: 0x400000 bytes (4 MiB)
Flash Device Interface description: 0x0002
  - x8 / x16 via BYTE# with asynchronous interface
Max. bytes in buffer write: 1
Number of Erase Block Regions: 2

Actual values used by U-Boot:
Word   write timeout:      2 ms
Buffer write timeout:      2 ms
Sector erase timeout:   8192 ms

Size: 4 MiB in 71 Sectors
  Sector Start Addresses:
    FFC00000 (RO) FFC02000 (RO) FFC04000 (RO) FFC06000 (RO) FFC08000 (RO)
    FFC0A000 (RO) FFC0C000 (RO) FFC0E000 (RO) FFC10000 (RO) FFC20000 (RO)
    FFC30000 (RO) FFC40000 (RO) FFC50000 (RO) FFC60000 (RO) FFC70000 (RO)
    FFC80000 (RO) FFC90000 (RO) FFCA0000 (RO) FFCB0000 (RO) FFCC0000 (RO)
    FFCD0000 (RO) FFCE0000 (RO) FFCF0000 (RO) FFD00000 (RO) FFD10000 (RO)
    FFD20000 (RO) FFD30000 (RO) FFD40000 (RO) FFD50000 (RO) FFD60000 (RO)
    FFD70000 (RO) FFD80000 (RO) FFD90000 (RO) FFDA0000 (RO) FFDB0000 (RO)
    FFDC0000 (RO) FFDD0000 (RO) FFDE0000 (RO) FFDF0000 (RO) FFE00000 (RO)
    FFE10000 (RO) FFE20000 (RO) FFE30000 (RO) FFE40000 (RO) FFE50000 (RO)
    FFE60000 (RO) FFE70000 (RO) FFE80000 (RO) FFE90000 (RO) FFEA0000 (RO)
    FFEB0000 (RO) FFEC0000 (RO) FFED0000 (RO) FFEE0000 (RO) FFEF0000 (RO)
    FFF00000 (RO) FFF10000 (RO) FFF20000 (RO) FFF30000 (RO) FFF40000 (RO)
    FFF50000 (RO) FFF60000 (RO) FFF70000 (RO) FFF80000 (RO) FFF90000 (RO)
    FFFA0000 (RO) FFFB0000 (RO) FFFC0000 (RO) FFFD0000 (RO) FFFE0000 (RO)
    FFFF0000 (RO)

環境変数

標準コンソールをシリアルコンソールに変更後

=> printenv
bootargs=root=/dev/hda1
bootcmd=run bootcmd1
nfsboot=bootp;run nfsargs;bootm
bootdelay=10
baudrate=57600
autoload=no
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
ldaddr=800000
hdpart=0:1
hdfile=boot/vmlinux.UBoot
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile}
boothd=setenv bootargs root=/dev/hda1;bootm ${ldaddr}
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm ffc00000
emboot=setenv bootargs root=/dev/ram0;bootm ffc00000
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
bootretry=30
bootcmd1=run hdboot;run flboot
bootcmd2=run flboot
bootcmd3=run emboot
writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4
writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4
ubpart=0:3
ubfile=share/u-boot/u-boot-hg.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=fff00000
ubeaddr=fff2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=RTL8169#0
stdin=serial
stdout=serial
stderr=serial

ROM版

RAM版同様、nas-central.org で公開されているコンパイル済みのバイナリを使用した。

$ cd /hogehoge/mnt/share
$ mkdir u-boot
$ wget http://downloads.buffalo.nas-central.org/LSHG_PPC/Bootloader/Uboot/Precompiled/u-boot-lsppchg-flash-1.2.0-r2.bin
$ mv u-boot-lsppchg-flash-1.2.0-r2.bin u-boot-hg.flash.bin

RAM版 U-Boot を起動して、run upgrade でフラッシュROMを書き換える。デフォでは、/dev/hda3 が /mnt に割り当てられているので、パーティション構成が異なる場合は、U-Boot の環境変数 ubpart を変更しておくこと。


トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-05-21 (金) 19:09:11 (112d)