HD-LANV1 のローダ入れ替え


HD-LANV1 のカーネルソースが手に入ったので、 HD-LANV1 のローダも入れ替える。

目指せ、無線 LAN アクセスポイントつき NAS!

無修正ローダとの入れ替え

まずは、BUFFALO からのソースそのままでローダを入れ替えてみる。
もし動かなければ、HD-120LAN は死亡。

カーネルソースの展開

[root@SECO /root] tar zxvf linux-2.4.17_hd-lan-1.2.4.tar.gz
[root@SECO /root] cd linux-2.4.17_mvl21-sandpoint

セルフコンパイル環境へ変更

[root@SECO linux-2.4.17_mvl21-sandpoint] mv .hhl_cross_compile{,.orig}

make menuconfig

まずは、bootcode を作成するだけなので、 適当に .config を作る

setsum のいれかえ

arch/ppc/boot/utils/setsum/setsum を、たつやさん作成のものと入れ替える

make zImage

[root@SECO linux-2.4.17_mvl21-sandpoint] make zImage
	:
	:
ld -T /mnt/home/linkstation/kernel/HD-LAN/linux-2.4.17_mvl21-sandpoint/arch/ppc/vmlinux.lds -Ttext 0x00800000 -Tbss 0x009000
00 -o bootcode.tmp boot_head.o ../common/misc-common.o ../common/boot_misc-simple.o ../common/ns16550.o ../common/string.o .
./../kernel/melco_hwctl.o ../lib/zlib.a
objcopy -O elf32-powerpc -R .comment \
        bootcode.tmp bootcode
objcopy -I elf32-powerpc -O binary   bootcode bootcode.bin
rm -f bootcode.tmp
../utils/setsum/setsum ../../../../firminfo.txt ../images/vmlinux.gz -o ../images/kernimg.bin
mv zvmlinux ../images/zImage.sandpoint
rm ../images/vmlinux.gz
	:
	:

fl2 のバックアップ

気休めに、バックアップ
[root@SECO /root] cat /dev/fl2 > fl2.orig

ブートコードの入れ替え

[root@SECO sandpoint] cat bootcode.bin > /dev/fl2
あれ?あっという間に終わった。

リブート

覚悟を決め、リブートする。
******* Product Information *******
----------------------------------
Product Name: HD-LAN
          VER: 1.23
         Date: 2004/5/10 11:24:1
----------------------------------
Firmware check:done.

>>root=/dev/hda1
これが出た瞬間、ほっと胸をなでおろす。
続き
Now Loading...done.
Now Booting
Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
HWTYPE:None PLD Model
Linux version 2.4.17_mvl21-sandpoint (root@toda_dev.melcoinc.co.jp) (gcc version
 2.95.3 20010315 (release/MontaVista)) #857 2004年 5月 10日 月曜日 11:22:13 JST
MELCO Network Attached Storage Series
2002 MELCO INC.
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: 
OpenPIC Version 1.2 (1 CPUs and 139 IRQ sources) at 80040000
decrementer frequency = 98.304000 MHz 
rtc sec count 1091616549
Calibrating delay loop... 130.66 BogoMIPS
Memory: 56004k available (1280k kernel code, 504k data, 204k 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: 1024 (order: 1, 8192 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
Disabling the Out Of Memory Killer
Journalled Block Device driver loaded
pty: 256 Unix98 ptys configured
MELCO INC. RTC driver ver 1.00
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI en
abled
ttyS00 at 0x80004600 (irq = 138) is a 16550A
ttyS01 at 0x80004500 (irq = 137) is a 16550A
block: 128 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 25600K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
CMD680: IDE controller on PCI bus 00 dev 60
CMD680: chipset revision 2
CMD680: 100% native mode on irq 17
    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: WDC WD1200AB-00CBA1, ATA DISK drive
ide0 at 0xbffef8-0xbffeff,0xbffef6 on irq 17
hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=232581/16/63, UDMA(100)
Partition check:
 hda: hda1 hda2
loop: loaded (max 8 devices)
FLASHDISK:Initialized [TOSHIBA VT641FT] 
Linux Tulip driver version 0.9.15-pre9 (Nov 6, 2001)
tulip0:  MII transceiver #1 config 3100 status 7849 advertising 05e1.
eth0: ADMtek Comet rev 17 at 0xbfff00, 00:07:40:60:54:22, IRQ 16.
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 4096)
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: 6450k freed
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 204k init
INIT: version 2.78 booting
Activating swap...
Adding Swap: 262132k swap-space (priority -1)
Checking all file systems...
Parallelizing fsck version 1.19 (13-Jul-2000)
Setting kernel variables.
Mounting local filesystems...
mount: none already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
mount: you didn't specify a filesystem type for /dev/hda1
      kjournald starting.  Commit interval 5 seconds
 I will try typeEXT3 FS 2.4-0.9.17, 10 Jan 2002 on ide0(3,1),  ext3,ext2
internal journal
EXT3-fs: mounted filesystem with ordered data mode.
/dev/hda1 on /mnt type ext3 (rw)
Cleaning: /tmp /var/lock /var/run.
default Hostname: HD-LAN422
Previous Configuration longing: done
Converting configurations... 
done. (not converted)
Configuration network interface: lo eth0
Hostname: SECO
Checking share directory information: done.
Netatalk configration file generating...
Samba configration file generating...
Initializing random number generator... done.
Starting system log daemon: syslogd/etc/rc.d/rcS.d/S80syslog: line 56:   117 Ter
minated              start-stop-daemon --start --quiet --exec /sbin/syslogd -- $
SYSLOGD
 klogd.

/dev/hda:
 setting standby to 241 (30 minutes)
INIT: Entering runlevel: 2
Starting AP serv daemon:AP serv starting on eth0
Starting internet superserver: inetd.
Start services: thttpd
Starting periodic command scheduler: cron.
Starting AppleTalk services: (backgrounded)
Start services: smbd nmbd
Start services: ppc_uartd


MELCO INC. Link Station series HD-LAN

SECO login: 
無事立ち上がってきた。
ホッ
ハックの記録 → HD-LANV1 デュアルブート

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