forked from ethersex/ethersex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.in
459 lines (401 loc) · 14.5 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
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
source scripts/usart-config.sh
source scripts/namedPinCopy.sh
mainmenu_name "Ethersex Configuration"
get_usart_count
mainmenu_option next_comment
comment "General Setup"
get_usart_count
bool 'Prompt for experimental code' CONFIG_EXPERIMENTAL
bool 'Prompt all possible options (expert mode)' CONFIG_EXPERT
choice 'Target Architecture' \
"AVR ARCH_AVR \
Host ARCH_HOST" \
'AVR' ARCH
if [ "$ARCH_AVR" = "y" ]; then
choice 'Target MCU' \
"ATmega8 atmega8 \
ATmega88 atmega88 \
ATmega128 atmega128 \
ATmega16 atmega16 \
ATmega162 atmega162 \
ATmega168 atmega168 \
ATmega168p atmega168p \
ATmega169 atmega169 \
ATmega32 atmega32 \
ATmega328p atmega328p \
ATmega64 atmega64 \
ATmega644 atmega644 \
ATmega644p atmega644p \
ATmega1284p atmega1284p" \
'ATmega644' MCU
int "MCU frequency" FREQ 20000000
choice 'Hardware/Periphery Class' \
"$(scripts/pinning_hardware_list.sh)" \
'Etherrape' HARDWARE
dep_bool "Use CPU sleep (EXPERIMENTAL)" CPU_SLEEP $ARCH_AVR $CONFIG_EXPERIMENTAL
source hardware/sram/config.in
# Set the Flash size to the cpu type
if [ "$atmega128" = "y" -o "$atmega1284p" = "y" ] ; then
FLASH_SIZE=131072 # 512/1024/2048/4096 0x1fc00/0x1f800/0x1f000/0x1e000
fi
if [ "$atmega64" = "y" -o "$atmega644" = "y" -o "$atmega644p" = "y" ] ; then
FLASH_SIZE=65536 # 512/1024/2048/4096 0xfc00/0xf800/0xf000/0xe000
fi
if [ "$atmega32" = "y" -o "$atmega328p" = "y" ] ; then
FLASH_SIZE=32768 # 256/512/1024/2048 0x7e00/0x7e00/0x7800/0x7000
fi
if [ "$atmega16" = "y" -o "$atmega162" = "y" -o "$atmega168" = "y" -o "$atmega168p" = "y" -o "$atmega169" = "y" -o "$atmega162" = "y" ] ; then
FLASH_SIZE=16384 # 128/256/512/1024 0x3f00/0x3e00/0x3c00/0x3800
fi
if [ "$atmega88" = "y" -o "$atmega8" = "y" ] ; then
FLASH_SIZE=8192 # 128/256/512/1024 0x1f00/0x1e00/0x1c00/0x1800
fi
# set the default bootloader words to cpu flash size
if [ "$BOOTLOADER_JUMP" = "y" -a "$BOOTLOADER_WORDS" = "" ] ; then
if [ "$FLASH_SIZE" = 8192 ] ; then BOOTLOADER_WORDS=1024 ; fi
if [ "$FLASH_SIZE" = 16384 ] ; then BOOTLOADER_WORDS=1024 ; fi
if [ "$FLASH_SIZE" = 32768 ] ; then BOOTLOADER_WORDS=2048 ; fi
if [ "$FLASH_SIZE" = 65536 ] ; then BOOTLOADER_WORDS=4096 ; fi
if [ "$FLASH_SIZE" = 131072 ] ; then BOOTLOADER_WORDS=4096 ; fi
fi
if [ "$atmega64" = "y" -o "$atmega644" = "y" -o "$atmega644p" = "y" -o "$atmega1284p" = "y" -o "$atmega128" = "y" ] ; then
bool 'Build a bootloader' BOOTLOADER_SUPPORT
else
dep_bool 'Build a bootloader' BOOTLOADER_SUPPORT "n"
fi
if [ "$FLASH_SIZE" = "131072" ] ; then
if [ "$BOOTLOADER_WORDS" = 512 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1fc00
else
if [ "$BOOTLOADER_WORDS" = 1024 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1f800
else
if [ "$BOOTLOADER_WORDS" = 2048 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1f000
else
define_hex BOOTLOADER_START_ADDRESS 0x1e000
BOOTLOADER_WORDS=4096
fi
fi
fi
fi
if [ "$FLASH_SIZE" = "65536" ] ; then
if [ "$BOOTLOADER_WORDS" = 512 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0xfc00
else
if [ "$BOOTLOADER_WORDS" = 1024 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0xf800
else
if [ "$BOOTLOADER_WORDS" = 2048 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0xf000
else
define_hex BOOTLOADER_START_ADDRESS 0xe000
BOOTLOADER_WORDS=4096
fi
fi
fi
fi
if [ "$FLASH_SIZE" = "32768" ] ; then
if [ "$BOOTLOADER_WORDS" = 256 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x7e00
else
if [ "$BOOTLOADER_WORDS" = 512 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x7c00
else
if [ "$BOOTLOADER_WORDS" = 1024 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x7800
else
define_hex BOOTLOADER_START_ADDRESS 0x7000
BOOTLOADER_WORDS=2048
fi
fi
fi
fi
if [ "$FLASH_SIZE" = "16384" ] ; then
if [ "$BOOTLOADER_WORDS" = 128 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x3f00
else
if [ "$BOOTLOADER_WORDS" = 256 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x3e00
else
if [ "$BOOTLOADER_WORDS" = 512 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x3c00
else
define_hex BOOTLOADER_START_ADDRESS 0x3800
BOOTLOADER_WORDS=1024
fi
fi
fi
fi
if [ "$FLASH_SIZE" = "8192" ] ; then
if [ "$BOOTLOADER_WORDS" = 128 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1f00
else
if [ "$BOOTLOADER_WORDS" = 256 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1e00
else
if [ "$BOOTLOADER_WORDS" = 512 ] ; then
define_hex BOOTLOADER_START_ADDRESS 0x1c00
else
define_hex BOOTLOADER_START_ADDRESS 0x1800
BOOTLOADER_WORDS=1024
fi
fi
fi
fi
if [ "$CONFIG_EXPERT" = "y" ] ; then
bool "Enable bootloader jump" BOOTLOADER_JUMP
if [ "$BOOTLOADER_JUMP" = "y" ] ; then
int 'Bootloader Size in words' BOOTLOADER_WORDS ""
fi
fi
fi
bool "Teensy build" TEENSY_SUPPORT
dep_bool "Use SPI Timeout" SPI_TIMEOUT $ARCH_AVR
dep_bool "Use Usart in SPI Mode" USART_SPI_SUPPORT $ARCH_AVR
if [ "$USART_SPI_SUPPORT" = y ]; then
choice ' SPI usart select' "$(usart_choice SPI)"
usart_process_choice SPI
else
dep_bool "Use Software-SPI" SOFT_SPI_SUPPORT $ARCH_AVR
fi
choice 'Version String' \
"GIT-commit-hash USE_GIT_VERSION \
Release-Version USE_RELEASE_VERSION \
Build-Date-Time USE_BUILDDATE_VERSION" \
'Release-Version' VERSION_STRING_CHOICE
if [ "$VERSION_STRING_CHOICE" = "USE_GIT_VERSION" ] || \
[ "$VERSION_STRING_CHOICE" = "USE_RELEASE_VERSION" ] ; then
define_string VERSION_GIT "$(scripts/get-git-version)"
fi
bool 'Debug: Discard some packets' DEBUG_DISCARD_SOME
dep_bool_menu "Enable Debugging" DEBUG y
int "UART Baudrate" DEBUG_BAUDRATE 115200
dep_bool 'Use SYSLOG instead UART' DEBUG_USE_SYSLOG $SYSLOG_SUPPORT $DEBUG
dep_bool 'Software Uart (Output only)' SOFT_UART_SUPPORT $DEBUG $ARCH_AVR
comment '----- Debugging Flags -----'
dep_bool 'Hooks' DEBUG_HOOK $DEBUG
dep_bool 'Reset Reason' DEBUG_RESET_REASON $DEBUG
endmenu
source core/config.in
source core/crypto/config.in
source core/vfs/config.in
source services/pam/config.in
source control6/config.in
endmenu
mainmenu_option next_comment
comment "Network"
string "Hostname" CONF_HOSTNAME "ethersex"
# if [ "$ENC28J60_SUPPORT" = "y" -o "$RFM12_IP_SUPPORT" = "y" -o "$ZBUS_SUPPORT" = "y" -o "$UIP_SUPPORT" = "y" -o "$UDP_SUPPORT" = "y" -o "$TCP_SUPPORT" = "y" -o "$ICMP_SUPPORT" = "y" ]; then
if [ "$NET_MAX_FRAME_LENGTH" = "" ] ; then NET_MAX_FRAME_LENGTH=1500 ; fi
if [ "$NET_MAX_FRAME_LENGTH" -lt 64 -o "$NET_MAX_FRAME_LENGTH" -gt 1500 ] ; then NET_MAX_FRAME_LENGTH=1500 ; fi
if [ "$atmega8" = "y" -o "$atmega88" = "y" -o "$atmega16" = "y" -o "$atmega168" = "y" -o "$atmega169" = "y" -o "$atmega168p" = "y" ] ; then
if [ "$NET_MAX_FRAME_LENGTH" -gt 192 ] ; then NET_MAX_FRAME_LENGTH=192 ; fi
fi
if [ "$atmega32" = "y" ] ; then
if [ "$TEENSY_SUPPORT" = "y" ] ; then
if [ "$NET_MAX_FRAME_LENGTH" -gt 192 ] ; then NET_MAX_FRAME_LENGTH=192 ; fi
else
if [ "$NET_MAX_FRAME_LENGTH" -gt 500 ] ; then NET_MAX_FRAME_LENGTH=500 ; fi
fi
fi
if [ "$atmega162" = "y" -a "$NET_MAX_FRAME_LENGTH" -gt 600 ] ; then NET_MAX_FRAME_LENGTH=600 ; fi
if [ "$atmega328p" = "y" -a "$NET_MAX_FRAME_LENGTH" -gt 384 ] ; then NET_MAX_FRAME_LENGTH=384 ; fi
Value=$NET_MAX_FRAME_LENGTH
if [ "$CONFIG_EXPERT" = "y" ] ; then
int "Network Buffer Size" NET_MAX_FRAME_LENGTH ""
else
Value=$NET_MAX_FRAME_LENGTH
define_int NET_MAX_FRAME_LENGTH $Value
fi
# fi
source hardware/ethernet/config.in
source core/host/tap-config.in
source hardware/radio/rfm12/config.in
dep_bool 'RFM12 raw' RFM12_RAW_SUPPORT $RFM12_IP_SUPPORT $ROUTER_SUPPORT $UDP_SUPPORT
if [ "$RFM12_RAW_SUPPORT" = y ]; then
int 'RFM12 raw UDP Port' RFM12_RAW_UDP_PORT 16962
fi
source protocols/usb/config.in
source protocols/zbus/config.in
dep_bool 'ZBUS raw' ZBUS_RAW_SUPPORT $ZBUS_SUPPORT $ROUTER_SUPPORT $UDP_SUPPORT
source scripts/ip-router-conf.sh
comment "IP configuration"
dep_bool 'IPv6 support' IPV6_SUPPORT $UIP_SUPPORT
if [ "$IPV6_SUPPORT" = "y" ]; then
define_bool IPV4_SUPPORT n
else
define_bool IPV4_SUPPORT $UIP_SUPPORT
fi
dep_bool 'Enable IP forwarding' IP_FORWARDING_SUPPORT $ROUTER_SUPPORT
dep_bool 'Enable TCP inactivity timeout' UIP_TIMEOUT_SUPPORT $UIP_SUPPORT
if [ "$UIP_TIMEOUT_SUPPORT" = "y" ]; then
int " TCP inactivity timeout (in minutes)" UIP_TIMEOUT_COUNT 10
fi
if [ "$IPV6_SUPPORT" != "y" -a "$BOOTP_SUPPORT" != "y" -o "$IPV6_STATIC_SUPPORT" = "y" ]; then
ip "Default gateway" CONF_ETHERRAPE_GATEWAY "192.168.23.1" "2001:6f8:1209:f0:0:0:0:1"
fi
define_bool UIP_MULTI_STACK $ROUTER_SUPPORT
source protocols/uip/ipchair/config.in
source protocols/uip/config.in
source protocols/dns/config.in
if [ "$DHCP_SUPPORT" = "y" ]; then
dep_bool 'BOOTP (DHCP-like) support' BOOTP_SUPPORT "n"
else
dep_bool 'BOOTP (DHCP-like) support' BOOTP_SUPPORT $BROADCAST_SUPPORT $ENC28J60_SUPPORT $IPV4_SUPPORT
fi
dep_bool 'Write BOOTP data to EEPROM' BOOTP_TO_EEPROM_SUPPORT $BOOTLOADER_SUPPORT $BOOTP_SUPPORT
if [ "$BOOTP_SUPPORT" = "y" ]; then
dep_bool "DHCP support" DHCP_SUPPORT "n"
else
dep_bool "DHCP support" DHCP_SUPPORT $BROADCAST_SUPPORT $ENC28J60_SUPPORT $IPV4_SUPPORT
fi
comment "Tunneling protocols"
dep_bool_menu "OpenVPN" OPENVPN_SUPPORT $UDP_SUPPORT
hex "OpenVPN key" CONF_OPENVPN_KEY "00000000000000000000000000000000"
hex "OpenVPN HMAC key" CONF_OPENVPN_HMAC_KEY "00000000000000000000000000000000"
comment "OpenVPN IP configuration"
ip "OpenVPN IP address" CONF_OPENVPN_IP "192.168.23.244" "2001:6f8:1209:F0:0:0:0:1"
if [ "$IPV6_SUPPORT" = "y" ]; then
int "IP prefix length" CONF_OPENVPN_IP6_PREFIX_LEN 64
else
ipv4 "OpenVPN netmask" CONF_OPENVPN_IP4_NETMASK "255.255.255.0"
fi
comment "OpenVPN Remote"
dep_bool "Static OpenVPN Remote" OPENVPN_STATIC_REMOTE $OPENVPN_SUPPORT
if [ "$OPENVPN_STATIC_REMOTE" = "y" ]; then
ip "Remote IP" CONF_OPENVPN_REMOTE_IP "192.168.23.254" "2001:6f8:1209:f0:230:5ff:fe23:3f8"
fi
comment "OpenVPN Port"
int 'OpenVPN Port' CONF_OPENVPN_PORT 1194
endmenu
comment "Debugging Flags"
dep_bool 'Networking' DEBUG_NET $DEBUG
dep_bool ' Config' DEBUG_NET_CONFIG $DEBUG_NET
dep_bool ' IPv6' DEBUG_NET_IP6 $DEBUG
dep_bool ' OpenVPN' DEBUG_OPENVPN $DEBUG
dep_bool ' Router' DEBUG_ROUTER $DEBUG
dep_bool ' uIP' DEBUG_UIP $DEBUG
dep_bool ' NTP' DEBUG_NTP $DEBUG
dep_bool ' Unknown packets' DEBUG_UNKNOWN_PACKETS $DEBUG_NET
endmenu
###############################################################################
mainmenu_option next_comment
comment "I/O"
if [ "$ARCH_HOST" = "y" ]; then
define_bool PORTIO_SUPPORT n
define_bool PORTIO_SIMPLE_SUPPORT n
define_bool NAMED_PIN_SUPPORT n
else
choice "I/O abstraction model (Port I/O)" \
"None CONFIG_IO_NONE \
Simple PORTIO_SIMPLE \
Full-featured PORTIO_FULL_FEATURED" \
Simple PORTIO_SCHEME
if [ x"$PORTIO_SCHEME" = x"PORTIO_SIMPLE" ]; then
define_bool PORTIO_SIMPLE_SUPPORT y;
elif [ x"$PORTIO_SCHEME" = x"PORTIO_FULL_FEATURED" ]; then
define_bool PORTIO_SUPPORT y;
fi
source core/portio/config.in
fi
source core/tty/config.in
source hardware/io_expander/config.in
source hardware/adc/config.in
source hardware/sms/config.in
source hardware/adc/kty/config.in
source hardware/adc/ads7822/config.in
source hardware/dac/config.in
source hardware/lcd/config.in
source hardware/i2c/master/config.in
source hardware/camera/config.in
source hardware/radio/fs20/config.in
source hardware/ir/config.in
source hardware/isdn/config.in
source hardware/pwm/config.in
source hardware/onewire/config.in
source hardware/input/config.in
source hardware/input/ps2/config.in
source hardware/input/buttons/config.in
source hardware/radio/rfm12/rfm12_ask-config.in
source hardware/sht/config.in
source hardware/zacwire/config.in
source hardware/ultrasonic/config.in
source hardware/hbridge/config.in
source mcuf/config.in
source hardware/storage/sd_reader/config.in
endmenu
###############################################################################
mainmenu_option next_comment
comment "Protocols"
source protocols/artnet/config.in
source protocols/dali/config.in
source protocols/dmx/config.in
source protocols/ecmd/config.in
source protocols/fnordlicht/config.in
source protocols/httplog/config.in
source protocols/irc/config.in
source protocols/mdns_sd/config.in
source protocols/modbus/config.in
source protocols/mysql/config.in
source protocols/netstat/config.in
source protocols/soap/config.in
source protocols/snmp/config.in
source protocols/smtp/config.in
source protocols/sms77/config.in
source protocols/syslog/config.in
source protocols/twitter/config.in
source protocols/ustream/config.in
source protocols/yport/config.in
source protocols/msr1/config.in
source protocols/to1/config.in
source protocols/serial_line_log/config.in
source protocols/nmea/config.in
source protocols/udpstella/config.in
source protocols/udpIO/config.in
source protocols/udpcurtain/config.in
source protocols/cw/config.in
endmenu
###############################################################################
mainmenu_option next_comment
comment "Applications"
source services/appsample/config.in
source services/bulbdial/config.in
source services/clock/config.in
source services/cron/config.in
source services/dyndns/config.in
source services/dmx-storage/config.in
source services/dmx-fxslot/config.in
source services/echo/config.in
source services/wol/config.in
source services/motd/config.in
source services/httpd/config.in
source services/jabber/config.in
source services/moodlight/config.in
source services/stella/config.in
source services/starburst/config.in
source services/curtain/config.in
source services/tftp/config.in
source services/upnp/config.in
source services/watchcat/config.in
source services/vnc/config.in
source services/watchasync/config.in
source services/glcdmenu/config.in
source services/lome6/config.in
source services/projectors/sanyoZ700/config.in
source services/freqcount/config.in
endmenu
###############################################################################
if [ "$ZBUS_SUPPORT" = "y" \
-o "$YPORT_SUPPORT" = "y" \
-o "$MODBUS_SUPPORT" = "y" ]; then
define_bool USART_SUPPORT y
fi
if [ "$RFM12_IP_SUPPORT" = "y" -o "$RFM12_ASK_SUPPORT" = "y" -o "$RFM12_DISABLE" = "y" ]; then
define_bool RFM12_SUPPORT y
else
define_bool RFM12_SUPPORT n
fi
if [ "$UIP_SUPPORT" = "y" -a "$IPV6_SUPPORT" != "y" ]; then
define_bool IPV4_SUPPORT y
fi