大破雑記帳

個人用メモな雑記ブログ いろんなことをざっくりと。

SKS8300-8X SerDesメモ

U-Boot

RTL9300# md.l 0xbb000184 14
bb000184: 1b1b1b1b 00001b1b 00000000 00000000    ................
bb000194: 007df7df 000007df 00000000 00000000    .}..............
bb0001a4: 00800000 00800000 00000400 00000400    ................
bb0001b4: 00000000 00000000 00000000 00000000    ................
bb0001c4: 00000000 00000000 00000000 00000000    ................
RTL9300# md.l 0xbb000294 12
bb000294: 1b1b1b1b 00001b1b 00000000 007df7df    .............}..
bb0002a4: 000007df 00800000 00800000 00800000    ................
bb0002b4: 00800000 00800000 00800000 00000000    ................
bb0002c4: 00000000 00000000 00000000 00000000    ................
bb0002d4: 00000000 00000000    ........
RTL9300# rtk 10g 0 fiber1g
10gMedia set Unit 0 Port 0
RTL9300# md.l 0xbb000184 14
bb000184: 1b1b1b1b 00001b1b 00000000 00000000    ................
bb000194: 007df7df 000007df 00000000 00000000    .}..............
bb0001a4: 00000000 00800000 00000400 00000400    ................
bb0001b4: 00000000 00000000 00000000 00000000    ................
bb0001c4: 00000000 00000000 00000000 00000000    ................
RTL9300# md.l 0xbb000294 12
bb000294: 1b1b1b1b 00001b1b 00000000 007df7df    .............}..
bb0002a4: 000007df 00800000 00800000 00800000    ................
bb0002b4: 00800000 00800000 00800000 00000000    ................
bb0002c4: 00000000 00000000 00000000 00000000    ................
bb0002d4: 00000000 00000000    ........

kernel (stock)

Switch(sdiag)#tshell for i in $(seq $((0x184)) 4 $((0x1cc))); do addr=$(printf "0x1b00%04x" $i); val=$(devmem $addr 32); printf "%s: %s\n" $addr 
0x1b000184: 0x1B1B1B1B
0x1b000188: 0x00001B1B
0x1b00018c: 0x00000000
0x1b000190: 0x00000000
0x1b000194: 0x007DF7DF
0x1b000198: 0x000007DF
0x1b00019c: 0x00000000
0x1b0001a0: 0x00000000
0x1b0001a4: 0x00C00000
0x1b0001a8: 0x00800000
0x1b0001ac: 0x00000400
0x1b0001b0: 0x00000400
0x1b0001b4: 0x00000000
0x1b0001b8: 0x00000000
0x1b0001bc: 0x00000000
0x1b0001c0: 0x00000000
0x1b0001c4: 0x00000000
0x1b0001c8: 0x00010100
0x1b0001cc: 0x00000000
Switch(sdiag)#tshell for i in $(seq $((0x294)) 4 $((0x2d8))); do addr=$(printf "0x1b00%04x" $i); val=$(devmem $addr 32); printf "%s: %s\n" $addr 
0x1b000294: 0x1B1B1B1B
0x1b000298: 0x00001B1B
0x1b00029c: 0x00000000
0x1b0002a0: 0x007DF7DF
0x1b0002a4: 0x000007DF
0x1b0002a8: 0x00C00000
0x1b0002ac: 0x00C00000
0x1b0002b0: 0x00C00000
0x1b0002b4: 0x00800000
0x1b0002b8: 0x00800000
0x1b0002bc: 0x00C00000
0x1b0002c0: 0x00000000
0x1b0002c4: 0x00000000
0x1b0002c8: 0x00000000
0x1b0002cc: 0x00000000
0x1b0002d0: 0x00000000
0x1b0002d4: 0x00000000
0x1b0002d8: 0x00000000
Switch(sdiag)#tshell for i in $(seq $((0x3b0)) 4 $((0x3b4))); do addr=$(printf "0x1b00%04x" $i); val=$(devmem $addr 32); printf "%s: %s\n" $addr 
0x1b0003b0: 0x00012FA4
0x1b0003b4: 0x00000D40

SFP電気仕様メモ (SFF-8419)

  • TX_Fault

    • unused: LOW(モジュール側)
    • active: HIGH(モジュール側)
    • wiring: pull-up(ホスト側)
  • TX_Disable

    • unused: -
    • active: HIGH or open(ホスト側)
    • wiring: pull-up(モジュール側)
  • RS0/RS1 (Rate Select)

    • unused: LOW(モジュール側)
    • active: HIGH(ホスト側)
    • wiring: pull-down(モジュール側)
  • MOD_ABS (MOD_DEF0)

    • unused: -
    • active: HIGH(ホスト側)
    • wiring: GND(モジュール側, 直接)
  • RX_LOS

    • unused: LOW(モジュール側)
    • active: HIGH(モジュール側)
    • wiring: pull-up(ホスト側?)

SKS8300-8X GPIOメモ

RTL9300# rtk ext-pinGet 2
The pinNum (2) is invalid.
RTL9300# md.l 0xbb00c600 10
bb00c600: 0000010c 00000000 00000000 00000000    ................
bb00c610: 00000000 00000000 00000000 00000000    ................
bb00c620: 00000000 00000000 00000000 00000000    ................
bb00c630: 00000000 00000000 00000000 00000000    ................
RTL9300# rtk ext-devInit 0
devAddress:     0

RTL9300# md.l 0xbb00c600 10
bb00c600: 0000010c 00000000 00000000 00000000    ................
bb00c610: 00000000 00000000 00000000 00000000    ................
bb00c620: 00003002 00000000 00000000 00000000    ..0.............
bb00c630: 00000000 00000000 00000000 00000000    ................
RTL9300# rtk ext-pinGet 2  
pin2:   1

SKS8300-8X ブート周りメモ

0x200 以降はヘッダ部分のサイズ値分のみをデコードしている気がする

あとよく考えたらテスト2つの事前の0埋めは生成したバイナリ大きいので要らなかった

テスト1

ブート時にイメージをロードする 0x81000000 から4byte 100ブロックを0埋めし、 /dev/zero から生成した10MiBバイナリを通常ブートと同様にロードさせたやつ

RTL9300# ls
 -rw-r--r--      566 Thu Jan 01 00:26:01 1970 startup.cfg
 -rw-r--r--      668 Thu Jan 01 00:23:53 1970 id_dsa
 -rw-r--r--     1679 Thu Jan 01 00:24:07 1970 id_rsa
 -rw-r--r-- 10485760 Thu Jan 01 00:01:46 1970 zero.bin
 -rw-r--r-- 14607999 Thu Jan 01 01:09:16 1970 nos.img
RTL9300# mw.l 0x81000000 0 100 
RTL9300# md.l 0x81000000 100 
81000000: 00000000 00000000 00000000 00000000    ................
81000010: 00000000 00000000 00000000 00000000    ................
81000020: 00000000 00000000 00000000 00000000    ................
81000030: 00000000 00000000 00000000 00000000    ................
81000040: 00000000 00000000 00000000 00000000    ................
81000050: 00000000 00000000 00000000 00000000    ................
81000060: 00000000 00000000 00000000 00000000    ................
81000070: 00000000 00000000 00000000 00000000    ................
81000080: 00000000 00000000 00000000 00000000    ................
81000090: 00000000 00000000 00000000 00000000    ................
810000a0: 00000000 00000000 00000000 00000000    ................
810000b0: 00000000 00000000 00000000 00000000    ................
810000c0: 00000000 00000000 00000000 00000000    ................
810000d0: 00000000 00000000 00000000 00000000    ................
810000e0: 00000000 00000000 00000000 00000000    ................
810000f0: 00000000 00000000 00000000 00000000    ................
81000100: 00000000 00000000 00000000 00000000    ................
81000110: 00000000 00000000 00000000 00000000    ................
81000120: 00000000 00000000 00000000 00000000    ................
81000130: 00000000 00000000 00000000 00000000    ................
81000140: 00000000 00000000 00000000 00000000    ................
81000150: 00000000 00000000 00000000 00000000    ................
81000160: 00000000 00000000 00000000 00000000    ................
81000170: 00000000 00000000 00000000 00000000    ................
81000180: 00000000 00000000 00000000 00000000    ................
81000190: 00000000 00000000 00000000 00000000    ................
810001a0: 00000000 00000000 00000000 00000000    ................
810001b0: 00000000 00000000 00000000 00000000    ................
810001c0: 00000000 00000000 00000000 00000000    ................
810001d0: 00000000 00000000 00000000 00000000    ................
810001e0: 00000000 00000000 00000000 00000000    ................
810001f0: 00000000 00000000 00000000 00000000    ................
81000200: 00000000 00000000 00000000 00000000    ................
81000210: 00000000 00000000 00000000 00000000    ................
81000220: 00000000 00000000 00000000 00000000    ................
81000230: 00000000 00000000 00000000 00000000    ................
81000240: 00000000 00000000 00000000 00000000    ................
81000250: 00000000 00000000 00000000 00000000    ................
81000260: 00000000 00000000 00000000 00000000    ................
81000270: 00000000 00000000 00000000 00000000    ................
81000280: 00000000 00000000 00000000 00000000    ................
81000290: 00000000 00000000 00000000 00000000    ................
810002a0: 00000000 00000000 00000000 00000000    ................
810002b0: 00000000 00000000 00000000 00000000    ................
810002c0: 00000000 00000000 00000000 00000000    ................
810002d0: 00000000 00000000 00000000 00000000    ................
810002e0: 00000000 00000000 00000000 00000000    ................
810002f0: 00000000 00000000 00000000 00000000    ................
81000300: 00000000 00000000 00000000 00000000    ................
81000310: 00000000 00000000 00000000 00000000    ................
81000320: 00000000 00000000 00000000 00000000    ................
81000330: 00000000 00000000 00000000 00000000    ................
81000340: 00000000 00000000 00000000 00000000    ................
81000350: 00000000 00000000 00000000 00000000    ................
81000360: 00000000 00000000 00000000 00000000    ................
81000370: 00000000 00000000 00000000 00000000    ................
81000380: 00000000 00000000 00000000 00000000    ................
81000390: 00000000 00000000 00000000 00000000    ................
810003a0: 00000000 00000000 00000000 00000000    ................
810003b0: 00000000 00000000 00000000 00000000    ................
810003c0: 00000000 00000000 00000000 00000000    ................
810003d0: 00000000 00000000 00000000 00000000    ................
810003e0: 00000000 00000000 00000000 00000000    ................
810003f0: 00000000 00000000 00000000 00000000    ................
RTL9300# exit
Boot# run zero.bin
Loading primary partition image ...
loading image to 0x81000000 with JFFS2
load image size: 10485760 bytes
Booting kernel with Legacy format image at 81000100
Bad Header Checksum
ERROR: can't get kernel image!
Boot# debug_unish_env
RTL9300# md.l 0x81000000 100
81000000: eeddcc21 5355eecc dd55807e 00000000    ...!SU...U.~....
81000010: cdbddfae bb9b8901 70e5ccdd f6fc8364    ........p......d
81000020: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000030: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000040: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000050: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000060: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000070: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000080: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000090: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810000a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810000b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810000c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810000d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810000e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810000f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000100: eeddcc21 5355eecc dd55807e 00000000    ...!SU...U.~....
81000110: cdbddfae bb9b8901 70e5ccdd f6fc8364    ........p......d
81000120: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000130: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000140: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000150: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000160: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000170: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000180: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000190: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810001a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810001b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810001c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810001d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810001e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810001f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000200: 00000000 00000000 00000000 00000000    ................
81000210: 00000000 00000000 00000000 00000000    ................
81000220: 00000000 00000000 00000000 00000000    ................
81000230: 00000000 00000000 00000000 00000000    ................
81000240: 00000000 00000000 00000000 00000000    ................
81000250: 00000000 00000000 00000000 00000000    ................
81000260: 00000000 00000000 00000000 00000000    ................
81000270: 00000000 00000000 00000000 00000000    ................
81000280: 00000000 00000000 00000000 00000000    ................
81000290: 00000000 00000000 00000000 00000000    ................
810002a0: 00000000 00000000 00000000 00000000    ................
810002b0: 00000000 00000000 00000000 00000000    ................
810002c0: 00000000 00000000 00000000 00000000    ................
810002d0: 00000000 00000000 00000000 00000000    ................
810002e0: 00000000 00000000 00000000 00000000    ................
810002f0: 00000000 00000000 00000000 00000000    ................
81000300: 00000000 00000000 00000000 00000000    ................
81000310: 00000000 00000000 00000000 00000000    ................
81000320: 00000000 00000000 00000000 00000000    ................
81000330: 00000000 00000000 00000000 00000000    ................
81000340: 00000000 00000000 00000000 00000000    ................
81000350: 00000000 00000000 00000000 00000000    ................
81000360: 00000000 00000000 00000000 00000000    ................
81000370: 00000000 00000000 00000000 00000000    ................
81000380: 00000000 00000000 00000000 00000000    ................
81000390: 00000000 00000000 00000000 00000000    ................
810003a0: 00000000 00000000 00000000 00000000    ................
810003b0: 00000000 00000000 00000000 00000000    ................
810003c0: 00000000 00000000 00000000 00000000    ................
810003d0: 00000000 00000000 00000000 00000000    ................
810003e0: 00000000 00000000 00000000 00000000    ................
810003f0: 00000000 00000000 00000000 00000000    ................

テスト2

メーカーファームウェア

Switch(sdiag)#tshell hexdump -n $((0x300)) -C /mnt/flash/zero2.bin
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  53 4b 53 38 33 30 30 2d  38 58 20 62 69 6e 61 72  |SKS8300-8X binar|
00000210  79 20 74 65 73 74 0a 00  00 00 00 00 00 00 00 00  |y test..........|
00000220  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000300

ブートローダ

RTL9300# mw.l 0x81000000 0 100
RTL9300# md.l 0x81000000 100
81000000: 00000000 00000000 00000000 00000000    ................
81000010: 00000000 00000000 00000000 00000000    ................
81000020: 00000000 00000000 00000000 00000000    ................
81000030: 00000000 00000000 00000000 00000000    ................
81000040: 00000000 00000000 00000000 00000000    ................
81000050: 00000000 00000000 00000000 00000000    ................
81000060: 00000000 00000000 00000000 00000000    ................
81000070: 00000000 00000000 00000000 00000000    ................
81000080: 00000000 00000000 00000000 00000000    ................
81000090: 00000000 00000000 00000000 00000000    ................
810000a0: 00000000 00000000 00000000 00000000    ................
810000b0: 00000000 00000000 00000000 00000000    ................
810000c0: 00000000 00000000 00000000 00000000    ................
810000d0: 00000000 00000000 00000000 00000000    ................
810000e0: 00000000 00000000 00000000 00000000    ................
810000f0: 00000000 00000000 00000000 00000000    ................
81000100: 00000000 00000000 00000000 00000000    ................
81000110: 00000000 00000000 00000000 00000000    ................
81000120: 00000000 00000000 00000000 00000000    ................
81000130: 00000000 00000000 00000000 00000000    ................
81000140: 00000000 00000000 00000000 00000000    ................
81000150: 00000000 00000000 00000000 00000000    ................
81000160: 00000000 00000000 00000000 00000000    ................
81000170: 00000000 00000000 00000000 00000000    ................
81000180: 00000000 00000000 00000000 00000000    ................
81000190: 00000000 00000000 00000000 00000000    ................
810001a0: 00000000 00000000 00000000 00000000    ................
810001b0: 00000000 00000000 00000000 00000000    ................
810001c0: 00000000 00000000 00000000 00000000    ................
810001d0: 00000000 00000000 00000000 00000000    ................
810001e0: 00000000 00000000 00000000 00000000    ................
810001f0: 00000000 00000000 00000000 00000000    ................
81000200: 00000000 00000000 00000000 00000000    ................
81000210: 00000000 00000000 00000000 00000000    ................
81000220: 00000000 00000000 00000000 00000000    ................
81000230: 00000000 00000000 00000000 00000000    ................
81000240: 00000000 00000000 00000000 00000000    ................
81000250: 00000000 00000000 00000000 00000000    ................
81000260: 00000000 00000000 00000000 00000000    ................
81000270: 00000000 00000000 00000000 00000000    ................
81000280: 00000000 00000000 00000000 00000000    ................
81000290: 00000000 00000000 00000000 00000000    ................
810002a0: 00000000 00000000 00000000 00000000    ................
810002b0: 00000000 00000000 00000000 00000000    ................
810002c0: 00000000 00000000 00000000 00000000    ................
810002d0: 00000000 00000000 00000000 00000000    ................
810002e0: 00000000 00000000 00000000 00000000    ................
810002f0: 00000000 00000000 00000000 00000000    ................
81000300: 00000000 00000000 00000000 00000000    ................
81000310: 00000000 00000000 00000000 00000000    ................
81000320: 00000000 00000000 00000000 00000000    ................
81000330: 00000000 00000000 00000000 00000000    ................
81000340: 00000000 00000000 00000000 00000000    ................
81000350: 00000000 00000000 00000000 00000000    ................
81000360: 00000000 00000000 00000000 00000000    ................
81000370: 00000000 00000000 00000000 00000000    ................
81000380: 00000000 00000000 00000000 00000000    ................
81000390: 00000000 00000000 00000000 00000000    ................
810003a0: 00000000 00000000 00000000 00000000    ................
810003b0: 00000000 00000000 00000000 00000000    ................
810003c0: 00000000 00000000 00000000 00000000    ................
810003d0: 00000000 00000000 00000000 00000000    ................
810003e0: 00000000 00000000 00000000 00000000    ................
810003f0: 00000000 00000000 00000000 00000000    ................
RTL9300# exit
Boot# dir
 -rw-r--r--     1679 Thu Jan 01 00:24:07 1970 id_rsa
 -rw-r--r-- 10485760 Thu Jan 01 00:01:46 1970 zero.bin
 -rw-r--r-- 14607999 Thu Jan 01 01:09:16 1970 nos.img
 -rw-r--r--  1049088 Thu Jan 01 00:13:34 1970 zero2.bin
 -rw-r--r--      668 Thu Jan 01 00:23:53 1970 id_dsa
 -rw-r--r--      566 Thu Jan 01 00:26:01 1970 startup.cfg
Boot# run zero2.bin
Loading primary partition image ...
loading image to 0x81000000 with JFFS2
load image size: 1049088 bytes
Booting kernel with Legacy format image at 81000100
Bad Header Checksum
ERROR: can't get kernel image!
Boot# debug_unish_env
RTL9300# md.l 0x81000000 100
81000000: eeddcc21 5355eecc dd55807e 00000000    ...!SU...U.~....
81000010: cdbddfae bb9b8901 70e5ccdd f6fc8364    ........p......d
81000020: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000030: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000040: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000050: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000060: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000070: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000080: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000090: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810000a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810000b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810000c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810000d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810000e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810000f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000100: eeddcc21 5355eecc dd55807e 00000000    ...!SU...U.~....
81000110: cdbddfae bb9b8901 70e5ccdd f6fc8364    ........p......d
81000120: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000130: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000140: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000150: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000160: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000170: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000180: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000190: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810001a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810001b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810001c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810001d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810001e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810001f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000200: 534b5338 3330302d 38582062 696e6172    SKS8300-8X binar
81000210: 79207465 73740a00 00000000 00000000    y test..........
81000220: 00000000 00000000 00000000 00000000    ................
81000230: 00000000 00000000 00000000 00000000    ................
81000240: 00000000 00000000 00000000 00000000    ................
81000250: 00000000 00000000 00000000 00000000    ................
81000260: 00000000 00000000 00000000 00000000    ................
81000270: 00000000 00000000 00000000 00000000    ................
81000280: 00000000 00000000 00000000 00000000    ................
81000290: 00000000 00000000 00000000 00000000    ................
810002a0: 00000000 00000000 00000000 00000000    ................
810002b0: 00000000 00000000 00000000 00000000    ................
810002c0: 00000000 00000000 00000000 00000000    ................
810002d0: 00000000 00000000 00000000 00000000    ................
810002e0: 00000000 00000000 00000000 00000000    ................
810002f0: 00000000 00000000 00000000 00000000    ................
81000300: 00000000 00000000 00000000 00000000    ................
81000310: 00000000 00000000 00000000 00000000    ................
81000320: 00000000 00000000 00000000 00000000    ................
81000330: 00000000 00000000 00000000 00000000    ................
81000340: 00000000 00000000 00000000 00000000    ................
81000350: 00000000 00000000 00000000 00000000    ................
81000360: 00000000 00000000 00000000 00000000    ................
81000370: 00000000 00000000 00000000 00000000    ................
81000380: 00000000 00000000 00000000 00000000    ................
81000390: 00000000 00000000 00000000 00000000    ................
810003a0: 00000000 00000000 00000000 00000000    ................
810003b0: 00000000 00000000 00000000 00000000    ................
810003c0: 00000000 00000000 00000000 00000000    ................
810003d0: 00000000 00000000 00000000 00000000    ................
810003e0: 00000000 00000000 00000000 00000000    ................
810003f0: 00000000 00000000 00000000 00000000    ................

テスト3

nos.imgから 0x300 切り出してブートを失敗させ止めたやつ

Boot# dir
 -rw-r--r--     1679 Thu Jan 01 00:24:07 1970 id_rsa
 -rw-r--r--      768 Thu Jan 01 00:01:33 1970 nos_edit0x300.img
 -rw-r--r-- 10485760 Thu Jan 01 00:01:46 1970 zero.bin
 -rw-r--r-- 14607999 Thu Jan 01 01:09:16 1970 nos.img
 -rw-r--r--  1049088 Thu Jan 01 00:13:34 1970 zero2.bin
 -rw-r--r--      668 Thu Jan 01 00:23:53 1970 id_dsa
 -rw-r--r--  1049088 Thu Jan 01 00:03:53 1970 zero3.bin
 -rw-r--r--      566 Thu Jan 01 00:26:01 1970 startup.cfg
 -rw-r--r-- 14607999 Thu Jan 01 00:04:32 1970 nos_edit.img
Boot# run nos_edit0x300.img
Loading primary partition image ...
loading image to 0x81000000 with JFFS2
load image size: 768 bytes
Booting kernel with Legacy format image at 81000100
Start checking the Kernel Image CRC ..........Bad Data CRC
ERROR: can't get kernel image!
Boot# debug_unish_env
RTL9300# md.l 0x81000000 100
81000000: 6e6f732e 696d6700 00010000 00dee66f    nos.img........o
81000010: 9e830629 00000000 00000000 00000000    ...)............
81000020: 00000000 00000000 00000000 00000000    ................
81000030: 00000000 00000000 00000000 00000000    ................
81000040: 00000000 00000000 00000000 00000000    ................
81000050: 00000000 00000000 00000000 00000000    ................
81000060: 2d2b345f 32362f2c 5f450000 00000000    -+4_26/,_E......
81000070: 00000000 00000000 00000000 00000000    ................
81000080: 00000000 00000000 00000000 00000000    ................
81000090: 00000000 00000000 00000000 00000000    ................
810000a0: 00000000 00000000 00000000 00000000    ................
810000b0: 00000000 00000000 00000000 00000000    ................
810000c0: 00000000 00000000 00000000 00000000    ................
810000d0: 00000000 00000000 00000000 00000000    ................
810000e0: 00000000 00000000 00000000 00000000    ................
810000f0: 00000000 00000000 00000000 00000000    ................
81000100: 93000000 c35b7515 6585c4ca 00dee53f    .....[u.e......?
81000110: 80000000 80251130 0c2e472b 05050201    .....%.0..G+....
81000120: 00000000 00000000 00000000 00000000    ................
81000130: 00000000 00000000 00000000 00000000    ................
81000140: 1f8b0808 49548565 0203766d 6c696e75    ....IT.e..vmlinu
81000150: 782e6269 6e00ec5a 7f6c1cc7 757e37bb    x.bin..Z.l..u~7.
81000160: 773a5227 734fb732 57112ded 9243f254    w:R'sO.2W.-..C.T
81000170: d1d6c9a2 63d639b4 a723edb2 b1fe506c    ....c.9..#....Pl
81000180: 17bdb476 73961844 49055486 9d942884    ...vs..DI.T...(.
81000190: 662b512d d19e798c 9922ac5b 548c64da    f+Q-..y..".[T.d.
810001a0: 2a7ad539 761213b5 d39ee51f 295a2190    *z.9v.......)Z!.
810001b0: 9bfc41b4 a9c1b446 ad3a6ac3 242a2ad9    ..A....F.:j.$**.
810001c0: acb7df9b dd259727 59958222 48111320    .....%.'Y.."H.. 
810001d0: 767676e6 bd6fdeaf 796fe688 deff7bff    vvv..o..yo....{.
810001e0: effdbf9f d6bfdeaf 79e7ea7f 4d66fd69    ........y...Mf.i
810001f0: 32f2869b 4b89af1f 3da5bf6d f6c4df36    2...K...=..m...6
81000200: abe8af72 7fc2cd51 c176e4ab 972a4931    ...r...Q.v...*I1
81000210: 7b47efd7 c8c2bc05 cceba87f 892ccc35    {G...........,.5
81000220: 53142372 c71da340 3a155c47 5adebb66    S.#r...@:.\GZ..f
81000230: 89d6e475 b74f90e1 80564715 6341cfd4    ...u.O...VG.cA..
81000240: 1628091a b61cd33f 2fecac93 6ab9fb4f    .(.....?/...j..O
81000250: a8907392 14fb008f 05ed83a0 5da97f85    ..s.........]...
81000260: c6eb5fa6 b1fab3e4 d69fa143 e0350a5e    .._........C.5.^
81000270: 8fe4d7bb b989d2c2 24f3cbc7 dd3ea9d3    ........$....>..
81000280: 5939fb73 7dc2ce39 f5393a90 8adfd15d    Y9.s}..9.9:....]
81000290: 9d221358 ba194b5e b8b9caf0 2557162f    .".X..K^....%W./
810002a0: b969419b 05359c47 354a4ee9 44930f42    .iA..5.G5JN.D..B
810002b0: 0616c54c 49badc87 a7ebbdc3 fd64db0e    ...LI........d..
810002c0: fd8edd65 bad4c66b 00b69382 b2febc96    ...e...k........
810002d0: c8bcadfe bc0d36e6 b5f0bc61 27e60c77    ......6....a'..w
810002e0: a56ddac3 f31e4d12 6d10de0f 98674afc    .m....M.m....gJ.
810002f0: e6d3826c 276fb94b 53964ded 445b947c    ...l'o.KS.M.D[.|

テスト3

メーカーファームウェア

Switch(sdiag)#tshell hexdump -C /mnt/flash/zero4.tmp                                                                                          
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000100  53 4b 53 38 33 30 30 2d  38 58 20 62 69 6e 61 72  |SKS8300-8X binar|
00000110  79 20 74 65 73 74 20 31  0a 00 00 00 00 00 00 00  |y test 1........|
00000120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  53 4b 53 38 33 30 30 2d  38 58 20 62 69 6e 61 72  |SKS8300-8X binar|
00000210  79 20 74 65 73 74 20 32  0a 00 00 00 00 00 00 00  |y test 2........|
00000220  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000300  53 4b 53 38 33 30 30 2d  38 58 20 62 69 6e 61 72  |SKS8300-8X binar|
00000310  79 20 74 65 73 74 0a 00  00 00 00 00 00 00 00 00  |y test..........|
00000320  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100300

ブートローダ

Boot# run zero4.tmp
Loading primary partition image ...
loading image to 0x81000000 with JFFS2
load image size: 1049344 bytes
Booting kernel with Legacy format image at 81000100
Bad Header Checksum
ERROR: can't get kernel image!
Boot# debug_unish_env
RTL9300# md.l 0x81000000 100
81000000: eeddcc21 5355eecc dd55807e 00000000    ...!SU...U.~....
81000010: cdbddfae bb9b8901 70e5ccdd f6fc8364    ........p......d
81000020: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000030: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000040: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000050: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000060: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000070: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000080: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000090: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810000a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810000b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810000c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810000d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810000e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810000f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000100: 41281f59 86851ef9 15ada0e0 696e6172    A(.Y........inar
81000110: 46dd5313 2e0fa932 7ae5ccdd f6fc8364    F.S....2z......d
81000120: ecddcef1 e354fed0 bdabdde1 e4b4d583    .....T..........
81000130: edfed0cd b655cca3 edd5c67e ddcc2153    .....U.....~..!S
81000140: ec4ddc00 5355cdc3 2201807e efbc7566    .M..SU.."..~..uf
81000150: a6c0cc2f fed0eecc dd550101 0101c564    .../.....U.....d
81000160: 9945ab32 55807eef 55807eef bc756689    .E.2U.~.U.~..uf.
81000170: e31d83dd fe558eab 7d55807e ff01ac66    .....U..}U.~...f
81000180: 0ec992d9 73e50101 bde510ce 0101bae8    ....s...........
81000190: 3edd81a1 53330101 9ac510aa 01ce8ae1    >...S3..........
810001a0: b1fb0080 53770000 70dc0001 0000cbb1    ....Sw..p.......
810001b0: a0300000 55a60000 cabd0101 0000c9b2    .0..U...........
810001c0: 81900100 5a210001 79bc0100 78007bb3    ....Z!..y...x.{.
810001d0: d4970100 5355a9fc dda501be afc175c5    ....SU........u.
810001e0: 8ed77700 55d00dac 0155807e efbc7ee6    ..w.U....U.~..~.
810001f0: f16c5200 331698cc 01010101 00007988    .lR.3.........y.
81000200: 534b5338 3330302d 38582062 696e6172    SKS8300-8X binar
81000210: 79207465 73742032 0a000000 00000000    y test 2........
81000220: 00000000 00000000 00000000 00000000    ................
81000230: 00000000 00000000 00000000 00000000    ................
81000240: 00000000 00000000 00000000 00000000    ................
81000250: 00000000 00000000 00000000 00000000    ................
81000260: 00000000 00000000 00000000 00000000    ................
81000270: 00000000 00000000 00000000 00000000    ................
81000280: 00000000 00000000 00000000 00000000    ................
81000290: 00000000 00000000 00000000 00000000    ................
810002a0: 00000000 00000000 00000000 00000000    ................
810002b0: 00000000 00000000 00000000 00000000    ................
810002c0: 00000000 00000000 00000000 00000000    ................
810002d0: 00000000 00000000 00000000 00000000    ................
810002e0: 00000000 00000000 00000000 00000000    ................
810002f0: 00000000 00000000 00000000 00000000    ................
81000300: 534b5338 3330302d 38582062 696e6172    SKS8300-8X binar
81000310: 79207465 73740a00 00000000 00000000    y test..........
81000320: 00000000 00000000 00000000 00000000    ................
81000330: 00000000 00000000 00000000 00000000    ................
81000340: 00000000 00000000 00000000 00000000    ................
81000350: 00000000 00000000 00000000 00000000    ................
81000360: 00000000 00000000 00000000 00000000    ................
81000370: 00000000 00000000 00000000 00000000    ................
81000380: 00000000 00000000 00000000 00000000    ................
81000390: 00000000 00000000 00000000 00000000    ................
810003a0: 00000000 00000000 00000000 00000000    ................
810003b0: 00000000 00000000 00000000 00000000    ................
810003c0: 00000000 00000000 00000000 00000000    ................
810003d0: 00000000 00000000 00000000 00000000    ................
810003e0: 00000000 00000000 00000000 00000000    ................
810003f0: 00000000 00000000 00000000 00000000    ................

WEX-1166DHPL 公式ファームウェアメモ

         0  1  2  3     4  5  6  7     8  9  A  B     C  D  E  F     
      ┌──────────────┬────────────────────────────────────────────┐  
 0x00 │ Magic Number?│                     Version            --->│  
      ├──────────────┴────────────────────────────────────────────┤  
      │--->                     (Version)                     --->│  
      ├─────────────────────────────┬─────────────────────────────┤  
      │--->      (Version)          │    Firmware Information --->│  
      ├─────────────────────────────┴─────────────────────────────┤  
      │--->              (Firmware Information)               --->│  
      ├───────────────────────────────────────────────────────────┤  
      │--->              (Firmware Information)               --->│  
      ├─────────────────────────────┬──────────────┬──────────────┤  
      │---> (Firmware Information)  │Unix Time(hex)│       ?      │  
      ├─────────────────────────────┴──────────────┴──────────────┤  
 0x70 │                         Padding?                      --->│  
      └───────────────────────────────────────────────────────────┘  
                                   ...                               
      ┌─────────────────────────────┬──────────────┬──────────────┐  
0x1F0 │--->     (Padding?)          │  Data CRC32  │       ?      │  
      ├─────────────────────────────┴──────────────┴──────────────┤  
0x200 │                     Encoded Data (xor)                --->│  
      ├───────────────────────────────────────────────────────────┤  
      │--->                (Encoded Data (xor))               --->│  
      ├───────────────────────────────────────────────────────────┤  
      │--->                (Encoded Data (xor))               --->│  
      └───────────────────────────────────────────────────────────┘  
                                   ...                               

SKS8300-8X

1GbEを超えるポートを搭載しながら安価であり、Twitter等で話題になったガビガビ八丁ことSeekswan/XikeStor製スイッチシリーズの一つ。

RTL9303を搭載していることが知られ、OpenWrtの移植が期待されており、寄付を頂いて購入したもの。

弄っていくのでメモ。

Switch

未確認

zone WAN LAN
port (WRC-X1800GS) INTERNET LAN2 LAN1
port (MT7530) port0 port1 port2

MAC

未確認

U-Boot

ブートを中断するとブートメニューが表示される

"Boot" CLI

  • help

      Boot# help
      baudrate            - Set the baudrate
      bootloader          - Config boot image or startup-config
      clearconfig         - Set IP to default
      config              - Config IP address for host and server.
      dir                 - Display files in current directory
      load <filename>     - Load system image(binary format)
      menu - display a menu, to select the items to do something
      nopw                - Cancel boot password
      ping <x.x.x.x>      - Ping test
      pw                  - Set boot password
      reboot              - Reboot system
      showconfig          - Show IP configurations
      writeconfig         - Save IP configurations
      xmodem              - Load file by xmodem
    
  • dir

      Boot# dir
       -rw-r--r--      566 Thu Jan 01 00:26:01 1970 startup.cfg
       -rw-r--r--      668 Thu Jan 01 00:23:53 1970 id_dsa
       -rw-r--r--     1679 Thu Jan 01 00:24:07 1970 id_rsa
       -rw-r--r-- 14607999 Thu Jan 01 01:09:16 1970 nos.img
    
  • run nos.img

      Boot# run nos.img
      Loading primary partition image ...
      loading image to 0x81000000 with JFFS2
      load image size: 14607999 bytes
      Booting kernel with Legacy format image at 81000100
      Start checking the Kernel Image CRC ............OK
      Start uncompressing the Kernel Image ...........OK
    
      Starting kernel ...
    

U-Boot本体

  • help

    • 一覧に存在するものの実際には利用できないコマンドがいくつかある
      • "Boot" CLI側で使用できるコマンドの模様
    • 環境変数領域がFlash内に存在しない為か、 saveenv コマンドが無い
      RTL9300# help
      ?       - alias for 'help'
      an      - an          - Set asset number
    
      base    - print or set address offset
      baudrate- baudrate            - Set the baudrate
    
      boota   - boota  - boot application image from one of dual images partition automatically
      bootloader- bootloader          - Config boot image or startup-config
    
      bootm   - boot application image from memory
      bootp   - boot image via network using BOOTP/TFTP protocol
      chpart  - change active partition
      clear   - 
      clearconfig- clearconfig         - Set IP to default
    
      cmp     - memory compare
      config  - config              - Config IP address for host and server.
    
      cp      - memory copy
      crc32   - checksum calculation
      debug_unish_env- 
      dir     - dir                 - Display files in current directory
    
      env     - environment handling commands
      erase   - erase FLASH memory
      exit    - exit    - Enter Test Cmd CLI
    
      flerase - Erase flash partition
      flinfo  - print FLASH memory information
      flshow  - Show flash partition layout
      format  - format              - format disk
    
      fsinfo  - print information about filesystems
      fsload  - load binary file from a filesystem image
      getflashbin- 
      go      - start application at address 'addr'
      help    - 
      help    - print command description/usage
      iminfo  - print header information for application image
      lic     - lic         - Set license
    
      load    - load <filename>     - Load system image(binary format)
    
      loadb   - load binary file over serial line (kermit mode)
      loads   - load S-Record file over serial line
      loady   - load binary file over serial line (ymodem mode)
      loop    - infinite loop on address range
      ls      - list files in a directory (default /)
      mac     - mac         - Set mac of switch
    
      md      - memory display
      menu    - menu - display a menu, to select the items to do something
    
      mm      - memory modify (auto-incrementing address)
      mtdparts- define flash/nand partitions
      mtest   - simple RAM read/write test
      mw      - memory write (fill)
      nm      - memory modify (constant address)
      nopassword- nopassword          - no password for setup
    
      nopw    - nopw                - Cancel boot password
    
      ping    - ping <x.x.x.x>      - Ping test
    
      ping    - send ICMP ECHO_REQUEST to network host
      pn      - pn          - Set part number
    
      powerdown- powerdown <port>     - poweroff port
    
      poweron - poweron <port>       - poweron port
    
      printenv- print environment variables
      printsys- printsys - print system information variables
    
      protect - enable or disable FLASH write protection
      ptest   - ptest       - ptest
    
      put     - 
      pw      - pw                  - Set boot password
    
      reboot  - reboot              - Reboot system
    
      reset   - Perform RESET of the CPU
      reset_all- Perform whole chip RESET of the CPU
      rtk     - rtk     - Realtek commands
    
      run     - run <filename>      - Run from tftp or local flash
    
      run     - run commands in an environment variable
      savesys - savesys - save system information variables to persistent storage
    
      setenv  - set environment variables
      setsys  - setsys  - set system information variables
    
      sf      - SPI flash sub-system
      show    - 
      showconfig- showconfig          - Show IP configurations
    
      showlic - showlic     - show license
    
      sleep   - delay execution for some time
      sn      - sn          - Set serial number
    
      tftpboot- boot image via network using TFTP protocol
      tftpput - TFTP put command, for uploading files to a server
      typeid  - 
      upgrade - Upgrade loader or runtime image
      uploadflashbin- 
      version - version     - Set hardware version
    
      version - print monitor, compiler and linker version
      watchdog- watchdog            - watchdog
    
      write   - write <filename>    - Write load file to flash
    
      writeconfig- writeconfig         - Save IP configurations
    
      writeflashbin- 
      xmodem  - xmodem              - Load file by xmodem
    
  • version

      RTL9300# version
      U-Boot 2011.12
      mips-linux-uclibc-xgcc (Realtek MSDK-4.8.5p1 Build 2536) 4.8.5 20150209 (prerelease)
      GNU ld (Realtek MSDK-4.8.5p1 Build 2536) 2.24.0
    
  • printenv

      RTL9300# printenv
      baudrate=9600
      boardmodel=RTL9303_8XGE
      bootcmd=boota
      bootdelay=1
      console=ttyS0,9600
      ethact=rtl9300#0
      ethaddr=00:E0:4C:00:00:00
      filesize=dee67f
      filesystem=0
      ipaddr=192.168.2.1
      ledModeInitSkip=0
      loadaddr=0x81000000
      loglevel=0
      mtddevname=flash_user
      mtddevnum=3
      mtdids=nor0=spi_nor
      mtdparts=mtdparts=spi_nor:30M@2M(flash_user),832K@1216K(sys_log),192K@1M(raw),1M@0(bootrom);
      partition=nor0,3
      serverip=192.168.2.36
      stderr=serial
      stdin=serial
      stdout=serial
    
      Environment size: 495/8188 bytes
    
  • tftpboot

      RTL9300# tftpboot
      Using rtl9300#0 device
      TFTP from server 192.168.2.36; our IP address is 192.168.2.1
      Filename '       '. Size is 0x1129c00 Bytes = 17.2 MB
      Load address: 0x81000000
      Loading: *
    
  • chpart → fsinfo → fsload → md.l

      RTL9300# chpart nor0,3
      RTL9300# fsinfo
      ### filesystem type is JFFS2
      Compression: NONE
              frag count: 7120
              compressed sum: 14565893
              uncompressed sum: 14565893
      Compression: ZERO
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      Compression: RTIME
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      Compression: RUBINMIPS
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      Compression: COPY
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      Compression: DYNRUBIN
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      Compression: ZLIB
              frag count: 19
              compressed sum: 37491
              uncompressed sum: 45028
      Compression: LZO
              frag count: 0
              compressed sum: 0
              uncompressed sum: 0
      RTL9300# fsload nos.img
      loading image to 0x81000000 with JFFS2
      load image size: 14607999 bytes
      RTL9300# md.l 0x81000000 40
      81000000: 8092a70d 16187934 23ac8082 00dee66f    ......y4#......o
      81000010: d1c6277b 456577ff 901b3423 0a047d9c    ..'{Eew...4#..}.
      81000020: 1423320f 1dac0230 4355231f 1c4c2b7d    .#2....0CU#..L+}
      81000030: 13023033 4aab345d 132b3a82 2334dfad    ..03J.4].+:.#4..
      81000040: 14b32400 adab333d deff8082 11448b9a    ..$...3=.....D..
      81000050: 5a4034d1 02301234 23abffff ffff3b9c    Z@4..0.4#.....;.
      81000060: 94e6892d ddb6b13d 0ac58211 448b9a77    ...-...=....D..w
      81000070: 1de37d23 02ab7255 83ab8082 01ff549a    ..}#..rU......T.
      81000080: f2376e27 8d1bffff 431bf032 ffff4618    .7n'....C..2..F.
      81000090: c2237f5f adcdffff 663bf056 ff32761f    .#._....f;.V.2v.
      810000a0: 4f050080 ad890000 902400ff 0000354f    O........$....5O
      810000b0: 60d00000 ab5a0000 3643ffff 0000374e    `....Z..6C....7N
      810000c0: 7f70ff00 a6df00ff 8744ff00 8800854d    .p.......D.....M
      810000d0: 2c69ff00 adab5704 235bff42 513f8b3b    ,i....W.#[.BQ?.;
      810000e0: 72298900 ab30f354 ffab8082 1144821a    r)...0.T.....D..
      810000f0: 0f94ae00 cdea6834 ffffffff 00008778    ......h4.......x
    

Kernel

Linux Kernelではあるものの、シリアルコンソールにdmesgは出ず。

  • uname -a

      Switch(sdiag)#tshell uname -a     
      Linux 3.18.24 #3 Fri Dec 22 17:18:00 CST 2023 mips GNU/Linux
    
  • cat /proc/version

      Switch(sdiag)#tshell cat /proc/version
      Linux version 3.18.24 (xxxxxxxx@xxxxxxxx) (gcc version 4.8.5 20150209 (prerelease) (Realtek MSDK-4.8.5p1 Build 2536) ) #3 Fri Dec 22 17:18:00 CST 2023
    
  • cat /proc/cpuinfo

      Switch(sdiag)#tshell cat /proc/cpuinfo
      system type             : RTL9300
      machine                 : RTL9300
      processor               : 0
      cpu model               : MIPS 34Kc V5.5
      BogoMIPS                : 531.66
      wait instruction        : yes
      microsecond timers      : yes
      tlb_entries             : 32
      extra interrupt vector  : yes
      hardware watchpoint     : no
      isa                     : mips1 mips32r2
      ASEs implemented        : mips16
      shadow register sets    : 1
      kscratch registers      : 0
      package                 : 0
      core                    : 0
    
  • cat /proc/meminfo

      Switch(sdiag)#tshell cat /proc/meminfo
      MemTotal:         498136 kB
      MemFree:          426392 kB
      MemAvailable:     462036 kB
      Buffers:               0 kB
      Cached:            41948 kB
      SwapCached:            0 kB
      Active:            28280 kB
      Inactive:          35832 kB
      Active(anon):      22164 kB
      Inactive(anon):        0 kB
      Active(file):       6116 kB
      Inactive(file):    35832 kB
      Unevictable:           0 kB
      Mlocked:               0 kB
      HighTotal:        262144 kB
      HighFree:         205924 kB
      LowTotal:         235992 kB
      LowFree:          220468 kB
      SwapTotal:             0 kB
      SwapFree:              0 kB
      Dirty:                 0 kB
      Writeback:             0 kB
      AnonPages:         22192 kB
      Mapped:            24688 kB
      Shmem:                 0 kB
      Slab:               4464 kB
      SReclaimable:        576 kB
      SUnreclaim:         3888 kB
      KernelStack:         960 kB
      PageTables:          228 kB
      NFS_Unstable:          0 kB
      Bounce:                0 kB
      WritebackTmp:          0 kB
      CommitLimit:      249068 kB
      Committed_AS:      31324 kB
      VmallocTotal:    1015800 kB
      VmallocUsed:        1064 kB
      VmallocChunk:    1014332 kB
    
  • cat /proc/mtd

      Switch(sdiag)#tshell cat /proc/mtd    
      dev:    size   erasesize  name
      mtd0: 00100000 00001000 "boot"
      mtd1: 00030000 00001000 "flash_raw"
      mtd2: 000d0000 00001000 "flash_syslog"
      mtd3: 01e00000 00001000 "flash_user"
    
  • mount

      Switch(sdiag)#tshell mount
      rootfs on / type rootfs (rw)
      none on /proc type proc (rw,relatime)
      none on /sys type sysfs (rw,relatime)
      none on /dev/pts type devpts (rw,relatime,mode=622)
      /dev/mtdblock3 on /mnt/flash type jffs2 (rw,sync,relatime)
      /dev/mtdblock2 on /mnt/flash1 type jffs2 (rw,sync,relatime)
    
  • ifconfig

      Switch(sdiag)#tshell ifconfig     
      lo        Link encap:Local Loopback  
                inet addr:127.0.0.1  Mask:255.0.0.0
                UP LOOPBACK RUNNING  MTU:65536  Metric:1
                RX packets:1627 errors:0 dropped:0 overruns:0 frame:0
                TX packets:1627 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0 
                RX bytes:85434 (83.4 KiB)  TX bytes:85434 (83.4 KiB)
    
  • ls -al /dev/

      Switch(sdiag)#tshell ls -al /dev/
      total 0
      drwxrwxrwx    4 500      500              0 Jan  1 00:00 .
      drwxrwxrwx   13 500      500              0 Dec 22  2023 ..
      crwxrwxrwx    1 500      500         5,   1 Jan  1 00:06 console
      crwxrwxrwx    1 500      500         5,  64 Mar  1  2020 cua0
      crwxrwxrwx    1 500      500         5,  65 Mar  1  2020 cua1
      crwxrwxrwx    1 500      500         1,   2 Mar  1  2020 kmem
      crwxrwxrwx    1 500      500         1,   1 Mar  1  2020 mem
      crwxrwxrwx    1 500      500        90,   0 Mar  1  2020 mtd0
      crwxrwxrwx    1 500      500        90,   1 Mar  1  2020 mtd1
      crwxrwxrwx    1 500      500        90,  10 Mar  1  2020 mtd10
      crwxrwxrwx    1 500      500        90,  11 Mar  1  2020 mtd11
      crwxrwxrwx    1 500      500        90,  12 Mar  1  2020 mtd12
      crwxrwxrwx    1 500      500        90,  13 Mar  1  2020 mtd13
      crwxrwxrwx    1 500      500        90,  14 Mar  1  2020 mtd14
      crwxrwxrwx    1 500      500        90,  15 Mar  1  2020 mtd15
      crwxrwxrwx    1 500      500        90,  16 Mar  1  2020 mtd16
      crwxrwxrwx    1 500      500        90,  17 Mar  1  2020 mtd17
      crwxrwxrwx    1 500      500        90,  18 Mar  1  2020 mtd18
      crwxrwxrwx    1 500      500        90,   2 Mar  1  2020 mtd2
      crwxrwxrwx    1 500      500        90,   3 Mar  1  2020 mtd3
      crwxrwxrwx    1 500      500        90,   4 Mar  1  2020 mtd4
      crwxrwxrwx    1 500      500        90,   5 Mar  1  2020 mtd5
      crwxrwxrwx    1 500      500        90,   6 Mar  1  2020 mtd6
      crwxrwxrwx    1 500      500        90,   7 Mar  1  2020 mtd7
      crwxrwxrwx    1 500      500        90,   8 Mar  1  2020 mtd8
      crwxrwxrwx    1 500      500        90,   9 Mar  1  2020 mtd9
      brwxrwxrwx    1 500      500        31,   0 Mar  1  2020 mtdblock0
      brwxrwxrwx    1 500      500        31,   1 Mar  1  2020 mtdblock1
      brwxrwxrwx    1 500      500        31,  10 Mar  1  2020 mtdblock10
      brwxrwxrwx    1 500      500        31,  11 Mar  1  2020 mtdblock11
      brwxrwxrwx    1 500      500        31,  12 Mar  1  2020 mtdblock12
      brwxrwxrwx    1 500      500        31,  13 Mar  1  2020 mtdblock13
      brwxrwxrwx    1 500      500        31,  14 Mar  1  2020 mtdblock14
      brwxrwxrwx    1 500      500        31,  15 Mar  1  2020 mtdblock15
      brwxrwxrwx    1 500      500        31,  16 Mar  1  2020 mtdblock16
      brwxrwxrwx    1 500      500        31,  17 Mar  1  2020 mtdblock17
      brwxrwxrwx    1 500      500        31,   2 Mar  1  2020 mtdblock2
      brwxrwxrwx    1 500      500        31,   3 Mar  1  2020 mtdblock3
      brwxrwxrwx    1 500      500        31,   4 Mar  1  2020 mtdblock4
      brwxrwxrwx    1 500      500        31,   5 Mar  1  2020 mtdblock5
      brwxrwxrwx    1 500      500        31,   6 Mar  1  2020 mtdblock6
      brwxrwxrwx    1 500      500        31,   7 Mar  1  2020 mtdblock7
      brwxrwxrwx    1 500      500        31,   8 Mar  1  2020 mtdblock8
      brwxrwxrwx    1 500      500        31,   9 Mar  1  2020 mtdblock9
      crwxrwxrwx    1 500      500        90,   0 Mar  1  2020 mtdchar0
      crwxrwxrwx    1 500      500        90,   1 Mar  1  2020 mtdchar1
      crwxrwxrwx    1 500      500        90,  10 Mar  1  2020 mtdchar10
      crwxrwxrwx    1 500      500        90,  11 Mar  1  2020 mtdchar11
      crwxrwxrwx    1 500      500        90,  12 Mar  1  2020 mtdchar12
      crwxrwxrwx    1 500      500        90,  13 Mar  1  2020 mtdchar13
      crwxrwxrwx    1 500      500        90,  14 Mar  1  2020 mtdchar14
      crwxrwxrwx    1 500      500        90,  15 Mar  1  2020 mtdchar15
      crwxrwxrwx    1 500      500        90,  16 Mar  1  2020 mtdchar16
      crwxrwxrwx    1 500      500        90,  17 Mar  1  2020 mtdchar17
      crwxrwxrwx    1 500      500        90,   2 Mar  1  2020 mtdchar2
      crwxrwxrwx    1 500      500        90,   3 Mar  1  2020 mtdchar3
      crwxrwxrwx    1 500      500        90,   4 Mar  1  2020 mtdchar4
      crwxrwxrwx    1 500      500        90,   5 Mar  1  2020 mtdchar5
      crwxrwxrwx    1 500      500        90,   6 Mar  1  2020 mtdchar6
      crwxrwxrwx    1 500      500        90,   7 Mar  1  2020 mtdchar7
      crwxrwxrwx    1 500      500        90,   8 Mar  1  2020 mtdchar8
      crwxrwxrwx    1 500      500        90,   9 Mar  1  2020 mtdchar9
      crwxrwxrwx    1 500      500         1,   3 Mar  1  2020 null
      crwxrwxrwx    1 500      500         5,   2 Mar  1  2020 ptmx
      drwxr-xr-x    2 0        0                0 Jan  1 00:00 pts
      crwxrwxrwx    1 500      500         2,   0 Mar  1  2020 ptyp0
      crwxrwxrwx    1 500      500         2,   1 Mar  1  2020 ptyp1
      crwxrwxrwx    1 500      500         2,   2 Mar  1  2020 ptyp2
      crwxrwxrwx    1 500      500         2,   3 Mar  1  2020 ptyp3
      crwxrwxrwx    1 500      500         2,   4 Mar  1  2020 ptyp4
      crwxrwxrwx    1 500      500         2,   5 Mar  1  2020 ptyp5
      crwxrwxrwx    1 500      500         2,   6 Mar  1  2020 ptyp6
      crwxrwxrwx    1 500      500         2,   7 Mar  1  2020 ptyp7
      crwxrwxrwx    1 500      500         2,   8 Mar  1  2020 ptyp8
      crwxrwxrwx    1 500      500         2,   9 Mar  1  2020 ptyp9
      crwxrwxrwx    1 500      500         2,  10 Mar  1  2020 ptypa
      crwxrwxrwx    1 500      500         2,  11 Mar  1  2020 ptypb
      crwxrwxrwx    1 500      500         2,  12 Mar  1  2020 ptypc
      crwxrwxrwx    1 500      500         2,  13 Mar  1  2020 ptypd
      crwxrwxrwx    1 500      500         2,  14 Mar  1  2020 ptype
      crwxrwxrwx    1 500      500         2,  15 Mar  1  2020 ptypf
      crwxrwxrwx    1 500      500         1,   8 Mar  1  2020 random
      crwxrwxrwx    1 0        0          10, 100 Jan  1 00:00 reservedramdrv
      crwxrwxrwx    1 500      500       200,   0 Mar  1  2020 rtcore
      brwxrwxrwx    1 500      500         8,   0 Mar  1  2020 sda
      brwxrwxrwx    1 500      500         8,   1 Mar  1  2020 sda1
      brwxrwxrwx    1 500      500         8,   2 Mar  1  2020 sda2
      brwxrwxrwx    1 500      500         8,   3 Mar  1  2020 sda3
      brwxrwxrwx    1 500      500         8,  16 Mar  1  2020 sdb
      brwxrwxrwx    1 500      500         8,  17 Mar  1  2020 sdb1
      brwxrwxrwx    1 500      500         8,  18 Mar  1  2020 sdb2
      brwxrwxrwx    1 500      500         8,  19 Mar  1  2020 sdb3
      brwxrwxrwx    1 500      500         8,  32 Mar  1  2020 sdc
      brwxrwxrwx    1 500      500         8,  33 Mar  1  2020 sdc1
      brwxrwxrwx    1 500      500         8,  34 Mar  1  2020 sdc2
      brwxrwxrwx    1 500      500         8,  35 Mar  1  2020 sdc3
      drwxrwxrwx    2 500      500              0 Jan  1 00:06 shm
      crwxrwxrwx    1 500      500       201,   0 Mar  1  2020 ski
      crwxrwxrwx    1 500      500         5,   0 Mar  1  2020 tty
      crwxrwxrwx    1 500      500         4,   0 Mar  1  2020 tty0
      crwxrwxrwx    1 500      500         4,   1 Mar  1  2020 tty1
      crwxrwxrwx    1 500      500         4,   2 Mar  1  2020 tty2
      crwxrwxrwx    1 500      500         4,   3 Mar  1  2020 tty3
      crwxrwxrwx    1 500      500         4,  64 Mar  1  2020 ttyS0
      crwxrwxrwx    1 500      500         4,  65 Mar  1  2020 ttyS1
      crwxrwxrwx    1 500      500         3,   0 Mar  1  2020 ttyp0
      crwxrwxrwx    1 500      500         3,   1 Mar  1  2020 ttyp1
      crwxrwxrwx    1 500      500         3,   2 Mar  1  2020 ttyp2
      crwxrwxrwx    1 500      500         3,   3 Mar  1  2020 ttyp3
      crwxrwxrwx    1 500      500         3,   4 Mar  1  2020 ttyp4
      crwxrwxrwx    1 500      500         3,   5 Mar  1  2020 ttyp5
      crwxrwxrwx    1 500      500         3,   6 Mar  1  2020 ttyp6
      crwxrwxrwx    1 500      500         3,   7 Mar  1  2020 ttyp7
      crwxrwxrwx    1 500      500         3,   8 Mar  1  2020 ttyp8
      crwxrwxrwx    1 500      500         3,   9 Mar  1  2020 ttyp9
      crwxrwxrwx    1 500      500         3,  10 Mar  1  2020 ttypa
      crwxrwxrwx    1 500      500         3,  11 Mar  1  2020 ttypb
      crwxrwxrwx    1 500      500         3,  12 Mar  1  2020 ttypc
      crwxrwxrwx    1 500      500         3,  13 Mar  1  2020 ttypd
      crwxrwxrwx    1 500      500         3,  14 Mar  1  2020 ttype
      crwxrwxrwx    1 500      500         3,  15 Mar  1  2020 ttypf
      crwxrwxrwx    1 500      500         1,   9 Mar  1  2020 urandom
      crwxrwxrwx    1 500      500         1,   5 Mar  1  2020 zero
    
  • busybox

      Switch(sdiag)#tshell busybox 
      BusyBox v1.23.2 (2020-06-14 03:31:34 PDT) multi-call binary.
      BusyBox is copyrighted by many authors between 1998-2012.
      Licensed under GPLv2. See source distribution for detailed
      copyright notices.
    
      Usage: busybox [function [arguments]...]
         or: busybox --list[-full]
         or: busybox --install [-s] [DIR]
         or: function [arguments]...
    
              BusyBox is a multi-call binary that combines many common Unix
              utilities into a single executable.  Most people will create a
              link to busybox for each function they wish to use and BusyBox
              will act like whatever it was invoked as.
    
      Currently defined functions:
              [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
              awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
              bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
              chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
              conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
              deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
              dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
              dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
              expand, expr, fakeidentd, false, fatattr, fbset, fbsplash, fdflush,
              fdformat, fdisk, fgconsole, fgrep, find, findfs, flock, fold, free,
              freeramdisk, fsck, fsck.minix, fstrim, fsync, ftpd, ftpget, ftpput,
              fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm,
              head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig,
              ifdown, ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice,
              iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule,
              iptunnel, kbd_mode, kill, killall, killall5, klogd, last, less,
              linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login,
              logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof,
              lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man,
              md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo,
              mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp,
              modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv, nameif,
              nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter, nohup,
              nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping, ping6,
              pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop,
              printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate,
              rdev, readahead, readlink, readprofile, realpath, reboot, reformime,
              remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm,
              rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script,
              scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont,
              setkeycodes, setlogcons, setserial, setsid, setuidgid, sh, sha1sum,
              sha256sum, sha3sum, sha512sum, showkey, shuf, slattach, sleep, smemcap,
              softlimit, sort, split, start-stop-daemon, stat, strings, stty, su,
              sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
              syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
              tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
              tty, ttysize, tunctl, ubiattach, ubidetach, ubimkvol, ubirmvol,
              ubirsvol, ubiupdatevol, udhcpc, udhcpd, udpsvd, umount, uname,
              unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unxz, unzip, uptime,
              users, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall,
              watch, watchdog, wc, wget, which, who, whoami, whois, xargs, xz, xzcat,
              yes, zcat, zcip
    
  • ls -al /bin/

      Switch(sdiag)#tshell ls -al /bin/
      total 2536
      drwxrwxrwx    2 500      500              0 Aug  1  2020 .
      drwxrwxrwx   13 500      500              0 Dec 22  2023 ..
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ash -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 base64 -> busybox
      -rwxrwxrwx    1 500      500        1259536 Jun 14  2020 busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 cat -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 catv -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 chattr -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 chgrp -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 chmod -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 chown -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 conspy -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 cp -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 cpio -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 cttyhack -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 date -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 dd -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 df -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 dmesg -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 dnsdomainname -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 dumpkmap -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 echo -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ed -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 egrep -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 false -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 fatattr -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 fdflush -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 fgrep -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 fsync -> busybox
      -rwxr-xr-x    1 500      500        1331689 Aug  1  2020 gdb.lzma
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 getopt -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 grep -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 gunzip -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 gzip -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 hostname -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 hush -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ionice -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 iostat -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ipcalc -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 kbd_mode -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 kill -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 linux32 -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 linux64 -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ln -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 login -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ls -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 lsattr -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 lzop -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 makemime -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mkdir -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mknod -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mktemp -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 more -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mount -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mountpoint -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mpstat -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mt -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 mv -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 netstat -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 nice -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 pidof -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ping -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ping6 -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 pipe_progress -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 printenv -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ps -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 pwd -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 reformime -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 rev -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 rm -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 rmdir -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 rpm -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 run-parts -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 scriptreplay -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 sed -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 setarch -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 setserial -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 sh -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 sleep -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 stat -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 stty -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 su -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 sync -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 tar -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 touch -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 true -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 ulimit -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 umount -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 uname -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 usleep -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 vi -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 watch -> busybox
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 zcat -> busybox
    
  • ls -al /sbin/

      Switch(sdiag)#tshell ls -al /sbin/
      total 0
      drwxrwxrwx    2 500      500              0 Jun 14  2020 .
      drwxrwxrwx   13 500      500              0 Dec 22  2023 ..
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 acpid -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 adjtimex -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 arp -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 blkid -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 blockdev -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 bootchartd -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 depmod -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 devmem -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 fbsplash -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 fdisk -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 findfs -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 freeramdisk -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 fsck -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 fsck.minix -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 fstrim -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 getty -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 halt -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 hdparm -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 hwclock -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ifconfig -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ifdown -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ifenslave -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ifup -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 init -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 insmod -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ip -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 ipaddr -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 iplink -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 iproute -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 iprule -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 iptunnel -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 klogd -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 loadkmap -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 logread -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 losetup -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 lsmod -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 makedevs -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mdev -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mkdosfs -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mke2fs -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mkfs.ext2 -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mkfs.minix -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mkfs.vfat -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 mkswap -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 modinfo -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 modprobe -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 nameif -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 pivot_root -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 poweroff -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 raidautorun -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 reboot -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 rmmod -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 route -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 runlevel -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 setconsole -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 slattach -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 start-stop-daemon -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 sulogin -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 swapoff -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 swapon -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 switch_root -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 sysctl -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 syslogd -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 tunctl -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 udhcpc -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 vconfig -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 watchdog -> ../bin/busybox
      lrwxrwxrwx    1 500      500             14 Aug  1  2020 zcip -> ../bin/busybox
    
  • ls -al /usr/bin/

      Switch(sdiag)#tshell ls -al /usr/bin/  
      total 0
      drwxrwxrwx    2 500      500              0 Jun 14  2020 .
      drwxrwxrwx    4 500      500              0 Jun 14  2020 ..
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 [ -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 [[ -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 awk -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 basename -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 beep -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 bunzip2 -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 bzcat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 bzip2 -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 cal -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chpst -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chrt -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chvt -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 cksum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 clear -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 cmp -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 comm -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 crontab -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 cryptpw -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 cut -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dc -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 deallocvt -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 diff -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dirname -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dos2unix -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 du -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dumpleases -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 eject -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 env -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 envdir -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 envuidgid -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 expand -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 expr -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fgconsole -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 find -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 flock -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fold -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 free -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ftpget -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ftpput -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fuser -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 groups -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 hd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 head -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 hexdump -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 hostid -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 id -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 install -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ipcrm -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ipcs -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 killall -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 last -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 less -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 logger -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 logname -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lpq -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lpr -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lsof -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lspci -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lsusb -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lzcat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lzma -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lzopcat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 man -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 md5sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 mesg -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 microcom -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 mkfifo -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 mkpasswd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nc -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nmeter -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nohup -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nslookup -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 od -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 openvt -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 passwd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 patch -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pgrep -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pkill -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pmap -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 printf -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pscan -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pstree -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 pwdx -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 readlink -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 realpath -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 renice -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 reset -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 resize -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 rpm2cpio -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 runsv -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 runsvdir -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 rx -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 script -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 seq -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 setkeycodes -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 setsid -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 setuidgid -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sha1sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sha256sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sha3sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sha512sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 showkey -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 shuf -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 smemcap -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 softlimit -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sort -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 split -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 strings -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sum -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sv -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tac -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tail -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tcpsvd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tee -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 telnet -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 test -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tftp -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 time -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 timeout -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 top -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tr -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 traceroute -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 traceroute6 -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tty -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ttysize -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 udpsvd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unexpand -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 uniq -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unix2dos -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unlink -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unlzma -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unlzop -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unxz -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 unzip -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 uptime -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 users -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 uudecode -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 uuencode -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 vlock -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 volname -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 wall -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 wc -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 wget -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 which -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 who -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 whoami -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 whois -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 xargs -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 xz -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 xzcat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 yes -> ../../bin/busybox
    
  • ls -al /usr/sbin/

      Switch(sdiag)#tshell ls -al /usr/sbin/
      total 0
      drwxrwxrwx    2 500      500              0 Jun 14  2020 .
      drwxrwxrwx    4 500      500              0 Jun 14  2020 ..
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 add-shell -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 addgroup -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 adduser -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 arping -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 brctl -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chpasswd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 chroot -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 crond -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 delgroup -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 deluser -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dhcprelay -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 dnsd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ether-wake -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fakeidentd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fbset -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 fdformat -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ftpd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 httpd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ifplugd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 inetd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 killall5 -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 loadfont -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 lpd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nanddump -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nandwrite -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 nbd-client -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ntpd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 popmaildir -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 powertop -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 rdate -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 rdev -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 readahead -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 readprofile -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 remove-shell -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 rtcwake -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 sendmail -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 setfont -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 setlogcons -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 svlogd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 telnetd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 tftpd -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubiattach -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubidetach -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubimkvol -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubirmvol -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubirsvol -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 ubiupdatevol -> ../../bin/busybox
      lrwxrwxrwx    1 500      500             17 Aug  1  2020 udhcpd -> ../../bin/busybox
    
  • ls -al /

      Switch(sdiag)#tshell ls -al /                      
      total 32288
      drwxrwxrwx   13 500      500              0 Dec 22  2023 .
      drwxrwxrwx   13 500      500              0 Dec 22  2023 ..
      drwxrwxrwx    2 500      500              0 Aug  1  2020 bin
      drwxrwxrwx    4 500      500              0 Jan  1 00:00 dev
      drwxrwxrwx    3 1027     1001             0 Dec 22  2023 etc
      drwxrwxrwx    2 500      500              0 Mar  1  2020 home
      lrwxrwxrwx    1 500      500              9 Aug  1  2020 init -> sbin/init
      drwxrwxrwx    3 500      500              0 Aug  1  2020 lib
      drwxrwxrwx    4 500      500              0 Jan  1 00:00 mnt
      -rwxrwx---    1 1027     1001      33048660 Dec 22  2023 nos
      -rwxrwx---    1 1027     1001         11548 Dec 22  2023 nos_console
      dr-xr-xr-x   29 0        0                0 Jan  1 00:00 proc
      drwxrwxrwx    2 500      500              0 Jun 14  2020 sbin
      dr-xr-xr-x   11 0        0                0 Jan  1 00:00 sys
      lrwxrwxrwx    1 500      500              7 Aug  1  2020 tmp -> var/tmp
      drwxrwxrwx    4 500      500              0 Jun 14  2020 usr
      drwxrwxrwx    8 500      500              0 Jan  1 00:00 var
    
  • hexdump -n 128 -C /nos*

      Switch(sdiag)#tshell hexdump -n 128 -C /nos
      00000000  7f 45 4c 46 01 02 01 00  00 00 00 00 00 00 00 00  |.ELF............|
      00000010  00 02 00 08 00 00 00 01  00 86 f4 c0 00 00 00 34  |...............4|
      00000020  01 f8 41 74 70 00 10 05  00 34 00 20 00 0a 00 28  |..Atp....4. ...(|
      00000030  00 2c 00 2b 00 00 00 06  00 00 00 34 00 40 00 34  |.,.+.......4.@.4|
      00000040  00 40 00 34 00 00 01 40  00 00 01 40 00 00 00 05  |.@.4...@...@....|
      00000050  00 00 00 04 00 00 00 03  00 00 01 74 00 40 01 74  |...........t.@.t|
      00000060  00 40 01 74 00 00 00 14  00 00 00 14 00 00 00 04  |.@.t............|
      00000070  00 00 00 01 70 00 00 00  00 00 01 88 00 40 01 88  |....p........@..|
      00000080
      Switch(sdiag)#tshell hexdump -n 128 -C /nos_console
      00000000  7f 45 4c 46 01 02 01 00  01 00 00 00 00 00 00 00  |.ELF............|
      00000010  00 02 00 08 00 00 00 01  00 40 10 70 00 00 00 34  |.........@.p...4|
      00000020  00 00 1d 90 70 00 10 05  00 34 00 20 00 0a 00 28  |....p....4. ...(|
      00000030  00 21 00 1e 00 00 00 06  00 00 00 34 00 40 00 34  |.!.........4.@.4|
      00000040  00 40 00 34 00 00 01 40  00 00 01 40 00 00 00 05  |.@.4...@...@....|
      00000050  00 00 00 04 00 00 00 03  00 00 01 74 00 40 01 74  |...........t.@.t|
      00000060  00 40 01 74 00 00 00 14  00 00 00 14 00 00 00 04  |.@.t............|
      00000070  00 00 00 01 70 00 00 00  00 00 01 88 00 40 01 88  |....p........@..|
      00000080
    
  • cat /etc/inittab

      Switch(sdiag)#tshell cat /etc/inittab
      ::sysinit:/etc/init.sh
      console::respawn:-/bin/sh
      ::restart:/sbin/init
    
  • cat /etc/init.sh

      Switch(sdiag)#tshell cat /etc/init.sh
      #!/bin/sh
    
      #
      # create essential directory 
      #
      mkdir /var/empty
      mkdir /dev/pts
    
      #
      # mount process
      #
      mount -a
      chmod 777 /dev/mtd0
      chmod 777 /dev/mtd1
      mkdir /mnt/flash/
      mkdir /mnt/flash1/
      mount -t jffs2 -o rw,sync /dev/mtdblock3 /mnt/flash/
      mount -t jffs2 -o rw,sync /dev/mtdblock2 /mnt/flash1/
    
    
      #
      # insert kernel module if exist
      #
      cd /lib/modules/3.18.24/kernel/
    
      if test -f "drivers/net/switch/rtcore/rtcore.ko"; then
              insmod drivers/net/switch/rtcore/rtcore.ko
      fi
    
      cd /
    
      if test -e /lib/modules/reserved_ram_kernel.ko
      then
              mknod -m 777 /dev/reservedramdrv c 10 100
              insmod /lib/modules/reserved_ram_kernel.ko low_mem_size=0xF000000 dma_reserved_size=0x800000 user_reserved_size=0x800000
      fi
    
    
      if test -e /lib/modules/interrupt_gpio_kernel.ko
      then
              insmod /lib/modules/interrupt_gpio_kernel.ko
      fi
    
    
      #
      # network interface configuration 
      #
      ifconfig lo 127.0.0.1
      route add -net 127.0.0.0 netmask 255.255.255.0 lo
    
      # ifconfig eth0 192.168.1.1
    
      #
      # start application
      #
      # if test -f "/bin/diag"; then
      #       diag
      # fi
    
  • bootlog

      System is initializing...
      **************************************************
      WINBOND/
      Net Initialization Completed
      U-boot version: V2.00
      Hit Ctrl+B to stop autoboot:  0 
      Loading primary partition image ...
      loading image to 0x81000000 with JFFS2
      load image size: 14607999 bytes
      Booting kernel with Legacy format image at 81000100
      Start checking the Kernel Image CRC ............OK
      Start uncompressing the Kernel Image ...........OK
    
      Starting kernel ...
    
      Init Linux Shell Task Module....OK!
      Init Skb Process Module....OK!
      Init Util Filesystem Module....OK!
      Init System Customer Information ....OK!
      Init System Log Module...OK!
      Current time: Fri Dec 22 00:00:00 2023 [UTC]
      Firmware Compile Time: 2023-12-22 17:18:02
      Switch System Software Version V300SP10231222
      Init VLAN Module...OK!
      Init MAC Address...OK!
      System Management MAC Address 84-E5-D8-E0-8E-F7
      Loading Factory Default Config ...
      %Dec 22 00:00:14.270 2023 %LINK-5-CHANGED: Interface Vlan1, changed state to UP
      Http server is Enabled
      Init Default Config ...
    
      User Access Verification
    
      Username: 
    
  • dmesg

      Switch(sdiag)#tshell dmesg
      Linux version 3.18.24 (xxxxxxxx@xxxxxxxx) (gcc version 4.8.5 20150209 (prerelease) (Realtek MSDK-4.8.5p1 Build 2536) ) #3 Fri Dec 22 17:18:00 CST 2023
      MIPS: machine is RTL9300
      bootconsole [early0] enabled
      CPU0 revision is: 00019555 (MIPS 34Kc)
      [cpu0, rtl9300_auto_probe_memsize:137]: AUTO byte_size = 0x20000000 Byte
      [cpu0, prom_memory_size_get:241]: Get total memory size by auto probe result
      [cpu0, prom_memory_size_get:244]: Get dma size from kernel commnad line
      [cpu0, prom_meminit:292]: DMA size=0x1000000(B)
      [cpu0, prom_mem_zone2:73]: mem zone2: OFF=0x70000000,MAX=0x7fffffff
      [cpu0, prom_meminit:313]: mem zone0: Base=0x0, size=0xf000000(B)
      [cpu0, prom_meminit:314]: mem zone2: Base=0x20000000, size=0x10000000(B)
      Determined physical RAM map:
       memory: 0f000000 @ 00000000 (usable)
       memory: 10000000 @ 20000000 (usable)
      [cpu0, plat_remove_mem_parameter:111]: cmdline=img=flash:/nos.img mem=512M user_mem=512M root=/dev/ram rw nopassword= loglevel=0 filesystem=JFFS2 console=ttyS0,9600  rtk_dma_size=16M, 80332b58, 80332b6b
      [cpu0, plat_remove_mem_parameter:116]: cmdline=img=flash:/nos.img  user_mem=512M root=/dev/ram rw nopassword= loglevel=0 filesystem=JFFS2 console=ttyS0,9600  rtk_dma_size=16M
      [cpu0, plat_remove_mem_parameter:111]: cmdline=img=flash:/nos.img mem=512M user_mem=512M root=/dev/ram rw nopassword= loglevel=0 filesystem=JFFS2 console=ttyS0,9600  rtk_dma_size=16M, 8032e98c, 8032e99f
      [cpu0, plat_remove_mem_parameter:116]: cmdline=img=flash:/nos.img  user_mem=512M root=/dev/ram rw nopassword= loglevel=0 filesystem=JFFS2 console=ttyS0,9600  rtk_dma_size=16M
      Initrd not found or empty - disabling initrd
      Zone ranges:
        Normal   [mem 0x00000000-0x0effffff]
        HighMem  [mem 0x0f000000-0x2fffffff]
      Movable zone start for each node
      Early memory node ranges
        node   0: [mem 0x00000000-0x0effffff]
        node   0: [mem 0x20000000-0x2fffffff]
      Initmem setup node 0 [mem 0x00000000-0x2fffffff]
      On node 0 totalpages: 126976
      free_area_init_node: node 0, pgdat 80314bc0, node_mem_map 81000000
        Normal zone: 480 pages used for memmap
        Normal zone: 0 pages reserved
        Normal zone: 61440 pages, LIFO batch:15
        HighMem zone: 1056 pages used for memmap
        HighMem zone: 65536 pages, LIFO batch:15
      Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
      Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
      pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
      pcpu-alloc: [0] 0 
      Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 126496
      Kernel command line: img=flash:/nos.img  user_mem=512M root=/dev/ram rw nopassword= loglevel=0 filesystem=JFFS2 console=ttyS0,9600  rtk_dma_size=16M
      PID hash table entries: 1024 (order: 0, 4096 bytes)
      Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
      Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
      Writing ErrCtl register=00025009
      Readback ErrCtl register=00025009
      Memory: 485168K/507904K available (2408K kernel code, 133K rwdata, 608K rodata, 12968K init, 163K bss, 22736K reserved, 262144K highmem)
      NR_IRQS:128
      console [ttyS0] enabled
      bootconsole [early0] disabled
      Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
      pid_max: default: 32768 minimum: 301
      Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
      Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
      NET: Registered protocol family 16
      NET: Registered protocol family 2
      TCP established hash table entries: 2048 (order: 1, 8192 bytes)
      TCP bind hash table entries: 2048 (order: 3, 40960 bytes)
      TCP: Hash tables configured (established 2048 bind 2048)
      TCP: reno registered
      UDP hash table entries: 256 (order: 1, 12288 bytes)
      UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
      NET: Registered protocol family 1
      futex hash table entries: 256 (order: 0, 7168 bytes)
      jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
      random: modprobe urandom read with 2 bits of entropy available
      bounce: pool size: 64 pages
      io scheduler noop registered
      io scheduler deadline registered
      io scheduler cfq registered (default)
      Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
      serial8250: ttyS0 at MMIO 0x0 (irq = 47, base_baud = 10764700) is a 16550A
      mtdoops: mtd device (mtddev=name/number) must be supplied
      RTK_SPI_FLASH_MIO driver is bypassed
      RTK_NORSFG3 driver is used
      =================================================================
      init_luna_nor_spi_map: flash map at 0xb4000000
      SPI NOR driver probe...
      WINBOND/EF4019/MMIO32-2/ModeC add SPI NOR partition
      MTD partitions obtained from built-in array
      Creating 4 MTD partitions on "rtk_norsf_g3":
      0x000000000000-0x000000100000 : "boot"
      0x000000100000-0x000000130000 : "flash_raw"
      0x000000130000-0x000000200000 : "flash_syslog"
      0x000000200000-0x000002000000 : "flash_user"
      =================================================================
      TCP: cubic registered
      NET: Registered protocol family 17
      Freeing unused kernel memory: 12968K (80316000 - 80fc0000)
      RTCORE LKM Insert...
      RTCORE Driver Module Initialize (LKM)
        IOAL init
        Log init
        Hardware-profile probetypestr:[boardtype], type:1024
       (RTL9303_8XGE)
        Hardware-profile init
        Intr Probe (unit 0)
        GPIO probe (unit 0): (found)
        GPIO Init
        SPI init (unit 0) (type3)
          SPI Master init
        I2C probe (unit 0)
        I2C init (unit 0)
        RTL8231 probe (unit 0): (found)
        RTL8231 init (unit 0)
        TC probe (unit 0): (found)
        TC init (unit 0)
          TC util init (isr)
    

WRC-X1800GS GPIOメモ

ファームウェア v1.09に前後して一度ハードウェアの変更が入っており、NANDチップの変更やGPIO割り当ての一部変更が行われているようである

v1.09以降のファームウェアは両方のリビジョンで共通であり、外観上HW Rev.を区別できる箇所は無さそう

GPIO

HW Rev.1

gpio0 : LED, green:wifi_2g
gpio3 : LED, green:power
gpio4 : LED, red:power
gpio5 : LED, red:wifi_2g_1
gpio6 : BTN, reset_btn
gpio7 : SSW, modeswitch (ap)
gpio8 : LED, red:wps
gpio13: LED, green:wifi_5g
gpio14: SSW, modeswitch (router)
gpio17: LED, red:wifi_5g_1
gpio18: BTN, wps_btn

HW Rev.2

恐らくgreen:wifi_2gがgpio0からgpio15に変更されている

gpio0 : LED, green:wifi_2g
gpio3 : LED, green:power
gpio4 : LED, red:power
gpio5 : LED, red:wifi_2g_1
gpio6 : BTN, reset_btn
gpio7 : SSW, modeswitch (ap)
gpio8 : LED, red:wps
gpio13: LED, green:wifi_5g
gpio14: SSW, modeswitch (router)
gpio15: LED, green:wifi_2g_2
gpio17: LED, red:wifi_5g_1
gpio18: BTN, wps_btn