Kconfig 16.3 KB
Newer Older
1 2 3

mainmenu "WR PTP Core software configuration"

4 5
# Later we'll build wr_cpu.bin for wr-switch from this code base
config WR_SWITCH
6
	bool "Build rt_cpu.bin, for the WR-Switch FPGA"
7 8 9 10
	default n

config WR_NODE
	bool
11
	default !WR_SWITCH
12

13 14
# most options with no prompt here are prompted-for in the "advanced" section

15 16 17 18
config PPSI_FORCE_CONFIG
	bool
	default y

19
config PRINT_BUFSIZE
20 21
	int
	default 128
22

23 24
config RAMSIZE
	int
25
	default 65536 if WR_SWITCH
26
	default 131072
27

28 29 30 31
config TEMP_POLL_INTERVAL
	int
	default 15

32 33 34 35 36 37 38
config TEMP_HIGH_THRESHOLD
	int
	default 70

config TEMP_HIGH_RAPPEL
	int
	default 60
39

40 41 42
config PLL_VERBOSE
	boolean

43 44 45
config PFILTER_VERBOSE
	boolean

46 47 48 49
config WRC_VERBOSE
	boolean
	default y if WR_SWITCH

50 51 52 53 54 55 56
config VLAN
	boolean

config VLAN_NR
	int
	default 10 if VLAN
	default 0
57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
config VLAN_1_FOR_CLASS7
	int
	default 20 if VLAN
	default 0

config VLAN_2_FOR_CLASS7
	int
	default 30 if VLAN
	default 0

config VLAN_FOR_CLASS6
	int
	default 100 if VLAN
	default 0

73 74 75 76 77 78 79 80 81 82 83
config HOST_PROCESS
	boolean
	default n

config LM32
	boolean
	default !HOST_PROCESS

config EMBEDDED_NODE
	boolean
	default LM32 && WR_NODE
84

85 86
# CONFIG_WR_SWITCH has no further options at all at this point

87 88 89 90 91
config WR_NODE_PCS16
	depends on WR_NODE
	boolean "Compile for 16-bit PCS"
	default n
	help
92 93
	  This allows to compile the WR PTP Core software for 16-bit PCS platforms
	  (e.g. Kintex-7).
94

95
config STACKSIZE
96 97
	depends on WR_NODE
	int
98 99
	default 2048

100
config PPSI
101
	depends on WR_NODE
102 103
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
104

105
config W1
106
	depends on EMBEDDED_NODE
107 108
	boolean
	default y
Aurelio Colosimo's avatar
Aurelio Colosimo committed
109

110 111
config LATENCY_ETHTYPE
	int
112
	default 291
113

114 115 116
config LATENCY_SYSLOG
	bool

117 118
# The other ones can be set by non-developers

119 120 121 122 123 124 125 126 127 128 129
config P2P
	depends on WR_NODE
	default n
	boolean "Build peer-delay mechanism (and prefer it)"
	help
	  This choice selects peer-to-peer ("P2P"), or "peer delay"
	  PTP protocol. If activated, but P2P and E2E (end to end)
	  are built, and they can be chosen at run time, with P2P preset.
	  If you deny this option, P2P code is not built, to save some
	  binary size.

130
config WR_NIC_CPU
131
	depends on WR_NODE
132 133 134 135 136 137 138 139 140
	boolean "Allows compatibility with external NIC driver on CPU"
	default n
	help
	  ARP & ICMP traffic are bypassed to the external fabric (NIC) so
	  that the CPU handles these packets and not the LM32. (This option
	  is mainly used by the wr-starting-kit on SPEC cards)

config IP
	depends on WR_NODE && !WR_NIC_CPU
141
	boolean "Compile minimal IP support in wrpc-sw"
142
	help
143 144 145
	  This allows to run LM32 code that is aware of IP. The feature is
	  needed to run Etherbone in your gateware, because Etherbone
	  is UDP-based and thus the CPU needs to run DHCP.
146

147
config CMD_CONFIG
148
	depends on WR_NODE
149
	boolean "Include configuration in the output binary"
Aurelio Colosimo's avatar
Aurelio Colosimo committed
150
	help
151 152 153
	  This options adds the "config" command to the shell, which
	  reports the current configuration.  This adds half a kilobyte
	  to the binary size (100b for the code plus the .config file).
Aurelio Colosimo's avatar
Aurelio Colosimo committed
154

155 156 157 158 159 160 161 162
config SYSLOG
	depends on IP
	boolean "Include syslog client support"
	help
	  This enable a UDP syslog client, configured by a shell command.
	  The user (or init script) must use "syslog <ipaddr> <macaddr>"
	  to enable it.  The special "off" ipaddr disables syslog.

163 164 165 166 167 168 169 170 171 172 173 174
config PUTS_SYSLOG
	depends on SYSLOG
	boolean "Sent puts (i.e. printf) to syslog too"
	help
	  This allows logging the various warning and error messages
	  that normally go to the console alone, where nobody is looking
	  in a deployed system.  Output from interactive commands is
	  not sent to syslog, but self-timed diagnostic (stat, gui, verbose)
	  will reach syslog anyways, if an interactive user enables them.
	  Unfortunately, "stat" will reach syslog as several short strings,
	  and "gui" is full of escape sequences.

Adam Wujek's avatar
Adam Wujek committed
175
config SNMP
176
	depends on IP && !HOST_PROCESS
177 178
	default y
	boolean "Mini SNMP responder"
Adam Wujek's avatar
Adam Wujek committed
179

Adam Wujek's avatar
Adam Wujek committed
180
config SNMP_SET
181 182 183 184
	depends on SNMP
	default y
	boolean "Add SET support to the Mini SNMP responder"
	help
Adam Wujek's avatar
Adam Wujek committed
185 186
	  This option enables support for SET requests for Mini SNMP responder

187 188 189 190 191 192 193 194
config SNMP_INIT
	depends on SNMP && BUILD_INIT
	default y if BUILD_INIT
	default n
	boolean "Adds support of changing init script/commands via SNMP"
	help
	  This option adds a branch wrpcInitScriptConfigGroup to the SNMP

195 196 197 198 199 200 201
config SNMP_SDB
	depends on SNMP && GENSDBFS
	default y
	boolean "Adds support of generation of SDB via SNMP"
	help
	  This option adds a branch wrpcSdbGroup to the SNMP

202
config SNMP_AUX_DIAG
203 204 205 206 207
	depends on SNMP && AUX_DIAG
	default y if AUX_DIAG
	default n
	boolean "Adds support of auxiliary diagnostics registers to SNMP"
	help
208
	  This option adds a branch wrpcAuxDiag to the SNMP
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
config BUILD_INIT
	depends on WR_NODE
	default n
	boolean "Include an init command in the binary (build-time)"

config INIT_COMMAND
	depends on BUILD_INIT
	string "Enter the init command, use ';' as command separator"
	default ""

config INIT_COMMAND
	string
	default ""

# The following two integer values are derived, and used in if() (shell.c)
config HAS_BUILD_INIT
	int
	default 1 if BUILD_INIT
	default 0

config HAS_FLASH_INIT
	int
	default 1 if FLASH_INIT
	default 0

config FLASH_INIT
236 237 238
	boolean
	default y if EMBEDDED_NODE
	default n
239

240
config AUX_DIAG
241
	depends on WR_NODE
242 243 244
	default n
	boolean "Add support for auxiliary diagnostics registers"
	help
245 246 247
	  This option adds support for read/write of aux diag registers and
	  the diag command.

248 249 250 251 252 253 254 255
config SDB_STORAGE
	depends on WR_NODE
	default y
	boolean "Use SDB to manage storage (instead of legacy eeprom code)"
	help
	  Use SDB to manage flash and eeproms (both W1 and I2C). If not, legacy code
	  (eeprom only) will be selected.

Grzegorz Daniluk's avatar
Grzegorz Daniluk committed
256 257 258 259 260 261 262 263
config GENSDBFS
  depends on SDB_STORAGE
  default y
  boolean "Shell command for SDBFS generation"
  help
    This option adds _sdb fs_ command to write empty SDBFS filesystem
    image in Flash/EEPROM.

264 265 266 267 268
config LEGACY_EEPROM
	depends on WR_NODE
	boolean
	default !SDB_STORAGE

269
config VLAN
Grzegorz Daniluk's avatar
Grzegorz Daniluk committed
270
  depends on WR_NODE
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
	boolean "Filter and rx/tx frames in a VLAN (as opposed to untagged)"

config VLAN_NR
	depends on VLAN
	int "Use this VLAN number for filter/tx/rx"

config VLAN_1_FOR_CLASS7
	depends on VLAN
	int "Route this VLAN to fabric class 7 (Etherbone)"

config VLAN_2_FOR_CLASS7
	depends on VLAN
	int "Route this VLAN too to fabric class 7 (Etherbone)"

config VLAN_FOR_CLASS6
	depends on VLAN
	int "Route this VLAN too to fabric class 6 (Streamer/NIC)"

289 290 291 292 293 294 295 296 297 298 299 300 301 302
config WR_DIAG
	depends on WR_NODE
	boolean "Write of WRPC diagnostics to dedicated WB registers"
	default n
	help
	  This is a software part of new (additional) diagnostics for WR PTP
	  Core. It allows to access diagnostics values through WB registers
	  (e.g. PCI bus). It allows the host machine (of SPEC/SVEC/etc.) to
	  easily access information about the health of WR PTP Core.

	  Please note that other option to access the status of WRPC, which
	  is direct access to the WRPC's memory does not provide any mechanism
	  to ensure the data consistency.

303
config WR_NODE_SIM
304
	depends on WR_NODE && !HOST_PROCESS
305 306 307 308 309 310 311 312 313
	boolean "Build simple software for test of WR PTP Core in simulation"
	default n
	help
	  This option builds binary that is meant to be used in testbench
	  simulations. It initializes only simulation-needed essentials.
	  All the initialization that is time-consuming and unnecessary
	  is avoided. The main function sends min-size frames to PTP
	  MAC address destination and expects the simulation to return
	  these frames.
314 315

config ABSCAL
Grzegorz Daniluk's avatar
Grzegorz Daniluk committed
316
  depends on WR_NODE
317 318 319 320 321 322 323
	default y
	boolean "Support absolute calibration"
	help
	  If you select this, you'll be able to do absolute calibration
	  using a loop-back SFP adapter, according to the procedure
	  described and documented by Peter Jansweijer.

324
config LLDP
325
	depends on WR_NODE && IP
326 327 328 329 330 331 332
	boolean "Include LLDP protocol transmit-only"
	default n
	help
	  This enable LLDP support. LLDP is a vendor-neutral link layer protocol 
	  used by network devices for advertising their identity, capabilities, 
	  and neighbors on local area network.

333 334 335 336
#
# This is a set of configuration options that should not be changed by
# normal users. If the "developer" menu is used, the binary is tainted.

337

338 339
comment "wrpc-sw is tainted if you change the following options"
config DEVELOPER
340
	depends on WR_NODE
341 342 343 344 345 346 347
	bool "Advanced configurations, only for developers"
	help
	  The following options are new features under testing, or
	  special customizations not normally useful for people not
	  directly working on this package.  Please don't use unless
	  you are a developer of wrpc-sw.

348
config PPSI_FORCE_CONFIG
349
	depends on DEVELOPER
350 351 352 353 354 355 356 357
	bool "Reconfigure ppsi from wrpc-sw at every build"
	default y
	help
	  If you are playing with custom ppsi configurations, please
	  disable this. Otherwise the option allows wrpc-sw to always
	  reconfigura ppsi, so if you change from end-to-end to
	  peer-to-peer here, the change is propagated to the ppsi build.

358
config HOST_PROCESS
359
	depends on DEVELOPER
360 361 362
	boolean "Build as a host process, to develop/debug network"

config RAMSIZE
363
	depends on DEVELOPER && LM32
364 365 366 367 368 369 370
	int "Size of the RAM in the FPGA for this program"
	default 90112
	help
	  The usual configuration for wrpc-sw is 0x16000 bytes
	  (i.e. 88kB = 90112 bytes) but if your project has less or
	  more features you may want to adjust the FPGA size and
	  choose your preferred value here.
Aurelio Colosimo's avatar
Aurelio Colosimo committed
371

372
config STACKSIZE
373
	depends on DEVELOPER && LM32
374 375 376 377 378 379
	int "Size of the stack area needed by this program"
	default 2048
	help
	  The linker complains if the code doesn't fit into RAM, but
	  we must also consider the stack, or the program will crash
	  at run time. (However, we have a detector for overflows).
380

381
config PRINT_BUFSIZE
382
	depends on DEVELOPER
383 384 385 386 387 388 389
	int "Size for the temporary output string of pp_printf"
	default 128
	help
	  This buffer is constant storage (i.e. wasted space), but it
	  also constraints the maximum lenght of text that can be written
	  in a single call to printf.

390
config TEMP_POLL_INTERVAL
391
	depends on DEVELOPER
392 393
	int "Poll interval, in seconds, for temperature sensors"

394
config TEMP_HIGH_THRESHOLD
395
	depends on DEVELOPER && SYSLOG
396 397 398
	int "Threshold for temperature: tell syslog if higher"

config TEMP_HIGH_RAPPEL
399
	depends on DEVELOPER && SYSLOG
400 401
	int "Remember over-temperature every that many seconds"

402
config CMD_LL
403
	depends on DEVELOPER && LM32
404 405 406 407 408 409 410 411
	bool "Build low-level commands for development/testing"
	help
	  This enables low-level commands: "devmem" to read/write memory
	  and "delays" to read/write the constant delays in this device.
	  Please note that the delays have no immediate effect when set
	  on the master, because they are just sent to the slave
	  during the initial handshake

412 413 414 415 416 417 418 419
config DAC_LOG
	depends on DEVELOPER && EMBEDDED_NODE
	bool "Be able send DAC values through UDP"
	help
	  If you want to see the dac output, input to the VCXO main
	  oscillator, enable this. You'll have a "daclog" shell command
	  to set ipaddress and mac of the target host. UDP port is 1050.

420
config FLASH_INIT
421
	depends on DEVELOPER && LM32
422 423 424
	default y
	boolean "Read init commands from flash storage"

425
# CHECK_RESET for switch and node
426
config CHECK_RESET
427
	depends on DEVELOPER && LM32 || WR_SWITCH
428 429 430 431 432 433
	bool "Print a stack trace if reset happens"
	help
	  If the CPU is following a NULL pointer, the program will
	  be restarted. If this option is activated, the main function
	  detects that it is re-executed and dumps a stack trace; it
	  then clears the stack (for next time) and restarts again.
434

435
config SPLL_FIFO_LOG
436
	depends on DEVELOPER && LM32
437 438 439 440 441 442 443
	bool "Add a circular buffer for spll logging, used by tools/wrpc-dump"
	help
	  This option addrs 256 bytes to the wrpc bynary, to log
	  the DDMTD tags read from the fifos, the interrupts and the
	  related timing.  The information is shown by tools/wrpc-dump
	  if present, no change/rebuild of the tool is needed.

444 445
choice
	prompt "Implementation of pp_printf"
446
	depends on DEVELOPER
447

448
config PRINTF_IS_XINT
449 450 451 452 453 454
	bool "hex-and-int"
	help
	  This selects a printf that can only print decimal and hex
	  numbers, without obeying the format modifiers. %c and %s are
	  supported too, and %p is equivalent to %x.
	  See pp_printf/README for details.
455

456
config PRINTF_IS_FULL
457
	bool "full"
458 459 460 461 462 463
	help
	  This selects an implementation that supports all standard
	  formats with modifiers, like "%08X" and "%.5s". It costs
	  around 2k of compiled code more than XINT.
	  See pp_printf/README for details.

464
config PRINTF_IS_MINI
465
	bool "minimal"
466 467 468 469 470 471
	help
	  This selects a printf that prints all integers as hex,
	  without obeying the format modifiers. %c and %s are
	  supported too. See pp_printf/README for details.
	  This is not probably what you want for wrpc-sw.

472
config PRINTF_IS_NONE
473
	bool "empty"
474 475 476 477 478 479
	help
	  This selects a printf that prints the format string
	  alone and ignores all further arguments. Minimal size,
	  but not suited for wrpc-sw. See pp_printf/README for details.
endchoice

480
config ASSERT
481 482 483
	bool "Build assertion checks in the code"
	depends on DEVELOPER
	default y
484 485 486 487 488
	help
	  Build assertions in the code, to catch unexpected situations.
	  When an assertion fails the code loops over repeating the
	  error message every second. OTOH, panic() is always built,
	  with no Kconfig -- and it does the same, unconditionally.
489

490
config DETERMINISTIC_BINARY
491
	depends on DEVELOPER || WR_SWITCH
492
	boolean "Build a binary that is the same every time"
493
	help
494 495 496 497 498 499 500 501
	  This option is used to #ifdef __DATE__ and __TIME__ strings
	  out of the compiled WRC binary. If you set it you'll get the
	  same binary bit-by-bit at each rebuild.  I am using this
	  option to hack the build procedure and use a simple "diff"
	  between the old and new output to verify I didn't introduce
	  changes.

	  If in doubt, say No.
502

503
config NET_VERBOSE
504
	depends on DEVELOPER
505 506 507 508 509
	boolean "Extra verbose messages for networking"
	help
	  This is mainly a debug tool, to be left off unless you hack
	  in the network subsystem.

510 511 512 513
config PLL_VERBOSE
	depends on DEVELOPER
	boolean "Verbose messages in softpll"
	help
514
	  Outputs additional debugging messages in the softpll. Off by default.
515

516 517 518 519 520 521
config PFILTER_VERBOSE
	depends on DEVELOPER
	boolean "Verbose messages in packet filter setup"
	help
	  A debug tool for people changing the packet filter rules

522
config WRC_VERBOSE
523
	depends on DEVELOPER || WR_SWITCH
524 525 526 527 528
	boolean "More verbose messages in wr core"
	default y if WR_SWITCH
	help
	  This enables some more diagnostic messages. Normally off.

Adam Wujek's avatar
Adam Wujek committed
529 530 531 532 533 534
config SNMP_VERBOSE
	depends on DEVELOPER && SNMP
	boolean "More verbose messages in SNMP"
	help
	  This enables some more diagnostic messages. Normally off.

535
config FAKE_TEMPERATURES
536
	depends on DEVELOPER
537 538 539 540 541
	boolean "Offer an array of 3 fake temperatures, for testing"
	help
	  The option adds also a "faketemp" command, used to set
	  the fake temperatures: e.g. "faketemp 120 -10 50"

542
config LATENCY_PROBE
543
	depends on DEVELOPER
544 545 546 547 548 549 550 551 552 553 554 555
	bool "Build the latency probe mechanism (send/recv)"
	help
	  The latency prober sends two frames to broadcast and
	  then the timestamp of their departure time. The receiver
	  measures the network latency and reports it.

	  If this option is set, the receiver is always running. The
	  sender is built but must be activated by the latency shell cmd.

config LATENCY_ETHTYPE
	depends on LATENCY_PROBE
	int "Ethtype to use for latency probing"
556 557 558 559
	default 291
	help
	  Ethertypes 0x0101-0x01ff are marked as "experimental", apparently.
	  So 0x0123 (291)is a good default, but please pick yours.
560

561 562 563 564 565
config LATENCY_SYSLOG
	depends on LATENCY_PROBE && SYSLOG
	bool "Report latency problems to syslog"
	default y

566 567 568 569 570 571 572 573 574 575 576 577
config DEFAULT_PRINT_TASK_TIME_THRESHOLD
        depends on DEVELOPER
        default 0
        int "Default threshold of printing task execution time"
        help
          If a task executes longer than a given number, its name and
          an execution time will be printed to the console. Additionally,
          setting this value triggers printing messages if particular task
          runs longer than ever before. Setting to 0 disabled this
          functionality. This value can be changed in run-time by the command
          "ps max <msecs>".

578

579 580 581 582 583 584 585
# This is needed to size the pp_instance data strucuture. Instead of
# including the ppsi autoconf.h, with duplicate definitions, define it
# here, as we know what the value is
config VLAN_ARRAY_SIZE
	int
	default 1

586
# CONFIG_WR_NODE
587

588 589 590 591 592 593 594
################# helper configuration items #############
config PRINTF_XINT
	boolean
	default PRINTF_IS_XINT if (DEVELOPER && WR_NODE)
	default y

config PRINTF_FULL
595 596
	boolean
	default PRINTF_IS_FULL
597 598

config PRINTF_MINI
599 600
	boolean
	default PRINTF_IS_MINI
601 602

config PRINTF_NONE
603 604
	boolean
	default PRINTF_IS_NONE
605 606 607 608 609 610

config PPSI
	depends on WR_NODE
	boolean
	help
	  Select this option for the ppsi engine (now only option)