diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000000..82ba6f0460 --- /dev/null +++ b/Kconfig @@ -0,0 +1,116 @@ +mainmenu "Tiny Mountain Build Options" + +source "kernel/Kconfig" + +source "misc/Kconfig" + +source "arch/Kconfig" + +menu "Debugging Options" + +config STDOUT_CONSOLE + bool + prompt "Send stdout to console" + default n + help + This option directs standard output (e.g. printf) to the console + device, rather than suppressing in entirely. + +config ASSERT + bool + prompt "Enable __ASSERT() macro" + default n + help + This enables the __ASSERT() macro in the kernel code. If an assertion + fails, the calling thread is put on an infinite tight loop. Since + enabling this adds a significant footprint, it should only be enabled + in a non-production system. + +config ASSERT_LEVEL + int + prompt "__ASSERT() level" + default 1 + depends on ASSERT + help + This option specifies the assertion level used by the __ASSERT() + macro. It can be set to one of three possible values: + + Level 0: off + Level 1: on + warning in every file that includes __assert.h + Level 2: on + no warning + +endmenu + +menu "System Monitoring Options" + +config BOOT_TIME_MEASUREMENT + bool + prompt "Boot time measurements [EXPERIMENTAL]" + default n + depends on EXPERIMENTAL + help + This option enables the recording of timestamps during system start + up. The global variable __start_tsc records the time TiMo begins + executing, while __main_tsc records when main() begins executing, + and __idle_tsc records when the CPU becomes idle. All values are + recorded in terms of CPU clock cycles since system reset. + +config CPU_CLOCK_FREQ_MHZ + int + prompt "CPU CLock Frequency in MHz" + default 20 + depends on BOOT_TIME_MEASUREMENT + help + This option specifies the CPU Clock Frequency in MHz in order to + convert Intel RDTSC timestamp to microseconds. + +endmenu + +menu "Compile and Link Features" + +config COMPILER_OPT + string + prompt "Custom compiler options" + default "" + help + This option is a free-form string that is passed to the compiler + when building all parts of a project (i.e. kernel, LKMs, and USAPs). + The compiler options specified by this string supplement the + pre-defined set of compiler supplied by the TiMo build system, + and can be used to change compiler optimization, warning and error + messages, and so on. + + A given LKM or USAP can override this setting by means of the + OVERRIDE_COMPILER_OPT make variable in its Makefile. + +config SECTION_GARBAGE_COLLECTION + bool + prompt "ELF section garbage collection" + default y + help + This option enables the compiler to place each function and data + item into its own ELF section, which then allows the linker to + discard any sections that are not directly referenced. Enabling + this option should significantly reduce the final image size, + especially in situations when only a relatively few number of + APIs in the object modules are actually referenced. + + Certain host tools expect the presence of various symbols in + the ELF image, regardless of image configuration or composition. + Enabling this option may cause these host tools to end abnormally + if the expected symbols have been discarded. + +endmenu + +source "drivers/Kconfig" + +config EXPERIMENTAL + bool + prompt "Experimental Options" + default n + help + This option enables all experimental options in the project. + If it is disabled, all options marked as EXPERIMENTAL will + be disabled. + If it is enabled, all options marked as EXPERIMENTAL will + be available for selection.