トップ «前の日記(2007-11-19) 最新 次の日記(2007-11-21)» 編集

Pyon's Diary

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

2007-11-20 舊 平成拾玖年丁亥神無月拾壹日戊午 (火・晴) [長年日記]

[節] KURO-BOX/PRO (No.33) Debian ArmEabiPort で暫定的に miconapl を動す樣にした。(LD_LIBRARY_PATH 不要)

參考にしたのは以下の頁。

先日 Debian ArmEabiPort を入れたが、其れだと objdump (binutils) が入つてゐ無かつたので先づは binutils を入れた。

# apt-get install binutils

で適當な實行ファイル(例へば /bin/ls)を objdump で調べて見た。

# objdump -p /bin/ls

/bin/ls:     file format elf32-littlearm

Program Header:
(中略)
Dynamic Section:
  NEEDED      librt.so.1
  NEEDED      libacl.so.1
  NEEDED      libselinux.so.1
  NEEDED      libgcc_s.so.1
  NEEDED      libc.so.6
(中略)
Version References:
  required from libacl.so.1:
    0x05822450 0x00 05 ACL_1.0
  required from libgcc_s.so.1:
    0x0b792655 0x00 04 GCC_3.5
  required from librt.so.1:
    0x0d696914 0x00 03 GLIBC_2.4
  required from libc.so.6:
    0x0d696914 0x00 02 GLIBC_2.4
private flags = 4000002: [Version4 EABI] [has entry point]

ldd コマンドより詳細な情報が出力された。

miconapl を調べる爲に HDD 起動環境のパーティションを /mnt/old にマウントした。

# mount /dev/sda2 /mnt/old

miconapl を調べて見た。

# objdump -p /mnt/old/usr/local/sbin/miconapl

/mnt/old/usr/local/sbin/miconapl:     file format elf32-littlearm

Program Header:
(中略)
Dynamic Section:
  NEEDED      libbuffalo_bin.so
  NEEDED      libgcc_s.so.1
  NEEDED      libc.so.6
(中略)
Version References:
  required from libgcc_s.so.1:
    0x0b792655 0x00 03 GCC_3.5
  required from libc.so.6:
    0x0d696914 0x00 02 GLIBC_2.4
private flags = 4000002: [Version4 EABI] [has entry point]

慥かに人間パズル 玄箱プロに Debianに書いて有る通り、ライブラリを持つて呉れば良さゝう。

# cp -i /mnt/old/usr/local/lib/libbuffalo_bin.so /usr/local/lib/
# cp -i /mnt/old/usr/local/sbin/miconapl /usr/local/sbin/

斯樣にして置いて miconapl で温度を取得して見た。

# miconapl -b -a temp_get
>MiconCommon_Constructor
#[miconapl.temp_get]
temp=29

動いた。當面は此で良しとする。

追記: Fand を動かした。(2007-11-20)

miconapl が動く樣に成つたので Fand を動かす事にした。

オリジナルの Fand は

で調べた通り只のバックグラウンドで動くので其れを以下の樣に變更した。

(KDEB)# cat /usr/local/sbin/Fand
#!/bin/sh

CONF_FILE=/usr/local/etc/fan.prof
MICONAPL=/usr/local/sbin/miconapl

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"n
                SSPD_NEW=slow
        elif [ "${DIRECT}" = "DOWN" -a "${SSPD}" = "full" -o "${DIRECT}" = "UP"n
                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}
else
        ${MICONAPL} -a fan_set_speed full
fi

其して此乃スクリプトを cron で毎分起動される樣に設定した。

(KDEB)# crontab -l
# m h  dom mon dow   command
# Controlling Fan.
* * * * * /usr/local/sbin/Fand > /dev/null 2>&1

Fand が使用する設定ファイルの内容は以下の通り。

(KDEB)# cat /usr/local/etc/fan.prof
stop	-	10
slow	10	25
fast	25	35
full	35

後、起動時に miconapl の初期化を行ふ樣に rc.local に以下の設定を追加した。

# Initialize miconapl
/usr/local/sbin/miconapl -b -a boot_end

追記: libc.so.6, libgcc_s.so.1 (2007-11-20)

  • /lib/libc.so.6 (libc6)
  • /lib/libgcc_s.so.1 (libgcc1)

は玄箱の HDD 起動環境から持つて來無くても Debian ArmEabiPort の方のライブラリで動いた。

故に HDD 起動環境から持つて來る必要の有る物は

  • libbuffalo_bin.so
  • miconapl

の二つだけで良かつた。此に沿つて元記事は書き直した。

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

[節] 晩御飯。

  • 押麥飯。
  • 麩の味噌汁。
  • 自家製〆鯖。
  • 榎茸の中華風炒め。
  • 若布の生姜スープ。
Tags: None | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] KURO-BOX/PRO (No.34) Debian ArmEabiPort では shutdown -h now で電源が切れ無い。

(2008-02-17 2.6.25-rc1 に於いて shutdown -hP で電源が落とせる樣に成つた)

/etc/default/halt を

HALT=halt

と書換へて見たが電源が切れ無い。

(前略)
Unmounting local filesystems...done.
Will now halt.
sd 0:0:0:0: [sda] Synchronizing SCSI cache
System halted.

此乃状態で止まつて了ふ。此處で電源釦を長押しするとシリアル・コンソールに

EXT3-fs error (device sda6): ext3_find_entry: reading directory #2088961 offset 0
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00

と云つたエラーが出力される。

追記: 此か?。(2007-11-21)

に書いて有る、

The things that are not yet supported:

・The buffalo's MICON Driver is not (yet ?) in the kernel. This may prevent the device from beeing able to shutdown itself.

[NAS-Central -- Buffalo ARM9 Kernel Portより引用]

が該當するのだろうか。だとすると電源を落とせる樣に成るのは先の話か。

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

© pyon