APSoC SDK 4.3.0.0 User’s Manual
MediaTek Inc.
RALINK AP SDK 4.3.0.0 USER’s
MANUAL
Copyright © 2014 MediaTek Inc.
All Rights Reserved.
This document is property of MediaTek Inc., receipt, or possession of this document does not
express, license, or imply any rights to use, sell, design, or manufacture from this information or the
software documented herein. No reproduction, publication, or disclosure of this information, in whole
or in part, shall be allowed, unless the prior written consent of MediaTek Inc. is obtained.
NOTE: THIS DOCUMENT CONTAINS SENSITIVE INFORMATION AND HAS RESTRICTED
DISTRIBUTION.
APSoC SDK 4.3.0.0 User’s Manual
Proprietary Notice and Liability Disclaimer
The confidential Information, technology or any Intellectual Property embodied therein, including without
limitation, specifications, product features, data, source code, object code, computer programs, drawings,
schematics, know-how, notes, models, reports, contracts, schedules and samples, constitute the Proprietary
Information of MediaTek (hereinafter "Proprietary Information")
All the Proprietary Information is provided "AS IS". No Warranty of any kind, whether express or implied, is given
hereunder with regards to any Proprietary Information or the use, performance or function thereof. MediaTek
hereby disclaims any warranties, including but not limited warranties of non-infringement, merchantability,
completeness, accuracy, fitness for any particular purpose, functionality and any warranty related to course of
performance or dealing of Proprietary Information. In no event shall MediaTek be liable for any special, indirect
or consequential damages associated with or arising from use of the Proprietary Information in any way,
including any loss of use, data or profits.
MediaTek retains all right, title or interest in any Proprietary Information or any Intellectual Property embodied
therein. The Proprietary Information shall not in whole or in part be reversed, decompiled or disassembled, nor
reproduced or sublicensed or disclosed to any third party without MediaTek 's prior written consent.
MediaTek reserves the right, at its own discretion, to update or revise the Proprietary Information from time to
time, of which MediaTek is not obligated to inform or send notice. Please check back if you have any question.
Information or items marked as "not yet supported" shall not be relied on, nor taken as any warranty
or permission of use.
MediaTek Inc. (Taiwan)
5F, No.5, Tai-Yuen 1st Street,
ChuPei City
HsinChu Hsien 302, Taiwan, ROC
Tel +886-3-560-0868
Fax +886-3-560-0818
Sales Taiwan: Sales@ralinktech.com.tw
Technical Support Taiwan: FAE@ralinktech.com.tw
http://www.ralinktech.com/
Page 2 of 205
APSoC SDK 4.3.0.0 User’s Manual
TABLE OF CONTENTS
1 SDK History ................................................................................................................................. 10
2 Version History............................................................................................................................ 14
3 Overview of the Ralink AP Demo Board ................................................................................. 15
3.1 RT2880 ............................................................................................................................................. 15
3.2 RT3052 ............................................................................................................................................. 19
3.3 RT3883 ............................................................................................................................................. 21
3.4 RT3352 ............................................................................................................................................. 24
3.5 RT5350 ............................................................................................................................................. 26
3.6 RT6855 ............................................................................................................................................. 28
3.7 RT6856 ............................................................................................................................................. 29
3.8 MT7620 ............................................................................................................................................ 31
3.9 MT7621 ............................................................................................................................................ 35
3.10
MT7628 ................................................................................................................................... 39
4 AP SDK source code overview ................................................................................................ 42
5 Tool-chain .................................................................................................................................... 43
5.1
Install toolchain ................................................................................................................................ 43
5.2
Install LZMA Utility .......................................................................................................................... 43
5.3
Install mksquashfs utility ................................................................................................................ 44
6 Boot loader .................................................................................................................................. 46
6.1 Uboot Configuration ........................................................................................................................ 46
6.2 Build the uboot Image .................................................................................................................... 49
6.3 Burn the uboot image ..................................................................................................................... 50
Page 3 of 205
APSoC SDK 4.3.0.0 User’s Manual
7 User Library ................................................................................................................................. 51
7.1
Library Configuration ...................................................................................................................... 51
7.2
Library Porting ................................................................................................................................. 52
7.3 Build user library ............................................................................................................................. 53
8 User Application.......................................................................................................................... 54
8.1 Ralink Proprietary Applications ..................................................................................................... 54
8.2
accel-pptp ......................................................................................................................................... 62
8.3
bigpond ............................................................................................................................................. 62
8.4
bonnie++ .......................................................................................................................................... 62
8.5
bridge-utils ....................................................................................................................................... 62
8.6
busybox ............................................................................................................................................ 62
8.7
comgt-0.32 ....................................................................................................................................... 63
8.8
ctorrent-dnh3.2 ................................................................................................................................ 63
8.9
curl..................................................................................................................................................... 63
8.10
dhcp6 ....................................................................................................................................... 63
8.11
dnsmasq-2.40 ........................................................................................................................ 63
8.12
dropbear-0.52 ........................................................................................................................ 64
8.13
ebtables .................................................................................................................................. 64
8.14
ecmh ........................................................................................................................................ 64
8.15
GoAhead ................................................................................................................................. 64
8.16
igmpproxy ............................................................................................................................... 64
8.17
inadyn ...................................................................................................................................... 64
Page 4 of 205
APSoC SDK 4.3.0.0 User’s Manual
8.18
iperf .......................................................................................................................................... 65
8.19
iproute2 ................................................................................................................................... 65
8.20
iptables .................................................................................................................................... 65
8.21
lighttpd ..................................................................................................................................... 65
8.22
linux-igd ................................................................................................................................... 65
8.23
lldt(lld2d) ................................................................................................................................. 66
8.24
matrixssl-1.8.3 ........................................................................................................................ 66
8.25
miniupnpd-1.6 ........................................................................................................................ 66
8.26
mkdosfs-2.11 .......................................................................................................................... 66
8.27
mpstat-0.1.1 ........................................................................................................................... 66
8.28
mtd-utils .................................................................................................................................. 66
8.29
ntfs-3g ..................................................................................................................................... 67
8.30
ntfsprogs ................................................................................................................................. 67
8.31
ntpclient ................................................................................................................................... 67
8.32
nvram library .......................................................................................................................... 67
8.33
openl2tp-1.6 ........................................................................................................................... 67
8.34
openswan-2.6.38 ................................................................................................................... 67
8.35
p910nd .................................................................................................................................... 68
8.36
pciutils-3.0.0 ........................................................................................................................... 68
8.37
ppp-2.4.2 ................................................................................................................................. 68
8.38
pptp-client ............................................................................................................................... 68
8.39
proftpd ..................................................................................................................................... 68
Page 5 of 205
APSoC SDK 4.3.0.0 User’s Manual
8.40
radvd-1.0 ................................................................................................................................. 69
8.41
rp-l2tp-0.4 ............................................................................................................................... 69
8.42
rp-pppoe-3.8 ........................................................................................................................... 69
8.43
samba ..................................................................................................................................... 69
8.44
sdparm-1.02 ........................................................................................................................... 69
8.45
strace ....................................................................................................................................... 70
8.46
taskset ..................................................................................................................................... 70
8.47
tcpdump .................................................................................................................................. 70
8.48
totd-1.5 .................................................................................................................................... 70
8.49
usb_modeswitch-0.9.5 .......................................................................................................... 70
8.50
uvc_stream ............................................................................................................................. 71
8.51
wireless_tools ......................................................................................................................... 71
8.52
wpa_supplicant-0.5.7 ............................................................................................................ 71
8.53
wsc_upnp ................................................................................................................................ 71
8.54
zebra-0.95a_ripd .................................................................................................................... 71
8.55
Port new user application ..................................................................................................... 72
9 Linux Kernel ................................................................................................................................ 74
9.1
Linux configuration .......................................................................................................................... 74
9.2 Change Flash/DRAM Size ............................................................................................................. 76
9.3 Change Switch Controller in RT288x SDK ................................................................................. 77
9.4 Update User/Kernel default settings ............................................................................................ 78
9.5 Compile Linux image with root file system .................................................................................. 79
Page 6 of 205
APSoC SDK 4.3.0.0 User’s Manual
9.6 Port new Linux kernel module ....................................................................................................... 80
9.7 Execute commands at boot up time ............................................................................................. 82
9.8 Add new files in RootFs ................................................................................................................. 82
9.9 Reduce Image size ......................................................................................................................... 83
10 Flash Layout and Firmware Upgrade ...................................................................................... 87
10.1
Flash Layout ........................................................................................................................... 87
10.2
Firmware Upgrade................................................................................................................. 89
11 FAQ .............................................................................................................................................. 90
11.1
Default password/UART/networking setting ...................................................................... 90
11.2
System requirements for the host platform........................................................................ 90
11.3
Quickly Build a Default Reference Image .......................................................................... 91
11.4
How to configure MT7620 to connect with the external switch ...................................... 91
11.5
How to configure MT7621 internal switch to get more GPIO pins ................................. 92
11.6
How to add new default parameter in flash ....................................................................... 93
11.7
Enable Ethernet Converter / AP Client Mode.................................................................... 95
11.8
How to change the Ethernet MAC address ....................................................................... 98
11.9
How to change the Wireless MAC address ....................................................................... 99
11.10
How to configure GPIO ports ............................................................................................. 100
11.11
Use GPIO to turn on LED ................................................................................................... 102
11.12
Use LED firmware to turn on LED .................................................................................... 105
11.13
How to start the telnet server ............................................................................................. 107
11.14
11n bit rate derivation ......................................................................................................... 109
Page 7 of 205
APSoC SDK 4.3.0.0 User’s Manual
11.15
How to build a single image for the flash programmer .................................................. 112
11.16
How to power down the RT3x5x/RT5350/MT7628 build-in 10/100 PHYs .................. 114
11.17
How to power down the RT6855/RT6856/MT7620 build-in 10/100 PHYs ................. 115
11.18
How to enable NFS client ................................................................................................... 117
11.19
How to add a new language to the web UI ...................................................................... 118
11.20
How to enable watchdog .................................................................................................... 119
11.21
How to enable USB storage on the RT305x platform .................................................... 120
11.22
How to enable USB automount on the RT305x platform .............................................. 122
11.23
How to enable software QoS ............................................................................................. 123
11.24
QoS information ................................................................................................................... 128
11.25
How to enable USB Ethernet (example for ASIX AX88XXX) ....................................... 134
11.26
How to build a single image for the RT2880 8M flash platform .................................... 135
11.27
How to start a printer server (example for HP officejet 4355) ....................................... 136
11.28
How to force the RT3052 link speed ................................................................................ 139
11.29
How to verify IGMP snooping function ............................................................................. 140
11.30
EHCI/OHCI USB Power Saving ........................................................................................ 142
11.31
Auto-frequency and Power Saving ................................................................................... 143
11.32
Concurrent AP porting Guide ............................................................................................ 148
11.33
SuperDMZ usage guide ..................................................................................................... 156
11.34
How to support IPv6 Ready Logo ..................................................................................... 157
11.35
How to enable iPerf tool ..................................................................................................... 161
11.36
How to enable ebtables ...................................................................................................... 162
Page 8 of 205