■ もともとはLS−160GL
(2010.03.30)

コンソール・ログ

ひさしぶりに、シリアルコンソールをつないで起動した。
そのときの、記録。
長いから、こちらにリンク

(2010.01.25)

asteriskについて

asteriskが今日、やっとまともに使えるようになった。
中古で購入したSIP-2100Pも、ソフトフォーンのX-Liteも共に動く。
ここらへんの経緯はこっちに。
(2009.02.09)

pivot_rootについて

pivot_rootのmanはこちら
どうやら pwrmgr をstringsなどを使って読み解いていると、 pivot_rootを使ってルートFSを切り替えてるようなので、 pivot_rootを勉強する。
(2009.02.08)

いまだ、スリープ設定が失敗

スリープ設定をWEBからでなく、ターミナルから設定したけど、 まだ成功しない。
なにが起きてるのかを調べるべく、シリアルコンソールをつないで、
/usr/local/sbin/PowerSave.sh standby-cron を実行してみた。
通常はcrontab -e に時間を指定してこれが動くようにしてある。
きっと、まだ何か足りない。
/usr/local/sbin/pwrmgrはchrootして実行するように変更してある。 pwrmgrは動くようになっている。
これがそのときの記録
そっかぁ、pwrmgrはchrootして実行してはダメなんだ。
(2009.02.02)

スリープ機能で起動/終了する記録を取ってみた

http://192.168.xxx.xxx/で LinkStation ログインにて admin/pa*****d で入り、
「メンテナンス」の「スリープ設定」で
現在の時刻が10:23だったから
タイマー2:起動時刻 9:15  終了時刻 10:30
タイマー3:起動時刻 10:45 終了時刻 24:00
のように「設定」。
短時間でパワーオン/オフするようにセットして シリアルコンソールでの記録を取ってみた。
もうひとつ
# shutdown -r now でリブートしないでホールトしてしまうので それの原因も探ることにした。

そのときの記録
と、見比べるため、 shutdown -h の記録
事前に2009.01.26のようにバグ(?)は取り除いておいた。

crotabで指定した時間になると、
/usr/local/sbin/PowerSave.sh resume-cron  (起動)
または
/usr/local/sbin/PowerSave.sh standby-cron  (スリープ)
が動き出す。
こいつが/etc/melco/sleep を参照していまたしかにそういう時刻なのかチェックをして そうして起動/終了のステップに進む。
記録を見ると、スリープというのはどうやらRAM-DISKで(つまりHDを 動かさないで)動いてることのようだ。
このときイーサーネットも動いているし、cronも動いている。
なので時間になれば起動するわけだ。

ほかの、ちゃんとリスタートができるマシンと比べてみた。
そのときの記録
どこが違うかというと、
リブートができたホールトしちゃう
>miconCntl_Reboot
>miconCntl_ShutdownWait
>miconCntl_PowerOff
>miconCntl_ShutdownWait
miconCntl_RebootとmiconCntl_PowerOffになる場所を探す。 >miconCntl_PowerOff
(2009.01.26)

スリープ機能のしくみ

WEBでスリープ機能で設定をすると、つぎのファイルが変更される。
  • /etc/melco/sleep
  • /var/spool/cron/crontabs/root (# crontab -e)
ただし、
# ls -l /var/spool/cron
lrwxrwxrwx  1 root  root  9 Jan 24 13:38 /var/spool/cron -> /etc/cron
となっている。

たとえば、起動時刻を毎日の9:45にし、終了時刻を25;45に設定すると、
# cat /etc/melco/sleep
timer1_mode=day
timer1_up=0945
timer1_down=2545
timer1_week=
timer2_mode=disable
timer3_mode=disable
# cat /var/spool/cron/crontabs/root
45 09 * * * /usr/local/sbin/PowerSave.sh resume-cron
45 01 * * * /usr/local/sbin/PowerSave.sh standby-cron

そこで、/usr/local/sbin/PowerSave.shを調査。
関連するファイルは
  • /usr/local/sbin/PwrmgrCrontab 実行ファイル(バイナリ)
  • /etc/melco/sleep 設定ファイル
  • /etc/melco/info 設定ファイル
  • /usr/local/sbin/pwrmgr 実行ファイル(バイナリ)
  • /usr/local/bin/standby_check.sh 実行ファイル(シェルスクリプト)
  • pwrmgr -u スリープ(実質、これでスリープ)
  • pwrmgr -u -s パワーオン
  • /usr/local/sbin/PowerSave.sh 実行ファイル(シェルスクリプト)
/usr/local/sbin/PwrmgrCrontab -i /etc/melco/sleep -c >/tmp/.PwrmgrCrontab.logのように使用し、
/etc/melco/sleepファイルの正当性をチェックしてる。
リターンコードは10の場合と100の場合(と0?)がある。
リターンコードが10だと、"Normal work continuance"と表示して、
「正常。このままです」と言って終わっちゃう。
細工してこのリターンコードは無視するように直した。
/usr/local/sbin/PowerSave.sh の 140行目付近
    if [ "$CMD" = "standby-cron" ]; then
        $PWRMGRCRONTAB -i $IFILE -c >/tmp/.PwrmgrCrontab.log
        if [ $? -eq 10 ]; then
            echo "Normal work continuance"
            # exit 0  <<==コメントにしてしまう
        fi                      
    fi              

ftpd(proftpd)が動いてないのに気がついた。
調べたら、/etc/proftpd/proftpd.confの記述中に変なのがあるらしい。
例えば、24行目に。なので、直してしまう。
(2009.01.21)

pwrmgr について

debian化したあと、pwrmgrが動かない。
jump_to_lsglにリンクを張って、実行するも
4737 Segmentation fault になってしまう。

stringsを使って少し調査
% strings /lsgl/usr/local/sbin/pwrmgr
(いくつも省略、関係のありそうなもののみ)
chroot
socket
recvfrom
sendto
htonl
getservbyname
GLIBC_2.4
usage: %s [-bdfsuv] [-i initrd] [-l listfile] [-p port|service] [-r [fstype,]rootfs] [-t timeout]
usage: %s -c host command ... [timeout]
usage: %s -V
/var/run/%s.pid
/proc/
%02x:%02x:%02x:%02x:%02x:%02x
mv %s %s
/mnt/ram/etc/linkstation_emergence
/mnt/ram/etc/linkstation_standby
/mnt/ram/tmp/standby.df
/etc/pwrmgr/standby.df
/mnt/ram/tmp/standby.mount
/etc/pwrmgr/standby.mount
/mnt/ram/tmp/standby.config
/etc/pwrmgr/standby.config
mkdir -p /mnt/ram/etc/cron/crontabs
cp /etc/melco/* /mnt/ram/etc/melco/
/mnt/ram/etc/cron/crontabs/root
/etc/cron/crontabs/root
pclist fgets failed: %s
ioctl SIOCGIFCONF failed: %s
ioctl SIOCGIFHWADDR %s failed: %s
shutdown signal
received unknown packet
/etc/mtab
fopen mtab failed: %s
%s/swaps
fopen swaps failed: %s
unknown record at %d in swaps
swapoff %s failed: %s
/etc/init.d/standby.rcDown standby
down all processes failed
restart init(1) with no respawn in inittab(5)
/dev/root
/etc/inittab
/etc/.inittab.pwrmgr
backup inittab(5) failed: %s
::respawn:
edit inittab(5) failed
milisleep failed: %s
restart init failed: %s
restore inittab(5) failed: %s
kills the survived processes
killall -KILL sh getty
kills the survived processes failed
ext2
ext3
/dev/console
put nologin
/etc/nologin
put nologin failed: %s
create ram-rootfs
/dev/ram0
use /boot/initrd.buffalo
dd if=/boot/initrd.buffalo bs=64 skip=1 | gzip -dc > /dev/ram0
down all processes
remove /etc/nologin
unmount some file-systems. and turn off swaps
mount new rootfs
/mnt/ram/
mount new rootfs failed: %s
copy the PC-list and inittab(5) into new rootfs
/mnt/ram/usr/local/sbin/pwrmgr
/usr/local/sbin/pwrmgr
/mnt/ram//etc/pwrmgr/
mkdir new pwrmgr dir failed: %s
/mnt/ram/etc/pwrmgr/pclist
/mnt/ram/etc/inittab
/etc/pwrmgr/standby.inittab
create buffalo file failed!
change rootfs
chdir failed: %s
mnt/
pivot_root failed: %s
chroot failed: %s
restart new rootfs
restart init failed(2): %s
/sbin/reboot
/etc/init.d/standby.rcDown resume
/mnt
mount rootfs failed: %s
/mnt/
/mnt/etc/pwrmgr/
/etc/pwrmgr/pwrmgrlog
put resume log failed: %s
/dev/ttyS0
No.      IpAddress       result time     flag
%d       %s      %d              active
%d       %s     %d               active
%d       %s      %d              disactive
%d       %s     %d               disactive
pclist is empty.
socket failed
/tmp/.pwrmgrsock
socket failed (unix): %s
pwrmgr restart
** CHANGE from LOG_ERR to LOG_INFO.
/etc/pwrmgr/
/proc/%d/fd/1
You should run as root
xfs,/dev/sda2
Ver.1.4

% strings /lsgl/usr/local/sbin/pwrmgr | sort | uniq
(いくつも省略、関係のありそうなもののみ)
** CHANGE from LOG_ERR to LOG_INFO.
, %s
/dev/console
/dev/ram0
/dev/root
/dev/ttyS0
/etc/.inittab.pwrmgr
/etc/cron/crontabs/root
/etc/init.d/standby.rcDown resume
/etc/init.d/standby.rcDown standby
/etc/inittab
/etc/mtab
/etc/nologin
/etc/pwrmgr/
/etc/pwrmgr/pwrmgrlog
/etc/pwrmgr/standby.config
/etc/pwrmgr/standby.df
/etc/pwrmgr/standby.inittab
/etc/pwrmgr/standby.mount
/lib/ld-linux.so.3
/mnt
/mnt/
/mnt/etc/pwrmgr/
/mnt/ram/
/mnt/ram//etc/pwrmgr/
/mnt/ram/etc/cron/crontabs/root
/mnt/ram/etc/inittab
/mnt/ram/etc/linkstation_emergence
/mnt/ram/etc/linkstation_standby
/mnt/ram/etc/pwrmgr/pclist
/mnt/ram/tmp/standby.config
/mnt/ram/tmp/standby.df
/mnt/ram/tmp/standby.mount
/mnt/ram/usr/local/sbin/pwrmgr
/proc/
/proc/%d/fd/1
/sbin/reboot
/tmp/.pwrmgrsock
/usr/local/sbin/pwrmgr
/var/run/%s.pid
::respawn:
GLIBC_2.4
Ver.1.4
(2009.01.20)

バッファロー社のfirmware アップデートのおさらい

buffalo社からLSーGLのfirmwareをアップデートの発表があって、これをするときの手順をおさらいしておく。
  1. http://buffalo.jp/から入る
  2. http://buffalo.jp/download/driver/hd/ls-gl.htmlまで進む
  3. そこに「LS-GLシリーズ ファームウェア アップデータ」というのがある
  4. http://buffalo.jp/download/driver/hd/ls-gl_fw.html まで進む
  5. 「LS-GLシリーズ ファームウェア アップデータ Ver.1.15(2008年5月26日掲載)」 とあるので
    2008年5月26日現在の最新ファームウェアは v1.15 である。
  6. ずっと下のほうにある「使用許諾契約に同意してダンロード」をクリックし、
    http://buffalo.jp/php/ldl.php?to=hd/lsgl-115.exe
    をダウンロードする。
    または、"wget http://buffalo.jp/php/ldl.php?to=hd/lsgl-115.exe" する。
  7. lsgl-115.exeはウインドウズ実行ファイル。
    これをMAC/LINUXではどうするかというと、"lha -x lsgl-115.exe"で解凍して使う。
  8. lha -x lsgl-115.exeをすると、
    % lha -x lsgl-115.exe 
    LS-GL_1.15.htm  - Melted   :  oo
    LS-GL_1.15/hddrootfs.img        - Melted   :  oooooooooooooooooooooooooooooooooo
    LS-GL_1.15/initrd.img   - Melted   :  ooooooooooooooooooooooooooooooooooooo
    LS-GL_1.15/linkstation_version.txt      - Melted   :  o
    LS-GL_1.15/LSUpdater.exe        - Melted   :  oooooooooooooooooooo
    LS-GL_1.15/lsupdater.ini        - Melted   :  o
    LS-GL_1.15/u-boot.buffalo.updated       - Melted   :  oooooooooooooooo
    LS-GL_1.15/uImage.buffalo       - Melted   :  oooooooooooooooooooooooooooooooo
    % ls
    123456789    LS-GL_1.15.htm  lsgl-115.exe
    LS-GL_1.15/  ls-gl_1.15/
    % ls LS-GL_1.15/
    LSUpdater.exe  initrd.img               lsupdater.ini           uImage.buffalo
    hddrootfs.img  linkstation_version.txt  u-boot.buffalo.updated
    % ls ls-gl_1.15/
    % rmdir ls-gl_1.15
    % ls -l 123456789 
    -rw-r--r-- 1 kamii kamii 0 Jan 21 09:15 123456789
    % ls -l LS-GL_1.15/
    total 80328
    -rw-r--r-- 1 kamii kamii   316720 Jul  4  2007 LSUpdater.exe
    -rw-r--r-- 1 kamii kamii 75066052 May 20  2008 hddrootfs.img
    -rw-r--r-- 1 kamii kamii  4799585 May 20  2008 initrd.img
    -rw-r--r-- 1 kamii kamii      226 May 20  2008 linkstation_version.txt
    -rw-r--r-- 1 kamii kamii      148 May 19  2008 lsupdater.ini
    -rw-r--r-- 1 kamii kamii   245776 May 19  2008 u-boot.buffalo.updated
    -rw-r--r-- 1 kamii kamii  1809460 May 20  2008 uImage.buffalo
    % cat LS-GL_1.15/linkstation_version.txt 
    VERSION=1.15-0.71
    BOOT=1.10
    KERNEL=2008/05/20 10:01:54
    INITRD=2008/05/20 10:02:20
    ROOTFS=2008/05/20 10:02:41
    FILE_BOOT = u-boot.buffalo.updated
    FILE_KERNEL = uImage.buffalo
    FILE_INITRD = initrd.img
    FILE_ROOTFS = hddrootfs.img
    % cat LS-GL_1.15/lsupdater.ini 
    [Application]
    Title = BUFFALO LS-GL Updater Ver.1.15
    WaitReboot = 240
    
    [Target]
    ProductID = 0x0009
    Name = LS-GL
    
    [Flags]
    VersionCheck = 1
    
2009年1月現在での最新バージョンは1.15である。
さてと、ここからだ
ダウンロードした lsgl-115.exe を料理する。
% lha -x lsgl-115.exe
% cd LS-GL_1.15/
% unzip hddrootfs.img
Archive:  hddrootfs.img
[hddrootfs.img] hddrootfs.buffalo.updated password:   <<==パスワードを入力
  inflating: hddrootfs.buffalo.updated
kamii@lsgl:LS-GL_1.15$ unzip initrd.img
Archive:  initrd.img
[initrd.img] initrd.buffalo password:         <<==パスワードを入力
  inflating: initrd.buffalo
kamii@lsgl:LS-GL_1.15$  
ここで入力したパスワードはかなり長い。どっちも41文字。
ここで使ったパスワードはこちら

これで hddrootfs.buffalo.updated と initrd.buffalo が取り出せた。
あと、u-boot.buffalo.updated と uImage.buffalo も。
% ls -l
total 159060
-rw-r--r-- 1 kamii kamii   316720 Jul  4  2007 LSUpdater.exe
-rw-r--r-- 1 kamii kamii 75764196 May 20  2008 hddrootfs.buffalo.updated
-rw-r--r-- 1 kamii kamii 75066052 May 20  2008 hddrootfs.img
-rw-r--r-- 1 kamii kamii  4852968 May 20  2008 initrd.buffalo
-rw-r--r-- 1 kamii kamii  4799585 May 20  2008 initrd.img
-rw-r--r-- 1 kamii kamii      226 May 20  2008 linkstation_version.txt
-rw-r--r-- 1 kamii kamii      148 May 19  2008 lsupdater.ini
-rw-r--r-- 1 kamii kamii   245776 May 19  2008 u-boot.buffalo.updated
-rw-r--r-- 1 kamii kamii  1809460 May 20  2008 uImage.buffalo
% file *.img
hddrootfs.img: Zip archive data, at least v2.0 to extract
initrd.img:    Zip archive data, at least v2.0 to extract
% file hddrootfs.buffalo.updated initrd.buffalo u-boot.buffalo.updated uImage.buffalo
hddrootfs.buffalo.updated: gzip compressed data, from Unix, last modified: Tue May 20 10:03:31 2008
initrd.buffalo:            PPCBoot image
u-boot.buffalo.updated:    data
uImage.buffalo:            PPCBoot image
% tar tzvf hddrootfs.buffalo.updated > ls-list.txt
% dd if=initrd.buffalo of=initrd.gz bs=64 skip=1
75826+1 records in
75826+1 records out
4852904 bytes (4.9 MB) copied, 3.1461 seconds, 1.5 MB/s
% gunzip initrd.gz
% sudo mount -o loop,ro ./initrd /mnt/loop0
% mount
LS-GL_1.15/initrd on /mnt/loop0 type ext2 (ro,loop=/dev/loop0)

ちょこっと変更したものをオリジナルのinitrdやuImageとしてそれを tftpサーバに入れ、それをオリジナルとみなすことにする。
変更箇所は initrdを mount -o loop,rw でマウントして
  • /etc/passwd にtoorとkamiiを追加
  • /etc/shadow にrootのパスワードをなくし、toorとkamiiに同じパスワードを設定
  • /linuxrcファイルを修正し、"hddSys is old."で止まらないようにする。
それを initrd.buffaloに戻す。リネームして initrd.newpwd とする。
# mv initrd.newpwd initrd
# gzip initrd
# mkimage -A ARM -O Linux -T RAMDisk -C gzip -a 0x00000000 -e 0x00000000 \
  -n initrd -d initrd.gz initrd.buffalo
Image Name:   initrd
Created:      Wed Jan 21 21:44:24 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4882917 Bytes = 4768.47 kB = 4.66 MB
Load Address: 0x00000000
Entry Point:  0x00000000
# mkimage -l initrd.buffalo    <<======これで確認をする
Image Name:   initrd
Created:      Wed Jan 21 21:44:24 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4882917 Bytes = 4768.47 kB = 4.66 MB
Load Address: 0x00000000
Entry Point:  0x00000000
# 
この initrd.buffalo をtftpサーバーにアップロード。準備完了
これを使って玄箱/Proのほうで試してみた。
まずはHDはいれっぱなしのままで実験(結果、==>>失敗をする)
玄箱/Proにシリアルケーブルをつなぎ、tftpブートでゴー!!
途中で
* A maintenance shell will now be started. 
CONTROL-D will terminate this shell and resume system boot.
Press enter for maintenance
(or type Control-D to continue):   <<=====ここで↑Dを打った
... done.
となったので、しかたない、ここで↑Dを打って、コンティニューした。
"Starting system log daemon: syslogd"のあと、ダンマリになってしまった。
pingすると通じているが、telnetもsshも使えない。
しかたない。前面パネルのパワーボタン長押しで強制シャットダウン。
あんまりうまくないね。
このときのシルアルコンソールに出た記録は これ。
あ、しまった。"/linuxrc"が元のままだから、いろいろなファイルが 書き換えられてしまった。失敗、失敗。復元するのが大変だ。
/linuxrc を神居特製のにコピーしなおして、また改めて、initrd.buffaloを作成、 そしてtftpサーバーにコピー。

こんどはHDをはずして、再び、玄箱/Proで挑戦
hddrootfs.buffalo.tar.gz ですが、これを解凍してチェックしたところ、
etc/hddrootmode という空ファイルがなかったので、このファイルを 追加して、hddrootfs.kamii_buffalo.tar.gz という名前で保存した。
あと、flushqueue というプログラムはどこにあるんだろう。
最後の付近でこれがないと言われる。
(2009.01.17)

bluetoothについて(3) パスキー

H11T(イーモバイル)との接続のときにパスキーのやり取りをするが、 これがうまくいかない。
そこで、対症療法的な解決方法:
パスキー(あとほかの情報も)は
'/var/lib/bluetooth/00:10:DC:57:C7:A8/'
にアスキーで、データベース形式(キー データ)で入っている。
(00:10:DC:57:C7:A8はBlueToothデバイスのアドレス)
なので、ダイレクトにそこにパスキーを書いてしまうという対策を取った。
具体的には
# cat '/var/lib/bluetooth/00:10:DC:57:C7:A8/pincodes'
00:15:B7:**:**:** ****        <<== H11T-bdaddr スペース パスキー
00:02:C7:65:D1:3D 0826
である。
(2009.01.15)

bluetoothについて(2) バグフィックス

基本は v3.9 です。
bluez-libs-3.9.tar.gzと bluez-utils-3.9.tar.gzを使用。
カーネルモジュールのbluetooth関係はいじらないでそのまま。
対症療法ですが、つぎのようにして、少し誤魔化してみました。
bluez-libs-3.9.tar.gz
/usr/src/linux/include/net/bluetooth/はいじらないことにしました。
修正するファイルは bluez-libs-3.9/src/hci.c
852行目付近の
memcpy((void *) *ii, buf + sizeof(*ir), size);
           ↓
memcpy((void *) *ii, buf + sizeof(*ir)-2, size);
           ↓
memcpy((void *) *ii, buf + HCI_INQUIRY_REQ_SIZE, size);

さらに、bluez-libs-3.9/include/hci.h の中に(1589行目)
#define HCI_INQUIRY_REQ_SIZE 10
を追加しておく。
どうも調べると、2バイト分、ズレがあるようなんで、強制的に 2バイト分、ずらしてしまいました。
これをすると、 # hcitool scan はうまくいくようになる。
修正後、% ./configure ; make ; sudo make install すると
/usr/local/lib/libbluetooth* と /usr/local/include/bluetooth/*.h にインストールされる。

bluez-utils-3.9.tar.gz
しなければいけない修正はないが、修正をしておきたいのは
bluez-utils-3.9/scripts/bluetooth.init の8行目
PATH=/sbin:/bin:/usr/sbin:/usr/bin
       ↓
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
それと、これは好みによるが私はこうした。28行目付近
HCID_ENABLE=true
SDPD_ENABLE=false
HIDD_ENABLE=false
HID2HCI_ENABLE=false
RFCOMM_ENABLE=false
DUND_ENABLE=false
PAND_ENABLE=false
    ↓
HCID_ENABLE=true
SDPD_ENABLE=true
HIDD_ENABLE=false
HID2HCI_ENABLE=false
RFCOMM_ENABLE=true
DUND_ENABLE=true
PAND_ENABLE=true
これはそのまま /etc/init.d/bluetooth にコピーされる。

次にbluez-utils-3.9/hcid/hcid.conf ファイルを修正。
この修正も好みで。
これはそのまま /etc/bluetooth/hcid.conf にコピーされる。

% ./configure --enable-usb --enable-hcid --enable-sdpd --enable-hidd --enable-test --enable-cups --enable-configfiles --enable-initscripts --enable-hid2hci ; make ; sudo make install すると
/usr/local/sbin/* と /usr/local/bin/* にインストールされる。
あと、/etc/init.d/bluetooth や /etc/bluetooth/hcid.conf なども更新される。

注意すべきは、今後、apt-get でbluetooth関係を入れないことですね。

さらに解説:
別の機種と比較しました。
LS−GLだとsizeof(struct hci_inquiry_req)は「12」になりました。
ところが他のマシンだとこれが「10」です。というわけで、
sizeof(*ir)-2 でちょうとつじつまが合うということになります。

# hciconfig したときに
# hciconfig
hci0:   Type: USB
        BD Address: 00:10:DC:57:C7:A8 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:440 acl:0 sco:0 events:21 errors:0
        TX bytes:327 acl:0 sco:0 commands:20 errors:0
のようにPSCAN のあとにISCANがなければ
# hciconfig hci0 piscan
のようにすると
# hciconfig
hci0:   Type: USB
        BD Address: 00:10:DC:57:C7:A8 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN 
        RX bytes:440 acl:0 sco:0 events:21 errors:0
        TX bytes:327 acl:0 sco:0 commands:20 errors:0
となる。
(2009.01.13)

bluetoothについて(1)

まだ、どうもおかしい。
hcitool scan
の出力をみると、どこかの struct{}が微妙にズレてるんではと推察する。
古いマシンでちゃんと動いているのが 3.9 のだったので、 ここはちょっと古いけど、3.9のに統一して、コンパイルしてみようかな。
bluez-libs-3.9.tar.gzと bluez-utils-3.9.tar.gz をもってきてやってみよう。
% cat bluez-utils-3.9-MEMO
#./configure にオプションをつける。つぎのように。

./configure --enable-usb --enable-hcid --enable-sdpd --enable-hidd  --enable-tes
t --enable-cups --enable-configfiles --enable-initscripts  --enable-hid2hci

THEN

make
sudo make install

exit

あるいは、こっちでも大丈夫になったか?(イヤ、まだ)
./configure --enable-all

結果:ああ、残念。ダメだったよ。
include fileは
  • /usr/src/linux/include/net/bluetooth/
  • /usr/include/bluetooth/
  • /usr/local/include/bluetooth/
の3つの場所にある。これらが全部バラバラな中身になっている。
それが問題なのか。
最新のは/usr/local/include/bluetooth/のはず。
/usr/include/bluetooth/は不要?
(2009.01.12)

AppleTalkの起動をバックグラウンドで

起動シーンを見てると、AppleTalk の起動のところでかなり時間をとられてる。
Starting AppleTalk services (this will take a while):
NET: Registered protocol family 5
ここをバックグラウンドにしたいなと思っていたら、 そういう設定にもできることがわかった。
/etc/init.d/netatalk の部分にATALK_BGROUND=noを見つけた。
これをyesにすればバックグラウンドになるはず。って失敗。
直す個所はここではなくて、/etc/default/netatalkがよろしい。
このファイルを修正して、無事に成功。
Starting AppleTalk services in the background.
(2009.01.10)

LS-GLのサブボードとKuroProのサブボードを交換

どのように違ってくるのか調べるために、サブボードを交換してみた。
逆バージョンは玄箱/Proのページのほうに書いた。
シリアルコンソールは次のように出て、違いをdiffしてみた。
Script started on Sat Jan 10 23:31:34 2009
bash-3.2$ cu -l '/dev/cu.I-O DATA USB-RSAQ5' -s 115200
Connected.
Orion1   CPU =  Low 

=== BUFFALO LS-GL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_GL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Apr 18 2007 - 18:35:44) Marvell version: 1.12.1 - TINY

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

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz 
Orion 1 streaming disabled 
SysClock = 200Mhz , 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

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD1600AAJS-00PSA0                    Firm: 05.06H05 Ser#:      WD-WCAP9A669853
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/initrd.buffalo

4883837 bytes read
Using device ide1, partition 1
** Bad partition 1 **
Booting from Device 0 
hit any key to switch tftp boot.
Hit any key to stop autoboot:  2  1  0 
Hit any key to stop autoboot:  3  2  1  0 

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD1600AAJS-00PSA0                    Firm: 05.06H05 Ser#:      WD-WCAP9A669853
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/uImage.buffalo

1887188 bytes read
Using device ide1, partition 1
** Bad partition 1 **
<<stop_sound>>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.16.16-arm1
   Created:      2009-01-07  14:46:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1887124 Bytes =  1.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2009-01-01   9:50:49 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4883773 Bytes =  4.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.10
CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSGL ---
Uncompressing Linux........................................
...........................................................
...................... done, booting the kernel.
Linux version 2.6.16.16-arm1 (kamii@lsgl) (gcc version 4.1.2 20061115
 (prerelease) (Debian 4.1.1-21)) #4 Wed Jan 7 23:45:39 JST 2009
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 200000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3 

Memory policy: ECC disabled, Data cache writeback
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
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.10
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: 110392KB available (3229K code, 538K data, 104K 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: 15360K
NET: Registered protocol family 16
FLASH boardId = 12
Flash bankwidth 1, base ff800000, size 400000
BUFFALO LS_GL FLASH size 4096[KB]

  Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_GL 

 Detected Tclk 166664740 and SysClk 200000000 
Marvell USB EHCI Host controller #0: c16f5e00
Marvell USB EHCI Host controller #1: c16f5c00
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 IDMA acceleration in copy to/from user buffers. used channels 2 and 3 
Done. 
cesadev_init(c00112bc)
mvCesaInit: sessions=640, queue=32, pSram=f0000000
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
SGI XFS with large block numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered (default)
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
RAMDISK driver initialized: 3 RAM disks of 16384K 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 (0)
'eth0' 
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
  Vendor:           Model: WD1600AAJS-00PSA  Rev: 05.0
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c145bba0
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
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.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
ehci_platform ehci_platform.4523: EHCI Platform 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: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: Product: EHCI Platform Host Controller
usb usb1: Manufacturer: Linux 2.6.16.16-arm1 ehci_hcd
usb usb1: SerialNumber: ehci_platform.4523
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Platform 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: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: Product: EHCI Platform Host Controller
usb usb2: Manufacturer: Linux 2.6.16.16-arm1 ehci_hcd
usb usb2: SerialNumber: ehci_platform.16781
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v2.3
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
MICON V2 (C) BUFFALO INC. V.1.00 installed.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
---- in modified linuxrc (KAMII) ---
Sat Jan 10 23:33:03 JST 2009
err: >AnalyzeRecvPacket:This is invalid RespCode.(code=244)
CheckDevices
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
PRODUCTID=0x00000009 PRODUCTID=0x00000009
KERNEL:2009/1/1 1:8:37
HDD:2008/5/20 10:2:41
KERNEL:2008/5/20 10:2:20
HDD:2008/5/20 10:2:41
***(WARN) hddSys is old. ***
-- CopyFromInitrdToHdd --
== fsck_disks ==
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/ls_disk1_1: 34/74296 files (26.5% non-contiguous), 58772/297171 blocks
4+0 records in
4+0 records out
XFS mounting filesystem sda2
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - agno = 8
        - agno = 9
        - agno = 10
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - agno = 15
        - agno = 16
        - agno = 17
        - agno = 18
        - agno = 19
        - agno = 20
        - agno = 21
        - agno = 22
        - agno = 23
        - agno = 24
        - agno = 25
        - agno = 26
        - agno = 27
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - clear lost+found (if it exists) ...
        - clearing existing "lost+found" inode
        - marking entry "lost+found" to be deleted
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - agno = 8
        - agno = 9
        - agno = 10
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - agno = 15
        - agno = 16
        - agno = 17
        - agno = 18
        - agno = 19
        - agno = 20
        - agno = 21
        - agno = 22
        - agno = 23
        - agno = 24
        - agno = 25
        - agno = 26
        - agno = 27
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - ensuring existence of lost+found directory
        - traversing filesystem starting at / ... 
rebuilding directory inode 128
        - traversal finished ... 
        - traversing all unattached subtrees ... 
        - traversals finished ... 
        - moving disconnected inodes to lost+found ... 
Phase 7 - verify and correct link counts...
done
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 104K
INIT: version 2.86 booting
Activating swap...Adding 1004020k swap on /dev/sda5.  Priority:-1 extents:1 across:1004020k
done.
Checking root file system...fsck 1.40-WIP (14-Nov-2006)
/sbin/fsck.xfs: XFS file system.
done.
Setting the system clock..
Cleaning up ifupdown....
Loading kernel modules...done.
Loading device-mapper support.
Checking file systems...fsck 1.40-WIP (14-Nov-2006)
/dev/sda1: clean, 34/74296 files, 58772/297171 blocks
/sbin/fsck.xfs: XFS file system.
done.
Setting kernel variables...done.
Mounting local filesystems...kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda6
done.
Activating swapfile swap...done.
Setting up networking....
Starting hotplug subsystem:
   pci     
cat: /sys/bus/pci/devices/*/class: No such file or directory
cat: /sys/bus/pci/devices/*/vendor: No such file or directory
cat: /sys/bus/pci/devices/*/device: No such file or directory
cat: /sys/bus/pci/devices/*/subsystem_vendor: No such file or directory
cat: /sys/bus/pci/devices/*/subsystem_device: No such file or directory
Bad PCI agent invocation
   pci      [success]
   usb     
   usb      [success]
   isapnp  
   isapnp   [success]
   ide     
   ide      [success]
   input   
   input    [success]
   scsi    
     sd_mod: can't be loaded (for disk)
   scsi     [success]
done.
Configuring network interfaces...Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

eth0: link down
Listening on LPF/eth0/00:16:01:f5:4f:e4
Sending on   LPF/eth0/00:16:01:f5:4f:e4
Sending on   Socket/fallback
eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.254.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.254.254
bound to 192.168.0.29 -- renewal in 295 seconds.
done.
Starting portmap daemon....
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting portmap daemon...Already running..
Starting bluemon: disabled in /etc/default/bluemon
Starting system message bus: dbus.
Starting MTA: exim4.
Starting internet superserver: inetd.
hostname: Unknown host
hostname: Unknown host
Starting AppleTalk services (this will take a while): NET: Registered protocol family 5
Usage: nbprgstr [ -A address ] [-m Mac charset] [ -p port] obj:type@zone
Usage: nbprgstr [ -A address ] [-m Mac charset] [ -p port] obj:type@zone
 atalkd papd afpd cnid_metad.
Starting Samba daemons: nmbd smbd.
Starting OpenBSD Secure Shell server: sshd.
Starting kernelmon:Starting NTP server: ntpd.
Starting bluetooth: hcidBluetooth: Core ver 2.8
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
 sdpdBluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
 sdp_optionsBluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.7
 rfcommBluetooth: BNEP (Ethernet Emulation) ver 1.2
Bluetooth PAN daemon version 3.7 
Usage:
	pand <options>
Options:
	--show --list -l          Show active PAN connections
	--listen -s               Listen for PAN connections
	--connect -c <bdaddr>     Create PAN connection
	--autozap -z              Disconnect automatically on exit
	--search -Q[duration]     Search and connect
	--kill -k <bdaddr>        Kill PAN connection
	--killall -K              Kill all PAN connections
	--role -r <role>          Local PAN role (PANU, NAP, GN)
	--service -d <role>       Remote PAN service (PANU, NAP, GN)
	--ethernet -e <name>      Network interface name
	--device -i <bdaddr>      Source bdaddr
	--nosdp -D                Disable SDP
	--auth -A                 Enable authentication
	--encrypt -E              Enable encryption
	--secure -S               Secure connection
	--master -M               Become the master of a piconet
	--nodetach -n             Do not become a daemon
	--persist -p[interval]    Persist mode
	--cache -C[valid]         Cache addresses
	--pidfile -P <pidfile>    Create PID file
	--devup -u <script>       Script to run when interface comes up
 pand.
ProFTPd is started from inetd/xinetd.
Starting periodic command scheduler: crond.
Starting web server (apache2)...apache2: apr_sockaddr_info_get() failed for lsgl
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
.
flushqueue

Debian GNU/Linux 4.0 lsgl ttyS0

lsgl login: root
Last login: Thu Jan  8 09:15:44 2009 from 192.168.0.39 on pts/1
Linux lsgl 2.6.16.16-arm1 #4 Wed Jan 7 23:45:39 JST 2009 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
lsgl:~# uname -a
Linux lsgl 2.6.16.16-arm1 #4 Wed Jan 7 23:45:39 JST 2009 armv5tejl GNU/Linux
lsgl:~# date
Sat Jan 10 23:35:49 JST 2009
lsgl:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root             29288256   2783956  26504300  10% /
tmpfs                    63008         0     63008   0% /lib/init/rw
tmpfs                    63008         0     63008   0% /dev/shm
/dev/sda1               287785     49386    223541  19% /boot
/dev/sda6            125623128    639280 124983848   1% /mnt/disk1
lsgl:~# mount
/dev/root on / type xfs (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (ro,nosuid,nodev)
/dev/sda6 on /mnt/disk1 type xfs (rw)
lsgl:~# shutdown -h now

Broadcast message from root@lsgl (ttyS0) (Sat Jan 10 23:36:12 2009):

The system is going down for system halt NOW!
INIT: Switching to runINIT: Sending processes the TERM signal
Stopping web server (apache2)...apache2: apr_sockaddr_info_get() failed for lsgl
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
.
Stopping periodic command scheduler: crond.
Stopping Samba daemons: nmbd smbd.
Stopping bluemon: bluemon.
Stopping Common Unix Printing System: cupsd.
Stopping system message bus: dbus.
Stopping MTA: exim4_listener.
Stopping advanced IEEE 802.11 management: hostapd.
Stopping internet superserver: inetd.
hostname: Unknown host
hostname: Unknown host
Stopping AppleTalk Daemons: afpd papd timelord atalkd cnid_metad.
Stopping System status server: rwhod.
Stopping OpenSLP server: slpd.
Stopping OpenBSD Secure Shell server: sshd.
Stopping NTP server: ntpd.
Saving the system clock..
ProFTPd is started from inetd/xinetd.
Stopping bluetooth: pand rfcomm sdpd hcid.
Stopping domain name service...: bindrndc: connect failed: 127.0.0.1#953: connection refused
 failed!
Stopping kernel log daemon: klogd.
Stopping system log daemon: syslogd.
Asking all remaining processes to terminate...done.
Killing all remaining processes...done.
Deconfiguring network interfaces...There is already a pid file /var/run/dhclient.eth0.pid with pid 627
removed stale PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:16:01:f5:4f:e4
Sending on   LPF/eth0/00:16:01:f5:4f:e4
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.254.254 port 67
done.
Cleaning up ifupdown....
Deactivating swap...done.
Unmounting local filesystems...done.
Will now halt.
Synchronizing SCSI cache for disk sda: 
System halted.
>miconCntl_PowerOff
>miconCntl_ShutdownWait
Core Driver (ERROR) 0 0: Edma Error Reg 0x28
Core Driver (ERROR) 0 0: Flush DMA, type=CALLBACK, commands 0 (on EDMA 0)
~.
Disconnected.
bash-3.2$ exit
exit

Script done on Sat Jan 10 23:36:37 2009
(2009.01.06e)

usb.usermapで新しいUSB製品にも対応

hotplugの場合、新規製品には/etc/hotplug/usb.usermapで対応します。
名前のようにユーザーが書いてもよいファイルです。
USBを挿したときに、自動判別してカーネルモジュールをロードしてくれますが、
新しい製品だとどのモジュールを入れていいかわからず、何もしてくれません。
そんなときにこのファイルを利用します。 同じようなファイルは
  • depmod -a で勝手に作ってくれる /lib/modules/2.6.16.16-arm1/modules.usbmap
  • /etc/hotplug/usb.distmap
  • /etc/hotplug/usb.handmap
などがあります。

usb.usermap には次の形式で記入します。
<例>
BUFFALO LUA2-TX を挿入したあと、
# lsusb したら、
root@lsgl:~# lsusb
Bus 002 Device 002: ID 0411:0009 MelCo., Inc. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
root@lsgl:~# 
と出たとします。ここからわかるのは、ベンダー= 0x0411 製品= 0x0009 です。
その場合、
### BUFFALO LUA2-TX     ここは単なるコメント
pegasus 0x0003 0x0411 0x0009 0x0 0x0 0x0 0x0 0x0 0xff 0xff 0xff 0x00000000
を追加します。

(解説)
0x0003 はこのまま。(この意味は次の2つで決定するよという意味)
つづいて、ベンダー、製品の順で、のこりは常にこのようにします。
(2009.01.06d)

USB有線LANアダプタは使えそう

USBに挿すと、こんなものが/var/log/messagesに出てた。


MAC対応の100Mbps の BUFFALO LUA2-U2-ATX USB有線LANアダプタを差したとき
(こいつはax88178 なのか?ASIX ElecのAX88x72Aなのか?)
どこかにASIX AX88772 or AX88のドライバーがないかな?
http://www.asix.com.tw./
www.xmos.com
http://www.cs.caltech.edu/~weixl/research/fast-mon/drivers/net/pcmcia/
あたりにあるのか。。。
Jan  6 17:06:31 lsgl kernel: usb 2-1: new high speed USB device using ehci_platform and address 4
Jan  6 17:06:32 lsgl kernel: usb 2-1: Product: AX88x72A
Jan  6 17:06:32 lsgl kernel: usb 2-1: Manufacturer: ASIX Elec. Corp.
Jan  6 17:06:32 lsgl kernel: usb 2-1: SerialNumber: 4001BC
Jan  6 17:06:32 lsgl kernel: usb 2-1: configuration #1 chosen from 1 choice
そのときに、 % lsmod してみても、モジュールはロードされないから変化はない。
root@lsgl:~# lsmod
Module                  Size  Used by
bnep                   10816  0 
rfcomm                 34488  0 
l2cap                  19556  6 bnep,rfcomm
bluetooth              42968  5 bnep,rfcomm,l2cap
appletalk              31920  20 
psnap                   3140  1 appletalk
llc                     6036  1 psnap
#
% lsusb してみる。
root@lsgl:~# lsusb
Bus 002 Device 002: ID 0b95:7720 ASIX Electronics Corp. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
root@lsgl:~# 

(BUFFALO LUA2-TXが成功した。)
100Mbps の BUFFALO LUA2-TX USB有線LANアダプタを差したとき
(これはpegasus)
Jan  6 17:08:26 lsgl kernel: usb 2-1: new full speed USB device using ehci_platform and address 5
Jan  6 17:08:26 lsgl kernel: usb 2-1: Product: BUFFALO LUA2-TX
Jan  6 17:08:26 lsgl kernel: usb 2-1: Manufacturer: LUA2-TX
Jan  6 17:08:26 lsgl kernel: usb 2-1: SerialNumber: 0009
Jan  6 17:08:26 lsgl kernel: usb 2-1: configuration #1 chosen from 1 choice
Jan  6 17:08:29 lsgl kernel: pegasus: v0.6.13 (2005/11/13), Pegasus/Pegasus II USB Ethernet driver
Jan  6 17:08:30 lsgl kernel: pegasus 2-1:1.0: setup Pegasus II specific registers
Jan  6 17:08:30 lsgl kernel: pegasus 2-1:1.0: eth1, MELCO/BUFFALO LUA2-TX, 00:0d:0b:48:2e:f3
Jan  6 17:08:30 lsgl kernel: usbcore: registered new driver pegasus
Jan  6 17:08:30 lsgl usb.hotplug[2616]:      pegasus: loaded successfully
Jan  6 17:08:30 lsgl dhcpcd.exe: interface eth0 has been configured with old IP=192.168.0.29
そのときに、 % lsmod してみる。
root@lsgl:~# lsmod
Module                  Size  Used by
pegasus                24112  0 
bnep                   10816  0 
rfcomm                 34488  0 
l2cap                  19556  6 bnep,rfcomm
bluetooth              42968  5 bnep,rfcomm,l2cap
appletalk              31920  20 
psnap                   3140  1 appletalk
llc                     6036  1 psnap
root@lsgl:~# 
% lsusb してみる。
root@lsgl:~# lsusb
Bus 002 Device 002: ID 0411:0009 MelCo., Inc. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
root@lsgl:~# 
それを抜いたとき
Jan  6 17:10:23 lsgl kernel: usb 2-1: USB disconnect, address 5
Jan  6 17:10:25 lsgl dhcpcd.exe: interface eth0 has been brought down

PLANEX の 1000Mbps USB有線LANアダプター GU-1000T を差したとき
(これはASIX Elecの製品か?)
Jan  6 17:10:44 lsgl kernel: usb 2-1: new high speed USB device using ehci_platform and address 6
Jan  6 17:10:45 lsgl kernel: usb 2-1: Product: GU-1000T
Jan  6 17:10:45 lsgl kernel: usb 2-1: Manufacturer: PLANEX COM. Inc.
Jan  6 17:10:45 lsgl kernel: usb 2-1: SerialNumber: 000909
Jan  6 17:10:45 lsgl kernel: usb 2-1: configuration #1 chosen from 1 choice
そのときに、 % lsusb してみる。(lsmod では変化は無い)
root@lsgl:~# lsusb
Bus 002 Device 003: ID 0b95:1780 ASIX Electronics Corp. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
root@lsgl:~# 
それを抜いたとき
Jan  6 17:12:26 lsgl kernel: usb 2-1: USB disconnect, address 6
関連ファイル:
/etc/hotplug/
/etc/hotplug/usb.distmap   --  /lib/modules/xxx/modules.usbmap 似?
/etc/hotplug/usb.usermap   --  ここに記述?
/etc/hotplug/usb/
/etc/hotplug/usb/usb.hotplug
/etc/hotplug/usb/pegasus
/etc/hotplug/usb/zd1211b
/etc/hotplug/usb/prism2_usb
/etc/network/interfaces
/etc/network/run/.ifstate.tmp
/etc/network/run/ifstate
/sbin/dhclient
/sbin/dhclient3
/sbin/dhcpcd
/sbin/udhcpc
/sbin/pump
/sbin/start-stop-daemon

わかったぞ、モジュールが。
MELCOLUA2-U2-ATXasix0b95:7720www.asix.com.tw.
MELCOLUA2-TXpegasus0411:0009
PLANEXGU-1000Tasix0b95:1780www.asix.com.tw.

3機種とも、無事イーサーケーブルを着けて接続成功
(2009.01.06c)

-- MARK --ってなんだ?

/var/log/messagesを見たら、ジャスト20分おきに
Jan  6 11:59:33 lsgl -- MARK --
Jan  6 12:19:34 lsgl -- MARK --
Jan  6 12:39:34 lsgl -- MARK --
Jan  6 12:59:35 lsgl -- MARK --
Jan  6 13:19:35 lsgl -- MARK --
Jan  6 13:39:35 lsgl -- MARK --
Jan  6 13:59:36 lsgl -- MARK --
Jan  6 14:19:36 lsgl -- MARK --
Jan  6 14:39:37 lsgl -- MARK --
Jan  6 14:59:37 lsgl -- MARK --
と出てる。いったいどいつがこれを出しているんだろう。やめたいな。
/sbin/syslogd が出してるとわかった。
/sbin/syslogd -m 0 とするとマークが出ないことがわかった。
なので、 /etc/default/syslogd ファイルを修正。
SYSLOGD="-m 0" と、変更
(2009.01.06b)

prism2_usbなUSB無線LANは断念か

これは11Mbps出し、古すぎるし、もう使わないだろうから 断念するか。どうやらこれはロードするたんびに ファームウェアをアップロードするようなのだ。 そういう点も気に入らない。
(2009.01.06a)

hotplugで自動起動

USBにデバイスを挿入したら、自動で使えるようにhotplugお利用する。
murasaki,usbmgr,hotplugと似たようなのがある。
ここでは、このうち、hotplugで。
/etc/をみると、 /etc/hotplug/ と /etc/hotplug.d/の二つがある。
きっと、バージョンの違うのを入れていて、二つ似たようなのを作って しまったのかもしれない。
わけがわからないので、とりあえず、この二つは合体させた。
いま動いているhotplugはXXXXX.hotplug を実行させるようだ。
でもXXXXX.agent というのがいくつもある。機能は同じだから きっと名前の違いと場所の違いだけらしいから、リンクを張ってごまかす。
これでだいたいうまくいった。
zd1211bのモジュールを使うUSB無線LANアダプタがあるので、
/etc/hotplug/usb/zd1211b,/etc/hotplug/usb,zd1211b.offをシェルで 作成、実行モードにしておく。
これでUSBを差すと、おお、 # ifconfig で wlan0 が見えた。使えた。
USBを差すと、/proc/sys/kernel/hotplug に書かれてるプログラムが起動される。
/proc/sys/kernel/hotplugには/sbin/hotplugと書かれているので、
最初には/sbin/hotplugが実行される。ここからスタートする。
/etc/hotplug/usb/usb.hotplug は ../usb.agent にリンクしてある。
# cd /etc/hotplug/usb
# ls -l
total 12
-rw-r--r-- 1 root root  73 Jan  3 21:14 prism2_usb
lrwxrwxrwx 1 root root  12 Jan  3 20:03 usb.hotplug -> ../usb.agent*
lrwxrwxrwx 1 root root   7 Jan  6 08:47 zd1211 -> zd1211b*
-rwxr-xr-x 1 root root 483 Jan  6 08:46 zd1211b*
-rwxr-xr-x 1 root root 169 Jan  3 20:09 zd1211b.off*
# cat zd1211b.off
#!/bin/sh
ifdown wlan0
# cat zd1211b
#!/bin/sh
ifup wlan0
ifconfig wlan0 192.168.0.72 netmask 255.255.255.0
iwconfig wlan0 essid "WorldDisney" 
iwconfig wlan0 mode managed
iwconfig wlan0 channel 11
/sbin/dhclient wlan0
ln -s /etc/hotplug/usb/zd1211b.off $REMOVER

prism2のUSB無線LANアダプタを差すと、
どうも、別らしくて、/etc/hotplug/wlan.agentが動き、そして
Jan 6 08:48:33 lsgl wlan.agent[1449]: /sbin/wlanctl-ng not found.
と言われる。
ps ax したら
 1108 pts/1    S+     0:00 tail -f /var/log/messages
 1266 ?        S<     0:00 /bin/bash /etc/hotplug/wlan.agent wlan
 1302 ?        S<s    0:00 /bin/sh /etc/hotplug/net.ifup wlan0
 1307 ?        S<     0:00 /bin/sh /sbin/wlanctl-ng wlan0 lnxreq_ifstate ifstate
 1309 ?        S<     0:00 ifup --allow=hotplug wlan0
 1310 ?        S<     0:00 run-parts /etc/network/if-pre-up.d
 1312 ?        S<s    0:00 /bin/sh /etc/network/if-pre-up.d/linux-wlan-ng-pre-up
 1315 ?        S<     0:00 /sbin/dhclient wlan0
 1320 ?        S<     0:00 /bin/sh /sbin/wlanctl-ng wlan0 lnxreq_ifstate ifstate
 1323 ?        S<     0:00 /sbin/dhclient wlan0
 1345 pts/0    R+     0:00 ps ax
があった。
(2009.01.04b)

printk,klogd の原理

バグをフィックスしたのでついでにprintk,klogdに関するメモ

printk関数の使用例

カーネルメッセージを出力するサンプルプログラム。 このプログラムは、モジュールの読み込み時と取り外し時にログレベルKERN_ALERTで カーネルメッセージを出力する。
/* hello.c - kernel message sample program */
#define MODULE
#include <linux/module.h> 
int init_module(void) {printk("<1>Hello, \n"); return 0;} 
void cleanup_module(void) {printk("<1>Goodbye \n");}

コンソールログレベルの設定

 コンソール出力を行うログレベルであるコンソールログレベルの変更は、 仮想ファイル/proc/sys/kernel/printkの値およびklogdに与えるパラメータを変更する ことで行える。
それぞれのパラメータの意味は表のごとく。
klogd起動時に与える引数でもコンソールログレベルは指定できる。
# klogd -c <ログレベル>

# cat /proc/sys/kernel/prink
1   4   1   7
|   |   |   |
|   |   |   +------- default_console_loglevel
|   |   +----------- minimum_console_loglevel
|   +--------------- default_meddage_level
+------------------- console_loglevel

/proc/sys/kernel/printkにおける各パラメータの意味
パラメータ意味
console_loglevel現在のコンソールログレベル
default_message_levelログレベルが指定されていないメッセージに付加するログレベル
minimum_console_loglevelコンソールログレベルに設定できる最小のログレベル
default_console_loglevelデフォルトのコンソールログレベル

 ただし、/proc/sys/kernel/printk中のminimum_console_loglevel値よりも小さい ログレベルを指定した場合は、コンソールログレベルは強制的に minimum_console_loglevelの値に設定される。
また、引数でログレベルを指定しない場合、コンソールログレベルは default_console_loglevelの値に設定される。
(2009.01.04a)

BlueToothは使えるか

# aptitude install bluetooth bluez-utils して基本をインストール。
Xウインドウでのアプリのために、gnomeを使うか、kdeを使うかで、
# aptitude install bluez-gnome または
# aptitude install kdebluetooth でインストール(両方してもいいけど)
どうもバグらしいので # dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable を実行するか、あるいはこれを /etc/init.d/bluetooth に 入れて実行するようにしておく。

# hcitool dev で確認。
# hcitool scan で周りのBlueTooth製品をスキャンしてみる。
BlueToothにつきもののパスキーについては、
/etc/bluetooth/hcid.conf ファイルを少し修正。
passkey "xxxx"; のところは#をつけてコメントにしてしまう。
以下のように修正。
# passkey "2309";    <===コメントにする
pin_helper /usr/bin/bluez-pin;   <=== 付け加える
KDEだと /etc/bluetooth/link_key ファイルがないといけないから、
# touch /etc/bluetooth/link_key
# chmod 644 /etc/bluetooth/link_key
# /etc/init.d/bluetooth restart

/etc/default/bluetooth ファイルを修正
PAND_ENABLED=0
PAND_OPTIONS=""
の2ヶ所を修正
PAND_ENABLED=1
PAND_OPTIONS="--listen --role=NAP --devup /etc/bluetooth/pan/dev-up"
そして、次を実行
# mkdir /etc/bluetooth/pan
# touch /etc/bluetooth/pan/dev-up
# chmod 755 /etc/bluetooth/pan/dev-up
# vi /etc/bluetooth/pan/dev-up
  (略)
# cat /etc/bluetooth/pan/dev-up
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
ifup bnep0
sleep 2
/etc/init.d/dhcp3-server restart
#
これはIPフォワードか、まずいな、やめとくか。

/etc/network/interfaces ファイルに下を追加。
iface bnep0 inet static
          address 10.0.254.1
          netmask 255.255.255.240
		  
post-up iptables -t nat -A POSTROUTING -s 10.0.254.0/24 -j MASQUERADE
post-up iptables -A FORWARD -i bnep0 -o eth0 -j ACCEPT
post-up iptables -A FORWARD -o bnep0 -i eth0 -j ACCEPT
pre-down /etc/init.d/dhcp3-server stop


どうにもうまくいってない様子なんで、ザウルスのとを比較してみた。
BlueToothなUSBを挿してみると、/var/log/messages には次の内容が。
Jan  5 21:59:08 lsgl kernel: usb 2-1: new full speed USB device using ehci_platform and address 2
Jan  5 21:59:10 lsgl kernel: usb 2-1: configuration #1 chosen from 1 choice
Jan  5 21:59:19 lsgl kernel: Bluetooth: HCI USB driver ver 2.9
Jan  5 21:59:19 lsgl kernel: usbcore: registered new driver hci_usb
Jan  5 21:59:19 lsgl usb.hotplug[1113]:      hci_usb: loaded successfully
Jan  5 21:59:19 lsgl usb.hotplug[1111]:      hci_usb: loaded successfully
Jan  5 21:59:19 lsgl usb.hotplug[1112]:      hci_usb: already loaded
そうしてコマンドを打ってみた。
root@lsgl:~# hciconfig
hci0:	Type: USB
	BD Address: 00:13:46:03:0A:9A ACL MTU: 192:8 SCO MTU: 64:8
	UP RUNNING PSCAN 
	RX bytes:486 acl:0 sco:0 events:18 errors:0
	TX bytes:313 acl:0 sco:0 commands:16 errors:0

root@lsgl:~# hcitool scan
Scanning ...
	02:01:00:1F:5B:D2	n/a
	02:01:00:16:CB:15	n/a
	02:01:00:15:B7:F7	n/a
root@lsgl:~#
さて、これをザウルスのと比較してみる。
bash-2.05# hciconfig
hci0:   Type: UART
        BD Address: 00:10:60:30:09:02 ACL MTU: 192:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:271 acl:0 sco:0 events:13 errors:0
        TX bytes:498 acl:0 sco:0 commands:12 errors:0

bash-2.05# hcitool scan
Scanning ...
        00:16:CB:15:2B:AA       Rainbow
        00:15:B7:F7:50:C5       H11T
        00:1F:5B:D2:6D:69       Fairy
bash-2.05#   
まずは
ザウルスでは UP RUNNING PSCAN ISCAN と出てる。
そして、hcitool scan した結果は
MACアドレスが違っているが、しかしよくみると、関連が。
LS-GLZaurusseihin
02:01:00:1F:5B:D200:1F:5B:D2:6D:69Fairy
02:01:00:16:CB:1500:16:CB:15:2B:AARainbow
02:01:00:15:B7:F700:15:B7:F7:50:C5H11T
つまりLS-GLでは頭の部分の02:01が間違っていて、最後の2バイトが欠落している。
さあて、なにかが悪い。
(2009.01.03d)

nvramの内容

# nvram -c printenv
1: [bootargs=$(bootargs_base) $(bootargs_root)]
2: [baudrate=115200]
3: [loads_echo=0]
4: [ipaddr=192.168.11.150]
5: [serverip=192.168.11.1]
6: [rootpath=/nfs/arm]
7: [cpuName=926]
8: [CASset=min]
9: [MALLOC_len=4]
10: [bootargs_end=:::DB88FXX81:eth0:none]
11: [ethact=egiga0]
12: [ethaddr=00:16:01:F5:4F:E4]
13: [buffalo_ver=BOOTVER=1.10]
14: [buffalo_minor_ver=BOOT_MINOR_VER=1.00]
15: [build_time=18:35:39]
16: [initrd=initrd.buffalo]
17: [kernel=uImage.buffalo]
18: [bootargs_base=console=ttyS0,115200]
19: [bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5]
20: [def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd)
    ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes
    ;bootm 0x00100000 0x00800000]
21: [ncip=192.168.11.1]
22: [netmask=255.255.255.0]
23: [nc=setenv stdout nc;setenv stdin nc;setenv stderr nc]
24: [ser=setenv stdin serial;setenv stdout serial;setenv stderr serial]
25: [stdin=serial]
26: [stdout=serial]
27: [stderr=serial]
28: [enaMonExt=no]
29: [enaFlashBuf=yes]
30: [enaCpuStream=no]
31: [ethprime=egiga0]
32: [disaMvPnp=no]
33: [overEthAddr=no]
34: [usb0Mode=host]
35: [usb1Mode=host]
36: [filesize=4A857D]     <=== 削除
37: [force_tftp=1]        <=== 削除 
38: [bootcmd=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd)
    ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes
    ;bootm 0x00100000 0x00800000]   <=== 失敗
39: [bootdelay=4]
# 
気になる部分を修正する。修正するにはブート時に シリアルコンソールでしなければならない。
===> bootcmd    変更。
===> tftpboot   は削除する。
===> force_tftp は削除する。
===> filesize   は削除する。
そうしてsaveenv
ただし、環境変数のセットはEMモードからnvramコマンドでやること。
tftpブートで立ち上げると今回のようなヘマをしてしまう。
あれぇ?bootcmdのセットが思うようにできない。''でくくってもダメ。どうして?
Marvell>> setenv bootcmd 'ide reset; ext2load ide 1:1 0x00100000 /$(kernel);ext2load ide 1:1 0x00800000 /$(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver);bootm 0x00100000 0x00800000'
** Too many args (max. 16) **
Marvell>>
となってしまう。
あと気がついたこと。
/usr/local/sbin/jump_to_lsgl(自家製)引数受け渡しのところが失敗なことに やっと気がついた。いまのは
% cat /usr/local/sbin/jump_to_lsgl
#!/bin/sh
CMD=/lsgl/usr/local/sbin/`basename $0`
LD_LIBRARY_PATH=/lsgl/lib $CMD $@
echo `date +%Y-%m-%d:%H:%M` $0 $* >> /lsgl/jump-log
正しくは
% cat /usr/local/sbin/jump_to_lsgl
#!/bin/sh
CMD=/lsgl/usr/local/sbin/`basename $0`
LD_LIBRARY_PATH=/lsgl/lib $CMD "$@"
echo `date +%Y-%m-%d:%H:%M` $0 $* >> /lsgl/jump-log
(2009.01.03c)

リブート&シャットダウンのコンソールログ バグ・フィックス

ひさしぶりに、起動のときと、シャットダウンのときのコンソール出力を 見てみる。
Orion1   CPU =  Low 

=== BUFFALO LS-GL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_GL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Apr 18 2007 - 18:35:44) Marvell version: 1.12.1 - TINY

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

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz 
Orion 1 streaming disabled 
SysClock = 200Mhz , 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

Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD1600AAJS-00PSA0                    Firm: 05.06H05 Ser#:      WD-WCAP9A669853
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)

Using device ide0, partition 1

Loading from block device ide device 0, partition 1: Name: hda1
  Type: U-Boot  File:/initrd.buffalo

4883837 bytes read
Using device ide1, partition 1
** Bad partition 1 **
Booting from Device 0 
hit any key to switch tftp boot.
Hit any key to stop autoboot:  2  1  0 
Hit any key to stop autoboot:  3  2  1  0 
Using egiga0 device
TFTP from server 192.168.11.1; our IP address is 192.168.11.150
Filename 'uImage.buffalo'.
Load address: 0x100000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ############################################
done
Bytes transferred = 1886640 (1cc9b0 hex)
Using egiga0 device
TFTP from server 192.168.11.1; our IP address is 192.168.11.150
Filename 'initrd.buffalo'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ############################################
done
Bytes transferred = 4883837 (4a857d hex)
<<stop_sound>>
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.16.16-arm1
   Created:      2008-12-31  16:37:06 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1886576 Bytes =  1.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   initrd
   Created:      2009-01-01   9:50:49 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4883773 Bytes =  4.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

arg:console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.10 tftpboot=yes
CONFIG_BUFFALO_PLATFORM CONFIG_BUFFALO_LINKSTATION_LSGL ---
Uncompressing Linux..............................
...................................................................
........................ done, booting the kernel.
Linux version 2.6.16.16-arm1 (kamii@lsgl) (gcc version 4.1.2 20061115 (prerelease)
   (Debian 4.1.1-21)) #1 Thu Jan 1 01:29:35 JST 2009
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 200000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3 

Memory policy: ECC disabled, Data cache writeback
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
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M
    panic=5 BOOTVER=1.10 tftpboot=yes
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: 110392KB available (3229K code, 538K data, 104K 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: 15360K
NET: Registered protocol family 16
FLASH boardId = 12
Flash bankwidth 1, base ff800000, size 400000
BUFFALO LS_GL FLASH size 4096[KB]

  Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_GL 

 Detected Tclk 166664740 and SysClk 200000000 
Marvell USB EHCI Host controller #0: c16f5e00
Marvell USB EHCI Host controller #1: c16f5c00
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 IDMA acceleration in copy to/from user buffers. used channels 2 and 3 
Done. 
cesadev_init(c00112bc)
mvCesaInit: sessions=640, queue=32, pSram=f0000000
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
SGI XFS with large block numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered (default)
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
RAMDISK driver initialized: 3 RAM disks of 16384K 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 (0)
'eth0' 
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
  Vendor:           Model: WD1600AAJS-00PSA  Rev: 05.0
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c7791ba0
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
physmap flash device: 400000 at ff800000
>jedec_probe
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.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
ehci_platform ehci_platform.4523: EHCI Platform 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: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: Product: EHCI Platform Host Controller
usb usb1: Manufacturer: Linux 2.6.16.16-arm1 ehci_hcd
usb usb1: SerialNumber: ehci_platform.4523
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Platform 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: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: Product: EHCI Platform Host Controller
usb usb2: Manufacturer: Linux 2.6.16.16-arm1 ehci_hcd
usb usb2: SerialNumber: ehci_platform.16781
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v2.3
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
MICON V2 (C) BUFFALO INC. V.1.00 installed.
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
---- in modified linuxrc (KAMII) ---
Sat Jan  3 12:09:22 JST 2009
err: >AnalyzeRecvPacket:This is invalid RespCode.(code=244)
CheckDevices
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
PRODUCTID=0x00000009 PRODUCTID=0x00000009
KERNEL:2009/1/1 1:8:37
HDD:2008/5/20 10:2:41
KERNEL:2008/5/20 10:2:20
HDD:2008/5/20 10:2:41
***(WARN) hddSys is old. ***
-- CopyFromInitrdToHdd --
== fsck_disks ==
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/ls_disk1_1: 31/74296 files (19.4% non-contiguous), 53216/297171 blocks
4+0 records in
4+0 records out
XFS mounting filesystem sda2
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - agno = 8
        - agno = 9
        - agno = 10
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - agno = 15
        - agno = 16
        - agno = 17
        - agno = 18
        - agno = 19
        - agno = 20
        - agno = 21
        - agno = 22
        - agno = 23
        - agno = 24
        - agno = 25
        - agno = 26
        - agno = 27
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - clear lost+found (if it exists) ...
        - clearing existing "lost+found" inode
        - marking entry "lost+found" to be deleted
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - agno = 8
        - agno = 9
        - agno = 10
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - agno = 15
        - agno = 16
        - agno = 17
        - agno = 18
        - agno = 19
        - agno = 20
        - agno = 21
        - agno = 22
        - agno = 23
        - agno = 24
        - agno = 25
        - agno = 26
        - agno = 27
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - ensuring existence of lost+found directory
        - traversing filesystem starting at / ... 
rebuilding directory inode 128
        - traversal finished ... 
        - traversing all unattached subtrees ... 
        - traversals finished ... 
        - moving disconnected inodes to lost+found ... 
Phase 7 - verify and correct link counts...
done
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... /initrd does not exist. Ignored.
Unmounting old root
Trying to free ramdisk memory ... okay
Freeing init memory: 104K
INIT: version 2.86 booting
Activating swap...Adding 1004020k swap on /dev/sda5.  Priority:-1 extents:1 across:1004020k
done.
Checking root file system...fsck 1.40-WIP (14-Nov-2006)
/sbin/fsck.xfs: XFS file system.
done.
Setting the system clock..
Cleaning up ifupdown....
Loading kernel modules...done.
Loading device-mapper support.
Checking file systems...fsck 1.40-WIP (14-Nov-2006)
/dev/sda1: clean, 31/74296 files, 53216/297171 blocks
/sbin/fsck.xfs: XFS file system.
done.
Setting kernel variables...done.
Mounting local filesystems...kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda6
done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

eth0: link down
Listening on LPF/eth0/00:16:01:f5:4f:e4
Sending on   LPF/eth0/00:16:01:f5:4f:e4
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.254.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.254.254
bound to 192.168.0.29 -- renewal in 249 seconds.
done.
Starting portmap daemon....
Loading the saved-state of the serial devices... 
/dev/ttyS0 at 0x0000 (irq = 3) is a 16550A
/dev/ttyS1 at 0x0000 (irq = 4) is a 16550A
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting portmap daemon...Already running..
Starting Common Unix Printing System: cupsd.
Starting system message bus: dbus.
Starting advanced IEEE 802.11 management: disabled via /etc/default/hostapd.
Starting internet superserver: inetd.
hostname: Unknown host
hostname: Unknown host
Starting AppleTalk services (this will take a while): NET: Registered protocol family 5
Usage: nbprgstr [ -A address ] [-m Mac charset] [ -p port] obj:type@zone
Usage: nbprgstr [ -A address ] [-m Mac charset] [ -p port] obj:type@zone
 atalkd papd afpd cnid_metad.
Starting Samba daemons: nmbd smbd.
Starting OpenSLP server: slpd.
Starting OpenBSD Secure Shell server: sshd.
Starting kernelmon:Starting NTP server: ntpd.
Starting bluetooth: hcidBluetooth: Core ver 2.8
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
 sdpd sdp_optionsBluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.7
 rfcomm.
ProFTPd is started from inetd/xinetd.
Starting periodic command scheduler: crond.
Starting web server (apache2)...apache2: apr_sockaddr_info_get() failed for lsgl
apache2: Could not reliably determine the server's fully qualified domain name,
      using 127.0.0.1 for ServerName
.
flushqueue
umount: /initrd: not found

Debian GNU/Linux 4.0 lsgl ttyS0

>mv_set_rtc: 1230952301
lsgl login: root
>mv_set_rtc: 1230952361
Password: 
Last login: Sat Jan  3 11:51:14 2009 from 192.168.0.39 on pts/0
Linux lsgl 2.6.16.16-arm1 #1 Thu Jan 1 01:29:35 JST 2009 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
2 failures since last login.
Last was Wed Dec 31 12:12:38 2008 on pts/1.
>mv_set_rtc: 1230952421
lsgl:~# date
lsgl:~# uname -a
Linux lsgl 2.6.16.16-arm1 #1 Thu Jan 1 01:29:35 JST 2009 armv5tejl GNU/Linux
Sat Jan  3 12:13:49 JST 2009
lsgl:~# shutdown -h now

Broadcast message from root@lsgl (ttyS0) (Sat Jan  3 12:13:59 2009):

The system is going down for system halt NOW!
INIT: Switching to runINIT: Sending processes the TERM signal
Stopping web server (apache2)...apache2: apr_sockaddr_info_get() failed for lsgl
apache2: Could not reliably determine the server's fully qualified domain name,
   using 127.0.0.1 for ServerName
.
Stopping periodic command scheduler: crond.
Stopping Samba daemons: nmbd smbd.
Stopping Common Unix Printing System: cupsd.
Stopping system message bus: dbus.
Stopping advanced IEEE 802.11 management: hostapd.
Stopping internet superserver: inetd.
hostname: Unknown host
hostname: Unknown host
Stopping AppleTalk Daemons: afpd papd timelord atalkd cnid_metad.
Stopping System status server: rwhod.
Stopping OpenSLP server: slpd.
Stopping OpenBSD Secure Shell server: sshd.
Stopping NTP server: ntpd.
Saving the system clock..
ProFTPd is started from inetd/xinetd.
Stopping bluetooth: rfcomm sdpd hcid.
Stopping domain name service...: bindrndc: connect failed: 127.0.0.1#953: connection refused
 failed!
Stopping kernel log daemon: klogd.
Stopping system log daemon: syslogd.
Asking all remaining processes to terminate...done.
Killing all remaining processes...done.
Deconfiguring network interfaces...There is already a pid file /var/run/dhclient.eth0.pid with pid 566
removed stale PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:16:01:f5:4f:e4
Sending on   LPF/eth0/00:16:01:f5:4f:e4
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.254.254 port 67
done.
Cleaning up ifupdown....
Deactivating swap...done.
Unmounting local filesystems...done.
Will now halt.
Synchronizing SCSI cache for disk sda: 
System halted.
>miconCntl_PowerOff
>miconCntl_ShutdownWait
Core Driver (ERROR) 0 0: Edma Error Reg 0x28
Core Driver (ERROR) 0 0: Flush DMA, type=CALLBACK, commands 0 (on EDMA 0)
あれ?ftp-bootになってる。気がつかなかった。いつからこうなったんだろう。
気になる文字列は
** Bad partition 1 **
TFTP from server 192.168.11.1; our IP address is 192.168.11.150
err: >AnalyzeRecvPacket:This is invalid RespCode.(code=244)
>mv_set_rtc: 1230952421
カーネルが1分ごとにmv_set_rtcのログを出している。なんとかしたい。
これを調査してみた。出してる部分がみつかった。
/usr/src/linux/arch/arm/mach-mv88fxx81/LSP/time.cであった。
ここの72行目。mvOsPrintf(">mv_set_rtc: %ld\n",xtime.tv_sec);がおかしい。
これはprintkになっていくから、'>'ではだめで、おそらく'<7>'の 間違いである。
で、めんどいから、ここはコメントアウトにしてしまうように修正をかける。
そうしてまたカーネルを作り直しだぁ。
/usr/src/linux/arch/arm/boot/uImage が新しくなればオーケー。
/var/log/messagesを見てて、また新しいバグを発見してしまった。
こんどは、コレ。 >jedec_probe 。たぶん、これも<7>jedec_probeなんでは なかろうか。
ということで、どうせついでなんで、これも修正。
ファイルは /usr/src/linux/drivers/mtd/chips/jedec_probe.c
これの 2171行目を printk(">%s\n",__FUNCTION__); の箇所を修正し、
再び、 % cd /usr/src/linux ; make uImage する。
終了したら、% sudo -s でスーパーユーザーになり、
# mount -o remount,rw /boot
# cp -pi arch/arm/boot/uImage /tmp/
# cd /boot
# mv -i uImage.buffalo uImage.buffalo-004
# mv -i /tmp/uImage uImage.buffalo
そうしてから、リブート。
(2009.01.03b)

いままでaptitudeでインストールしたパッケージ

# dpkg -l | wc -l
390

# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  adduser        3.102          Add and remove users and groups
ii  apache2        2.2.3-4+etch6  Next generation, scalable, extendable web se
ii  apache2-mpm-pr 2.2.3-4+etch6  Traditional model for Apache HTTPD 2.1
ii  apache2-utils  2.2.3-4+etch6  utility programs for webservers
ii  apache2.2-comm 2.2.3-4+etch6  Next generation, scalable, extendable web se
ii  apt            0.6.46.4-0.1   Advanced front-end for dpkg
ii  apt-utils      0.6.46.4-0.1   APT utility programs
ii  aptitude       0.4.4-4        terminal-based apt frontend
ii  aspell         0.60.4-4       GNU Aspell spell-checker
ii  aspell-en      6.0-0-5.1      English dictionary for GNU Aspell
ii  autoconf       2.61-4         automatic configure script builder
ii  automake       1.10+nogfdl-1  A tool for generating GNU Standards-complian
ii  autotools-dev  20060702.1     Update infrastructure for config.{guess,sub}
ii  base-files     4              Debian base system miscellaneous files
ii  base-passwd    3.5.11         Debian base system master password and group
ii  bash           3.1dfsg-8      The GNU Bourne Again SHell
ii  biff           0.17.pre200004 a mail notification tool
rc  bind           8.4.7-1        Internet Domain Name Server
ii  bind9          9.3.4-2etch3   Internet Domain Name Server
ii  binutils       2.17-3         The GNU assembler, linker and binary utiliti
ii  bluetooth      3.7-1          Bluetooth stack utilities
ii  bluez-cups     3.7-1          Bluetooth printer driver for CUPS
ii  bluez-gnome    0.6-1          Bluetooth utilities for GNOME
ii  bluez-hcidump  1.32-1         Analyses Bluetooth HCI packets
ii  bluez-pcmcia-s 3.7-1          PCMCIA support files for BlueZ 2.0 Bluetooth
ii  bluez-utils    3.7-1          Bluetooth tools and daemons
ii  bsdmainutils   6.1.6          collection of more utilities from FreeBSD
ii  bsdutils       2.12r-19etch1  Basic utilities from 4.4BSD-Lite
ii  btscanner      2.1-3          ncurses-based scanner for Bluetooth devices
ii  bzip2          1.0.3-6        high-quality block-sorting file compressor -
ii  cdbs           0.4.48         common build system for Debian packages
ii  cdebootstrap   0.3.15         Bootstrap a Debian system
ii  cdebootstrap-s 0.5.3          Bootstrap a Debian system - static binary
ii  coreutils      5.97-5.3       The GNU core utilities
ii  cpio           2.6-18.1+etch1 GNU cpio -- a program to manage archives of 
ii  cpp            4.1.1-15       The GNU C preprocessor (cpp)
ii  cpp-4.1        4.1.1-21       The GNU C preprocessor
ii  cron           3.0pl1-100     management of regular background processing
ii  cupsys         1.2.7-4etch6   Common UNIX Printing System(tm) - server
ii  cupsys-bsd     1.2.7-4etch6   Common UNIX Printing System(tm) - BSD comman
ii  cupsys-client  1.2.7-4etch6   Common UNIX Printing System(tm) - client pro
ii  cupsys-common  1.2.7-4etch6   Common UNIX Printing System(tm) - common fil
ii  db4.2-util     4.2.52+dfsg-2  Berkeley v4.2 Database Utilities
ii  dbus           1.0.2-1+etch2  simple interprocess messaging system
ii  debconf        1.5.11etch2    Debian configuration management system
ii  debconf-i18n   1.5.11etch2    full internationalization support for debcon
ii  debhelper      5.0.42         helper programs for debian/rules
ii  debian-archive 2007.07.31~etc GnuPG archive keys of the Debian archive
ii  debianutils    2.17           Miscellaneous utilities specific to Debian
ii  defoma         0.11.10-0.1    Debian Font Manager -- automatic font config
ii  dhcp3-client   3.0.4-13       DHCP Client
ii  dhcp3-common   3.0.4-13       Common files used by all the dhcp3* packages
ii  dhcpcd         2.0.3-1        DHCP client for automatically configuring IP
ii  dictionaries-c 0.70.10        Common utilities for spelling dictionary too
ii  diff           2.8.1-11       File comparison utilities
ii  diffstat       1.43-2         produces graph of changes introduced by a di
ii  dosfstools     2.11-2.1+b1    Utilities to create and check MS-DOS FAT fil
ii  dpkg           1.13.26        package maintenance system for Debian
ii  dpkg-dev       1.13.26        package building tools for Debian
ii  dselect        1.13.26        user tool to manage Debian packages
ii  e2fslibs       1.39+1.40-WIP- ext2 filesystem libraries
ii  e2fsprogs      1.39+1.40-WIP- ext2 file system utilities and libraries
ii  ed             0.2-20         The classic unix line editor
ii  expat          1.95.8-3.4     XML parsing C library - example application
ii  file           4.17-5etch3    Determines file type using "magic" numbers
ii  fileutils      5.97-5.3       The GNU file management utilities (transitio
ii  findutils      4.2.28-1etch1  utilities for finding files--find, xargs, an
ii  fontconfig     2.4.2-1.2      generic font configuration library - support
ii  fontconfig-con 2.4.2-1.2      generic font configuration library - configu
ii  foomatic-db    20061031-1     linuxprinting.org printer support - database
ii  foomatic-db-en 3.0.2-20061031 linuxprinting.org printer support - programs
ii  foomatic-filte 3.0.2-20061031 linuxprinting.org printer support - filters
ii  ftp-ssl        0.17.12+0.2-6  The FTP client with SSL or TLS encryption su
ii  gawk           3.1.5.dfsg-4   GNU awk, a pattern scanning and processing l
ii  gcc            4.1.1-15       The GNU C compiler
ii  gcc-4.1        4.1.1-21       The GNU C compiler
ii  gcc-4.1-base   4.1.1-21       The GNU Compiler Collection (base package)
ii  gconf2         2.16.1-1       GNOME configuration database system (support
ii  gconf2-common  2.16.1-1       GNOME configuration database system (common 
ii  gettext        0.16.1-1       GNU Internationalization utilities
ii  gettext-base   0.16.1-1       GNU Internationalization utilities for the b
ii  gnupg          1.4.6-2        GNU privacy guard - a free PGP replacement
ii  gpgv           1.4.6-2        GNU privacy guard - signature verification t
ii  grep           2.5.1.ds2-6    GNU grep, egrep and fgrep
ii  groff-base     1.18.1.1-12    GNU troff text-formatting system (base syste
ii  gs-common      0.3.11         Common files for different Ghostscript relea
ii  gs-esp         8.15.3.dfsg.1- The Ghostscript PostScript interpreter - ESP
ii  gsfonts        8.11+urwcyr1.0 Fonts for the Ghostscript interpreter(s)
ii  gzip           1.3.5-15       The GNU compression utility
ii  hicolor-icon-t 0.8-4          default fallback theme for FreeDesktop.org i
ii  host           20000331-9     utility for querying DNS servers
ii  hostap-utils   0.4.0-1        Utility programs for Host AP driver for Inte
ii  hostapd        0.5.5-3.1      user space IEEE 802.11 AP and IEEE 802.1X/WP
ii  hostname       2.93           utility to set/show the host name or domain 
ii  hotplug        0.0.20040329-2 Linux Hotplug Scripts
ii  html2text      1.3.2a-3       An advanced HTML to text converter
ii  ifupdown       0.6.8          high level tools to configure network interf
ii  inetutils-inet 1.5.dfsg.1-2   Internet super server
ii  inetutils-teln 1.5.dfsg.1-2   Telnet server
ii  info           4.8.dfsg.1-4   Standalone GNU Info documentation browser
ii  initscripts    2.86.ds1-38+et Scripts for initializing and shutting down t
ii  intltool-debia 0.35.0+2006071 Help i18n of RFC822 compliant config files
ii  iptables       1.3.6.0debian1 administration tools for packet filtering an
ii  iputils-ping   20020927-6     Tools to test the reachability of network ho
ii  kernel-package 10.067         A utility for building Linux kernel related 
ii  klogd          1.4.1-18       Kernel Logging Daemon
ii  laptop-detect  0.12.1         attempt to detect a laptop
ii  ldap-utils     2.3.30-5+etch2 OpenLDAP utilities
ii  less           394-4          Pager program similar to more
ii  libacl1        2.2.41-1       Access control list shared library
rc  libapache2-mod 2.22-4         apache2 module to speed up perl scripts by m
ii  libapr1        1.2.7-8.2      The Apache Portable Runtime Library
ii  libaprutil1    1.2.7+dfsg-2   The Apache Portable Runtime Utility Library
ii  libasn1-6-heim 0.7.2.dfsg.1-1 Libraries for Heimdal Kerberos
ii  libaspell15    0.60.4-4       GNU Aspell spell-checker runtime library
ii  libatk1.0-0    1.12.4-3       The ATK accessibility toolkit
ii  libatk1.0-data 1.12.4-3       Common files for the ATK accessibility toolk
ii  libattr1       2.4.32-1       Extended attribute shared library
ii  libbeecrypt6   4.1.2-6        open source C library of cryptographic algor
ii  libbind9-0     9.3.4-2etch3   BIND9 Shared Library used by BIND
ii  libblkid1      1.39+1.40-WIP- block device id library
ii  libbluetooth2  3.7-1          Library to use the BlueZ Linux Bluetooth sta
ii  libbz2-1.0     1.0.3-6        high-quality block-sorting file compressor l
ii  libc6          2.3.6.ds1-13et GNU C Library: Shared libraries
ii  libc6-dev      2.3.6.ds1-13et GNU C Library: Development Libraries and Hea
ii  libcairo2      1.2.4-4.1+etch The Cairo 2D vector graphics library
ii  libcap1        1.10-14        support for getting/setting POSIX.1e capabil
ii  libcomerr2     1.39+1.40-WIP- common error description library
ii  libcompress-zl 1.42-2         Perl module for creation and manipulation of
ii  libconsole     0.2.3dbs-65    Shared libraries for Linux console and font 
ii  libconvert-asn 0.20-1         Perl module for encoding and decoding ASN.1 
ii  libcrypt-smbha 0.12-1         generate LM/NT hash of a password for samba
ii  libcupsimage2  1.2.7-4etch6   Common UNIX Printing System(tm) - image libs
ii  libcupsys2     1.2.7-4etch6   Common UNIX Printing System(tm) - libs
ii  libdb4.2       4.2.52+dfsg-2  Berkeley v4.2 Database Libraries [runtime]
ii  libdb4.3       4.3.29-8       Berkeley v4.3 Database Libraries [runtime]
ii  libdb4.4       4.4.20-8       Berkeley v4.4 Database Libraries [runtime]
ii  libdbus-1-3    1.0.2-1+etch2  simple interprocess messaging system
ii  libdbus-glib-1 0.71-3         simple interprocess messaging system (GLib-b
ii  libdebian-inst 0.50etch1      Library of some extra debian-installer funct
ii  libdebian-inst 0.50etch1      Library of common debian-installer functions
ii  libdevmapper1. 1.02.08-1      The Linux Kernel Device Mapper userspace lib
ii  libdigest-md4- 1.5-1          MD4 Message Digest for Perl
ii  libdigest-sha1 2.11-1         NIST SHA-1 message digest algorithm
ii  libdns22       9.3.4-2etch3   DNS Shared Library used by BIND
ii  libedit2       2.9.cvs.200505 BSD editline and history libraries
ii  libenchant1c2a 1.3.0-2        a wrapper library for various spell checker 
ii  libexpat1      1.95.8-3.4     XML parsing C library - runtime library
ii  libfont-afm-pe 1.19-1         Font::AFM - Interface to Adobe Font Metrics 
ii  libfontconfig1 2.4.2-1.2      generic font configuration library - runtime
ii  libfontenc1    1.0.2-2        X11 font encoding library
ii  libfreetype6   2.2.1-5+etch3  FreeType 2 font engine, shared library files
ii  libfs6         1.0.0-4        X11 Font Services library
ii  libft-perl     1.2-16         Perl module for the FreeType library
ii  libgcc1        4.1.1-21       GCC support library
ii  libgconf2-4    2.16.1-1       GNOME configuration database system (shared 
ii  libgcrypt11    1.2.3-2        LGPL Crypto library - runtime library
ii  libgdbm3       1.8.3-3        GNU dbm database routines (runtime version)
ii  libglib1.2     1.2.10-17      The GLib library of C routines
ii  libglib2.0-0   2.12.4-2       The GLib library of C routines
ii  libglib2.0-dat 2.12.4-2       Common files for GLib library
ii  libgnutls13    1.4.4-3+etch1  the GNU TLS library - runtime library
ii  libgpg-error0  1.4-1          library for common error values and messages
ii  libgssapi4-hei 0.7.2.dfsg.1-1 Libraries for Heimdal Kerberos
ii  libgtk1.2      1.2.10-18      The GIMP Toolkit set of widgets for X
ii  libgtk1.2-comm 1.2.10-18      Common files for the GTK+ library
ii  libgtk2.0-0    2.8.20-7       The GTK+ graphical user interface library
ii  libgtk2.0-bin  2.8.20-7       The programs for the GTK+ graphical user int
ii  libgtk2.0-comm 2.8.20-7       Common files for the GTK+ graphical user int
ii  libhtml-format 2.04-1         Format HTML syntax trees
ii  libhtml-parser 3.55-1         A collection of modules that parse HTML text
ii  libhtml-tagset 3.10-2         Data tables pertaining to HTML
ii  libhtml-tree-p 3.19.01-2      represent and create HTML syntax trees
ii  libice6        1.0.1-2        X11 Inter-Client Exchange library
ii  libidl0        0.8.6-1        library for parsing CORBA IDL files
ii  libidn11       0.6.5-1        GNU libidn library, implementation of IETF I
ii  libio-socket-s 1.01-1         Perl module implementing object oriented int
ii  libisc11       9.3.4-2etch3   ISC Shared Library used by BIND
ii  libisccc0      9.3.4-2etch3   Command Channel Library used by BIND
ii  libisccfg1     9.3.4-2etch3   Config File Handling Library used by BIND
ii  libiw28        28-1+etchnhalf Wireless tools - library
ii  libjcode-pm-pe 2.06-1         Perl extension interface to convert Japanese
ii  libjpeg62      6b-13          The Independent JPEG Group's JPEG runtime li
ii  libkrb5-17-hei 0.7.2.dfsg.1-1 Libraries for Heimdal Kerberos
ii  libkrb53       1.4.4-7etch6   MIT Kerberos runtime libraries
ii  libldap-2.3-0  2.3.30-5+etch2 OpenLDAP libraries
ii  libldap2       2.1.30-13.3    OpenLDAP libraries
ii  liblocale-gett 1.05-1         Using libc functions for internationalizatio
rc  liblockfile1   1.06.1         NFS-safe locking library, includes dotlockfi
ii  liblwres9      9.3.4-2etch3   Lightweight Resolver Library used by BIND
ii  liblzo1        1.08-3         data compression library (old version)
ii  libmagic1      4.17-5etch3    File type determination library using "magic
ii  libmail-sendma 0.79-4         Send email from a perl script
ii  libmailtools-p 1.74-1         Manipulate email in perl programs
ii  libmudflap0    4.1.1-21       GCC mudflap shared support libraries
ii  libmudflap0-de 4.1.1-21       GCC mudflap support libraries (development f
ii  libmysqlclient 5.0.32-7etch8  mysql database client library
ii  libncurses4    4.2-10.1       Shared libraries for terminal handling
ii  libncurses5    5.5-5          Shared libraries for terminal handling
ii  libncurses5-de 5.5-5          Developer's libraries and docs for ncurses
ii  libncursesw5   5.5-5          Shared libraries for terminal handling (wide
ii  libneon25      0.25.5.dfsg-6  An HTTP and WebDAV client library
ii  libnet-ldap-pe 0.33-2         A Client interface to LDAP servers
ii  libnet-ssleay- 1.30-1         Perl module for Secure Sockets Layer (SSL)
ii  libnewt0.52    0.52.2-10      Not Erik's Windowing Toolkit - text mode win
ii  libnotify1     0.4.3-1        sends desktop notifications to a notificatio
ii  libopencdk8    0.5.9-2        Open Crypto Development Kit (OpenCDK) (runti
ii  liborbit2      2.14.3-0.2     libraries for ORBit2 - a CORBA ORB
ii  libpam-modules 0.79-5         Pluggable Authentication Modules for PAM
ii  libpam-runtime 0.79-5         Runtime support for the PAM library
ii  libpam0g       0.79-5         Pluggable Authentication Modules library
ii  libpango1.0-0  1.14.8-5       Layout and rendering of internationalized te
ii  libpango1.0-co 1.14.8-5       Modules and configuration files for the Pang
ii  libpaper-utils 1.1.21         Library for handling paper characteristics (
ii  libpaper1      1.1.21         Library for handling paper characteristics
ii  libpci2        2.1.11-3       Obsolete shared library for accessing pci de
ii  libpcre3       6.7+7.4-4      Perl 5 Compatible Regular Expression Library
ii  libpng12-0     1.2.15~beta5-1 PNG library - runtime
ii  libpoppler0c2  0.4.5-5.1etch3 PDF rendering library
ii  libpopt0       1.10-3         lib for parsing cmdline parameters
ii  libpq4         8.1.15-0etch1  PostgreSQL C client library
ii  libreadline5   5.2-2          GNU readline and history libraries, run-time
ii  libroken16-hei 0.7.2.dfsg.1-1 Libraries for Heimdal Kerberos
ii  librpm4        4.4.1-13       RPM shared library
ii  libsasl2       2.1.22.dfsg1-8 Authentication abstraction library
ii  libsasl2-2     2.1.22.dfsg1-8 Authentication abstraction library
ii  libsasl2-modul 2.1.22.dfsg1-8 Pluggable Authentication Modules for SASL
ii  libselinux1    1.32-3         SELinux shared libraries
ii  libsepol1      1.14-2         Security Enhanced Linux policy library for c
ii  libsexy2       0.1.10-1       collection of additional GTK+ widgets - libr
ii  libshishi0     0.0.30-2       Library for the Shishi Kerberos v5 implement
ii  libsigc++-2.0- 2.0.17-2       type-safe Signal Framework for C++ - runtime
ii  libslang2      2.0.6-4        The S-Lang programming library - runtime ver
ii  libslp1        1.2.1-6.2      OpenSLP libraries
ii  libsm6         1.0.1-3        X11 Session Management library
ii  libsqlite3-0   3.3.8-1.1      SQLite 3 shared library
ii  libss2         1.39+1.40-WIP- command-line interface parsing library
ii  libssl0.9.8    0.9.8c-4etch3  SSL shared libraries
ii  libssp0        4.1.1-21       GCC stack smashing protection library
ii  libstartup-not 0.8-2          library for program launch feedback (shared 
ii  libstdc++6     4.1.1-21       The GNU Standard C++ Library v3
ii  libsysfs2      2.1.0-1        interface library to sysfs
ii  libtasn1-3     0.3.6-2        Manage ASN.1 structures (runtime)
ii  libtext-charwi 0.04-4         get display widths of characters on the term
ii  libtext-iconv- 1.4-3          converts between character sets in Perl
ii  libtext-wrapi1 0.06-5         internationalized substitute of Text::Wrap
ii  libtiff4       3.8.2-7+etch1  Tag Image File Format (TIFF) library
ii  libtimedate-pe 1.1600-5       Time and date functions for Perl
ii  libttf2        1.4pre.2005051 FreeType 1, The FREE TrueType Font Engine, s
ii  libunicode-map 0.112-10       Perl module for mapping charsets from and to
ii  libunicode-map 0.12-3         Perl module to map 8bit character sets to Un
ii  libunicode-map 1.11-2         Perl module for conversing between any chara
ii  libunicode-str 2.09-1         Perl modules for Unicode strings
ii  liburi-perl    1.35-2         Manipulates and accesses URI strings
ii  libusb-0.1-4   0.1.12-5       userspace USB programming library
ii  libuuid1       1.39+1.40-WIP- universally unique id library
rc  libvolume-id0  0.105-4        libvolume_id shared library
ii  libwnck-common 2.14.3-1       Window Navigator Construction Kit - common f
ii  libwnck18      2.14.3-1       Window Navigator Construction Kit - runtime 
ii  libwrap0       7.6.dbs-13     Wietse Venema's TCP wrappers library
ii  libwww-perl    5.805-1        WWW client/server library for Perl (aka LWP)
ii  libx11-6       1.0.3-7        X11 client-side library
ii  libx11-data    1.0.3-7        X11 client-side library
ii  libxau6        1.0.1-2        X11 authorisation library
ii  libxcursor1    1.1.7-4        X cursor management library
ii  libxdmcp6      1.0.1-2        X11 Display Manager Control Protocol library
ii  libxext6       1.0.1-2        X11 miscellaneous extension library
ii  libxfixes3     4.0.1-5        X11 miscellaneous 'fixes' extension library
ii  libxfont1      1.2.2-2.etch1  X11 font rasterisation library
ii  libxft2        2.1.8.2-8      FreeType-based font drawing library for X
ii  libxi6         1.0.1-4        X11 Input extension library
ii  libxinerama1   1.0.1-4.1      X11 Xinerama extension library
ii  libxml2        2.6.27.dfsg-6  GNOME XML library
ii  libxrandr2     1.1.0.2-5      X11 RandR extension library
ii  libxrender1    0.9.1-3        X Rendering Extension client library
ii  libxres1       1.0.1-2        X11 Resource extension library
ii  libxt6         1.0.2-2        X11 toolkit intrinsics library
ii  linux-kernel-h 2.6.18-7       Linux Kernel Headers for development
rc  linux-wlan-ng  0.2.5+dfsg+pri utilities for wireless prism2 cards
ii  linux-wlan-ng- 0.2.5+dfsg+pri linux-wlan-ng driver
ii  locales        2.3.6.ds1-13et GNU C Library: National Language (locale) da
ii  login          4.0.18.1-7     system login tools
ii  logrotate      3.7.1-3        Log rotation utility
ii  lsb-base       3.1-23.2etch1  Linux Standard Base 3.1 init script function
ii  lsof           4.77.dfsg.1-3  List open files
ii  m4             1.4.8-2        a macro processing language
ii  make           3.81-2         The GNU version of the "make" utility.
ii  makedev        2.3.1-83       creates device files in /dev
ii  man-db         2.4.3-6        The on-line manual pager
ii  manpages       2.39-1         Manual pages about using a GNU/Linux system
ii  mawk           1.3.3-11       a pattern scanning and text processing langu
ii  mime-support   3.39-1         MIME files 'mime.types' & 'mailcap', and sup
ii  mktemp         1.5-2          Makes unique filenames for temporary files
ii  module-assista 0.10.8         tool to make module package creation easier
ii  module-init-to 3.3-pre4-2     tools for managing Linux kernel modules
ii  mount          2.12r-19etch1  Tools for mounting and manipulating filesyst
ii  mysql-common   5.0.32-7etch8  mysql database common files (e.g. /etc/mysql
ii  nano           2.0.2-1etch1   free Pico clone with some new features
ii  ncurses-base   5.5-5          Descriptions of common terminal types
ii  ncurses-bin    5.5-5          Terminal-related programs and man pages
ii  ncurses-term   5.5-5          Additional terminal type definitions
ii  net-tools      1.60-17        The NET-3 networking toolkit
ii  netatalk       2.0.3-4        AppleTalk user binaries
ii  netbase        4.29           Basic TCP/IP networking system
ii  netcat         1.10-32        TCP/IP swiss army knife
ii  nkf            2.07-1         Network Kanji code conversion Filter
ii  notification-d 0.3.5-1+b1     a daemon that displays passive pop-up notifi
ii  ntp            4.2.2.p4+dfsg- Network Time Protocol daemon and utility pro
rc  openbsd-inetd  0.20050402-6   The OpenBSD Internet Superserver
ii  openssh-blackl 0.1.1          list of blacklisted OpenSSH RSA and DSA keys
ii  openssh-client 4.3p2-9etch3   Secure shell client, an rlogin/rsh/rcp repla
ii  openssh-server 4.3p2-9etch3   Secure shell server, an rshd replacement
ii  openssl        0.9.8c-4etch3  Secure Socket Layer (SSL) binary and related
ii  passwd         4.0.18.1-7     change and administer password and group dat
ii  patch          2.5.9-4        Apply a diff file to an original
ii  pciutils       2.2.4~pre4-1   Linux PCI Utilities
ii  pcmciautils    014-3          PCMCIA utilities for Linux 2.6
ii  perl           5.8.8-7etch4   Larry Wall's Practical Extraction and Report
ii  perl-base      5.8.8-7etch4   The Pathologically Eclectic Rubbish Lister
ii  perl-doc       5.8.8-7etch6   Perl documentation
ii  perl-modules   5.8.8-7etch6   Core Perl modules
ii  po-debconf     1.0.8          manage translated Debconf templates files wi
ii  poppler-utils  0.4.5-5.1etch3 PDF utilitites (based on libpoppler)
ii  portmap        5-26           The RPC portmapper
ii  procps         3.2.7-3        /proc file system utilities
ii  proftpd        1.3.0-19etch1  Versatile, virtual-hosting FTP daemon
ii  psfontmgr      0.11.10-0.1    PostScript font manager -- part of Defoma, D
ii  psmisc         22.3-1         Utilities that use the proc filesystem
ii  python         2.4.4-2        An interactive high-level object-oriented la
ii  python-minimal 2.4.4-2        A minimal subset of the Python language (def
ii  python2.4      2.4.4-3+etch2  An interactive high-level object-oriented la
ii  python2.4-mini 2.4.4-3+etch2  A minimal subset of the Python language (ver
ii  quilt          0.45-6         Tool to work with series of patches
ii  rc             1.7.1-3        an implementation of the AT&T Plan 9 shell
ii  readline-commo 5.2-2          GNU readline and history libraries, common f
ii  rpm            4.4.1-13       Red Hat package manager
ii  rwho           0.17-8         Clients to query the rwho server
ii  rwhod          0.17-8         System status server
ii  samba          3.0.24-6etch10 a LanManager-like file and printer server fo
ii  samba-common   3.0.24-6etch10 Samba common files used by both the server a
ii  sed            4.1.5-1        The GNU sed stream editor
ii  setserial      2.17-43        controls configuration of serial ports
ii  shishi-common  0.0.30-2       Platform independent files for Shishi
ii  slpd           1.2.1-6.2      OpenSLP Server (slpd)
ii  smbclient      3.0.24-6etch10 a LanManager-like simple client for Unix
ii  smbldap-tools  0.9.2-3        Scripts to manage Unix and Samba accounts st
ii  sudo           1.6.8p12-4     Provide limited super user privileges to spe
ii  sysklogd       1.4.1-18       System Logging Daemon
ii  sysv-rc        2.86.ds1-38+et System-V-like runlevel change mechanism
ii  sysvinit       2.86.ds1-38+et System-V-like init utilities
ii  sysvinit-utils 2.86.ds1-38+et System-V-like utilities
ii  tar            1.16-2etch1    GNU tar
ii  tasksel        2.66           Tool for selecting tasks for installation on
ii  tasksel-data   2.66           Official tasks used for installation of Debi
ii  tcpd           7.6.dbs-13     Wietse Venema's TCP wrapper utilities
rc  telnetd        0.17-34        The telnet server
rc  telnetd-ssl    0.17.24+0.1-14 The telnet server with SSL encryption suppor
ii  textutils      5.97-5.3       The GNU text file processing utilities (tran
ii  traceroute     1.4a12-21      traces the route taken by packets over a TCP
ii  ttf-dejavu     2.15-1         Vera font family derivate with additional ch
ii  tzdata         2008e-1etch3   Time Zone and Daylight Saving Time Data
ii  ucf            2.0020         Update Configuration File: preserves user ch
rc  udev           0.105-4        /dev/ and hotplug management daemon
ii  unzip          5.52-9etch1    De-archiver for .zip files
ii  update-inetd   4.27-0.5       inetd.conf updater
rc  usbmgr         1.0.0-5        user-mode daemon which loads/unloads USB ker
rc  usbmount       0.0.14.1       automatically mount and unmount USB mass sto
ii  usbutils       0.72-7         USB console utilities
ii  usbview        1.0-7          USB device viewer
ii  util-linux     2.12r-19etch1  Miscellaneous system utilities
ii  vim-common     7.0-122+1etch3 Vi IMproved - Common files
ii  vim-tiny       7.0-122+1etch3 Vi IMproved - enhanced vi editor - compact v
ii  wget           1.10.2-2       retrieves files from the web
ii  whiptail       0.52.2-10      Displays user-friendly dialog boxes from she
ii  wireless-tools 28-1+etchnhalf Tools for manipulating Linux Wireless Extens
ii  x-ttcidfont-co 25.1           Configure TrueType and CID fonts for X
ii  x11-common     7.1.0-19       X Window System (X.Org) infrastructure
ii  xfonts-encodin 1.0.0-6        Encodings for X.Org fonts
ii  xfonts-utils   1.0.1-1        X Window System font utility programs
ii  xfsprogs       2.8.11-1       Utilities for managing the XFS filesystem
ii  xutils         7.1.ds.3-1     X Window System utility programs
ii  xutils-dev     7.1.ds-6       X Window System utility programs for develop
ii  zd1211-source  0.0.0.svnr67-2 Source for the zd1211 wireless driver module
ii  zlib1g         1.2.3-13       compression library - runtime
ii  zlibc          0.9k-2         Uncompressing C Library
# 
うわぁ、X関係は全部要らないから、とっぱらおう。 # aptitude remove XXXX で。
だけど、必要なのもあるので、これはしないことにした。
(2009.01.03a)

ext3ファイルをtune2fsする

# tune2fs -c0 -i0 /dev/sda1
これで、20回ごとのリブートのときに fsck 時間オーバーで エラーになることもなかろう。
(2009.01.02d)

bind,named設定

% cat /etc/bind/named.conf.local
zone "toy.matrix.jp" {
      type master;
      file "/etc/bind/toy.matrix.jp-in-zone";
};

zone "0.168.192.in-addr.arpa" {
      type master;
      file "/etc/bind/0.168.192-rev";
};

% cat /etc/bind/toy.matrix.jp-in-zone
$TTL 3600       ; 1 hour
toy.matrix.jp.            IN SOA  totoro.toy.matrix.jp. root.toy.matrix.jp. (
                                2008123101 ; serial
                                3600       ; refresh (1 hour)
                                300        ; retry (5 minutes)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                3600       ; minimum (1 hour)
                                )
                        NS      totoro.toy.matrix.jp.
                        NS      gate.toy.matrix.jp.
                        A       192.168.0.2
                        MX      5 totoro.toy.matrix.jp.
slot-in                 A       192.168.0.1
totoro                  A       192.168.0.2
gate                    A       192.168.0.4
ftp                     CNAME   totoro
smtp                    CNAME   totoro
www                     CNAME   totoro
zeus                    A       192.168.0.6

% cat /etc/bind/0.168.192-rev
$TTL 3600       ; 1 hour
0.168.192.in-addr.arpa. IN SOA  totoro.toy.matrix.jp. root.toy.matrix.jp. (
                                2008123101 ; serial
                                3600       ; refresh (1 hour)
                                300        ; retry (5 minutes)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                3600       ; minimum (1 hour)
                                )
                        NS      totoro.toy.matrix.jp.
                        NS      link.toy.matrix.jp.
1                       PTR     slot-in.toy.matrix.jp.
2                       PTR     totoro.toy.matrix.jp.
4                       PTR     gate.toy.matrix.jp.
6                       PTR     zeus.toy.matrix.jp.
	:
	:

(2009.01.02c)

USB無線LAN (zd1211型)のインストール

カーネルに組み込まなければならない。
今後もこのようなこと、つまりカーネルを変更することがあると 思う。 そのための場所が /usr/src/ である。私はだいたい 、いつもこうしてる。
% cd /usr/src/
% tar xzf zd1211-driver-r85.tgz
% cd zd1211-driver-r85
% vi Makefile
ZD1211REV_B=1 と変える。
mkdir -p $(MODPATH)/net を mkdir -p $(MODPATH)/kernel/drivers/usb/net に変える。
同様に
cp $(MODULE) $(MODPATH)/kernel/drivers/usb/net
% vi src/zdusb.c
http://spock.ss.u-tokai.ac.jp/~kamii/LinuxZaurus/GW-US54GXS.shtmlから
(3) zdusb.c を修正する。
約83行目あたり。
{ USB_DEVICE(0x1582, 0x6003) }, のあとに行を追加。
だいたいこんな感じに。
  { USB_DEVICE(0x157e, 0x300d) },  // TEW429UB
  { USB_DEVICE(0x1582, 0x6003) },
  { USB_DEVICE(0x2019, 0x5303) },  // PCI GW-US54GXS
#elif defined(ZD1211)
  { USB_DEVICE(0x0105, 0x145f) },
           :
  { USB_DEVICE(0x14ea, 0xab13) },  // PCI GW-US54Mini
(4) make する前に../Makefile も手直し、22行目を
ZD1211REV_B=0  にして zd1211  を作成。
ZD1211REV_B=1  にして zd1211b を作成。
(5) % cd ..
(5.5) % make clean 毎回、make clean をしてから make すること。
(6) make  さて、エラーなしでできるか。。。(warningはたくさん出る)
% export ARCH=arm
% make
% sudo make install
% sudo depmod -a
% sudo aptitude install wireless-tools

完了したら、実験。
  1. # modprobe zd1211b
  2. # lsmod
  3. USB無線LANアダプタを差す。
  4. # iwconfig
  5. # ifconfig wlan0 up
  6. # iwlist wlan0 scanning 周囲の無線局を調べる。
  7. # iwconfig wlan0 essid "FOOBAR" ESSIDを指定する。
  8. # iwconfig wlan0 key 0123456789abcdef 16けたWEPキーを16進数で指定する。 あるいは
    # iwconfig wlan0 key s:testt 文字列(5文字)を利用してWEPキーを指定する。
  9. # ifconfig wlan0 192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.1
  10. # ip route add default via 192.168.0.1 dev wlan0 table 200

これでうまくいったのなら、次は手動でなく自動にしたいから、
  1. /etc/modules に zd1211b を追加
  2. /etc/network/interfaces を修正。以下を追加。
    auto wlan0
    iface wlan0 inet static
    address 192.168.0.101
    netmask 255.255.255.0
    wireless_essid F43F4EGROUP
    wireless_channel 11
    wireless_key s:testt
    wireless-rate 54M  
    
    up ip route add default via 192.168.0.1 dev wlan0 table 200
    up ip rule add from 192.168.0.101 table 200
    down ip rule del from 192.168.0.101 table 200
    down ip route del default via 192.168.0.1 dev wlan0 table 200
    


usbmgrではなく、ホットプラグに対応させる。
  1. # aptitude install hotplug
  2. # /etc/network/interfaces に以下の1行を追加。
    allow-hotplug wlan0
    もしもあったら、以下に続く数行は削除
    auto wlan0
  3. # cd /etc/hotplug/usb
  4. zd1211bおよびzd1211b.offファイルを vi でつぎのような内容で作る。
    % cat zd1211b
    #!/bin/sh
    ifup wlan0
    ifconfig wlan0 192.168.0.101 netmask 255.255.255.0
    iwconfig wlan0 essid "F43F4EGROUP" 
    iwconfig wlan0 key s:testt
    iwconfig wlan0 mode master
    iwconfig wlan0 channel 11
    ip route add default via 192.168.0.1 dev wlan0 table 200
    ip rule add from 192.168.0.101 table 200
    ip route flush cache
    
    # cat zd1211b.off
    #!/bin/sh
    ip rule del from 192.168.0.101 table 200
    ip route del default via 192.168.0.1 dev wlan0 table 200
    ip route flush cache
    ifdown wlan0
    
  5. # chmod 755 zd1211b zd1211b.off
(2009.01.02b)

atalk&smb appletalkとsambaでファイル共有にしよう


SAMBAについて
ユーザの作成をするために、
# smbpasswd -a kamii
# smbpasswd -a admin
これで /etc/samba/smbpasswd.tdb とかにデータが入るはずなんだが。。
つぎに  /etc/samba/smb.conf を修正する。
プリンター関係はコメントしてしまう。[printer]と[print$]
そして最後のほうに
 [share]
       comment = LS-GL share
       path = /mnt/disk1/share
       read only = No
       force create mode = 0664
       force directory mode = 0775
あとは # /etc/init.d/samba reload でおしまい。
関連するファイルは
/etc/samba/lmhosts
/etc/samba/smb.conf
/etc/samba/smbpasswd
/usr/lib/samba
/usr/share/samba
/usr/share/samba/swat
/var/cache/samba
/var/lib/samba
/var/log/samba
/var/run/samba

NETATALKについて
atalkd/afpd/papd
関連するファイルは
/etc/netatalk/
/etc/netatalk/afppasswd
/etc/netatalk/atalkd.conf
/usr/lib/netatalk
こうした。
% cat /etc/netatalk/AppleVolumes.default
#~/			"Home Directory"  コメントにした。
/mnt/disk1/share/	"Share"
% cat /etc/netatalk/atalkd.conf
eth0 -phase 2 -net 0-65534 -addr 65280.119
ゲストでも入れるように、つぎのようにする。
(2009.01.02a)

U-Boot変数の比較 LinkStationとLS-GL

U-Bootのどこが違うのか、DBOX(LinkStation)とLS-GLのprintenvを 比べてみた。
気になる変数は stdin,stdout,stderr,ncip,など。versionもみてみた。
比較表はこちら

とりあえず、この表を見て、つぎの部分を直そう。
  • => setenv ncip 192.168.11.1
  • => setenv netmask 255.255.255.0
  • => setenv nc 'setenv stdout nc;setenv stdin nc;setenv stderr nc'
  • => setenv ser 'setenv stdin serial;setenv stdout serial;setenv stderr serial'
  • => run nc
ここまでは無難な変更だから。これは => saveenv してもいいだろう。
気がついたんだが、
たとえば bootdelay変数なら => setenv bootdelay 4 で直せる。
だけど、 => setenv stdout nc としてもstdoutは変更されない。
=> run nc のようにしないとできない。
これは /bin/tcshでsttyが有効にならないのと同じか。。。

あれれ、=> run nc でエラーになっちゃう。runなんてコマンドはないと言われる。
Environment size: 1148/4092 bytes
Marvell>> run nc

Unknown command 'run' - try 'help'
Marvell>> help

?       - alias for 'help'
base    - print or set address offset
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
boot end  .
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bubt	- Burn an image on the Boot Flash.
cmp     - memory compare
cp      - memory copy
cpumap - Display CPU memory mapping settings.
crc32   - checksum calculation
date    - get/set/reset date & time
diskboot- boot from IDE device
echo    - echo args to console
erase   - erase FLASH memory
ext2load- load binary file from a Ext2 filesystem
ext2ls- list files in a directory (default /)
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
ide     - IDE sub-system
loop    - infinite loop on address range
md      - memory display
micon -command(2byte hex) -data(witin 32byte hex) 
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
pci     - list and access PCI Configuraton Space
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
saveenv - save environment variables to persistent storage
security -device -command -options -password 
setenv  - set environment variables
shutdown	- Poff .
tftpboot- boot image via network using TFTP protocol
version - print monitor version
Marvell>> 
(2009.01.01c)

スリープ機能をdebianでも使いたい

関係ありそうなのは
/etc/melco/sleep   -- 設定ファイル
/usr/local/bin/standby_check.sh  -- 15分毎にスリープタイムになったかチェック
/usr/local/sbin/ApplyPwrCrontab.sh
/usr/local/sbin/PowerSave.sh
/usr/local/sbin/PwrmgrCrontab  -- binary program (use JAIL?)
/usr/local/sbin/pwrmgr         -- binary program (use JAIL?)
/etc/pwrmgr    -- 設定ディレクトリィ
/etc/cron/crontabs/root  -- crontab
/var/spool/cron/crontabs/rootに
# cat /var/spool/cron/crontabs/root
00 0 * * * /etc/cron/cron.d/mailnotice.sh
05 4 * * * /etc/cron/cron.d/logrotate
08 4 * * * /etc/cron/cron.d/calib_time.sh
15 12 * * * /usr/local/sbin/PowerSave.sh resume-cron
30 12 * * * /usr/local/sbin/PowerSave.sh standby-cron
45 12 * * * /usr/local/sbin/PowerSave.sh resume-cron
00 13 * * * /usr/local/sbin/PowerSave.sh standby-cron
#
追加で
0,15,30,45 * * * /usr/local/bin/standby_check.sh 1> /dev/null 2>&1
を入れてみるかな? 結局、いまのところは/usr/local/sbin/pwrmgrが
"1350 Segmentation fault"となって動かないからダメ。

/usr/local/sbin/PowerSave.sh を解析。
ブートのときは pwrmgr -u -s を実行
パワー断のときは pwrmgr -u を実行
(2009.01.01b)

network-based console (U-Boot環境変数の入れ替えを試みる)

u-bootについていろいろ調べました。
結論としてはU-Bootの環境変数 stdin/stdout/stderrをncにすることで ネットからのコントロールができるようなのだ。
u-boot-1.1.6.tar.gzをsourceforgeからもらってきて、調査。

u-boot-1.1.6 をmakeするときの引数について。

CPUはarm920t なので

% make VCMA9_config
そのあと
% make
% ls -ld u-boot*
-rwxr-xr-x 1 kamii kamii 402369 Jan 1 23:47 u-boot*
-rwxr-xr-x 1 kamii kamii 109232 Jan 1 23:47 u-boot.bin*
-rw-r--r-- 1 kamii kamii 91286 Jan 1 23:47 u-boot.map
-rwxr-xr-x 1 kamii kamii 327762 Jan 1 23:47 u-boot.srec*
$
それぞれの意味は?
/boot/u-boot.buffalo と同じのはこの中のどれなのか。。。
u-boot.bin だと思う。最初の数バイトが同じパターンだから。

kamii@lsgl:u-boot-1.1.6$ head -c 8 /boot/u-boot.buffalo | hd -c
00000000  12 00 00 ea 14 f0 9f e5                           |........|
0000000 022  \0  \0 352 024 360 237 345

kamii@lsgl:u-boot-1.1.6$ head -c 8 u-boot.bin | hd -c
00000000  12 00 00 ea 14 f0 9f e5                           |........|
0000000 022  \0  \0 352 024 360 237 345
README にはこう書いてある。
- "u-boot.bin" is a raw binary image
- "u-boot" is an image in ELF binary format
- "u-boot.srec" is in Motorola S-Record format

こうやってできたのだが、FLASH-ROMに焼き込むにはかなり勇気がいる。
もしも失敗したら、一貫の終わりだから。JTAGにお世話にならないといけない。
なので躊躇している。
/dev/mtd0 に書き込むには initrd内の /etc/init.d/fwupdate.sh を利用する。
たぶん、/boot/にu-boot.buffalo.updated という名前で作っておけば やってくれる。
=========================================================
NetConsole (drivers/netconsole.c)
netcatやncコマンドでリモートマシンからコントロールしたい。
そういうu-bootを作りたい。どうすればいい?
どうやら  make したら、drivers/netconsole.oが作成されたから
きっと、標準で、組み込まれるらしい。
=========================================================
つまりは
networked console を使いたいということなんです。
こういうときは 'stdin' と 'stdout' environment variables を
"nc" に変更すればいい。 'stdin' と 'stdout' は独立に変えられる。
ほかに変数として、'ncip' これを:のようにセットする。
ただしポートは標準では 6666 なので、6666なら省略可で、でいい。
例えば、サーバーが 192.168.1.1:6666ならばこうするとよい。
        => setenv nc 'setenv stdout nc;setenv stdin nc'
        => setenv ncip 192.168.1.1
        => saveenv
        => run nc
詳しくはu-boot-1.1.6/doc/README.NetConsole に書いてある。
=========================================================
"saveenv"はこわいから、絶対!!に注意。

(2009.01.01a)

シリアルケーブルをハンダづけ

お正月の朝、8:30起床。
何が起こっているのか、わからないので、仕方がない。
やっぱりシリアルをつなげてブート時の動向をチェックしなくては 先に進まないだろう。
とうとうシリアルケーブルをハンダづけすることにした。
ジャンク箱から 昔買っておいた9-KE(携帯用データ転送Cable;430円)のケーブルを切った。
電線はシールドの中に4本。今回の色は前と同じ、黒、茶、赤、ダイダイ。
色がわかる人なら、0、1、2、3だ。
1:TXD橙(赤)(TxD)
2:RXD黒(黄)(RxD)
3:VccNC
4:GND茶(緑)(Gnd)
のような結線をすればよい。
赤(黒)(Gnd)と茶(緑)(Gnd)はショートさせてあるから、赤を3番にハンダづけすると壊れちゃう。
転送スピードは115200
9ピンコネクタDB9の7,8(RTS/CTS)番ピンをショートさせたほうがいい?
ここによると、すでに9-KEでは内部でショートしてありますね。
ただ、「黒(RxD)はオープンコレクタとなっているので、相手側でプルアップしないと ダメということもわかりました。」 とあります。ほう、これがザウルスだとレシーブはできるけど、センドができない 理由なのか。。。?

ハンダづけが完了した。
マック側はUSB-SERIALのUSB-RSAQ5をとりつけ、ターミナルをたちあげる。 そして、
% cu -l '/dev/cu.I-O DATA USB-RSAQ5' -s 115200
おぉぉ。出たーー。

解析。あ、EMモードになってる。 その時の記録
** Bad partition 1 ** だってぇ!おかしいな。それは置いといて、
EMモードになったのはなぜか、"use initrd mode" の文字列を探すと ここにあった。
KERNEL:2009/1/1 1:8:37
HDD:2008/5/20 10:2:41
KERNEL:2008/5/20 10:2:20
HDD:2008/5/20 10:2:41
*** hddSys is old. use initrd mode. ***
どういうことかというと、uImage.buffaloのほうが古くないといけない。
もっと詳しくだと、% mkimage -l uImage.buffalo して"Created:"の日付を 見て、
% mkimage -l initrd.buffalo して"Created:"の日付を見て比較する。
で、uImage(KERNEL)のほうがinitrd(HDD)より古くないと変だと言ってる。
いくつか直す必要があるから、initrdのほうの/etc/passwd,/etc/shadowも 直してしまおう。
修正するのは
  • *** hddSys is old. use initrd mode. ***をつぶしてしまう
  • /etc/passwdにtoorとkamiiを追加
  • /etc/shadowにてtoorとkamiiのパスワードを入れる
せっかくシリアルケーブルをつけたので、タイミングよくキーを打ってtftpブートに して修正してみようと思う。serveripはtotoroのIPとする。
totoroにちょっと古いが動いていた initrd.buffaloとuImage.buffaloを /tftpboot/にコピー。
そうしてから、LS-GLをマックとはUSB-RSAQ5を使ってつないでおいて、
% cu -l '/dev/cu.I-O DATA USB-RSAQ5' -s 115200
LS-GLをパワーオン。
途中でマックのキーをたたく。そうするとtftpブートになった。その時の 記録

これで動いたから急いで、/boot/uImage.buffaloにリネーム。 そうしたら、リブート。これで戻った。
次回からは注意をしよう。 リブートして、本体HDから起動したときの 記録
(2008.12.31c)

OpenSource for buffalo

LS−GLシリーズやHSーDHGLシリーズ などのソースコードをBuffaloが提供している。
場所は http://opensource.buffalo.jp/

なので、ここからいろいろゲットする。
その下の http://opensource.buffalo.jp/ls-gl-112a.html には
apache_1.3.34_arm.tgz
bash-2.05b-20.1a_3.src.rpm
binutils-2.17pre-1.src.rpm
bison-2.1_arm.tgz
busybox-1.1.1_arm.tgz
bzip2-1.0.2-5_1.src.rpm
cgi-speedycgi-2.22.tar.gz
coreutils-5.95_arm.tar.gz
daemonize-1.5.tar.gz
db-4.2.52.nc_arm.tgz
dhcpcd-1.3.22-pl4_arm.tgz
diffutils-2.8.1-3_1.src.rpm
dosfstools-2.10_arm.tgz
e2fsprogs-1.27-9_1.src.rpm
e2fsprogs-libs-1.39.tar.gz
expat-1.95.4-1_1.src.rpm
file-3.39-9_2.src.rpm
fileutils-4.1.9-11_1.src.rpm
findutils-4.1.7-7_1.src.rpm
gcc-2005q3-2.src.rpm
gettext-0.14.5_arm.tgz
glibc-arm_trg-2005q3-2.arm.rpm
glibc-devel-arm_trg-2005q3-2.arm.rpm
gzip-1.3.3-5a_1.src.rpm
hyperestraier-1.1.5_arm.tgz
iscsitarget-0.4.15.tar.gz
krb5-1.4.3_arm.tgz
libiconv-1.10_arm.tgz
libol-0.3.18_arm.tgz
lighttpd-1.4.13.tar.gz
linux-2.6.16_lsp.1.7.8.tar.gz
linux-pam-0.81_arm.tgz
logrotate-3.7.1_arm.tgz
m4-1.4.4_arm.tgz
mod_ssl-2.8.25-1.3.34.tgz
module-init-tools-3.2_arm.tgz
ncurses-5.2-28_2.src.rpm
netatalk-2.0.3_arm.tgz
nfs-utils-1.1.0.tar.gz
nkf_arm.tgz
ntp-stable-4.2.0a-20060224_arm.tgz
openldap-2.3.11_arm.tgz
openssh-3.7.1p2_arm.tgz
openssl-0.9.7e_arm.tgz
pcre-6.7.tar.gz
perl-5.8.8_arm.tgz
popt-1.7_arm.tgz
portmap-6.0.tar.gz
proftpd-1.3.0_changed_arm.tgz
qdbm-1.8.46_arm.tgz
rsync-2.6.8_arm.tgz
samba-3.0.21c-060515_arm.tgz
shadow-4.0.14_arm.tgz
ssmtp-2.61.tar.gz
sysklogd-1.4.1rh_arm.tgz
syslog-ng-1.6.11_arm.tgz
tcp_wrappers_7.6.tar.gz
textutils-2.0.21-5_1.src.rpm
unzip-5.52_arm.tgz
util-linux-2.12_arm.tgz
xfsprogs-2.5.6_arm.tgz
zlib-1.2.3.tar.gz
zlib-1.2.3_arm.tgz
(2008.12.31b)

カーネルの入れ替えに挑戦

気を取り直して、再びプリンタ対応型カーネル作成に戻ろう。
ええと、どこまでいったかな?
もう一度手順を書き直し。
  1. http://opensource.buffalo.jp/ls-gl-112a.htmlから
    % wget http://buffalo.jp/php/los.php?to=gpl/storage/ls-gl/112a/linux-2.6.16_lsp.1.7.8.tar.gz
    でカーネルソースをもらってくる。
  2. 適当なディレクトリィで % tar xzf linux-2.6.16_lsp.1.7.8.tar.gz
  3. % cd linux-2.6.16_lsp.1.7.8
  4. 手作りのコンフィグファイル config.KAMII-003 を .config としてコピー
  5. % make menuconfig する。何も修正は必要ない。セーブする
  6. % make する。(これが長い)vmlinuxとSystem.mapが作られればオーケー
  7. % make modules
  8. % make uImage 結果:./arch/arm/boot/uImage が作られてればオーケー
    % mkimage -l ./arch/arm/boot/uImage でも確認ができる。
  9. # sudo make modules_install 結果:./binaries/lib/modules/2.6.16.16-arm1/の 下にモジュールが入ってくればオーケー
    installやmodules_installのときはsudoすること。忘れがちだ。
    このとき、depmodがある場所が/kernel26tool/sbin/depmodだと勘違いしてるが まあ、これはかまわない。
    if [ -r System.map -a -x /kernel26tool/sbin/depmod ]; then /kernel26tool/sbin/depmod -ae -F System.map -b binaries -r 2.6.16.16-arm1; fi
  10. モジュールはsudoになって/lib/modules/2.6.16.16-arm1/にtarを使ってコピーをし、 忘れずに # depmod -a をする。
  11. そして、大事なuIamgeであるが、これを /boot/のほうに次のように、大事な 元のを壊さないようにして移動。
    # sudo mv -i /boot/uImage.buffalo /boot/uImage.buffalo.daiji
    # sudo cp -pi ./arch/arm/boot/uImage /boot/uImage.buffalo
    
    あとは、ドキドキのリブート。これで、うまくいくのか/こけるのか。
    # shutdown -r now

あ〜あ、失敗。ネットが開いたんだけど、sshもtelnetも使えない。
面倒だぞ。いったん電源落として、HDを実験HDと交換して、 そしてオリジナルHDの/boot/uImage.buffaloを元のに戻して また作り直しをしなければならない。
あ〜あ、大晦日だというのに、紅白歌合戦も見ないでこんなことしてる。
また奥さんに怒られる。仕事場に閉じこもってばかりと。
スイッチを押してシャットダウンはできる。あとはssh/telnetが使えれば いいのか。
(2008.12.31a)

netcat

せっかくの、U-Boot なので、リモートマシンからブート時の制御をやってみることに。
そこで、実験。
printenv からは(# nvram -c printenv を実行)
4: [ipaddr=192.168.11.150]
5: [serverip=192.168.11.1]
がわかった。(これを信用していい?)
ここを直して 192.168.0.XXX してもいいのだが、ここを直すのは 私流でないから、リモート側で対処する。
つまり、リモートのほうに、 192.168.11.1/24 を設定する。 そうして、 netcat (または nc) を動かして、監視する。
% nc -v -v -n -u -l -s 192.168.11.1 -p 6666 192.168.11.150 6666
(-l = listen-mode; -u=UDP; -n=NO-DNS)
実際にはtotoroで nc.sh を実行し、監視する。
さあて、これで何かが出てくるか。。。
DHCPサーバーのログを見るとLS-GLは 192.168.11.2をDHCPでは要求していたが、これであってんのかなぁ?
オヨヨ!!昔、LinkStation(DBOX)にあったU-Bootとは違って、 NETでヨコドリなんていうのはできないのかぁ。。不便だ。
シリアルケーブルを使わんといかんのかなあ。
(2008.12.31)

debian

denian化がほぼできた。
kernelmon も入れたので、前面のスイッチを押せば、「ピー」となって電源断もできるし、
# shutdown -r now でリブートもできる。

そういえば、スリープ機能がこのままでは使えない。
どこをいじくればいいのかな。

ここらで、カーネルを取り換えようと思う。
% make menuconfig
% make
# sudo make modules
# sudo make uImage
# sudo make modules_install
などをやっていきたいところだが、あっちこっちでひっかかる。
まずは make menuconfig 。どうもlibncurses を-lしてくれなくて、ダメ。
ncurses がないからダメらしいのだが。。。でもaptitudeでいれてあるんだが。
apt-get --reinstall install XXXXXXXXXXしたら直った。
(2008.12.30)

改造を決心 initrd.buffalo

いよいよ、改造することを決心した。
とりあえずは、/boot/initrd.buffalo に仕込まれてる /linuxrc を
修正し、再び、/boot/initrd.buffalo に戻すことをする。これが第1歩。
手順は
# cd /boot
# dd if=initrd.buffalo of=initrd.gz bs=64 skip=1 
75826+1 records in
75826+1 records out
# gunzip initrd.gz
# mount -o loop,rw ./initrd /mnt/loop0
# vi /mnt/loop0/linuxrc
  (省略)
# umount /mnt/loop0
# gzip initrd
# mkimage -A ARM -O Linux -T RAMDisk -C gzip -a 0x00000000 -e 0x00000000 \
  -n initrd -d initrd.gz initrd.buffalo
# cp -pi initrd.buffalo /mnt/disk1/initrd.buffalo-NEW
linuxrcの基本は余分なファイルコピー(cp)はしないようにしたこと。
あとは /usr/local/sbin/miconapl /usr/local/sbin/nvram /usr/local/sbin/miconmon の部分に細工を加える。
jump_to_slgl に飛ばすようにした。
さあて、再起動だ。
5分経過後もエラーブザーが鳴らないからうまくいったか。

眠って、やっと朝になった。いまは30日の10:30。
さあて、これからオリジナルHDを壊す。
オリジナルHDをUSBケースに入れ、USB経由でつなぐ。
最初のパーティション(ext3)だけ自動マウントされてしまうので、これをumount
# fdisk /dev/sda でフォーマットと初期化を行う。
WD1600AAJS-00PSA0(160GB)
#partitionSIZEIDFSDIR
1/dev/sdb1+300MB83ext3/boot
2/dev/sdb2+30000MB83xfs/
4/dev/sdb4全部5Exten
5/dev/sdb5+1024MB82swapswap
6/dev/sdb6全部83xfs/mnt/disk1
# cd /tmp
# mkdir sdb1 sdb2 sdb6
# mount /dev/sdb1 /tmp/sdb1
# mount /dev/sdb2 /tmp/sdb2
# mount /dev/sdb6 /tmp/sdb6
# cd /tmp/sdb2
# mkdir boot mnt proc sys
# ln -s /mnt/ram tmp
# cd mnt
# mkdir authtest disk1 info loop0 msdfs_root ram usbdisk1 usbdisk2
# cd /
# tar cf - bin/ dev/ etc/ home/ lib/ lsgl/ root/ sbin/ share/ usr/ var/ www/ |\
  (cd /tmp/sdb2; tar xpf - )
# cd /boot
# tar cf - . | (cd /tmp/sdb1; tar xpf - )
# mkdir /tmp/sdb6/share
# chmod 777 /tmp/sdb6/share
これを完了させたら、電源をオフして、オリジナルHDのほうを 本体に入れ替えて、そうして電源オン。これで動く(はず)。
動くことが確認できたら、(5分後に落ちないことも確認すること)
結果:ここまではうまくいった。
再び、電源を落とし、再び、チェンジ!!
オリジナルHDをUSBでつなぐ。
方針変更して、いきなりこのHDにdebianを入れてしまうことにした。
前回、/mnt/disk1/debinst/のところにdebianを(cdebootstrapから作成) あらかじめ cdebootstrap で作った(gcc込み)のをdebian-Full-20081229.tgz として用意しておいた。もう一度
# cd /tmp
# mkdir sdb1 sdb2 sdb6
# mount /dev/sdb1 /tmp/sdb1
# mount /dev/sdb2 /tmp/sdb2
# mount /dev/sdb6 /tmp/sdb6
# cd /tmp/sdb2
# tar xzf /mnt/disk1/debian-Full-20081229.tgz
あと、いくつか手を加える。
これを完了させたら、電源をオフして、オリジナルHDのほうを 本体に入れ替えて、そうして電源オン。これで動く(はず)。
動くことが確認できたら、(5分後に落ちないことも確認すること)
再び、電源を落とし、再び、チェンジ!!
オリジナルHDをUSBでつなぐ。
ここからいよいよdebianをオーバー・ライトさせて、まあ、これだけで 動くとは思わないが、実験。
(2008.12.29d)

やっとここで一段落した。
オリジナルHDはもう壊すことにした。
で、改良用HDを本体にセットし、オリジナルHDをUSBで つないで、telnetでログインして、
着々とオリジナルHDをdebian化しようと企てた。
おっとう!!スタート5分で警告ブザーが鳴り始めたぞ。
何をし忘れたんだろう。
あ〜あ、大変だ。
たぶん、予想では
miconapl -a boot_flash_ok これを実行してから
miconapl -a boot_end を実行する。これでPOWER LED の点滅が止まる。
これかな?
miconaplの標準パスは /usr/local/sbin/miconapl で、
予備に同じディレクトリィにオリジナルを miconapl.ORG として置いてある。
ちなみに、再立ち上げ後、いそいで
# miconapl.ORG -a boot_flash_ok
# miconapl.ORG -a boot_end
してみた。
# miconapl.ORG -a boot_flash_ok
err: >AnalyzeRecvPacket:This is invalid RespCode.(code=244)
# miconapl.ORG -a boot_end
となって、最初のほうのはもうやらなくてもいいみたいな雰囲気。

miconapl,nvram,miconmon がdebian化後も動かせるように、これらが使う ライブラリィを別の個所(/lsgl/)にコピー、退避、しておく。
# cd /lib
# tar cf - ld-* libc-2.3.6.so libc.so.6 libgcc_s.* | (cd /lsgl/lib; tar xpf -)
# cd /usr/local/sbin
# tar cf - miconmon miconapl nvram | (cd /lsgl/usr/local/sbin; tar xpf -)
# cd /usr/local/lib
# tar cf - libbuffalo* | ( cd /lsgl/lib; tar xpf - )   移動場所に注意

# cat /usr/local/sbin/jump_to_slgl
#!/bin/sh
CMD=/lsgl/usr/local/sbin/`basename $0`
LD_LIBRARY_PATH=/lsgl/lib $CMD $@
echo `date +%Y-%m-%d:%H:%M` $0 $* >> /lsgl/jump-log
(2008.12.29c)

挑戦する

linux-kernel-2.26.16.16 を作り直す。
cdebootstrap-static -a arm etch /mnt/disk1/debinst http://http.us.debian.org/debian
にて LS-GL 内で最小のdebian-linuxを構築。
gcc-4.1が使えるので、
http://buffalo.jp/download/からもらってきたソースの中の
linux-2
をtar xzf し、cd linux し、buffalo/configを一つ上に .config として
コピーし、 make oldconfig する。(make menuconfigがダメだった)
# aptitude install module-init-tools
# make oldconfig
# make
# make modules
# make uImage
# make modules_install
で uImage を作成。
  Image arch/arm/boot/uImage is ready
作成場所はここなのか。
(後記)
足りないものはその都度、
# aptitude install XXXXXX
して用意する。


miconapl の利用:
スタートアップ時の順番
miconapl -a boot_flash_ok  これを実行してから
miconapl -a boot_end       を実行する。これでPOWER LED の点滅が止まる。
これを実行しないと5分後にシャットダウンされる。

シャットダウン時の順番
miconapl -a shutdown_wait
(2008.12.29b)

リラックス

ここらでちょっと、頭を切り替えて、U-Bootを作ってみる。
その前に、事前にこのような作業をしておく。
# cd /usr/bin/
# ln -s ar      arm-linux-ar
# ln -s gcc     arm-linux-gcc
# ln -s ld      arm-linux-ld
# ln -s nm      arm-linux-nm
# ln -s objcopy arm-linux-objcopy
# ln -s ar      arm-none-linux-gnueabi-ar
# ln -s gcc     arm-none-linux-gnueabi-gcc
# ln -s ld      arm-none-linux-gnueabi-ld
# ln -s nm      arm-none-linux-gnueabi-nm
# ln -s objcopy arm-none-linux-gnueabi-objcopy
u-bootをもらってくるのは sourceforge から。
そうして
% cd u-boot-1.1.6
% make VCMA9_config  (よくわからなかったがLS-GLがARM9なのでVCMA9にしてみた)
% make
% sudo cp -pi tools/mkimage /usr/bin/
u-boot-1.1.6/tools/ のところに mkimage が作られてる。
使うのはこのmkimageだけ。
(2008.12.29a)

どっぷりとつかる

今日はたくさんのことをして頭が混乱してるからこの辺でメモを取っておく。
あとでオリジナルのHDをフォーマットしなおして使うので、 その前にいろいろと記録を取ろう。
オリジナルのHDをUSBでいま稼働中のにつなぐ。(いまのはtelnetが可能)
つなぐとオートでext3の(/dev/sda1)はマウントされる。sda2,sda6は マウントされない。
手で、
# mount -t xfs /dev/ls_usbdisk2_2 /tmp/uu2
# mount -t xfs /dev/ls_usbdisk2_6 /tmp/uu6
つないだら

# fdisk /dev/ls_usbdisk2

The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/ls_usbdisk2: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

            Device Boot      Start         End      Blocks   Id  System
/dev/ls_usbdisk2p1               1          25      200781   83  Linux
/dev/ls_usbdisk2p2              26          87      498015   83  Linux
/dev/ls_usbdisk2p4              88       19457   155589525    5  Extended
/dev/ls_usbdisk2p5              88         104      136521   82  Linux swap
/dev/ls_usbdisk2p6             105       19457   155452941   83  Linux

Command (m for help): q
でパーティションのフォーマット、パーティションの各サイズをメモ

# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2             79988720    437320  79551400   1% /
/dev/ram1                15360       120     15240   1% /mnt/ram
/dev/ls_disk1_1         287782     17108    255816   6% /boot
/dev/ls_disk1_6      162787356   3980632 158806724   2% /mnt/disk1
/dev/ls_usbdisk2_1      194443     10624    173780   6% /mnt/usbdisk2
/dev/ls_usbdisk2_2      493212    157516    335696  32% /mnt/ram/uu2
/dev/ls_usbdisk2_6   155377036       624 155376412   0% /mnt/ram/uu6
これでみると sda1は194MB、sda2は493MB、残りsda6が155377MBぐらいである。

# mount
rootfs on / type rootfs (rw)
/dev/root on / type xfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/proc/bus/usb/ on /proc/bus/usb type usbfs (rw)
/dev/ram1 on /mnt/ram type tmpfs (rw)
/dev/ls_disk1_1 on /boot type ext3 (rw,data=ordered)
/dev/ls_disk1_6 on /mnt/disk1 type xfs (rw)
/dev/ls_usbdisk2_1 on /mnt/usbdisk2 type ext3 (rw,noatime,data=ordered)
/dev/ls_usbdisk2_2 on /mnt/ram/uu2 type xfs (rw)
/dev/ls_usbdisk2_6 on /mnt/ram/uu6 type xfs (rw)

# cd /mnt/usbdisk2 ; ls -l
-rw-r--r--    1 root     root      4520692 May 23  2008 initrd.buffalo
-rw-r--r--    1 root     root       245776 May 23  2008 u-boot.buffalo
-rw-r--r--    1 root     root      1867068 May 23  2008 uImage.buffalo

# dd if=initrd.buffalo of=/mnt/disk1/firm112-initrd.gz bs=64 skip=1
# (cd /mnt/disk1 ; gunzip firm112-initrd.gz )
して initrd を抜き取る。
# mount -o loop firm112-initrd /tmp/loop
オリジナルHDは WD1600AAJS で160GB

firm112-sda1-boot-ext3.tgz
firm112-sda2-root-xfs.tgz
firm112-sda6-disk1-xfs.tgz
firm112-initrd
firm112-save-conf
そうしたら、一回このファームウェアの情報とunameを知るために これをtelnetできるように修正して電源オフ。 こっちを本体に取り付けて起動。 telnet できたら # uname -a する。
# uname -a
Linux LS-GLFE4 2.6.16.16-arm1 #6 Fri Oct 12 21:23:48 JST 2007 armv5tejl unknown
おや、ファームがアップしたあとと変わりはない。2.6.16.16-arm1だ。予想外。

カーネルを再構築するとき .config は buffalo/buffalo_lsgl_arm_110.config
これを利用する。
telnet化。 /etc/melco/info を改良
/etc/init.d/telnetd.shを新規作成 /etc/init.d/rcSを改良。 telnetd.sh を ftpd.sh の近くに書く。 telnetd.shはftpd.shを参考にする。 debian化の第1歩は http://http.us.debian.org/debian/ のloop/main/c/cdebootstrap/cdebootstrap-static-XXXXX を使ってやっとうまくいった。 # cdebootstrap-static --allow-unauthenticated --arch=arm etch /home/arm-debinst http://http.us.debian.org/debian 徹夜でかなりはげしくいじって疲れてしまった。
ここらでメモを作っておくことにする。
カーネルをmakeするなら
# aptitude install autoconf automake binutils gcc gettext kernel-package \
  libncurses5-dev libtool linux-kernel-headers make
カーネルが作れたら、あとでもできるようにパッケージ化するかな。
とりあえず、 tarでは保存したけど。dpkg なら
# dpkg -b directory [filename]
debian化したならば、開発環境を作るために
# aptitude install gcc make libc-dev libc6-dev
# aptitude install patch

/boot/initrd.buffalo のdebian化対策用を作成
# gzip initrd
# mkimage -A ARM -O Linux -T RAMDisk -C gzip -a 0x00000000 -e 0x00000000 \
  -n initrd -d initrd.gz initrd.buffalo
(2008.12.28)

ファームウェア 1.15 ファンコントロール、温度モニタ

例のごとく、09:45〜25:45までが起動時間になるように設定する。
これはファームを1.15にアップデートする前にはない機能だった。
おや!!気がついた。パワーオンすると、ファンが止まったまま。これでいいのかなぁ?
心配になってきたので、スタートアップした時にファンが回るように直そう。
どんなコマンドで動くんだっけ?調べてみた。
# miconapl -a fan_set_speed {full,fast,slow,stop}
なので
# miconapl -a fan_set_speed slow  とした。
ファンのスピードを知りたいなら、
# miconapl -a fan_get_speed
それと、ついでに温度を調べる方法。
# miconapl -b -a temp_get
で表示が出る。 おまけで、U-Bootで使う時の環境変数が
# nvram -c printenv
でわかる。
# miconapl -b -a bz_on button
でブザー音がでる。
(2008.12.27)

初の電源オン

改良用のHDをLS-GLにセットし、電源を入れる。
なにはともあれ、http://www.buffalo.jp/download/driver/hd/ls-gl.htmlにある 最新のファームウェアVer.1.15(lsgl-115.exe)にアップデートをした。
root@LS-GLFE4:/# uname -a
Linux LS-GLFE4 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl unknown
モジュールは /lib/modules/2.6.16.16-arm1/ に入ることになる。
Debian GNU/Linux 4.0 r6は2.6.18-6だった。
2.6.16.16になるdebianは?
最初はシリアルを結線してしまおうと思ったが、メイン基板のところにしか ないみたいでめんどくさいので、いまはスキップ。
あとは、早急にtelnetログインができるように考える。
ところが、私のは新型LS-GLらしくて、ほかの人のと合っていない。
まあとりあえず、/etc/init.d/rcS を見る。
これを修正した。最後に近い部分を
echo "** step3 **"
for cmd in recover_shareinfo.sh micon_setup.sh atalk.sh ftpd.sh httpd.sh smb.sh\
clientUtil_servd.sh lsprcvd.sh daemonwatch.sh cron.sh logchkd.sh checkconfig.sh\
init_sem.sh telnetd.sh
do
        exec_sh $cmd
done
とした。
つまり、telnetd.shを追加し、/etc/init.d/ftpd.shを参考にして /etc/init.d/telnetd.shを作成。

/etc/melco/ にはさまざまな設定が(しかも知らぬ間に設定が変わる)がある。
この中の /etc/melco/info および /etc/melco/userinfo をとりあえず手で修正。
ほかにも http://192.168.0.29/にて修正されたものも (たとえばスリープ設定)も/etc/melcoに反映される。
/etc/melco/infoにてtelnetの項目をftpの次に追加。
ftp=on
telnet=on
kamiiを手でユーザ追加をしたもんだから、/etc/melco/userinfoここに記載 されていないから、手で加えた。
toor<>Same as root;
kamii<>Kamii Masashi;
(toorのパスワードはアレにしてある)
直したファイル、作ったファイルは
/etc/passwd        /etc/shadow
/etc/init.d/rcS    /etc/init.d/telnetd.sh
/etc/melco/info    /etc/melco/userinfo
****************************************
debian化するのに最大の問題点は miconapl というコマンドを実行するのに
必要なシェアド・ライブラリィがdebianのとバッティングすること。
同じ問題が nvram でも起きる。
% ldd /usr/local/sbin/miconapl するとこう出る。
root@LS-GLFE4:/etc/melco# ldd /usr/local/sbin/miconapl
        libbuffalo_bin.so => /usr/local/lib/libbuffalo_bin.so (0x40020000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4002d000)
        libc.so.6 => /lib/libc.so.6 (0x4003e000)
        /lib/ld-linux.so.3 (0x40000000)
root@LS-GLFE4:/etc/melco#
エレキジャック:玄箱PRO(KURO-BOX/Pro)のところをヒントにして
ライブラリィーがかぶってしまって消してしまうんかと心配だから
# mkdir /lsgl して /lsgl を作り、
必要なものはこっちに退避する。
とりあえずはこんなことをする。
また、bin+lib+etc+usr-20081227.tgz なんてものも作っておく。
うっかりLS-GLをダメにしてしまったときに、復旧を早められるよう、準備する。

% ps したときの記録
(2008.12.26)

商品と初対面。いきなり分解

ついでにCF型無線LANも買ってしまった。(WN-G54/CF)
どっちも、佐川急便で夜中に到着。
もうさっそく、電源を入れるよりも早く分解。
Parallels_Debian_on_Mac にて、ばらしたHDをUSBでつないで、
/dev/sda1(ext3),/dev/sda2(xfs),/dev/sda6(xfs)をtar.gzでセーブ。
ちなみに/dev/sda5はswap
さらに、改良用のHDをfdiskしてから、これらを戻す。
(2008.12.25)

LSーGLを注文

ネットでLS-160GLを注文。今日、届くと思ったが、こなかった。8,980円なり。