バージョン偽装(2)

LS-LGL

以前EABI の debootstrup を動作させるために Linux 2.6.12 のカーネルバージョンを 2.6.23 に偽装したカーネルを 作ったが、2.6.12 のままで起動してきたり、 起動しなかったりと、シリアルコンソールなしではお手上げ状態であった。

ようやく、シリアルコンソールがついたので、再チャレンジする。

再度挑戦

失敗したときの HDD を接続して起動してみた。
Bootstrap 02.09
 **Small NAS Series**
 ** LOADER **
 ** Buffalo BOARD: MVISAH -xx Hassi Board LE
 ** U-boot Version 1.02L-1.00
 ** Build Date Jun 11 2007-11:39:48

U-Boot 1.1.4 (Jun 11 2007 - 11:39:53) Marvell version: 2.2.4-TINY-NQ

U-Boot code: 00200000 -> 0023EE00  BSS: -> 0024A420

Soc: 88F6082 A1 (DDR1)
CPU running @ 333Mhz
SysClock = 166Mhz , TClock = 133Mhz

DRAM CS[0] base 0x00000000   size   8MB
DRAM CS[1] base 0x01000000   size   8MB
DRAM Total size  16MB
[256kB@f8100000] Flash: 256 kB
Addresses 4M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (4M - 3M): Done

CPU : ARM926 (Rev 0)
misc_init_r_env u-boot stop condition :MagicKey =(67, 24, 58, 2, 92, 113, 0)
misc_init_r_env > fHddBootWaitEnabled

Please Press HDD power button to continue ...

USB 0: device mode
DDR SDRAM Pads Driving Nch (Manu) = c
DDR SDRAM Pads Driving Pch (Manu) = c
DDR SDRAM  Drive Strength   0-3   = 3
DDR SDRAM Pads Driving Nch (Auto) = c
DDR SDRAM Pads Driving Pch (Auto) = c
Using 88E1112 phy

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: ST310212A                                Firm: 3.02     Ser#: 7EG28CA3
            Type: Hard Disk
            Capacity: 9768.3 MB = 9.5 GB (20005650 x 512)

Net:   egiga0 [PRIME], egiga1
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0

1284112 bytes read

1486692 bytes read
## Booting image at 01200000 ...
   Image Name:   Linux-2.6.23.fake_2.6.12.6-arm1
   Created:      2008-01-11  13:15:40 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1284048 Bytes =  1.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 013fffc0 ...
   Image Name:   initrd
   Created:      2007-12-27  13:07:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1486628 Bytes =  1.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSLGL ---
Uncompressing Linux.................................................................................... decompress done, booting the kernel.
Linux version 2.6.23.fake_2.6.12.6-arm1 (yasunari@junk) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #1 Fri Jan 11 22:15:20 JST 2008
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 1, 32 byte lines, 512 sets
CPU0: D cache: 16384 bytes, associativity 1, 32 byte lines, 512 sets
Machine: Feroceon
Using UBoot passing parameters structure
Sys Clk = 166666667, Tclk = 133333333
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x01400000,4M panic=5 BOOTVER=1.02L
PID hash table entries: 128 (order: 7, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 8MB 8MB 0MB 0MB = 16MB total
Memory: 9416KB available (2186K code, 361K data, 96K 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: 4096K
NET: Registered protocol family 16

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size  16MB
SDRAM_CS1 ....base 01000000, size  16MB
PEX0_MEM ....base e0000000, size 128MB
PEX0_IO ....base f2000000, size   1MB
INTER_REGS ....base f1000000, size   1MB
NFLASH_CS ....base f9000000, size   2MB
MFLASH_CS ....base f8100000, size 256KB
SPI_CS ....base fa000000, size   8MB
BOOT_ROM_CS ....base fc000000, size   1MB
DEV_BOOTCS ....base fc000000, size   1MB
CRYPT_ENG ....base f0000000, size  64KB
 mv_mtd_initialize Error : Unknown board

  Marvell Development Board (LSP Version 2.1.10_TG)-- RD-88F6082-DAS-PLUS  Soc: MV88F6082 Rev 1

 Detected Tclk 133333333 and SysClk 166666667
Marvell USB EHCI Gadget controller #0: c02efbc0
mvPexBarSet: ERR. Target 2 window invalid
mvPexInit: ERR. mvPexBarSet 2 failed
pci_init:Error calling mvPciIfInit for pciIf 0
IO Request resource failed - Pci If 0
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
inotify device minor=63
SGI XFS with no debug enabled
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
io scheduler noop registered
RAMDISK driver initialized: 3 RAM disks of 5120K 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 Marvell ethtool proc enabled
  o Rx desc: 64
  o Tx desc: 128
  o Loading network interface 'eth0' 'eth1'
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
  Vendor: Seagate   Model: ST310212A         Rev: 3.02
  Type:   Direct-Access                      ANSI SCSI revision: 03
SCSI device sda: 20005650 512-byte hdwr sectors (10243 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 20005650 512-byte hdwr sectors (10243 MB)
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
physmap flash device: 40000 at f8100000
Marvell Flash Detected @ 0xf8100000, 256KB Main region (64sec x 4KB), 2KB Information region
mice: PS/2 mouse device common for all mice
mvGppValueSet: Err. An attempt to set output value to GPP 3 in input mode.
Buffalo Platform Linux Driver(Light) (C) BUFFALO INC. Ver.0.01 installed.
Kernel message queue controll (C) BUFFALO INC. Ver.1.00 installed.
Kernel event for procfs (C) BUFFALO INC. Ver.1.00 installed.
Buffalo CPU Inerupts Driver (C) BUFFALO INC. Ver.0.01 alpha1 installed.
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
---- in linuxrc ---

===== Starting CheckDevices =====
===== Checking RTC...[Success]
[Finished]

linuxrc:choose operation (timeout 4[s])
 1:RamRoot other:HddRoot  ? -HddRoot-
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda2
Starting XFS recovery on filesystem: sda2 (dev: sda2)
Ending XFS recovery on filesystem: sda2 (dev: sda2)
PRODUCTID=0x0000000B PRODUCTID=0x0000000B
KERNEL:2008/1/11 22:10:26
HDD:2008/11/13 11:16:18
KERNEL:2007/11/13 11:16:14
HDD:2008/11/13 11:16:18
-- CopyFromInitrdToHdd --
........Finish

checking local disk....
fsck 1.38 (30-Jun-2005)
/dev/disk1_1 has gone 41315 days without being checked, check forced.
/dev/disk1_1: 23/250368 files (4.3% non-contiguous), 19268/500220 blocks
fsck 1.38 (30-Jun-2005)
fsck.ext2: while trying to open /dev/disk1_2
/dev/disk1_2:
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

fsck.ext2:
done
-- linuxrc finished. --

XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 96K
init started:  BusyBox v1.1.1 (2007.11.12-13:48+0000) multi-call binary
Starting pid 344, console /dev/ttyS0: '/etc/init.d/rcS'
--- rcStart (hddroot) ---
===== Starting MountSystemFolders =====
[Success]

WARNING: Couldn't open directory /lib/modules/2.6.23.fake_2.6.12.6-arm1: No such file or directory
FATAL: Could not open /lib/modules/2.6.23.fake_2.6.12.6-arm1/modules.dep.temp for writing: No such file or directory
===== Starting FreeRamdisk.sh =====
umount: /initrd: device is busy
umount: /initrd: device is busy
freeramdisk: /dev/ramdisk: Device or resource busy
===== Before : 616 KB Free
===== After  : 720 KB Free
===== Result : 104 KB Freed
[Success]

===== Starting update_file.sh =====
[Success]

===== Starting checkroot.sh =====
mount: /dev/pts already mounted or /dev/pts busy
mount: according to mtab, devpts is already mounted on /dev/pts
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 1368040k swap on /dev/disk1_5.  Priority:-1 extents:1
[Success]

===== Starting create_devlink.sh =====
[Success]

===== Starting sethostname.sh =====
configure files from Buffalo parameters.
[Success]

===== Starting syslog.sh =====
$Starting system logger:
$Starting kernel logger:
[Success]

===== Starting kernelmon.sh =====
[Success]

===== Starting FanCheckd.sh =====
[Success]

===== Starting setup_time.sh =====
***** Going to ntp server *****
Error : Name or service not known
***** failed to connect to ntp server *****
***** system clock restore from rtc. *****
System Clock setted [Thu Jan  1 08:59:59 JST 1970]
[Success]

===== Starting EnablingAutoip.sh =====
[Success]

===== Starting restore_config.sh =====
EXT3-fs warning: checktime reached, running e2fsck is recommended
Update configuration files
Restore previous configuration files
[Success]

===== Starting mount_share.sh =====
10+0 records in
10+0 records out
XFS mounting filesystem sda6
share
[Failed ]

===== Starting networking.sh =====
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]
networking.sh: dhcp requesting...
DontDownIface
alwaysFork
sendto:  count 6   sync 1
eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
sendto:  count 5   sync 1
sendto:  count 4   sync 0
dhcpcd.exe: interface eth0 has been configured with old IP=192.168.2.41 GATEWAY=192.168.2.1
: already running
** networking.sh dhcp fin.
configure files from Buffalo parameters.
[Success]

===== Starting smb.sh =====
configure samba
optarg:samba
Can't Open : /etc/melco/usbshareinfo
load_info ItemValue = off
LoadConfFileString:key=[ad_dns] not found in /etc/melco/info.
LoadConfFileOnOff:key=[info_visible] not found in /etc/melco/info.
LoadConfFileString:key=[msdfs_function] not found in /etc/melco/msdfs.
LoadConfFileString:key=[msdfs_root_as_link] not found in /etc/melco/msdfs.
LoadConfFileString:key=[msdfs_root_name] not found in /etc/melco/msdfs.
LoadConfFileString:key=[msdfs_root_path] not found in /etc/melco/msdfs.
LoadConfFileString:key=[msdfs_link1_name] not found in /etc/melco/msdfs.
Can't Open : /etc/melco/offlinefile
Can't Open : /etc/melco/shareinfo.hidden
Can't Open : /etc/melco/shareinfo.vfs
file:/etc/samba/smb.conf
>IconvCodeCharset CodePage=0,charset=CP932
file:/etc/pam_smb.conf
$Starting SMB services:
$Starting NMB services:

[Success]

===== Starting clientUtil_servd.sh =====
Starting clientUtil_server:starting on eth0
[Success]

===== Starting modules.sh =====
[Failed ]

===== Starting logchkd.sh =====
Starting logchkd:logchkd ver.1.12(Nov 12 2007) started
[Success]

===== Starting daemonwatch.sh =====
Starting daemonwatch:daemonwatch Ver.1.01
watch list file : /etc/daemonwatch.list
[Success]

===== Starting cron.sh =====
Start services: crond[Success]

telnetd: bind: Address already in use
===== Starting bootcomplete.sh =====
[Success]

Starting pid 1054, console /dev/ttyS0: '/sbin/getty'

BUFFALO INC. LinkStation series LS-LGL(SUIZEI)
LS-LGLFF7 login: root


BusyBox v1.1.1 (2007.11.12-13:48+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # uname -a
Linux LS-LGLFF7 2.6.23.fake_2.6.12.6-arm1 #1 Fri Jan 11 22:15:20 JST 2008 armv5tejl unknown
~ #
立ち上がってくるやん。

前回の失敗は何だった?
おそらく、コンセントまでは抜かずに再起動したため。
電源が落ちたように見えるときには、もう既にカーネルと initrd が 読込まれているなんて、シリアルコンソールつながないと絶対にわからない。

カーネル 2.6.13 LSP 2.1.10 の起動

調子にのって カーネル 2.6.13 LSP 2.1.10 を起動してみた。
Bootstrap 02.09
 **Small NAS Series**
 ** LOADER **
 ** Buffalo BOARD: MVISAH -xx Hassi Board LE
 ** U-boot Version 1.02L-1.00
 ** Build Date Jun 11 2007-11:39:48

U-Boot 1.1.4 (Jun 11 2007 - 11:39:53) Marvell version: 2.2.4-TINY-NQ

U-Boot code: 00200000 -> 0023EE00  BSS: -> 0024A420

Soc: 88F6082 A1 (DDR1)
CPU running @ 333Mhz
SysClock = 166Mhz , TClock = 133Mhz

DRAM CS[0] base 0x00000000   size   8MB
DRAM CS[1] base 0x01000000   size   8MB
DRAM Total size  16MB
[256kB@f8100000] Flash: 256 kB
Addresses 4M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (4M - 3M): Done

CPU : ARM926 (Rev 0)
misc_init_r_env 861 > MagicKey Change to 92
misc_init_r_env u-boot stop condition :MagicKey =(67, 24, 58, 2, 92, 113, 0)
misc_init_r_env > fHddBootWaitDisabled

USB 0: device mode
DDR SDRAM Pads Driving Nch (Manu) = c
DDR SDRAM Pads Driving Pch (Manu) = c
DDR SDRAM  Drive Strength   0-3   = 3
DDR SDRAM Pads Driving Nch (Auto) = c
DDR SDRAM Pads Driving Pch (Auto) = c
Using 88E1112 phy

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: ST310212A                                Firm: 3.02     Ser#: 7EG28CA3
            Type: Hard Disk
            Capacity: 9768.3 MB = 9.5 GB (20005650 x 512)

Net:   egiga0 [PRIME], egiga1
hit any key to switch tftp boot.
Hit any key to stop autoboot:  0
Hit any key to stop autoboot:  0

1287088 bytes read

1486692 bytes read
## Booting image at 01200000 ...
   Image Name:   Linux-2.6.13
   Created:      2008-01-06   3:51:35 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1287024 Bytes =  1.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 013fffc0 ...
   Image Name:   initrd
   Created:      2007-12-27  13:07:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1486628 Bytes =  1.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSLGL ---
Uncompressing Linux.................................................................................... decompress done, booting the kernel.
ここでストップ。思ったよりうんともすんとも状態。
駄目だコリャ

LS-L250GL
楽天市場
Amazon
Yahoo! ショッピング
Sofmap
TSUKUMO ネットショップ
ValuMore!
ムラウチドットコム
uWorks
パソQ


U-Boot
ハックの記録
LinkStation/玄箱 をハックしよう

HS-DHGL/M

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