/proc を見る

LS410D

/proc を見ていく
[root@LS410D06E ~]# cd /proc
[root@LS410D06E proc]# ls
1/             1632/          200/           316/           consoles       kpageflags     softirqs
1037/          1639/          201/           319/           cpu/           loadavg        stat
1108/          16523/         202/           323/           cpu_idle       locks          swaps
1200/          16524/         203/           334/           cpuinfo        mdstat         sys/
1205/          1655/          204/           4131/          crypto         meminfo        sysrq-trigger
1213/          1657/          2263/          487/           devices        misc           sysvipc/
1217/          1658/          2334/          493/           diskstats      modules        timer_list
1221/          1669/          2335/          586/           driver/        mounts@        tty/
1226/          1689/          2424/          6/             execdomains    mtd            uptime
1382/          1692/          2543/          7/             fb             mv_dump_cp15   version
1384/          1696/          2568/          8/             filesystems    net@           vmallocinfo
141/           1717/          2673/          949/           fs/            pagetypeinfo   vmstat
143/           178/           2731/          AuroraL2/      interrupts     partitions     zoneinfo
145/           182/           2734/          board_type     iomem          resource_dump
152/           183/           2868/          buddyinfo      ioports        sched_debug
1544/          196/           2919/          buffalo/       irq/           scsi/
158/           197/           3/             bus/           kallsyms       self@
1597/          198/           3084/          cgroups        kmsg           slabinfo
1604/          2/             3089/          cmdline        kpagecount     soc_type
[root@LS410D06E proc]#

AuroraL2

[root@LS410D06E proc]# ls AuroraL2/info
AuroraL2/info
[root@LS410D06E proc]# cat !$
cat AuroraL2/info
AuroraL2 Information:
Replacement   : semi pLRU
Associativity : 4-way
Way size      : 64KB
Data ECC      : Disabled
TAG parity    : Disabled
Write mode forcing     : PageAttribute
Write allocate forcing : Requester Attribute
[root@LS410D06E proc]#
メモリ関係??

board_type

[root@LS410D06E proc]# cat board_type
YANAGI
[root@LS410D06E proc]#
やっぱり YANAGI

bus

buffalo は置いといて、bus
[root@LS410D06E proc]# ls bus/
pci/ usb/
[root@LS410D06E proc]# ls bus/pci/
devices
[root@LS410D06E proc]# ls bus/pci/devices
bus/pci/devices
[root@LS410D06E proc]# cat !$
cat bus/pci/devices
[root@LS410D06E proc]# 
PCI バス??
[root@LS410D06E proc]# ls bus/usb/
001/     002/     devices
[root@LS410D06E proc]# ls bus/usb/devices
bus/usb/devices
[root@LS410D06E proc]# cat !$
cat bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.03
S:  Manufacturer=Linux 3.3.4 ehci_hcd
S:  Product=Marvell Orion EHCI
S:  SerialNumber=ehci_marvell.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.03
S:  Manufacturer=Linux 3.3.4 ehci_hcd
S:  Product=Marvell Orion EHCI
S:  SerialNumber=ehci_marvell.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
[root@LS410D06E proc]# ls bus/usb/001/001
bus/usb/001/001
[root@LS410D06E proc]# cat !$
cat bus/usb/001/001
        @k
                                獻root@LS410D06E proc]# file !$
file bus/usb/001/001
bus/usb/001/001: data
[root@LS410D06E proc]# file bus/usb/002/001
bus/usb/002/001: data
[root@LS410D06E proc]#

cmdline

[root@LS410D06E proc]# cat cmdline
console=ttyS0,115200 root=/dev/sda2 rw initrd=0x2600040 panic=5 BOOTVER=0.11 UBOOT_DATE=2013/07/02 mtdparts=armada-nand:4m(boot),-(rootfs)
[root@LS410D06E proc]#

cpuinfo

[root@LS410D06E proc]# cat cpuinfo
Processor       : Marvell PJ4Bv7 Processor rev 1 (v7l)
BogoMIPS        : 1196.85
Features        : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0x581
CPU revision    : 1

Hardware        : Marvell Armada-370
Revision        : 0000
Serial          : 0000000000000000
[root@LS410D06E proc]#
ARM V7

devices

[root@LS410D06E proc]# cat devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 29 fb
 89 i2c
 90 mtd
128 ptm
136 pts
180 usb
189 usb_device
254 rtc

Block devices:
  1 ramdisk
259 blkext
  7 loop
  8 sd
  9 md
 31 mtdblock
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 mdp
[root@LS410D06E proc]#
i2c ? 内部に使われている?

diskstats

[root@LS410D06E proc]# cat diskstats
   1       0 ram0 0 0 0 0 0 0 0 0 0 0 0
   1       1 ram1 0 0 0 0 0 0 0 0 0 0 0
   1       2 ram2 0 0 0 0 0 0 0 0 0 0 0
   1       3 ram3 0 0 0 0 0 0 0 0 0 0 0
   1       4 ram4 0 0 0 0 0 0 0 0 0 0 0
   1       5 ram5 0 0 0 0 0 0 0 0 0 0 0
   1       6 ram6 0 0 0 0 0 0 0 0 0 0 0
   1       7 ram7 0 0 0 0 0 0 0 0 0 0 0
   1       8 ram8 0 0 0 0 0 0 0 0 0 0 0
   1       9 ram9 0 0 0 0 0 0 0 0 0 0 0
   1      10 ram10 0 0 0 0 0 0 0 0 0 0 0
   1      11 ram11 0 0 0 0 0 0 0 0 0 0 0
   1      12 ram12 0 0 0 0 0 0 0 0 0 0 0
   1      13 ram13 0 0 0 0 0 0 0 0 0 0 0
   1      14 ram14 0 0 0 0 0 0 0 0 0 0 0
   1      15 ram15 0 0 0 0 0 0 0 0 0 0 0
   7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
   7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
   7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
   7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
   7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
   7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
   7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
   7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
  31       0 mtdblock0 58 388 3568 1950 0 0 0 0 0 1090 1950
   8       0 sda 3870 4016 192722 10530 1835 4024 51456 66930 0 17010 77460
   8       1 sda1 154 279 2004 380 10 16 152 130 0 510 510
   8       2 sda2 3285 3629 177196 8370 1547 3991 44360 58330 0 11990 66700
   8       3 sda3 14 92 288 170 0 0 0 0 0 170 170
   8       4 sda4 1 0 1 30 0 0 0 0 0 30 30
   8       5 sda5 87 0 696 200 0 0 0 0 0 200 200
   8       6 sda6 310 3 12281 1260 268 17 6944 7820 0 6240 9080
[root@LS410D06E proc]#
mtdblock0 がある
[root@LS410D06E proc]# cat mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "spi_flash"
[root@LS410D06E proc]#

driver

[root@LS410D06E proc]# ls driver/
rtc
[root@LS410D06E proc]# cat driver/rtc
rtc_time        : 10:30:05
rtc_date        : 2013-08-24
alrm_time       : 00:00:00
alrm_date       : 1970-01-01
alarm_IRQ       : no
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes
crystal         : 32.768 KHz
trim            : 0
[root@LS410D06E proc]#
アラーム機能がある??

filesystems

[root@LS410D06E proc]# cat filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   tmpfs
nodev   devtmpfs
nodev   sockfs
nodev   pipefs
nodev   anon_inodefs
nodev   rpc_pipefs
nodev   devpts
        ext3
        ext2
        ext4
nodev   ramfs
        vfat
        msdos
        hfsplus
nodev   nfs
nodev   jffs2
        fuseblk
nodev   fuse
nodev   fusectl
        xfs
nodev   mtd_inodefs
nodev   ubifs
        ufsd
nodev   usbfs
[root@LS410D06E proc]#
なんかいっぱい nodev なんだが、、、
よくわかっていない。

fs

[root@LS410D06E proc]# find fs -print
fs
fs/ufsd
fs/ufsd/version
fs/xfs
fs/xfs/xqm
fs/xfs/xqmstat
fs/xfs/stat
fs/nfsfs
fs/nfsfs/volumes
fs/nfsfs/servers
fs/jbd2
fs/ext4
fs/nfsd
[root@LS410D06E proc]# cat fs/ufsd/version
NTFS (with native replay) support included
exFAT support included
optimized: speed
Build_for__Buffalo_LS400_LS-M_k3.3.4_2012-10-26_U87E_r192070_b6

$Id: ufsdvfs.c,v 1.402.2.1 2012-04-24 16:17:11 shura Exp $
driver (8.7 U87E_r192070_b6, LBD=ON, delalloc, acl, ioctl, do) loaded at bf000000, sizeof(inode)=312
[root@LS410D06E proc]#
NTFS が無いと思ったら、こんな所でサポートされていたのね。

interrupts

[root@LS410D06E proc]# cat interrupts
           CPU0
  5:     605665  armada370_irq  armada370_tick
 10:      12286  armada370_irq  mv_eth
 31:      14905  armada370_irq  mv64xxx_i2c
 41:       2545  armada370_irq  serial
 45:          0  armada370_irq  ehci_hcd:usb1
 46:          0  armada370_irq  ehci_hcd:usb2
 48:          0  armada370_irq  cesa0
 51:          1  armada370_irq  mv_xor.0
 52:          1  armada370_irq  mv_xor.1
 54:     267748  armada370_irq  mvsdio
 55:       5728  armada370_irq  sata_mv
 94:          1  armada370_irq  mv_xor.2
 95:          1  armada370_irq  mv_xor.3
107:          0  armada370_irq  axp-temp
139:          1  armada370_irq  SataHotplug
140:          1  armada370_irq  SataHotplug
144:          0  armada370_irq  FuncSw
Err:          0
[root@LS410D06E proc]#
よくわからんので飽きてきた(藁

partitions

[root@LS410D06E proc]# cat partitions
major minor  #blocks  name

  31        0       1024 mtdblock0
   8        0  976762584 sda
   8        1     999983 sda1
   8        2    4999168 sda2
   8        3        384 sda3
   8        4          0 sda4
   8        5     999999 sda5
   8        6  961750016 sda6
[root@LS410D06E proc]#
sda3 も sda4 もダミーなのに、サイズが違うのはなぜ?

buffalo

お待ちかね buffalo を見る
[root@LS410D06E proc]# cd buffalo/
[root@LS410D06E buffalo]# ls
booting     cpu_status  firmware    gpio/       kernevnt    power_sw
[root@LS410D06E buffalo]#

booting

[root@LS410D06E buffalo]# cat booting
0
[root@LS410D06E buffalo]#

cpu_status

[root@LS410D06E buffalo]# cat cpu_status
normal_state
[root@LS410D06E buffalo]#

firmware

[root@LS410D06E buffalo]# cat firmware
SERIES=LinkStation
PRODUCTNAME=LS410D(LS-M)
VERSION=0.16
SUBVERSION=FLASH 0.00
PRODUCTID=0x0000001A
BUILDDATE=2013/07/04 22:11:21
BOOTVER=0.11
[root@LS410D06E buffalo]#

gpio

[root@LS410D06E buffalo]# find gpio -print
gpio
gpio/hotplug
gpio/hotplug/sata1
gpio/hotplug/sata0
gpio/led
gpio/led/hdd1err_blink
gpio/led/hdd1err
gpio/led/hdd0err_blink
gpio/led/hdd0err
gpio/led/funcred_blink
gpio/led/funcred
gpio/led/func_blink
gpio/led/func
gpio/led/alarm_blink
gpio/led/alarm
gpio/led/info_blink
gpio/led/info
gpio/led/power_blink
gpio/led/power
gpio/switch
gpio/switch/power
gpio/switch/func
gpio/switch/sw_control
gpio/power_control
gpio/power_control/usb0
gpio/power_control/hdd1
gpio/power_control/hdd0
gpio/fan
gpio/fan/control
gpio/fan/lock
[root@LS410D06E buffalo]#

hotplug

[root@LS410D06E buffalo]# cat gpio/hotplug/sata0
plugged
[root@LS410D06E buffalo]# cat gpio/hotplug/sata1
unplugged
[root@LS410D06E buffalo]#
1台モデルなので。。。

led

[root@LS410D06E buffalo]# echo on > gpio/led/hdd0err
[root@LS410D06E buffalo]#
ん?何もおこらない。
[root@LS410D06E buffalo]# cat gpio/led/hdd0err_blink
off
[root@LS410D06E buffalo]# echo on > !$
echo on > gpio/led/hdd0err_blink
[root@LS410D06E buffalo]#
何もおこらない
[root@LS410D06E buffalo]# echo on > gpio/led/funcred
[root@LS410D06E buffalo]#
FUNC LED が赤く光った
[root@LS410D06E buffalo]# echo off > gpio/led/funcred
[root@LS410D06E buffalo]#
消えた。
[root@LS410D06E buffalo]# echo on > gpio/led/funcred_blink
[root@LS410D06E buffalo]#
ブリンク
[root@LS410D06E buffalo]# ^on^off
echo off > gpio/led/funcred_blink
[root@LS410D06E buffalo]#
消えた。
[root@LS410D06E buffalo]# echo on > gpio/led/alarm
[root@LS410D06E buffalo]# echo off > gpio/led/alarm
[root@LS410D06E buffalo]# echo on > gpio/led/alarm_blink
[root@LS410D06E buffalo]# echo off > gpio/led/alarm_blink
Power LED が ピンク?に光ったり点滅したり
[root@LS410D06E buffalo]# echo on > gpio/led/info
[root@LS410D06E buffalo]# echo off > gpio/led/info
[root@LS410D06E buffalo]# echo on > gpio/led/info_blink
[root@LS410D06E buffalo]# echo off > gpio/led/info_blink
[root@LS410D06E buffalo]#
alarm と違いがわからない
[root@LS410D06E buffalo]# echo off > gpio/led/power
[root@LS410D06E buffalo]# echo on > gpio/led/power
[root@LS410D06E buffalo]# echo on > gpio/led/power_blink
[root@LS410D06E buffalo]# echo off > gpio/led/power_blink
[root@LS410D06E buffalo]#
POWER LED が白に光ったり点滅したり

結局 HDD にエラーが発生したらどこでわかるの??

switch

[root@LS410D06E buffalo]# cat gpio/switch/power
on
[root@LS410D06E buffalo]# cat gpio/switch/func
off
[root@LS410D06E buffalo]#

power_control

[root@LS410D06E buffalo]# cat gpio/power_control/usb0
on
[root@LS410D06E buffalo]# cat gpio/power_control/hdd1
on
[root@LS410D06E buffalo]# cat gpio/power_control/hdd0
on
[root@LS410D06E buffalo]#

fan

[root@LS410D06E buffalo]# cat gpio/fan/control
slow
[root@LS410D06E buffalo]# echo full > gpio/fan/control
[root@LS410D06E buffalo]# echo stop > gpio/fan/control
[root@LS410D06E buffalo]# echo slow > gpio/fan/control
[root@LS410D06E buffalo]# cat gpio/fan/lock
Fine
[root@LS410D06E buffalo]#
gpio/fan/control は従来と同じ

kernevnt

[root@LS410D06E buffalo]# cat kernevnt
戻ってこない
^C
[root@LS410D06E buffalo]#

power_sw

[root@LS410D06E buffalo]# cat power_sw
1
[root@LS410D06E buffalo]#

ということで、新しい発見はないと思う(節穴?



LS410D

楽天市場
Amazon


カーネルモジュールを見る
ハックの記録
LinkStation/玄箱 をハックしよう

Debian をインストールする

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

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