玄箱HGのU-Boot化

既にDebian化しているので手順がちょいと変わるかなと思いつつ、U-Boot化。これでシリアルが正常か調べられるかも。
/mnt/shareにkernelimage-2.6.20-kuroHG-uImage.tgzu-boot-hg.serial.flash.binを用意。ここここを参考に以下実行。
ちなみにddするときはmtd1じゃなくてmtdblock1。ここでちょっとはまった。

# cd /dev
# ./MAKEDEV mtd
# cd /boot
# cp -p System.map System.map.orig
# tar zxvf /mnt/share/kernelimage-2.6.20-kuroHG-uImage.tgz
# diff System.map System.map.orig
# cd /mnt/share
# md5sum -c u-boot-hg.serial.flash.md5
# dd if=u-boot-hg.serial.flash.bin of=/dev/mtdblock1 bs=1k
# cmp u-boot-hg.serial.flash.bin /dev/mtdblock1
# reboot

ドキドキしながらシリアルの出力を確認。

U-Boot 1.1.4 LiSt 2.1.0 (Oct  8 2006 - 17:02:54) LinkStation HG / KuroBox HG

CPU:   MPC8245 Revision 1.4 at 262.144 MHz: 16 kB I-Cache 16 kB D-Cache
DRAM:  128 MB
FLASH:  4 MB
*** Warning - bad CRC, using default environment

        00  0b  10ec  8169  0200  ff
        00  0c  1095  0680  0101  ff
        00  0e  1033  0035  0c03  ff
        00  0e  1033  0035  0c03  ff
        00  0e  1033  00e0  0c03  ff
Net:   RTL8169#0
stdin :   serial
stdout:   serial
stderr:   serial
IDE:   Bus 0: OK
  Device 0: Model: HDT722525DLAT80 Firm: V44OA96A Ser#: VD241DT4E3PWXC
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
Boot in 01 seconds ('s' to stop)...
Loading 0:1:boot/vmlinux.UBoot

1319184 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.20-kuroboxHG
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1319120 Bytes =  1.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK


KERNELBASE=c0000000 (r6=7fff00 r7=7fff0e) r3=7ffec0 (r4=0 r5=0)
Linux version 2.6.20-kuroboxHG (hiroyuki@hg-lan) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Mon Feb 5 22:40:49 JST 2007
Early serial console at MMIO 0x80004600 (options '57600n8')
BUFFALO Network Attached Storage Series
(C) 2002-2005 BUFFALO INC.
Zone PFN ranges:
  DMA             0 ->    32768
  Normal      32768 ->    32768
early_node_map[1] active PFN ranges
    0:        0 ->    32768
Built 1 zonelists.  Total pages: 32512
Kernel command line: root=/dev/hda1
OpenPIC Version 1.2 (1 CPUs and 11 IRQ sources) at 80040000
PID hash table entries: 512 (order: 9, 2048 bytes)
decrementer frequency = 32.522240 MHz
Console: colour dummy device 80x25

おっけ〜。でも's'が効かなかった。あれれ。
ということで、電源ボタンによるEMモード起動。あれ〜。なんかうまく動かない。
と、Flashカーネルが起動して例の謎プロンプトが出た。

loader.o kernel loader 2.4.17_mvl21
choose operation (timeout 4[s])
 1:shell  2:Flash Kernel  other:Hdd /boot Kernel  ? 

何気に2とか押したら、入力できたっ。あれれれぇ〜?とりあえず動いてはいる、ということで。