トップ «前の日記(2007-05-05) 最新 次の日記(2007-05-07)» 編集

Pyon's Diary

[はてなブックマーク登録数] [Google に登録] [RSS フィード] Gourmet Hardware Programming Society Software
成る可くJIS X 0213:2004對應MSフォント(5.0)、IPAフォント(003.02)で御覽下さい

2007-05-06 舊 平成拾玖年彌生廿日 (日・雨・立夏) [長年日記]

[節] KURO-BOX/PRO (No.01) やつと觸つた

先日購入してから弄る時間が無かつたので、やつとこさけふから弄れる樣に成つた。

既にシリアルコンソールキット SCON-KIT/PRO が繋がる樣にコネクタは半田付けして在るので、家の計算機に FT232R 用のドライバを入れる所から始めた。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.02) 計算機と接續する。

WinXP 用のドライバを落として來て適當なフォルダに展開した。其れから KURO-BOX/PRO と計算機を SCON-KIT/PRO を使つて繋ぐと新しいハードウェアが見附かつた、とのメッセージが出るので先程展開したフォルダを指定するとドライバのインストールが始まつた。此でインストールは終了。

デバイスマネージャを見ると「ポート(COM とLPT)」の處に「USB Serial Port (COM7)」と出てゐて COM7 を經由して繋がつてゐる事が判つた。PuTTY (0.59 ごつた煮版) で以下の樣に設定した。

  • 接続先 -- COM7
  • スピード -- 115200
  • データビット -- 8
  • ストップビット -- 1
  • パリティ -- なし
  • フロー制御 -- なし

先日職場で繋いで見た時、添付の「KUROBOX/PRO マイコン通信仕樣 Rev.1.0」に書いて在つた設定では文字化けを起こし、KURO-BOX/PRO もエラーランプ(赤)が光りビープ音が鳴つて五月蠅かつた。其處で

に書かれてゐた設定を試してみると上手く通信出來たので、以後其乃設定を踏襲する事にした。(SCON-KIT/PRO の取扱説明書を見たら正しい設定が書いて在つた。)

其れは其れとして PuTTY (0.59 ごつた煮版) を起動して、KURO-BOX/PRO の電源を入れた。

PuTTY (0.59 ごつた煮版) が堕ちた。

何度か遣り直して見たが矢張り通信を開始すると、PuTTY (0.59 >ごつた煮版) が堕ちるので、仕方無く TeraTerm (UTF-8, TTSSH2) を落として來て入れた。

一旦 KURO-BOX/PRO の電源を落とし、TeraTerm (UTF-8, TTSSH2) の設定をしてから再び KURO-BOX/PRO の電源を入れた。

に倣つて起動時のコンソール出力を採つて見た。

Orion1   CPU =  Low 

=== KURO U-Boot. ===
 ** LOADER **
 ** KUROBOX BOARD: KURO_BOX  LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Apr 10 2007 - 18:10:08) Marvell version: 1.12.1 - TINY

DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB 
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
NAND: 256 MB

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 500Mhz 
Orion 1 streaming disabled 
SysClock = 250Mhz , TClock = 166Mhz 


USB 0: host mode
USB 1: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
Found boot image 
hit any key to switch tftp boot.
Hit any key to stop autoboot:  2  1  0 
<<system_bootend>>
Hit any key to stop autoboot:  3  2  1  0 

Loading from device 0: <NULL> at 0xfa000000 (offset 0x20000)
   Image Name:   Linux-2.6.12.6-arm1
   Created:      2007-04-10  13:45:13 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1736548 Bytes =  1.7 MB
   Load Address: 00008000
   Entry Point:  00008000
<<stop_sound>>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.12.6-arm1
   Created:      2007-04-10  13:45:13 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1736548 Bytes =  1.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/mtdblock2 rw panic=5 BOOTVER=1.091
CONFIG_KUROBOX_PLATFORM CONFIG_KUROBOX_KUROBOX ---
Uncompressing Linux................................................................................................................. done, booting the kernel.
Linux version 2.6.12.6-arm1 (root@dev-hara) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #27 Tue Apr 10 22:47:16 JST 2007
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 250000000, Tclk = 166664740
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 rw panic=5 BOOTVER=1.091
PID hash table entries: 1024 (order: 10, 16384 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 126208KB available (3037K code, 426K data, 112K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
serial_initialize_ttyS1 (Debug): ttyS1 is initialized.
 config_device_cs Error : Unknown board 

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size 128MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB 
PEX0_IO ....base f2000000, size   1MB 
PCI0_MEM ....base e8000000, size 128MB 
PCI0_IO ....base f2100000, size   1MB 
INTER_REGS ....base f1000000, size   1MB 
DEVICE_CS0 ....base fa000000, size   2MB 
DEVICE_CS1 ....base f4000000, size  32MB 
DEVICE_CS2 ....base fa800000, size   1MB 
DEV_BOOCS ....base ff800000, size   8MB 
CRYPTO ENG ....no such
Flash bankwidth 1, base ff800000, size 400000
KUROBOX FLASH size 4096[KB]

  Marvell Development Board (LSP Version 1.10.3.patch5_DB_NAS)-- KUROBOX_BOARD_KUROBOX  Soc: 88F5182 A2

 Detected Tclk 166664740 and SysClk 250000000 
Marvell USB EHCI Host controller #0: c04e4b00
Marvell USB EHCI Host controller #1: c04e4a40
pexBarOverlapDetect: winNum 2 overlap current 0
mvPexInit:Warning :Bar 2 size is illigal
it will be disabled
please check Pex and CPU windows configuration
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
Use the XOR engines (offloading) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
  o copy user to/from kernel buffers
Number of XOR engines to use: 2
cesadev_init(c00122e4)
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
inotify device minor=63
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
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
ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 3 RAM disks of 32768K 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 Loading network interface ** egiga_init_module (10)
'eth0' 
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
physmap flash device: 400000 at ff800000
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Debug nand_scan : nand_flash_ids[i].pagesize is exist
Debug nand_scan : mtd->erasesize=0x00020000
Debug nand_scan : mtd->oobblock=0x00000800
Debug nand_scan : mtd->oobsize=0x00000040
NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Using static partition definition
Creating 3 MTD partitions on "nand_mtd":
0x00000000-0x00400000 : "uImage"
0x00400000-0x04400000 : "rootfs"
0x04400000-0x10000000 : "extra"
usbmon: debugs is not available
ehci_platform ehci_platform.4523: EHCI Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: park 0
ehci_platform ehci_platform.4523: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: park 0
ehci_platform ehci_platform.16781: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v2.2
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver
mice: PS/2 mouse device common for all mice
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
   arm4regs  :   308.800 MB/sec
   8regs     :   217.600 MB/sec
   32regs    :   252.400 MB/sec
raid5: using function: arm4regs (308.800 MB/sec)
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
Buffalo Platform Linux Driver(Light) 0.01 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON V2 (C) BUFFALO INC. V.1.00 installed.
NET: Registered protocol family 2
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
Empty flash at 0x00df85f8 ends at 0x00df8800
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 112K
--- rcStart (NANDroot) ---
===== Starting MountSystemFolders =====
mounting procfs ... [Success]
mounting sysfs ... [Success]
mouting usbfs ... [Success]
remouting rootfs ... [Success]
mounting all devices ... [Success]


===== Starting checkroot.sh =====
rm: /var/lock/perfmon: is a directory
rm: /var/lock/printing: is a directory
rm: /var/lock/subsys: is a directory
[Success]


===== Starting Kevent.sh =====
[Success]


===== Starting mount_share.sh =====
Mounting /dev/mtd3 on /mnt/mtd as a jffs2 file system.
Success.

[Success]


===== Starting sethostname.sh =====
hostname is setted to KUROBOX-PRO
[Success]


===== 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]
** dhcp fail
** setting default ip
route: SIOC[ADD|DEL]RT: No such process
/etc/dhcpc/dhcpcd.exe :::  down
dhcpcd.exe: interface eth0 has been brought down
add default if
hostname is setted to KUROBOX-PRO
[Success]


===== Starting httpd.sh =====
[Success]


===== Starting telnet.sh =====
[Success]


===== Starting inetd.sh =====
[Success]


===== Starting smb.sh =====
$Starting SMB services: 
$Starting NMB services: 
[Success]


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


===== Starting bootcomplete.sh =====
[Success]


===== Starting FanController.sh =====
[Success]


===== Starting boss.sh =====

                           ...''''..                                       
               '-~~(~~'' .~<shDBDhz+(-.                                    
            .~+sDDBNBDhhszDBNNNNBNNNBDs<-                                  
           ~sBNNNNNNNNNNNNNNNNNNNNNNNNNBs<'                                
         -=DNNBNNNNNNNNNNNNNNNNNBNNNNNNNNBz<'                              
       .~zNNNNNNNNNNNNNNNNNNNNNNNNNNBNNNNNNNz~                             
      '~hBNNNNBNNNNNNNNNNNNNNNNNNNNNNNNNNNNNND+'                           
      (hNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNBs-                          
    .~zNNNNNNNNNNNNNNNNNNNNNNNBNNNNNNBNNBNNNNNNBs                          
    ~sBNNNNNNNNNNNNNNNNNNNNNNNNNNNNBNNNNNNNNNNNNNz                         
   (+DNNNNNNNNNNNNNNNNNNNNNNDzNNNNNhzDNNBNNNNNNNNBs                        
   (sNNNNNNNNNNNNNNNNNNNNNNB=~hNNNN=~(sDNNNNNNNNNND                        
  (+DNNNNNNNNNNNNNNNNNNNNNNs'.=NNNNz- '(zDNNNNNNNNNz                       
  ~=BNNNNNNNNNNNNNNNNNNNNND- .=BNNNN<.  .(hNNNNNNNNB                       
  ~sNNNNNNNNNNNNNNNNNNNNND+. .+BNNNN+'    ~sBNNNNNNN                       
  (zNNNNNNNNNNNNNNNNNNNNND' ..+BNBNB=-     .+BNNNNNNh                      
  (zNNNNNNNNNNNNNNNNNNNBB= . 'hNBBNs+-      '+DNNNBND                      
  (sNNNNNNNNNNNNNNNNNNNND(   -DhDBN+<-    .  '=NNNNNB                      
  ~+DNNBNNNNNNNNNNNNNNNNz'  '=D=Dhh+('      . ~DBNNNB                      
  ~(sNNNNNNNNNNNNNNNNNNNz.  -hs(zz+<('      . .=NNNNN                      
   ~=NNBBBBNNNNNNNNNNNNB=  '==-=+s((~.        .~BNNNB                      
   ~=Nhs<+++hNNNNNNNNBz<- .~=-.s(+-(-          'hBNND                      
    =Ds+hz( ~hNNNNNNND+'..-+'.-((('<~''...     -hNNNNDs                    
   ~+z(BN=. .<BNNNNBhhDD=+<~. ~-=shBBDhz+('   -sBNNNBBNBz                  
  ~(=z(BD- '~~hBNNNs~-(<zDDs+~(shzssszDBNDh=<<sBNNNNNNNBN                  
  ~~+s<z=.-zh~sNNND<.  .''<zhhh==shDBNNNNNNNBDDNNNNNNNNNh                  
  ~~<ss+<.zBBs~zND+'      ..-+zDBNNNNNNNNNNNhzNNNNNNNNND+                  
  ~~(=h<<'+DBz-sBs~         .  (BBNNNNNNNNNz-<BBNNBNNND=                   
  ~(~<zss(('(z<sD+'            ~DNNNNNNNNNz~ 'sNNNNNNDs                    
    ~(=Ds=<...-(h<.    .     ..<BNNNNNNNNz~   -hNNNBh                      
     ~(hNs(.    =-            .=BNNNNNBNs-    .(hs==                       
     ''<BNz~    '.            .(hBNNBDz<'      .~''-                       
       -hNNh(. '..             .'<<(++~   .     -''.                       
       'hBNB+' '                   -+('.       .-''.                       
       'zDNz(  '.                 ~+<-'''..''. .-.                         
       ..~(-.  .'.              .~+(.   ..''--''.                          
                ''.           .'+<~         '~.                            
               .....          .-' .'---(~~~(<~.                            
                 ..'.            .((---'-~~(~                              
                   .'.            '+s=(-'-(+.   < Let's start a KURO-BOX!  
                    ....           .(hBDzDD=.       and have a fun time... 
                     ..'..          .'<sDh+.                               
                       .''..       .   ..-- .                              
                         ..''..         ...                                
                           .......     .'.                                 
                              ..''..'-'..                                  
                                  ...                                      


[Success]


KUROUTOSHIKOU KUROBOX Series KUROBOX/PRO(KOSHO)
KUROBOX-PRO login: 

サングラス男を見る事が出來た。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.03) ログインした。

KURO-BOX/PRO の取扱説明書に書いて在るパスワードを入力すると ログインする事が出來た。

login[916]: root login  on `ttyS0'



BusyBox v1.1.1 (2007.04.06-12:02+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #

取敢へず /proc 下を覗いて見る事にした。/proc/cpu は以下の通り。

/proc # cat cpuinfo
Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 266.24
Features        : swp half thumb fastmult
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 1
I line length   : 32
I sets          : 1024
D size          : 32768
D assoc         : 1
D line length   : 32
D sets          : 1024

Hardware        : MV-88fxx81
Revision        : 0000
Serial          : 0000000000000000

見た處で自分に何が判る譯でも無い。次ぎに /proc/filesystem を見てみた。

/proc # cat filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   futexfs
nodev   tmpfs
nodev   eventpollfs
nodev   devpts
        ext3
        ext2
nodev   ramfs
nodev   nfs
        jffs2
        xfs
nodev   rpc_pipefs

有効に成つてゐるファイルシステムは

  • ext2
  • ext3
  • jffs2
  • xfs

の四つの模樣。主記憶裝置に關する情報は /proc/meminfo を見た。

/proc # cat meminfo
MemTotal:       126328 kB
MemFree:        108808 kB
Buffers:             0 kB
Cached:           9524 kB
SwapCached:          0 kB
Active:           6176 kB
Inactive:         6044 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       126328 kB
LowFree:        108808 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           5492 kB
Slab:             3840 kB
CommitLimit:     63164 kB
Committed_AS:    23672 kB
PageTables:        228 kB
VmallocTotal:   385024 kB
VmallocUsed:      4428 kB
VmallocChunk:   380412 kB

慥かに總記憶容量は 128 MB の模樣。序でに起動直後の ps の出力。

# ps
  PID  Uid     VmSize Stat Command
    1 root        612 S   init
    2 root            SWN [ksoftirqd/0]
    3 root            SW< [events/0]
    4 root            SW< [khelper]
    5 root            SW< [kthread]
   11 root            SW< [kblockd/0]
   14 root            SW  [khubd]
   53 root            SW  [pdflush]
   54 root            SW  [pdflush]
   56 root            SW< [aio/0]
   55 root            SW  [kswapd0]
   58 root            SW< [xfslogd/0]
   59 root            SW< [xfsdatad/0]
   60 root            SW  [xfsbufd]
  163 root            SW  [kseriod]
  185 root            SW  [scsi_eh_0]
  186 root            SW  [scsi_eh_1]
  191 root            SW  [mtdblockd]
  234 root            SWN [jffs2_gcd_mtd2]
  327 root        632 S   /bin/sh /usr/local/sbin/Keventd
  366 root        504 S   cat /proc/buffalo/kernevnt
  389 root            SWN [jffs2_gcd_mtd3]
  516 root        612 S   httpd -p 80 -h /www
  525 root        456 S   telnetd
  534 root        756 S   inetd
  544 root       2724 S   /usr/local/sbin/smbd -D
  548 root       2712 S   /usr/local/sbin/smbd -D
  549 root       1860 S   /usr/local/sbin/nmbd -D
  585 root        536 S   /usr/local/sbin/clientUtil_server -i eth0
  603 root        600 S   /bin/sh /usr/local/sbin/Fand
  611 root        424 S   sleep 60
  674 root        716 S   -sh
  676 root        640 R   ps

Fand と云ふのが冷却扇を何かしてゐるプロセスか。

追記: パーティション。(2007-11-03)

[注意] 此乃時點で一囘、以下の事を既に行つてゐた。

其乃上でのパーティションの確認で在る事に注意。

パーティションを確認して見た。

# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/mtd2                64.0M     15.6M     48.4M  24% /
/dev/ram1                 8.0M    148.0k      7.9M   2% /mnt/ram
/dev/sda4                69.7G     32.1M     66.1G   0% /mnt/disk1
/dev/mtd3               188.0M     70.9M    117.1M  38% /mnt/mtd
# mount
/dev/root on / type jffs2 (rw,noatime)
proc on /proc type proc (rw,nodiratime)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/ram1 on /mnt/ram type tmpfs (rw)
/dev/sda4 on /mnt/disk1 type ext3 (rw)
/dev/mtd3 on /mnt/mtd type jffs2 (rw,noatime)

此乃結果と「KUROBOX/PRO 製品仕樣書」の P.20 をと付き合はせると NAND フラッシュ(256MB)の上には、以下の三つのパーティションが作成されてゐる模樣。

  • /dev/mtd1 -- U-Boot 格納領域(4MB)。
  • /dev/mtd2 -- ルート領域(/, 64MB))。
  • /dev/mtd3 -- データ領域(/mnt/mtd, 188MB)。
Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.04) 電源を落とした。

shutdown コマンドを實行して電源を落として見た。

# /sbin/shutdown -h now
# ----- rcDown -----

===== Starting shutdown_start.sh =====
[Success]


===== Starting shutdown_proc.sh =====

===== Starting clientUtil_servd.sh =====
Stop clientUtil_server:[Success]


===== Starting smb.sh =====
$Shutting down SMB services:
$Shutting down NMB services:
[Success]


===== Starting networking.sh =====
Deconfiguration network interface: lo eth0
killall: dhcpcd: no process killed
[Success]


===== Starting Kevent.sh =====
[Success]


===== Starting FanController.sh =====
Stopping a fan ...........
[Success]

[Success]


===== Starting umount_disk.sh =====
[Success]

The system is going down NOW !!
Sending SIGTERM to all processes.
The system is halted.
md: stopping all md devices.
md: md0 switched to read-only mode.
System halted.

落ちた。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.05) 冷却扇を制御する。

起動・停止のコンソール出力を眺めてゐると FanController.sh が冷却扇の制御を行つてゐる模樣。と云ふ事で /etc/init.d/FanController.sh の中を覗いて見た。

# cat /etc/init.d/FanController.sh
#!/bin/sh

start(){
if [ -x /usr/local/sbin/Fand ] ; then
        Fand &
fi
}

stop(){
        killall Fand
        echo -n "Stopping a fan ."
        /usr/local/sbin/miconapl -a fan_set_speed stop
        COUNTER=10
        while [ ${COUNTER} -gt 0 ]
        do
                sleep 1
                echo -n "."
                COUNTER=$((${COUNTER} - 1))
        done
        echo ""
}

case $1 in
start)
        start
        ;;
stop)
        stop
        ;;
restart)
        stop
        start
        ;;
*)
        echo "Usage : FanController.sh {start|stop|restart}"
        ;;
esac

起動時には Fand と云ふスクリプトが呼出されて此が冷却扇の制御を行つてゐる模樣。停止時には miconapl に冷却扇を止めろと命令を出してゐる模樣。試しに、

# miconapl -a fan_set_speed stop

とすると冷却扇が止まつた。次ぎに

# miconapl -a fan_set_speed full

とすると再び回り出した。最高囘轉の状態だと結構風切り音がする。囘轉數を見てみると、

# miconapl -a fan_get_speed
#[miconapl.fan_get_speed]
fan_rpm=3450

毎分 3,450 囘轉だつた。只けふは雨で其程氣温も高く無い所爲か暫くすると囘轉が弱まつて、

# miconapl -a fan_get_speed
#[miconapl.fan_get_speed]
fan_rpm=2610

毎分 2,610 囘轉に成つた。冷却扇の制御は microapl で行つてゐるらしい。其れは其れとして Fand の中身を覗いて見た。

# cat /usr/local/sbin/Fand
#!/bin/sh

CONF_FILE=/etc/fan.prof
miconapl -a fan_set_speed full

while :
do
        while :
        do
                sleep 60
                TEMP=`miconapl -a temp_get|grep temp=| sed -e "s/.*=//"`
                SPD=`miconapl -a fan_get_speed|grep fan_rpm=|sed -e "s/.*=//"`
                SSPD=`miconapl -a fan_set_speed|grep fan_speed=|sed -e "s/.*=//"`
                if [ -f ${CONF_FILE} ] ; then
                        L_LIMIT=`grep ${SSPD} ${CONF_FILE}| awk '{print $2}'`
                        H_LIMIT=`grep ${SSPD} ${CONF_FILE}| awk '{print $3}'`
                        if [ "${TEMP}" -lt "${L_LIMIT}" ] ; then
                                DIRECT=DOWN
                        elif [ "${TEMP}" -gt "${H_LIMIT}" ] ; then
                                DIRECT=UP
                        else
                                DIRECT=NO
                        fi

                        if [ "${DIRECT}" = "DOWN" -a "${SSPD}" = "slow" ] ; then
                                SSPD_NEW=stop
                        elif [ "${DIRECT}" = "DOWN" -a "${SSPD}" = "fast" -o "${DIRECT}" = "UP" -a "${SSPD}" = "stop" ] ; then
                                SSPD_NEW=slow
                        elif [ "${DIRECT}" = "DOWN" -a "${SSPD}" = "full" -o "${DIRECT}" = "UP" -a "${SSPD}" = "slow" ] ; then
                                SSPD_NEW=fast
                        elif [ "${DIRECT}" = "UP" -a "${SSPD}" = "fast" ] ; then
                                SSPD_NEW=full
                        else
                                SSPD_NEW=${SSPD}
                        fi
                        miconapl -a fan_set_speed ${SSPD_NEW}
                fi

        done
done

此を見ると microapl で温度も取得出來るらしい。試しにやつて見た。

# miconapl -a temp_get
#[miconapl.temp_get]
temp=34

今の温度は攝氏 34 度らしい。Fand は 60 秒に一囘温度を檢査して、其乃温度に對應する囘轉數を fan.prof から讀出して囘轉數を設定してゐる模樣。

miconapl の他のオプションは何處かに無いかと思つたら、以下の處で殆ど全てが列挙されてゐた。

無駄な時間を過ごした。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] 晩御飯。

  • 押麥飯。
  • 人參と絹莢の味噌汁。
  • 若筍煮。
  • ヨーグルトと醪に漬けた鶏と長葱のオリーブ油燒き。
Tags: None | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.06) Debian を入れるには。

自力でどうこうする伎倆が無いので、先人達の記録を檢索した結果、色々な人達が成功してゐた。

何はともあれ S-ATA の HDD を買つて來無いと。

其之前に開發環境を作つてみて、其方で勉強する方が先か。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink
[]

© pyon