-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.in
423 lines (358 loc) · 13.4 KB
/
config.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
mainmenu_name 'Uboot Configuration'
choice 'Chip ID' "MT7623 MT7623 \
MT7622 MT7622 \
MT7626 MT7626 \
" MT7622
choice 'Chip Type' "FPGA FPGA \
ASIC ASIC
" ASIC
define_bool MT7622_FPGA_BOARD n
define_bool MT7623_FPGA_BOARD n
define_bool MT7626_FPGA_BOARD n
define_bool LEOPARD_FPGA_BOARD n
define_bool MT7622_ASIC_BOARD n
define_bool MT7623_ASIC_BOARD n
define_bool MT7626_ASIC_BOARD n
define_bool LEOPARD_ASIC_BOARD n
if [ "$MT7623" = "y" ]; then
if [ "$FPGA" = "y" ]; then
define_bool MT7623_FPGA_BOARD y
else
define_bool MT7623_ASIC_BOARD y
fi
fi
if [ "$MT7622" = "y" ]; then
if [ "$FPGA" = "y" ]; then
define_bool MT7622_FPGA_BOARD y
else
define_bool MT7622_ASIC_BOARD y
fi
fi
if [ "$MT7626" = "y" ]; then
if [ "$FPGA" = "y" ]; then
define_bool MT7626_FPGA_BOARD y
define_bool LEOPARD_FPGA_BOARD y
else
define_bool MT7626_ASIC_BOARD y
define_bool LEOPARD_ASIC_BOARD y
fi
fi
#########################################################################################3
# MT7623
#########################################################################################3
if [ "$MT7623_FPGA_BOARD" = "y" -o "$MT7623_ASIC_BOARD" = "y" ]; then
#-----------------------
# MT7623 FLASH
#-----------------------
choice 'Flash Type' "NAND ON_BOARD_NAND_FLASH_COMPONENT \
eMMC ON_BOARD_EMMC_COMPONENT \
SD OFF_BOARD_SD_CARD_COMPONENT
" eMMC
if [ "$ON_BOARD_NAND_FLASH_COMPONENT" = "y" ]; then
define_bool CONFIG_MTK_MTD_NAND y
define_bool CONFIG_MTK_SLC_NAND_SUPPORT y
fi
#-----------------------
# MT7623 Ethernet
#-----------------------
choice 'Use GE1 or GE2' "GMAC1 CONFIG_USE_GE1 \
GMAC2 CONFIG_USE_GE2
" GMAC1
if [ "$CONFIG_USE_GE1" = "y" ]; then
choice 'GE1 connected to' "GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_TRGMII_FORCE_2600 CONFIG_GE1_TRGMII_FORCE_2600 \
" GE_RGMII_FORCE_1000
else
choice 'GE2 connected to' " GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_RGMII_INTERNAL_P0_AN GE_RGMII_INTERNAL_P0_AN \
GE_RGMII_INTERNAL_P4_AN GE_RGMII_INTERNAL_P4_AN
" GE_RGMII_FORCE_1000
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
if [ "$MT7623_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
if [ "$MT7623_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x6
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
fi
if [ "$GE_RGMII_INTERNAL_P0_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x0
fi
if [ "$GE_RGMII_INTERNAL_P4_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x4
fi
fi
#########################################################################################3
# MT7622
#########################################################################################3
if [ "$MT7622_FPGA_BOARD" = "y" -o "$MT7622_ASIC_BOARD" = "y" ]; then
#-----------------------
# MT7622 FLASH
#-----------------------
choice 'Flash Type' "NAND ON_BOARD_NAND_FLASH_COMPONENT \
SNAND ON_BOARD_SPI_NAND_FLASH_COMPONENT \
SNOR ON_BOARD_SPI_NOR_FLASH_COMPONENT \
eMMC ON_BOARD_EMMC_COMPONENT \
SD OFF_BOARD_SD_CARD_COMPONENT
" SNAND
if [ "$ON_BOARD_NAND_FLASH_COMPONENT" = "y" ]; then
define_bool CONFIG_MTK_MTD_NAND y
define_bool CONFIG_MTK_SLC_NAND_SUPPORT y
fi
if [ "$ON_BOARD_SPI_NAND_FLASH_COMPONENT" = "y" ]; then
define_bool CONFIG_MTK_MTD_NAND y
define_bool CONFIG_MTK_SLC_NAND_SUPPORT y
define_bool CONFIG_MTK_SPI_NAND_SUPPORT y
fi
#-----------------------
# MT7622 DDR
#-----------------------
if [ "$CONFIG_CUSTOMIZE_DRAM_SIZE" = "y" ]; then
choice 'DDR Component' " 512Mb ON_BOARD_512Mb_DRAM_COMPONENT \
1024Mb ON_BOARD_1024Mb_DRAM_COMPONENT \
2048Mb ON_BOARD_2048Mb_DRAM_COMPONENT \
4096Mb ON_BOARD_4096Mb_DRAM_COMPONENT \
8192Mb ON_BOARD_8192Mb_DRAM_COMPONENT \
2GB ON_BOARD_2GB_DRAM_COMPONENT
" 4096Mb
fi
endchoice
#-----------------------
# MT7622 Ethernet
#-----------------------
choice 'Use GE1 or GE2' "GMAC1 CONFIG_USE_GE1 \
GMAC2 CONFIG_USE_GE2
" GMAC2
if [ "$CONFIG_USE_GE1" = "y" ]; then
choice 'GE1 connected to' "GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_SGMII_FORCE_2500 CONFIG_GE1_SGMII_FORCE_2500 \
GE_ESW CONFIG_GE1_ESW
" GE_RGMII_FORCE_1000
else
choice 'GE2 connected to' " GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_RGMII_INTERNAL_P0_AN GE_RGMII_INTERNAL_P0_AN \
GE_RGMII_INTERNAL_P4_AN GE_RGMII_INTERNAL_P4_AN
" GE_RGMII_AN
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
if [ "$MT7622_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
if [ "$MT7622_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x6
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
fi
if [ "$GE_RGMII_INTERNAL_P0_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x0
fi
if [ "$GE_RGMII_INTERNAL_P4_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x4
fi
if [ "$CONFIG_GE1_SGMII_FORCE_2500" = "y" ]; then
define_bool CONFIG_RTL8367 y
fi
comment ""
tristate "Customize Dram Size" CONFIG_CUSTOMIZE_DRAM_SIZE
fi
#########################################################################################3
# MT7626
#########################################################################################3
if [ "$MT7626_FPGA_BOARD" = "y" -o "$MT7626_ASIC_BOARD" = "y" ]; then
#-----------------------
# MT7626 FLASH
#-----------------------
choice 'Flash Type' "SNOR ON_BOARD_SPI_NOR_FLASH_COMPONENT \
" SNOR
#-----------------------
# MT7626 FLASH SIZE
#-----------------------
choice 'Flash Size' "2M ON_BOARD_2M_FLASH_COMPONENT \
4M ON_BOARD_4M_FLASH_COMPONENT \
8M ON_BOARD_8M_FLASH_COMPONENT \
16M ON_BOARD_16M_FLASH_COMPONENT
" 2M
#-----------------------
# MT7626 DDR
#-----------------------
choice 'DDR Component' " 256Mb ON_BOARD_256Mb_DRAM_COMPONENT
" 256Mb
choice 'DDR Freq' "DDR_FREQ_1066MHZ DDR_FREQ_1066MHZ \
DDR_FREQ_1100MHZ DDR_FREQ_1100MHZ \
DDR_FREQ_1200MHZ DDR_FREQ_1200MHZ
" DDR_FREQ_1066MHZ
#-----------------------
# MT7626 Ethernet
#---------------------
choice 'Use GE1 or GE2' "GMAC1 CONFIG_USE_GE1 \
GMAC2 CONFIG_USE_GE2
" GMAC2
if [ "$CONFIG_USE_GE1" = "y" ]; then
choice 'GE1 connected to' "GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_SGMII_FORCE_2500 CONFIG_GE1_SGMII_FORCE_2500 \
GE_ESW CONFIG_GE1_ESW
" GE_ESW
else
choice 'GE2 connected to' " GE_MII_FORCE_100 GE_MII_FORCE_100 \
GE_RVMII_FORCE_100 GE_RVMII_FORCE_100 \
GE_MII_AN GE_MII_AN \
GE_RGMII_FORCE_1000 GE_RGMII_FORCE_1000 \
GE_RGMII_AN GE_RGMII_AN \
GE_RGMII_INTERNAL_P0_AN GE_RGMII_INTERNAL_P0_AN \
GE_RGMII_INTERNAL_P4_AN GE_RGMII_INTERNAL_P4_AN \
GE_SGMII_AN CONFIG_GE2_SGMII_AN
" GE_RGMII_AN
fi
bool "Partition LAN/WAN" LAN_WAN_PARTITION
if [ "$LAN_WAN_PARTITION" = "y" ]; then
choice 'LAN/WAN Board Layout' "WAN_AT_P0 CONFIG_WAN_AT_P0 \
WAN_AT_P1 CONFIG_WAN_AT_P1 \
WAN_AT_P2 CONFIG_WAN_AT_P2 \
WAN_AT_P3 CONFIG_WAN_AT_P3 \
WAN_AT_P4 CONFIG_WAN_AT_P4
"
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
if [ "$GE_MII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
hex "10/100 PHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1f
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE1" = "y" ]; then
if [ "$MT7626_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x1e
fi
fi
if [ "$GE_RGMII_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
if [ "$MT7626_FPGA_BOARD" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x6
else
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x0
fi
fi
if [ "$GE_RGMII_INTERNAL_P0_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x0
fi
if [ "$GE_RGMII_INTERNAL_P4_AN" = "y" -a "$CONFIG_USE_GE2" = "y" ]; then
define_hex MAC_TO_GIGAPHY_MODE_ADDR 0x4
fi
if [ "$CONFIG_GE1_SGMII_FORCE_2500" = "y" ]; then
bool "RTL8367" CONFIG_RTL8367 n
bool "RTL8367 v142" CONFIG_RTL8367_V142 n
bool "AR8337N" CONFIG_AR8337N n
fi
if [ "$CONFIG_AR8337N" = "y" ]; then
int "AR8337N - GPIO Rst Switch" GPIO_RESET_SWITCH 60
int "AR8337N - RESET Time Gap xx(ms)" GPIO_RESET_TIME_GAP_MS 20
bool "AR8337N - Switch Need Down After GPIO Rst" SWITCH_NEED_PHY_DOWN_AFTER_GPIO_RESET y
fi
if [ "$CONFIG_GE2_SGMII_AN" = "y" ]; then
hex "GigaPHY address for Auto Polling" MAC_TO_GIGAPHY_MODE_ADDR 0x5
fi
string "Dut IP, i.e. 192.168.0.1" CONFIG_DUT_IP "192.168.0.1"
string "Default Server IP, i.e. 192.168.0.3" CONFIG_SERVER_IP "192.168.0.3"
tristate "Flash Layout" CONFIG_FLASH_LAYOUT
if [ "$CONFIG_FLASH_LAYOUT" = "y" ]; then
hex "Factory Boot Offset" FACTORY_BOOT_OFFSET 0x0
hex "Factory Boot Len" FACTORY_BOOT_LEN 0x25000
hex "Firmware Offset" FIRMWARE_OFFSET 0x25000
hex "Firmware Len" FIRMWARE_LEN 0x3d5000
hex "Factory Info Offset" FACTORY_INFO_OFFSET 0x3fe000
hex "Factory Info Len" FACTORY_INFO_LEN 0x1000
hex "User Config Offset" USER_CONFIG_OFFSET 0x3fa000
hex "User Config Len" USER_CONFIG_LEN 0x2000
hex "BOOTCFG Offset" BOOTCFG_OFFSET 0x2F000
hex "BOOTCFG Len" BOOTCFG_LEN 0x1000
hex "Firmware2 Offset" FIRMWARE2_OFFSET 0x400000
hex "Firmware2 Len" FIRMWARE2_LEN 0x3D0000
fi
bool "Dual Image" CONFIG_DUAL_IMAGE
tristate "Web FailSafe" CONFIG_UIP
if [ "$CONFIG_UIP" = "y" ]; then
choice 'Brand' "tplink CONFIG_BRAND_TPLINK \
mercusys CONFIG_BRAND_MERCUSYS" tplink
if [ "$CONFIG_BRAND_TPLINK" = "y" ]; then
define_string CONFIG_PR_NAME "tplink"
else
if [ "$CONFIG_BRAND_MERCUSYS" = "y" ]; then
define_string CONFIG_PR_NAME "mercusys"
fi
fi
hex "DHCP Server IP(in hex, i.e. 0xC0A80001)" DHCPD_SERVER_IP_HEX 0xC0A80001
hex "DHCP Pool Start IP(in hex, i.e. 0xC0A80001)" DHCPD_POOL_START_IP_HEX 0xC0A8000C
hex "DHCP Pool End IP(in hex, i.e. 0xC0A80001)" DHCPD_POOL_END_IP_HEX 0xC0A80064
hex "Product ID(in hex, i.e. 0x0C800001)" CONFIG_DEFAULT_PRODUCT_ID 0x0C800001
fi
comment ""
tristate "Customize Dram Size" CONFIG_CUSTOMIZE_DRAM_SIZE
fi
#choice 'Default Behavior when Kernel Boot up Fail' "None None \
# FW_UPGRADE_BY_WEBUI FW_UPGRADE_BY_WEBUI
# "
choice 'Uboot type' "FactoryUboot CONFIG_FACTORY_UBOOT \
NormalUboot CONFIG_NORMAL_UBOOT \
" FactoryUboot
choice 'Hardware board' "ARCHERC80V1 HARDWARE_BOARD_ARCHERC80V1 \
ARCHERC64V1 HARDWARE_BOARD_ARCHERC64V1 \
MR50GV1 HARDWARE_BOARD_MR50GV1" ARCHERC80V1
if [ "$HARDWARE_BOARD_ARCHERC80V1" = "y" ]; then
define_string HARDWARE_BOARD "ARCHERC80V1"
else
if [ "$HARDWARE_BOARD_MR50GV1" = "y" ]; then
define_string HARDWARE_BOARD "MR50GV1"
else
if [ "$HARDWARE_BOARD_ARCHERC64V1" = "y" ]; then
define_string HARDWARE_BOARD "ARCHERC64V1"
fi
fi
fi
#Load Kernel Image from a USB Storage Device \
#Load Kernel Image from a SD card
#Load Kernel Image from a Browser \
#Load Kernel Image from the System Recovery Partition \