Kconfig 34.8 KB
Newer Older
1 2 3

mainmenu "White Rabbit Switch  configuration"

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
config DOTCONF_FW_VERSION
	string "Firmware version"
	default "5.0"
	help
	  Free-text information about switch's firmware version. This field is
	  for information purpose only. Additionally this field describes
	  version of Kconfig.

config DOTCONF_HW_VERSION
	string "Hardware version"
	help
	  Free-text information about switch's Hardware version. This field is
	  for information purpose only.

config DOTCONF_INFO
	string "Additional info about dot-config"
	help
	  Free-text information about switch's dot-config. This field is
	  for information purpose only.

24 25 26
choice DOTCONF_SOURCE
	  prompt "Source for a run-time replacement of dot-config"
	  default DOTCONF_SOURCE_TRY_DHCP
27

28 29
config DOTCONF_SOURCE_LOCAL
	bool "Use local dot-config"
30 31 32
	help
	  The White Rabbit Switch is configured at run-time,
	  according to a dot-config .config file. The file
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
	  is the same .config you are defining now. If you
	  select this option, dot-config is not replaced
	  at run time.

config DOTCONF_SOURCE_REMOTE
	bool "Use remote dot-config"
	help
	  Use the URL to dot-config provided in DOTCONF_URL.

config DOTCONF_SOURCE_FORCE_DHCP
	bool "Force to get the URL to a dot-config via DHCP"
	help
	  Retrieve a URL to the dot-config via DHCP at boot.
	  The URL can be configured in the "filename" configuration field of
	  the DHCP server.

config DOTCONF_SOURCE_TRY_DHCP
	bool "Try to get the URL to a dot-config via DHCP"
	help
	  The same as DOTCONF_SOURCE_FORCE_DHCP, but this option does not
	  cause errors in SNMP's objects if the switch fails to retrieve
	  the URL to the dot-config via DHCP.

endchoice

config DOTCONF_URL
	string "URL for a run-time replacement of dot-config"
	depends on DOTCONF_SOURCE_REMOTE
	help
	  tftp://, ftp:// or http:// URLs are allowed. Names are allowed if
63 64
	  you configured a DNS server. The special strings HOSTNAME, IPADDR and
	  MACADDR are substituted before retrieving the file.
65 66
	  Example:  "tftp://morgana/wrs-config-IPADDR"

67 68 69 70 71 72 73 74 75 76 77 78 79 80
config BR2_CONFIGFILE
	string "Configuration file for Buildroot"
	default "wrs_release_br2_config"
	help
	  The configuration file selects which packages are to be
	  included in the WRS filesystem and which are not.  If
	  you pass a relative pathname, the build procedure will
	  look for it in wr-switch-sw/configs/buildroot, while
	  absolute pathnames are used unchanged.

	  If the string being passed doesn't refer to a file, the
	  scripts print a warning and use the default file. Incorrect
	  files lead to unpredicatable results.

81
config PPSI
82
	bool
83
	default y
84

85
menu "Local Network Configuration"
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
choice
	prompt "Management port configuration (eth0)"
	default ETH0_DHCP

config ETH0_DHCP
	bool "DHCP forever"
	help
	  Try DHCP on management port (eth0) forever.

config ETH0_DHCP_ONCE
	bool "Try DHCP, if fail use static address"
	help
	  Try DHCP on management port (eth0) for a while, then configure
	  static IP. Useful, when you move switch between various development
	  enviroments.

config ETH0_STATIC
	bool "Static address"
	help
	  Use static address on management port (eth0). Don't try to DHCP.

endchoice

menu "Management port (eth0) Address"
depends on ETH0_DHCP_ONCE || ETH0_STATIC

config ETH0_IP
	string "Static IP address of management port (eth0)"
	default "192.168.1.254"
	help
	  Static IP address of management port (eth0). Please note that
	  wrong IP address will generate a runtime error on the switch.

config ETH0_MASK
	string "Mask of management port (eth0)"
	default "255.255.255.0"
	help
	  Mask of management port (eth0). Please note that wrong mask will
	  generate a runtime error on the switch.

config ETH0_NETWORK
	string "Network of management port (eth0)"
	default "192.168.1.0"
	help
	  Network of management port (eth0). Please note that wrong network
	  will generate a runtime error on the switch.

config ETH0_BROADCAST
	string "Broadcast of management port (eth0)"
	default "192.168.1.255"
	help
	  Broadcast of management port (eth0). Please note that wrong broadcast
	  will generate a runtime error on the switch.

config ETH0_GATEWAY
	string "Default gateway of management port (eth0)"
	default "192.168.1.1"
	help
	  Default gateway of management port (eth0). Please note that
	  wrong gateway address will generate a runtime error on the switch.

endmenu

150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
choice
	prompt "Hostname source"
	default HOSTNAME_DHCP

config HOSTNAME_DHCP
	bool "Get hostname via DHCP"
	help
	  Get hostname from DHCP server.

config HOSTNAME_STATIC
	bool "Use static hostname"
	help
	  Use static Hostname stored in CONFIG_HOSTNAME_STRING

endchoice

config HOSTNAME_STRING
	string "Static hostname of the switch"
	default "wrs"
	depends on HOSTNAME_STATIC
	help
	  Use this string as a static hostname of the switch.

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
menu "Root Password"

config ROOT_PWD_IS_ENCRYPTED
	bool "Should this file include an encripted root password?"
	help
	  The root password, as set here, can be in clear text or
	  encrypted. If it is specified as clear text, it is encrypted and
	  stored in the switch at run time.  If it specified in pre-encrypted
	  form, the string will just be copied in place. A clear-text
	  password in dot-config is less safe against sniffers.

config ROOT_PWD_CLEAR
	string "The password to be used at run time"
	depends on !ROOT_PWD_IS_ENCRYPTED
	default ""
	help
	  The string to be encrypted at boot time by the switch itself,
	  to later use normal ssh authentication. The empty string is
	  allowed.

config ROOT_PWD_CYPHER
	string "The password to be used at run time"
	depends on ROOT_PWD_IS_ENCRYPTED
	help
	  The actual pre-encrypted string. This is stored at run time
	  into /etc/passwd, for ssh authenticazion. To create the
	  string, please run "mkpasswd --method=md5 <password>"

endmenu


204 205 206 207 208 209 210 211
config NTP_SERVER
	string "IP address of local NTP server (empty for none)"
	help
	  At boot time, the White Rabbit time is primed by querying
	  an NTP server, if any is there.  Please write here the
	  IPV4 address (e.g.: "192.168.16.1"); an empty string
	  disables NTP-based priming.

212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
config DNS_SERVER
	string "static IP address of local DNS server (empty for none)"
	help
	  Using names instead of IP addresses is sometimes handy. This
	  option allow to specify a static server name, that is stored
	  in /etc/resolv.conf, within the WRS image being built. If
	  the string is empty, /etc/resolv.conf is managed according
	  to buildroot defaults.

config DNS_DOMAIN
	string "Default domain for DNS resolution"
	help
	  If CONFIG_DNS_SERVER is being used, this option may be
	  useful as well.

227 228 229 230 231 232 233 234 235 236 237 238
config REMOTE_SYSLOG_SERVER
	string "Send WRS syslog messages to this remote host"
	help
	  This IP address or name, if not empty enables remote syslog
	  in the switch; all messages are sent to this specific host.

config REMOTE_SYSLOG_UDP
	bool "Use UDP for syslog messages"
	default y
	help
	  Select UDP to send system logs. If not set, TCP is used.

239 240 241 242 243 244 245 246
config WRS_LOG_HAL
	string "Logging directions for the WR hal"
	default "daemon.info"
	help
	  The string can be a pathname (e.g. /dev/kmsg) or a <facility>.<level>
	  spefification like "daemon.debug". An empty strings is used
	  to represent no logging (like /dev/null).  Please note that
	  unknown facility names will generate a runtime error on the switch.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
	  Please note that all messages produced by the WR HAL if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.

config WRS_LOG_LEVEL_HAL
	string "Logging verbosity level for the WR HAL"
	default ""
	help
	  Specify verbosity of WR HAL as a string or number. The following
	  levels are supported:
	  ALERT (1)
	  ERROR (3)
	  WARNING (4)
	  INFO (6)
	  DEBUG (7)
	  By leaving this item empty, HAL will use its default verbosity level
	  (INFO).
	  Please note that all messages produced by the WR HAL if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.
267 268 269 270 271 272 273 274 275

config WRS_LOG_RTU
	string "Logging directions for the RTU daemon"
	default "daemon.info"
	help
	  The string can be a pathname (e.g. /dev/kmsg) or a <facility>.<level>
	  spefification like "daemon.debug". An empty strings is used
	  to represent no logging (like /dev/null).  Please note that
	  unknown facility names will generate a runtime error on the switch.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
	  Please note that all messages produced by RTU daemon if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.

config WRS_LOG_LEVEL_RTU
	string "Logging verbosity level for the RTU daemon"
	default ""
	help
	  Specify verbosity of RTU daemon as a string or number. The following
	  levels are supported:
	  ALERT (1)
	  ERROR (3)
	  WARNING (4)
	  INFO (6)
	  DEBUG (7)
	  By leaving this item empty, RTU daemon will use its default verbosity
	  level (INFO).
	  Please note that all messages produced by RTU daemon if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.
296 297

config WRS_LOG_PTP
298
	string "Logging directions for the PTP server (ppsi)"
299 300 301 302 303 304
	default "daemon.info"
	help
	  The string can be a pathname (e.g. /dev/kmsg) or a <facility>.<level>
	  spefification like "daemon.debug". An empty strings is used
	  to represent no logging (like /dev/null).  Please note that
	  unknown facility names will generate a runtime error on the switch.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
	  Please note that all messages produced by PPSi if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.

config WRS_LOG_LEVEL_PTP
	string "Logging verbosity level for the PTP server (ppsi)"
	default ""
	help
	  Specify verbosity of PPSi daemon as a string. This string will be
	  passed to the PPSI after "-d" parameter. Please refer to the PPSI's
	  documentation for more details.
	  By leaving this item empty, PPSi daemon will use its default
	  verbosity level.
	  Please note that all messages produced by PPSi if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>, no matter of verbosity of a message.
321

322 323
config WRS_LOG_SNMPD
	string "Logging directions for the SNMP daemon"
324
	default "Swd"
325 326
	help
	  The string can be a pathname (e.g. /dev/kmsg) or a valid snmpd log
327 328 329
	  option (without -L). "Swd" will forward messages with priority at
	  least warning to syslog with daemon as facility. To set level (i.e. 5)
	  use "S 5 daemon". For details please check "man snmpcmd". An empty
330 331
	  strings is used  to represent no logging (like /dev/null). Please
	  note that unknown facility names will generate a runtime error on the
332 333
	  switch. NOTE: It looks like Notice is not a default logging priority
	  as writen in manual.
334

335 336 337 338 339 340 341 342 343 344 345
config WRS_LOG_MONIT
	string "Logging directions for the monit"
	default "syslog"
	help
	  The string can be a pathname (e.g. /dev/kmsg) or a "syslog" string.
	  An empty strings is used  to represent no logging. If it is needed to
	  select facility and level please leave here empty string and change
	  /etc/monitrc file directly.
	  Please note that unknown facility names will generate a runtime error
	  on the switch.

346 347
config WRS_LOG_OTHER
	string "Logging directions for other programs"
348 349
	default "daemon.info"
	help
350 351 352
	  Redirect output from other programs.
	  In the current version following programs uses this option:
	  --wrs_watchdog
353
	  --wrs_auxclk
354
	  --wrs_custom_boot_script.sh
355
	  --vlan.sh
356
	  This collective entry is to avoid number of entries in dot-config.
357 358 359 360 361
	  The string can be a pathname (e.g. /dev/kmsg) or a <facility>.<level>
	  spefification like "daemon.debug". An empty strings is used
	  to represent no logging (like /dev/null).  Please note that
	  unknown facility names will generate a runtime error on the switch.

362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
config WRS_LOG_LEVEL_OTHER
	string "Logging verbosity level for other programs"
	default ""
	help
	  Specify verbosity of other programs as a string or number. The
	  following levels are supported:
	  ALERT (1)
	  ERROR (3)
	  WARNING (4)
	  INFO (6)
	  DEBUG (7)
	  By leaving this item empty, other programs daemon will use their
	  default verbosity level (INFO).
	  Please note that all messages produced by other programs if syslog is
	  configured will be passed to the syslog at the same
	  <facility>.<level>

379 380 381 382 383 384 385 386 387 388
config KEEP_ROOTFS
	bool "Keep generated filesystem and related script"
	help
	  During development of build scripts, it may be useful
	  to keep the generated root filesystem as well as the
	  script used to create it. If selected, the build script
	  will report the actual file names at each build.
	  If unsusre, say N.

endmenu
389

390
source Kconfig_port_timing.in
391

392
menu "SFP and Media Timing Configuration"
393 394 395

config SFP00_PARAMS
	string "Parameters for one SFP device type"
396
	default "vn=Axcen Photonics,pn=AXGE-1254-0531,tx=0,rx=0,wl_txrx=1310+1490"
397 398 399
	help
	  This parameter, and the following ones, are used to
	  configure the timing parameters of a specific SFP
400
	  transceiver. The transceiver name is autodected for each port
401
	  in the White Rabbit Switch, and you need one configuration
402
	  entry for each transceiver type that is installed in your
403
	  device.
404 405 406 407 408 409 410
	  vn (optional) - Vendor Name of an SFP
	  pn - Part Number of an SFP
	  vs (optional) - Vendor Serial (serial number) of an SFP
	  tx - TX delay of an SFP
	  rx - RX delay of an SFP
	  wl_txrx - Tx wavelength separated by "+" with Rx wavelength of an SFP;
		    for example wl_txrx=1490+1310
411 412 413

config SFP01_PARAMS
	string "Parameters for one SFP device type"
414
	default "vn=Axcen Photonics,pn=AXGE-3454-0531,tx=0,rx=0,wl_txrx=1490+1310"
415 416
	help
	  Please check the help of SFP00_PARAMS
417 418 419

config SFP02_PARAMS
	string "Parameters for one SFP device type"
420
	default "vn=APAC Opto,pn=LS38-C3S-TC-N-B9,tx=761,rx=557,wl_txrx=1310+1490"
421 422
	help
	  Please check the help of SFP00_PARAMS
423 424 425

config SFP03_PARAMS
	string "Parameters for one SFP device type"
426
	default "vn=APAC Opto,pn=LS48-C3S-TC-N-B4,tx=-29,rx=507,wl_txrx=1490+1310"
427 428
	help
	  Please check the help of SFP00_PARAMS
429 430 431

config SFP04_PARAMS
	string "Parameters for one SFP device type"
432
	default "vn=ZyXEL,pn=SFP-BX1490-10-D,tx=0,rx=0,wl_txrx=1490+1310"
433 434
	help
	  Please check the help of SFP00_PARAMS
435 436 437

config SFP05_PARAMS
	string "Parameters for one SFP device type"
438
	default "vn=ZyXEL,pn=SFP-BX1310-10-D,tx=0,rx=0,wl_txrx=1310+1490"
439 440
	help
	  Please check the help of SFP00_PARAMS
441 442 443

config SFP06_PARAMS
	string "Parameters for one SFP device type"
444 445
	help
	  Please check the help of SFP00_PARAMS
446 447 448

config SFP07_PARAMS
	string "Parameters for one SFP device type"
449 450
	help
	  Please check the help of SFP00_PARAMS
451 452 453

config SFP08_PARAMS
	string "Parameters for one SFP device type"
454 455
	help
	  Please check the help of SFP00_PARAMS
456 457 458

config SFP09_PARAMS
	string "Parameters for one SFP device type"
459 460
	help
	  Please check the help of SFP00_PARAMS
461

462 463 464 465 466

config FIBER00_PARAMS
	string "Alpha parameters for fiber type 0"
	default "alpha_1310_1490=2.6787e-04"
	help
467 468 469 470 471 472 473 474 475
	  This parameter specify the physical features of used fiber type.
	  Specify the alpha value for each pair of used wavelengths.
	  This parameter follows a format:
	  alpha_XXXX_YYYY=1.23e-04,alpha_AAAA_BBBB=4.56e-04,...
	  where XXX_YYYY and AAAA_BBBB are pairs of used wavelengths,
	  1.23e-04, 4.56e-04 are alpha values to be used for particular
	  wavelengths
	  The index ("00" onwards) is used to match the port
	  (CONFIG_PORTxx_PARAMS) with one of several installed fiber types.
476 477 478 479

config FIBER01_PARAMS
	string "Alpha parameters for fiber type 1"
	default "alpha_1310_1490=2.6787e-04"
480 481
	help
	  Please check the help of FIBER00_PARAMS
482 483 484 485

config FIBER02_PARAMS
	string "Alpha parameters for fiber type 2"
	default "alpha_1310_1490=2.6787e-04"
486 487
	help
	  Please check the help of FIBER00_PARAMS
488 489 490 491

config FIBER03_PARAMS
	string "Alpha parameters for fiber type 3"
	default "alpha_1310_1490=2.6787e-04"
492 493
	help
	  Please check the help of FIBER00_PARAMS
494

495
endmenu
496 497 498 499 500 501 502 503 504 505 506

choice
	prompt "Timing Mode"
	default TIME_BC

config TIME_GM
	bool "Grand-Master"
	help
	  This options selects the White Rabbit Switch as a grandmaster,
	  i.e. it uses its input channels to track an Atomic or GPS and
	  claim to be a PTP authoritative source on the network.
507 508 509 510
	  The clockClass is set to 6 which designates a clock that is
	  synchronized to a primary reference time source.
	  The value of the clockClass can be overridden by the user in
	  a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).
511 512 513 514 515 516 517

config TIME_FM
	bool "Free-Running Master"
	help
	  The White Rabbit Switch pretends to be a master on his PTP
	  network, but it doesn't sync to an external source. Its own
	  internal clocks and counters are used to drive timing.
518 519 520 521 522
	  The clockClass is set to 52 which designates a clock that shall not
	  be a slave to another clock i the domain.
	  The value of the clockClass can be overridden by the user in
	  a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).

523 524 525 526 527 528 529

config TIME_BC
	bool "Boundary Clock"
	help
	  The White Rabbit Switch is a normal PTP Boundary Clock: it is
	  slave on one of its ports and master on the other ones, according
	  to the standard Best Master Clock algorithm.
530 531 532
	  The clockClass is set to 248 which is the default clockClass.
	  The value of the clockClass can be overridden by the user in
	  a separate configuration parameter (CONFIG_PTP_OPT_CLOCK_CLASS).
533 534

endchoice
535

536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
menu "PPS generation"
	
config PPSGEN_PTP_FALLBACK
	bool "PTP fallback"
	default N
	help
	  This option enables the PPS generation if a slave instance 
	  programmed to use an extension protocol (WR, L1Sync, ...) is falling back
	  to PTP communication only. 
	
config PPSGEN_PTP_THRESHOLD_MS
	int "PTP threshold (ms)"
	default 500
	range 1 1000
	help
	  This option defines the threshold corresponding to the offset from the 
	  master used to start the generation of the PPS. It is  either used by a PTP slave 
	  instance or a instance using a protocol extension but going into the fallback PTP mode 
	  and with the PTP fallback option active. 
	  A 0 value means that the PPS will be not generated for the considerated cases. 
	  When the PPS is generated, it can be also disabled when the offset from master becomes greater
	  than the threshold value + 20%
	
config PPSGEN_GM_DELAY_TO_GEN_PPS_SEC
	int "Grand Master delay for PPS (sec)"
	default 0
	range 0 1000
	help
		This option allows a boundary/ordinary clock to generate PPS when it becomes Grand Master (GM) by BMCA. Becoming GM
		by BMCA might be a transitory situation during a network discovery. The PPS must be activated only when all this 
		transitory phase is terminated. This option then allows to define a delay in seconds to respect before 
		generating the PPS when a GM by BMCA is detected.  
		A 0 value desactivate this feature.
		
config PPSGEN_FORCE
	bool "Force PPS for testing purpose"
	default N
	help
	  This option enables the PPS generation for all cases. It should only be used for testing purpose. 

endmenu

578 579
choice
	prompt "PTP Port Assignment"
580
	default PTP_PORT_PARAMS
581 582 583 584
	help
	  You can choose wether to use parameters defined in PORTXX_PARAMS or
	  your own custom configuration file placed in switch filesystem
	  or downloaded at boot time.
585

586
config PTP_PORT_PARAMS
587
	bool "Generate ppsi.conf based on the PORTXX_PARAMS"
588
	help
589 590 591
	  Generate ppsi.conf based on "proto" and "role" specified for each
	  port in PORTXX_PARAMS.
	  PPSI's global settings can be set in file
592
	  /wr/etc/ppsi-pre.conf
593 594

config PTP_CUSTOM
595
	bool "Custom ppsi.conf in the WRS filesystem"
596 597
	help
	  Use custom file for ppsi defined by CONFIG_PTP_CUSTOM_FILENAME.
598

599 600 601 602 603 604 605 606
config PTP_REMOTE_CONF
	bool "Download ppsi.conf from the network at each boot"
	help
	  This choice allows to specify an URL so you can download a
	  custom file using the network. This allows running a bunch
	  of switches, all with the same configuration but different
	  configuations that can't just be derived from PORT_PARAMS above.

607 608
endchoice

609 610 611 612
config PTP_CUSTOM_FILENAME
	string "Pathname for your custom ppsi.conf"
	depends on PTP_CUSTOM
	default "/wr/etc/ppsi-custom.conf"
613 614
	help
	  This is the filename used as ppsi.conf. Please note that the
615 616
	  file is copied to /etc/ppsi.conf when configuration is applied,
	  and the PTP daemon always picks /etc/ppsi.conf, not this
617 618 619 620 621 622
	  filename.

config PTP_CONF_URL
	depends on PTP_REMOTE_CONF
	string "Download URL (http, ftp, tftp) for custom ppsi.conf"
	help
623
	  Like CONFIG_DOTCONF_URL, this option allows passing HOSTNAME, IPADDR
624 625 626
	  and MACADDR in the filename, and if a DNS server is configured,
	  you can use host names.
	  For example: tftp://morgana/wrs-IPADDR-ppsi.conf
627

628 629
menu "PTP options"

630 631 632 633 634 635 636
config PTP_OPT_OVERWRITE_CLOCK_CLASS
	boolean "Overwrite default clock-class"
	default FALSE
	help
	  The clock class is automatically set depending of the timing mode.
	  This option allows to overwrite the default value.
	   
637
config PTP_OPT_CLOCK_CLASS
638 639 640 641
	int "clock-class"
	default 248
	range 0 255
	depends on PTP_OPT_OVERWRITE_CLOCK_CLASS
642 643 644 645 646 647 648 649 650
	help
	  An attribute defining the TAI traceability, synchronization state and
	  expected performance of the time or frequency distributed by a
	  Boundary Clock or Ordinary Clock.
	  For more details please refer to the IEEE 1588-2008 standard.
	  If set, this configuration item overwrites the default value from
	  ppsi-pre.conf during generation of ppsi.conf.

config PTP_OPT_CLOCK_ACCURACY
651 652 653
	int "clock-accuracy"
	range 0 255
	default "254"
654 655 656 657 658 659 660 661
	help
	  An attribute defining the accuracy of the Local Clock (e.g. local
	  oscillator) of a Boundary Clock or Ordinary Clock.
	  For more details please refer to the IEEE 1588-2008 standard.
	  If set, this configuration item overwrites the default value from
	  ppsi-pre.conf during generation of ppsi.conf.

config PTP_OPT_CLOCK_ALLAN_VARIANCE
662 663 664
	int "clock-allan-variance/offsetScaledLogVariance"
	default "65535"
	range 0 65535
665 666 667 668 669 670 671 672
	help
	  An attribute defining the stability of the Local Clock of a
	  Boundary Clock or Ordinary Clock.
	  For more details please refer to the IEEE 1588-2008 standard.
	  If set, this configuration item overwrites the default value from
	  ppsi-pre.conf during generation of ppsi.conf.

config PTP_OPT_DOMAIN_NUMBER
673 674 675
	int "domain-number"
	default 0
	range 0 255
676 677 678 679 680 681 682 683
	help
	  A domain consists of one or more PTP devices communicating with each
	  other as defined by the PTP protocol. A domain defines the scope of
	  PTP message communication, state, operations, data sets, and
	  timescale. PTP devices may participate in multiple domains.
	  For more details please refer to the IEEE 1588-2008 standard.

config PTP_OPT_PRIORITY1
684 685 686
	int "priority1"
	default "128"
	range 0 255
687 688 689 690 691 692
	help
	  A user configurable designation that a clock belongs to an ordered
	  set of PTP devices from which a PTP Master is selected.
	  For more details please refer to the IEEE 1588-2008 standard

config PTP_OPT_PRIORITY2
693 694 695
	int "priority2"
	default "128"
	range 0 255
696 697 698 699 700 701 702
	help
	  A user configurable designation that provides finer grained ordering
	  among otherwise equivalent PTP devices.
	  For more details please refer to the IEEE 1588-2008 standard
	  If set, this configuration item overwrites the default value from
	  ppsi-pre.conf during generation of ppsi.conf.

703 704 705 706 707 708 709
config PTP_OPT_OVERWRITE_TIME_SOURCE
	boolean "Overwrite default time-source"
	default FALSE
	help
	  The clock class is automatically set depending of the timing mode.
	  This option allows to overwrite the default value.
	  
710
config PTP_OPT_TIME_SOURCE
711 712 713 714
	int "time-source"
	default 160
	range 0 255
	depends on PTP_OPT_OVERWRITE_TIME_SOURCE
715 716 717 718 719
	help
	  This information-only attribute indicates the source of time used
	  by the grandmaster (or free-running master).
	  NOTE: This is not supported yet by the PPSi.

720
endmenu #"PPSI options"
721

722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762
menu "Management configuration"
config SNMP_TRAPSINK_ADDRESS
	string "Static IP address or name where to send SNMPv1 traps"
	help
	  If not empty, the address or name is ussed as "trapsink"
	  destination in the SNMP configuration file for the switch.
	  It empty, no v1 traps are generated. If both this and
	  the following TRAP2SINK_ADDRESS are set, snmpd sends two
	  traps (one per protocol version). Trapcommunity is "public"
	  (not configurable so far).

config SNMP_TRAP2SINK_ADDRESS
	string "Static IP address or name where to send SNMPv2c traps"
	help
	  If not empty, the address or name is ussed as "trap2sink"
	  destination in the SNMP configuration file for the switch.
	  It empty, no v2c traps are generated. Trapcommunity is "public"
	  (not configurable so far).

config SNMP_RO_COMMUNITY
	string "Read-only community name for SNMP V1/V2 management"
	default "public"
	help
	  If not empty, the 'community' name is a sort of password,
	  that travels as clear text (we don't support encrypted SNMPv3
	  yet). The default is good for testing, but should be changed
	  for production. Please note, however, that the switch processes
	  SNMP only on the CPU Ethernet port (the copper "management" port).

config SNMP_RW_COMMUNITY
	string "Read-write community name for SNMP V1/V2 management"
	default "private"
	help
	  If not empty, the 'community' name is a sort of password,
	  that travels as clear text (we don't support encrypted SNMPv3
	  yet). The default is good for testing, but should be changed
	  for production. Please note, however, that the switch processes
	  SNMP only on the CPU Ethernet port (the copper "management" port).

config SNMP_TEMP_THOLD_FPGA
	int "Threshold level for FPGA temperature"
763
	default "80"
764 765
	help
	  Threshold level for FPGA temperature, when exceeded warning is
766 767
	  notified by SNMP via WR-SWITCH-MIB::wrsTemperatureWarning
	  Require hal restart after change
768 769 770

config SNMP_TEMP_THOLD_PLL
	int "Threshold level for PLL temperature"
771
	default "80"
772 773
	help
	  Threshold level for PLL temperature, when exceeded warning is
774 775
	  notified by SNMP via WR-SWITCH-MIB::wrsTemperatureWarning
	  Require hal restart after change
776 777 778

config SNMP_TEMP_THOLD_PSL
	int "Threshold level for Power Supply Left (PSL) temperature"
779
	default "80"
780 781
	help
	  Threshold level for Power Supply Left (PSL) temperature, when
782 783 784
	  exceeded warning is notified by SNMP via
	  WR-SWITCH-MIB::wrsTemperatureWarning
	  Require hal restart after change
785 786 787

config SNMP_TEMP_THOLD_PSR
	int "Threshold level for Power Supply Right (PSR) temperature"
788
	default "80"
789 790
	help
	  Threshold level for Power Supply Right (PSR) temperature, when
791 792 793
	  exceeded warning is notified by SNMP via
	  WR-SWITCH-MIB::wrsTemperatureWarning
	  Require hal restart after change
794

795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
config SNMP_SWCORESTATUS_DISABLE
	bool "Force SNMP object wrsSwcoreStatus to be always OK"
	default false
	help
	  Disable checking SNMP object wrsSwcoreStatus"

# config items below are not implemented in the SNMP
#config SNMP_SWCORESTATUS_HP_FRAME_RATE
#	int "Maximum allowed rate of HP frames on a port"
#	depends on !SNMP_SWCORESTATUS_DISABLE
#	default "0"
#	help
#	  Error via SNMP if rate of HP frames on any port exceed given value.
#
#config SNMP_SWCORESTATUS_RX_FRAME_RATE
#	int "Maximum allowed rate of RX frames on a port"
#	depends on !SNMP_SWCORESTATUS_DISABLE
#	default "0"
#	help
#	  Error via SNMP if rate of RX frames on any port exceed given value.
#
#config SNMP_SWCORESTATUS_RX_PRIO_FRAME_RATE
#	int "Maximum allowed rate of any RX priority"
#	depends on !SNMP_SWCORESTATUS_DISABLE
#	default "0"
#	help
#	  Error if frame rate of any RX priority exceed given value.
#
823

824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883
endmenu

menu "External clk2 clock signal configuration"
config WRSAUXCLK_FREQ
	string "Frequency of the generated clock signal in MHz"
	default "10"
	help
	  --freq parameter of wrs_auxclk
	  Desired frequency of the generated clock signal in MHz. Available
	  range from 4kHz to 250MHz.

config WRSAUXCLK_DUTY
	string "Duty cycle of the generated clock signal"
	default "0.5"
	help
	  --duty parameter of wrs_auxclk
	  Desired duty cycle given as a fraction (e.g. 0.5, 0.4).

config WRSAUXCLK_CSHIFT
	string "Coarse shift of the generated clock signal"
	default "36"
	help
	  --cshift parameter of wrs_auxclk
	  Coarse shift (granularity 2ns) of the generated clock signal. This
	  parameter can be used to get desired delay relation between generated
	  1-PPS and clk2. The delay between 1-PPS and clk2 is constant for
	  a given bitstream but may be different for various hardware versions
	  and re-synthesized gateware. Therefore it should be measured and
	  adjusted only once for given hardware and gateware version.


config WRSAUXCLK_SIGDEL
	string "Signal delay of the generated clock signal"
	default "0"
	help
	  --sigdel parameter of wrs_auxclk
	  Clock signal generated from the FPGA is cleaned by a discrete
	  flip-flop. It may happen that generated aux clock is in phase with
	  the flip-flop clock. In that case it is visible on the oscilloscope
	  that clk2 clock is jittering by 4ns. The "Signal delay" parameter
	  allows to add a precise delay to the FPGA-generated clock to avoid
	  such jitter. This delay is specified in steps, where each step is
	  around 150ps. This value, same as the "Coarse shift" parameter, is
	  constant for a given bitstream so should be verified only once.


config WRSAUXCLK_PPSHIFT
	string "Fine signal delay of the generated clock signal"
	default "0"
	help
	  --ppshift parameter of wrs_auxclk
	  If one needs to precisely align 1-PPS output with the clk2 aux clock
	  using "Coarse shift" parameter is not enough as it has
	  4ns granularity. In that case this parameter lets you shift 1-PPS
	  output by a configured number of 150ps steps. However, please have in
	  mind that 1-PPS output is used as a reference for WR calibration
	  procedure. Therefore, once this parameter is modified, the device
	  should be re-calibrated. Otherwise, 1-PPS output will be shifted
	  from the WR timescale by <steps>*150ps.

884
endmenu
885

886 887 888 889 890
menu "NIC throttling configuration"
config NIC_THROTTLING_ENABLED
	bool "Enable NIC throttling"
	default n
	help
891 892 893 894
	  Limit the Rx bandwidth of the traffic that goes from WR ports to
	  Linux. Throttling can be enabled to prevent Linux using 100% of the
	  processing power to receive Ethernet frames coming from WR ports to
	  the CPU.
895 896 897 898 899 900 901

config NIC_THROTTLING_VAL
	int "NIC throttling value"
	depends on NIC_THROTTLING_ENABLED
	default "4000"
	range 1 65535
	help
902
	  Value to which bandwith should be limited (in KB/s).
903

904
endmenu
905

906 907 908 909 910 911
config PPS_IN_TERM_50OHM
	bool "Enable 50ohm termination for 1-PPS input"
	default n
	help
	  Enable 50ohm termination for 1-PPS input.

912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952
menu "Custom boot script configuration"
config CUSTOM_BOOT_SCRIPT_ENABLED
	bool "Execute custom script"
	default n
	help
	  Enable execution of a custom script during boot. It can be a local
	  script placed at /wr/bin/custom_boot_script.sh or downloaded from
	  a given URL. This script can be used for some exotic configurations
	  that dot-config does not support. This scipt runs before switching
	  is enabled.

choice CUSTOM_BOOT_SCRIPT_SOURCE
	prompt "Source for a custom boot script"
	depends on CUSTOM_BOOT_SCRIPT_ENABLED
	default CUSTOM_BOOT_SCRIPT_SOURCE_LOCAL
	help
	  Defines the source of a custom boot script. Local or remote.

config CUSTOM_BOOT_SCRIPT_SOURCE_LOCAL
	bool "Use local custom script"
	help
	  Use /wr/bin/custom_boot_script.sh to be executed at boot.

config CUSTOM_BOOT_SCRIPT_SOURCE_REMOTE
	bool "Use remote custom script"
	help
	  Use the URL in CUSTOM_BOOT_SCRIPT_SOURCE_REMOTE_URL to download the
	  custom boot script.

endchoice
config CUSTOM_BOOT_SCRIPT_SOURCE_REMOTE_URL
	string "URL of a custom script"
	depends on CUSTOM_BOOT_SCRIPT_SOURCE_REMOTE
	help
	  URL to the custom script. HOSTNAME, IPADDR and MACADDR are
	  substituted before retrieving the file.

	  Example:  "tftp://morgana/custom-script-IPADDR"

endmenu

953 954 955 956 957 958 959
menu "LLDP options"
config LLDPD_DISABLE
	bool "Disable LLDP daemon"
	default n
	help
	  Disable LLDP daemon to prevent sending LLDP frames. It may be useful
	  for networks not using LLDP or with a low latency requirement.
960

961 962 963 964 965 966 967
config LLDPD_TX_INTERVAL
	int "LLDP TX interval"
	default 5
	depends on !LLDPD_DISABLE
	help
	  Define how often LLDP frames are sent.

968 969 970 971 972 973
config LLDPD_MANAGEMENT_PORT_DISABLE
	bool "Disable LLDP on the management port"
	default n
	depends on !LLDPD_DISABLE
	help
	  Disable LLDP traffic on management port.
974 975 976 977 978 979 980 981

config LLDPD_MINIMUM_FRAME_SIZE
	bool "Send only minimum information via LLDP"
	default n
	depends on !LLDPD_DISABLE
	help
	  Send only minimum information via LLDP. May be useful in networks
	  which require low latency.
982 983
endmenu

984 985 986 987 988 989
config HTTPD_DISABLE
	bool "Disable web interface"
	default n
	help
	  Disable web interface.

990 991 992 993 994 995 996 997
menu "Developer options"
config MONIT_DISABLE
	bool "Disable monit"
	default n
	help
	  Disable monit to prevent processes' restarts. It may be useful for
	  development.

998 999 1000 1001 1002
menu "Fan speed control"
config FAN_HYSTERESIS
	bool "Use hysteresis to control fan speed"
	default n
	help
1003 1004 1005 1006 1007 1008 1009
	  Use hysteresis to control fans. Enable fans with PWM value
	  CONFIG_FAN_HYSTERESIS_PWM_VAL} when PLL's temperature exceeds
	  CONFIG_FAN_HYSTERESIS_T_ENABLE. Disable fans when temperature drops
	  below CONFIG_FAN_HYSTERESIS_T_DISABLE. These options are intended to
	  be used during development to reduce noise generated by a switch.
	  Don't use in production as this may affect the synchronization
	  performance.
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035

config FAN_HYSTERESIS_T_DISABLE
	int "Disable fans temperature"
	default 60
	range 0 80
	depends on FAN_HYSTERESIS
	help
	  Temperature at which fans are disabled when working in hysteresis mode.

config FAN_HYSTERESIS_T_ENABLE
	int "Enable fans temperature"
	default 65
	range 0 80
	depends on FAN_HYSTERESIS
	help
	  Temperature at which fans are enabled when working in hysteresis mode.
	  Maximum allowed value is 80

config FAN_HYSTERESIS_PWM_VAL
	int "Value of fans' PWM"
	default 100
	range 4 1000
	depends on FAN_HYSTERESIS
	help
	  PWM value used to drive fans. Range from 4 to 1000.

1036 1037
endmenu # "Fan speed control"

1038 1039 1040 1041 1042
config READ_SFP_DIAG_ENABLE
	bool "Read SFPs Diagnostic Monitoring"
	default n
	help
	  Let HAL to read Diagnostic Monitoring from SFP's eeprom.
1043

1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
choice
	prompt "Compilation optimization"
    
    config OPTIMIZATION_SPEED
        boolean "Execution time (-O2)"
        help
           GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff.
           
     config OPTIMIZATION_SIZE_SPEED
        boolean "Size and execution time (-Os)"
        help
           Optimize for size. Enables all -O2 optimizations except those that often increase code size.
           
     config OPTIMIZATION_DEBUGGING
1058
        boolean "Debugging (-Og)"
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
        help
           Should be the optimization level of choice for the standard edit-compile-debug cycle

     config OPTIMIZATION_NONE_DEBUGGING
        boolean "Debugging without optimization(-ggdb)"
        help
           Compile without optimization and with debug informations 
endchoice

config OPTIMIZATION
	string
1070 1071
	default "-Os -ggdb" if OPTIMIZATION_SIZE_SPEED
	default "-O2 -ggdb" if OPTIMIZATION_SPEED
1072 1073
	default "-Og -ggdb" if OPTIMIZATION_DEBUGGING
	default "-ggdb" if OPTIMIZATION_NONE_DEBUGGING
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098
	default "-ggdb"

endmenu # "Developer options"

menu "RTU HP mask"

config RTU_HP_MASK_ENABLE
	bool "Set custom High Priority mask in RTU"
	default n
	help
	  Set the mask which priorities are considered High Priority (this
	  only concerns the traffic which is fast-forwarded).


config RTU_HP_MASK_VAL
	string "HP mask"
	default 0
	depends on RTU_HP_MASK_ENABLE
	help
	  Mask with priorities (eg. 0x9 => priority 4 and 0 are considered HP)


endmenu

source Kconfig_vlans.in
1099 1100