玄箱PROとかLinuxとか
http://w.atwiki.jp/aerocats/
玄箱PROとかLinuxとか
ja
2008-02-28T11:57:07+09:00
1204167427
-
NANDフラッシュ
https://w.atwiki.jp/aerocats/pages/67.html
玄箱PROはHDDを取り付けなくても、内蔵されたフラッシュメモリである程度はNASとして作動する。
しかし、その構造上メモリへの書き込み回数に制限があるのでNANDフラッシュを酷使することは推奨できない。
*構造
STMicroelectronics社のデータシートより。
玄箱PROからストレージとして扱う分には不要な項目もあるが、デバイスそのものの仕組みを知るには有用だと判断して掲載している。
**基本データ
|メーカー|STMicroelectronics|
|製品名|NAND02GW3B2C|
|容量|2Gb(256MB)|
|バス|x8|
|ページサイズ|2048+64バイト|
|ブロックサイズ|128K+4Kバイト|
|メモリ配列|64ページx2048ブロック|
ECC(Error Correct Code)用に各ページに64バイトのOOB(Out Of Band)が含まれている。
OOBの合計は8Mバイトになり、NAND02GW3B2Cの実質容量は264Mバイトとなる。
**信号種別
|信号名|概要|
|Inputs/Outputs(I/O0-I/O7)|選択されたアドレスを入力するか、出力モード時にデータを出力するか、または入力モード時にコマンドかデータを入力するのに使用される。入力はWrite Enableの立ち上がりでラッチされる。デバイスの選択が解除されるか、または出力に障害があるとき、I/O0-I/O7は浮いたままの状態になる。|
|Address Latch Enable(AL)|Command Interfaceのアドレス入力のラッチを有効にする。ALがHighの場合、アドレス入力はWrite Enableの立ち上がりでラッチされる。|
|Command Latch Enable(CL)|Command Interfaceのコマンド入力のラッチを有効にする。CLがHighの場合、コマンド入力はWrite Enableの立ち上がりでラッチされる。|
|Chip Enable(E)|メモリコントロールロジック、入力バッファ、デコーダ、およびセンスアンプを活性化する。EがLowの場合に、デバイスは選択される。EがHighになっても、デバイスは選択されたままで残っていて、待ち受け状態を調べても、デバイスはbu
2008-02-28T11:57:07+09:00
1204167427
-
(標準Linux)procディレクトリ
https://w.atwiki.jp/aerocats/pages/66.html
*/procとは
*/procの構成
実際に標準Linuxではどのような構成となっているか。
|ファイルもしくはディレクトリ名|設定内容|
|buddyinfo||
|buffalo/||
|bus/||
|cmdline||
|cpu/||
|cpuinfo||
|devices||
|diskstats||
|driver/||
|execdomains||
|filesystems||
|fs/||
|interrupts||
|iomem||
|ioports||
|kallsyms||
|kmsg||
|loadavg||
|locks||
|mdstat||
|meminfo||
|misc||
|modules||
|mounts|self/mountsのシンボリックリンク|
|mtd||
|mv_xor||
|net/||
|partitions||
|resource_dump||
|scsi/||
|self|1405のシンボリックリンク|
|slabinfo||
|stat||
|swaps||
|sys/||
|sysvipc/||
|tty/||
|uptime||
|version||
|vmstat||
----
2008-02-07T22:23:48+09:00
1202390628
-
BusyBox
https://w.atwiki.jp/aerocats/pages/65.html
*BusyBoxとは
BusyBoxは多くの標準的なLinuxユーティリティ(コマンド群)を1つの実行可能プログラムとして実装したもの。
それぞれのコマンドが共有する多くの共通要素をまとめることで、数多くのコマンドを備えながら小さな容量におさえることのできた非常に優れたPOSIX準拠プログラム。
なお、BusyBoxにはランレベルの概念はない。
*BusyBoxの仕組み
BusyBoxが動作する仕組みは比較的簡単で、自分を呼び出した時のプログラム名が動作すべきコマンドだと判断する。
例として「kurobox」という名前でBusyBoxにシンボリックリンクを貼り、PATHの通った場所に置き実行すると、BusyBoxは「kuroboxというコマンドを実行しろ」と命令されたものだと認識する。
main関数のargv[0]が「呼び出したコマンド名」だ。
豊富なコマンド群もほとんどがシンボリックリンクなのでサイズも節約でき、導入も簡単だ。
----
2008-07-02T17:01:58+09:00
1214985718
-
(標準Linux)usrディレクトリ
https://w.atwiki.jp/aerocats/pages/64.html
*/usrとは
*/usrの構成
実際に標準Linuxではどのような構成となっているか。
|ファイルもしくはディレクトリ名|設定内容|
|bin||
|include||
|lib||
|local||
|sbin||
|share||
----
2008-02-03T03:37:17+09:00
1201977437
-
(標準Linux)varディレクトリ
https://w.atwiki.jp/aerocats/pages/63.html
*/varとは
*/varの構成
標準Linuxのvarディレクトリは/mnt/ram/varのシンボリックリンクとなっている。
つまりRAM上に作られているため、玄箱PROの電源を切るたびに内容は消えてしまうということだ。
実際に標準Linuxではどのような構成となっているか。
|ファイルもしくはディレクトリ名|設定内容|
|empty||
|lib||
|lock||
|log||
|run||
|spool||
|tmp||
----
2008-02-03T02:46:18+09:00
1201974378
-
(標準Linux)sbinディレクトリ
https://w.atwiki.jp/aerocats/pages/62.html
*/sbinとは
*/sbinの構成
実際に標準Linuxの/sbinがどのようになっているのかを見てみる。
|コマンド|備考|説明|
|adjtimex|[[BusyBox]]のシンボリックリンク||
|depmod|||
|dhcpcd|||
|e2fsck|fsck.ext2のシンボリックリンク||
|fdisk|[[BusyBox]]のシンボリックリンク||
|freeramdisk|[[BusyBox]]のシンボリックリンク||
|fsck|[[BusyBox]]のシンボリックリンク||
|fsck.ext2|||
|fsck.ext3|fsck.ext2のシンボリックリンク||
|fsck.minix|[[BusyBox]]のシンボリックリンク||
|getty|[[BusyBox]]のシンボリックリンク||
|halt|[[BusyBox]]のシンボリックリンク||
|hdparm|[[BusyBox]]のシンボリックリンク||
|hwclock|[[BusyBox]]のシンボリックリンク||
|ifconfig|[[BusyBox]]のシンボリックリンク||
|ifdown|[[BusyBox]]のシンボリックリンク||
|ifup|[[BusyBox]]のシンボリックリンク||
|init|[[BusyBox]]のシンボリックリンク||
|insmod|[[BusyBox]]のシンボリックリンク||
|klogd|[[BusyBox]]のシンボリックリンク||
|ldconfig|||
|loadkmap|[[BusyBox]]のシンボリックリンク||
|logread|[[BusyBox]]のシンボリックリンク||
|losetup|[[BusyBox]]のシンボリックリンク||
|lsmod|[[BusyBox]]のシンボリックリンク||
|makedevs|[[BusyBox]]のシンボリックリンク||
|mdev|[[BusyBox]]のシンボリックリンク||
|mke2fs|mkfs.ext2のシンボリックリンク||
|mkfs.ext2|||
|mkfs.ext3|mkfs.ext2のシンボリックリンク||
|mkfs.minix|[[BusyBox]]のシンボリックリ
2008-02-03T06:53:14+09:00
1201989194
-
(標準Linux)devディレクトリ
https://w.atwiki.jp/aerocats/pages/61.html
*/devとは
*/devの構成
実際に標準Linuxではどのような構成となっているか。
|モード|所有者|グループ|メジャー番号|マイナー番号|サイズ|ファイル名|リンク先|
|crw-r--r--|root|root|5|1||console||
|crw-r--r--|root|root|205|16||cuaam0||
|crw-r--r--|root|root|205|17||cuaam1||
|lrwxrwxrwx|root|root|||3|disk1|sda|
|lrwxrwxrwx|root|root|||4|disk1_1|sda1|
|lrwxrwxrwx|root|root|||4|disk1_2|sda2|
|lrwxrwxrwx|root|root|||4|disk1_3|sda3|
|lrwxrwxrwx|root|root|||4|disk1_4|sda4|
|lrwxrwxrwx|root|root|||4|disk1_5|sda5|
|lrwxrwxrwx|root|root|||4|disk1_6|sda6|
|lrwxrwxrwx|root|root|||4|disk1_7|sda7|
|lrwxrwxrwx|root|root|||4|disk1_8|sda8|
|lrwxrwxrwx|root|root|||4|disk1_9|sda9|
|lrwxrwxrwx|root|root|||13|fd|/proc/self/fd|
|prw-r--r--|root|root|||0|initctl||
|brw-r--r--|root|root|1|250||initrd||
|brw-r--r--|root|root|9|0||md0||
|brw-r--r--|root|root|9|1||md1||
|brw-r--r--|root|root|9|2||md2||
|brw-r--r--|root|root|9|3||md3||
|brw-r--r--|root|root|9|4||md4||
|brw-r--r--|root|root|9|5||md5||
|brw-r--r--|root|root|9|6||md6||
|brw-r--r--|root|root|
2008-02-02T12:14:12+09:00
1201922052
-
fstab
https://w.atwiki.jp/aerocats/pages/60.html
*標準Linux
標準Linuxの/etc/fstabは以下のようになっている。
|デバイスまたはラベル|マウントポイント|[[ファイルシステム]]|[[オプション>マウントオプション]]|バックアップ指定|fsckの順位|
|proc|/proc|proc|defaults|0|0|
|sysfs|/sys|sysfs|defaults|0|0|
|devpts|/dev/pts|devpts|gid=4,mode=620|0|0|
----
2008-01-29T23:10:23+09:00
1201615823
-
(標準Linux)終了メッセージ
https://w.atwiki.jp/aerocats/pages/59.html
*終了メッセージ
----- rcDown -----
===== Starting shutdown_start.sh =====
[Success]
===== Starting shutdown_proc.sh =====
===== Starting clientUtil_servd.sh =====
Stop clientUtil_server:[Success]
===== Starting smb.sh =====
$Shutting down SMB services:
$Shutting down NMB services:
[Success]
===== Starting networking.sh =====
Deconfiguration network interface: lo eth0
killall: dhcpcd: no process killed
[Success]
===== Starting Kevent.sh =====
[Success]
===== Starting FanController.sh =====
Stopping a fan ...........
[Success]
[Success]
===== Starting umount_disk.sh =====
[Success]
The system is going down NOW !!
Sending SIGTERM to all processes.
The system is halted.
md: stopping all md devices.
md: md0 switched to read-only mode.
Synchronizing SCSI cache for disk sda:
System halted.
----
2008-01-29T01:33:43+09:00
1201538023
-
hexdumpコマンド
https://w.atwiki.jp/aerocats/pages/58.html
hexdumpコマンドは、あるファイルを指定するフォーマットで出力するフィルターユーティリティだ。
*標準Linuxでのhexdumpコマンド
**概要
helpを表示してみる。
~ # hexdump --help
BusyBox v1.1.1 (2007.04.06-12:02+0000) multi-call binary
Usage: hexdump [-[bcCdefnosvx]] [OPTION] FILE
The hexdump utility is a filter which displays the specified files,
or the standard input, if no files are specified, in a user specified
format
-b One-byte octal display
-c One-byte character display
-C Canonical hex+ASCII, 16 bytes per line
-d Two-byte decimal display
-e FORMAT STRING
-f FORMAT FILE
-n LENGTH Interpret only length bytes of input
-o Two-byte octal display
-s OFFSET Skip offset byte
-v display all input data
-x Two-byte hexadecimal display
標準Linuxでのhexdumpコマンドは[[BusyBox]]が動作する。
----
2008-01-29T00:27:25+09:00
1201534045