@gpioblink ( じぶりん ) さんから G-cluster を送ってもらいました。
G-cluster
つないでみた
HDMIにつないでみたらこんな画面が出てきました
スマートフォン、ゲームパッドで設定するみたいですね。
LEDがいい感じです。
このLEDはGPIOにつながっているのかな?
チップ構成
オンボードのチップ:
- ARM 1176JZF 600MHz CPU SoC CAVIUM PureVu Full-HD Media Processor CNW6611L-600BG324-SCP-G https://scrapbox.io/gcluster/CNW6611L_%E5%85%AC%E5%BC%8F%E8%B3%87%E6%96%99
- 256MBytes DDR3 16bit SDRAM SAMSUNG K4B2G1646E
- 128MBytes NAND Flash TOSHIBA TC58NVG0S3ETA00
- 128kBytes SPI Flash Macronix MX25L1006EMI-10G
あと860113 502 130129 とマーキングされた謎WiFiChipがありますが、内部の Linux で lsmod とすると
ath6kl_sdio 177554 0
mac80211 205075 0
cfg80211 158436 2 ath6kl_sdio,mac80211
compat 14631 3 ath6kl_sdio,mac80211,cfg80211
と出てくるので、Atheros AR6103とかそこらへんぽいです。
https://scrapbox.io/gcluster/860113_502_130129_%E3%81%A8%E3%83%9E%E3%83%BC%E3%82%AD%E3%83%B3%E3%82%B0%E3%81%95%E3%82%8C%E3%81%9F%E8%AC%8EWiFiChip
シリアルTTY
以下のようにして接続すると起動ログが取れます。
通信条件:TTY 3.3V レベル、フロー制御なし、8bit、115200bps
U-boot に入る
起動すると以下のように U-boot に入ります。
dlink_U-Boot 2011.06 (Jan 16 2013 - 15:22:32)
I2C: ready
DRAM: 256 MiB
SPI Speed at [R:23MHz/W:47MHz] Flash Size: 128KB
NAND: 128 MiB
MMC:
initializing secure environment
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
In: serial
Out: serial
Err: serial
MAC: 00:1a:cc:00:00:01
Hit any key to stop autoboot: 0
CNCl800L>
CNCl800L>
CNCl800L>
CNCl800L>
CNCl800L>
CNCl800L>
G-cluster の起動時にシリアルコンソールから何らかの入力があるとU-boot のコマンドインタプリタに落ちます。
ここから普通に起動するには boots と打ちます。
シリアルコンソールから入力がなければそのまま以下に進みます。
CNCl800L> boots
NAND read: device 0 offset 0x1c0000, size 0x20000
131072 bytes read: OK
NAND read: device 0 offset 0x180000, size 0x20000
131072 bytes read: OK
NAND read: device 0 offset 0x7c80000, size 0x1000
4096 bytes read: OK
Processing Application image.
NAND read: device 0 offset 0x2400000, size 0x17a0000
24772608 bytes read: OK
length 24641536: 376 whole chunks with 0 remainder
done!
Verifying Image RSA signature... OK.
Field Img Authentication passed
Check for Blob image...
Processing Blob image.
NAND read: device 0 offset 0x7c81000, size 0x20000
131072 bytes read: OK
Verifying Image RSA signature... OK.
AppImg (Blob) authenticated and copied to RAM addr : 0xefff000
... OK to boot
## Booting kernel from Legacy Image at 08080000 ...
Image Name: 240_SDK_gcluster_!
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 24532848 Bytes = 23.4 MiB
Load Address: 08080040
Entry Point: 08080040
XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux................................................................................................................................................................... done, booting the kernel.
�mmc0: Version ID 0x5342230a.
mount: mounting tmpfs on /dev/shm failed: No such file or directory
ath6kl: temporary war to avoid sdio crc error
SI_CecInit
SI_CpiInit
SI_CpiInit: Writing CEC_OP_ABORT_31 register
SI_CpiInit: Setting Logical Address
SI_CecInit: looping through ports (5)
SI_CecInit: CEC Enabled
Returned from SI_CecInit
Checking for secure chip and enabling HDCP
Creating the main HDMI thread
HDMI init!
TVCenter : tvout = 406dd474
TVCenter : HDMI not plug
HDMISetVideo: timingvideomode = 15, PictureAspectRatio = 1
CECLIB::Physical Address:: 65535
HDMIつなげていないとここで止まります。
この状態で、エンターが通るようになっています。
HDMIをつなげると、先に進みますがUSBをシリアルの反応が無くなってしまします。
それを防ぐため、ここの段階でstty cread と打ち込み、HDMIをつなぎます。
あるいは、HDMIつなげっぱなしでも、コマンドが通るようになるとエンターが反応がでるので、反応が出ている間に stty cread
と素早く打ち込みます。
HDMI を刺すと
phyAddr === 6461
phyAddr === 6523
phyAddr === 2000
phyAddr === 5dc4
phyAddr === 3e2
phyAddr === 607
AddrTag = 0x57
AddrTag = 0x23
AddrTag = 0x6e
AddrTag = 0x67
AddrTag = 0xe2
55555555555555555555555555555555555555555555555555555555555555555555555555
data = 0x0AddrTag = 0xe3
55555555555555555555555555555555555555555555555555555555555555555555555555
data = 0x5AddrTag = 0xe4
55555555555555555555555555555555555555555555555555555555555555555555555555
data = 0xfAddrTag = 0xe3
55555555555555555555555555555555555555555555555555555555555555555555555555
data = 0x6AddrTag = 0x66
--- CEC MSG: opcode 0x32 (set menu language) src=0x0 broadcast=1, args(3): 6A 70 6E
CECLIB:: Set Menu Language command received
Event Occured
TestCecLib:: TV received set menu language = jpn
HDMI cable plugged in, plug_check = 1, plugging = 0, pid 0x5e
edid_vic_to_edid_timing: WARNING, VIC out of range (93)
edid_vic_to_edid_timing: WARNING, VIC out of range (94)
.
.
.
.
TVCenter : HDMI is switch check begin
HDCP Authenticated
USB not found
----------------firsrshot----------------------
firstboot: 10, firstboot_flag(1)
DSM232:/ #
となります。
これで、 Linux シェルが使えます。
Linux マシンとして使うための問題点
- HDMIつなげないとブートが進まない
- 途中で stty cread と打ち込まないとシェルが操作できない
これを解決するために、ファームウェアを書き換える方向で考えていきます
(続く)
起動した後に情報を表示
DSM232:/mnt/jffs2 # cat /proc/meminfo
MemTotal: 133700 kB
MemFree: 82792 kB
Buffers: 0 kB
Cached: 43020 kB
SwapCached: 0 kB
Active: 4924 kB
Inactive: 40508 kB
Active(anon): 2412 kB
Inactive(anon): 0 kB
Active(file): 2512 kB
Inactive(file): 40508 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 2428 kB
Mapped: 2492 kB
Shmem: 0 kB
Slab: 3752 kB
SReclaimable: 1852 kB
SUnreclaim: 1900 kB
KernelStack: 304 kB
PageTables: 136 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 66848 kB
Committed_AS: 59788 kB
VmallocTotal: 638976 kB
VmallocUsed: 76772 kB
VmallocChunk: 510972 kB
DSM232:/mnt/jffs2 # df -h
Filesystem Size Used Available Use% Mounted on
none 64.0K 0 64.0K 0% /dev
tmpfs 65.3M 0 65.3M 0% /tmp
/dev/mtdblock14 56.5M 3.6M 52.9M 6% /mnt/jffs2
DSM232:/mnt/jffs2 # mount
rootfs on / type rootfs (rw)
none on /dev type tmpfs (rw,relatime,size=64k,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/mtdblock14 on /mnt/jffs2 type jffs2 (rw,relatime)
DSM232:/mnt/jffs2 # cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 565.24
Features : swp half fastmult vfp edsp java
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : Celestial CNC1800L
Revision : 0000
Serial : 0000000000000000
DSM232:/mnt/jffs2 #





