LinkIt Smart 7688を使ってみる

シリアルコンソール

LinkItではsshでのログイン以外にシリアルコンソールが使えます。
シリアルコンソールを使うには、USB-TTL変換アダプターを以下のように接続します。
USB-TTL変換アダプター LinkIt
RX UART_TXD2(P8)
TX UART_RXD2(P9)
GND GND

UART2をシリアルコンソールとして使うことができますが、これをUART0やUART1に変更するには、
こ ちらの手順でBootloaderのコンパイルとBootloaderのアップデートが必要となります。

TeraTermのボーレートを57600bpsに変更し、LinkItをリブートすると以下の様にずらずらとブートメッセージが表示されます。
root@mylinkit:/# [ 1316.650000] br-lan: port 2(ra0) entered disabled state
[ 1316.660000] br-lan: port 1(eth0) entered disabled state
[ 1316.680000] device eth0 left promiscuous mode
[ 1316.680000] br-lan: port 1(eth0) entered disabled state
[ 1316.720000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1316.730000] device ra0 left promiscuous mode
[ 1316.740000] br-lan: port 2(ra0) entered disabled state
[ 1320.920000] reboot: Restarting system
[04020D08][04020C0E]
DDR Calibration DQS reg = 00008889


U-Boot 1.1.3 (Dec  6 2016 - 11:20:23)

Board: Ralink APSoC
DRAM:  128 MB
relocate_code Pointer at: 87f68000
******************************
Software System Reset Occurred
******************************
flash manufacture id: c2, device id 20 19
find flash: MX25L25635E
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:Dec  6 2016  Time:11:20:23
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =128 Mbytes
RESET MT7628 PHY!!!!!!

GPIOMODE --> 50054404

GPIOMODE2 --> 5540551

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.

このタイミングで2秒間の入力待ちとなります。
このタイミングで何ができるのか、正確には分かりませんが、こ ちらの資料によると、TFTPを使ってファームを更新できるみたいです。
2秒間、何も入力しないとデフォルトの3の処理で先に進みます。
3: System Boot system code via Flash.
## Booting image at bc050000 ...
   Image Name:   MIPS OpenWrt Linux-3.18.23
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1194147 Bytes =  1.1 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 3.18.23 (blogic@debian) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49203) ) #5 Tue Sep 27 11:48:57 CEST 2016

(中略)

[    6.270000] rt305x-esw 10110000.esw: link changed 0x00
[    6.440000] random: procd urandom read with 10 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level

これ以降、f+Enterキーでfailsafeモードに入れます。
failsafeモードに入ると以下の表示となります。


詳しく追及していませんが、特定のコマンドだけ受け付けるようです。
rebootで再起動できました。

続く....