1## SPDX-License-Identifier: GPL-2.0-only 2 3## 4## 5## Copyright (C) 2008 Advanced Micro Devices, Inc. 6## Copyright (C) 2008 coresystems GmbH 7## 8## Redistribution and use in source and binary forms, with or without 9## modification, are permitted provided that the following conditions 10## are met: 11## 1. Redistributions of source code must retain the above copyright 12## notice, this list of conditions and the following disclaimer. 13## 2. Redistributions in binary form must reproduce the above copyright 14## notice, this list of conditions and the following disclaimer in the 15## documentation and/or other materials provided with the distribution. 16## 3. The name of the author may not be used to endorse or promote products 17## derived from this software without specific prior written permission. 18## 19## THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22## ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29## SUCH DAMAGE. 30## 31 32mainmenu "Libpayload Configuration" 33 34menu "Generic Options" 35 36config GPL 37 bool "GPLv2-licensed Options" 38 default y if CHROMEOS 39 default n 40 help 41 Prompt for options that will build code licensed under the GNU General 42 Public License (version 2). This will subject the whole payload to the 43 terms of this license (including its provision to release all sources, 44 please see the LICENSE_GPL file for details). 45 46config EXPERIMENTAL 47 bool "Experimental Options" 48 default n 49 help 50 Prompt for experimental functionality. Attention: This is not likely 51 to work without problems 52 53config DEVELOPER 54 bool "Developer Options" 55 default n 56 help 57 Prompt for developer options. These options are only interesting for 58 libpayload developers. 59 60config CHROMEOS 61 bool "ChromeOS Options" 62 default n 63 help 64 Select configuration defaults appropriate for ChromeOS boards. 65 66choice 67 prompt "Compiler to use" 68 default COMPILER_GCC 69 help 70 This option allows you to select the compiler. 71 72config COMPILER_GCC 73 bool "GCC" 74 help 75 Use the GNU Compiler Collection (GCC). 76 77config COMPILER_LLVM_CLANG 78 bool "LLVM/clang" 79 help 80 Use LLVM/clang. 81 82endchoice 83 84config LTO 85 bool "Use link time optimization (LTO)" 86 default n 87 depends on COMPILER_GCC 88 help 89 Compile with link time optimization. This can often decrease the 90 final binary size, but may increase compilation time. 91 92config REMOTEGDB 93 bool "Remote GDB stub" 94 default n 95 depends on GPL 96 help 97 Enable Remote GDB debugging support. 98 99config MEMMAP_RAM_ONLY 100 bool "Only consider RAM entries in memory map for further processing" 101 default n 102 103endmenu 104 105menu "Architecture Options" 106 107choice 108 prompt "Target Architecture" 109 default ARCH_X86_32 110 111config ARCH_ARM 112 bool "ARM" 113 help 114 Support the ARM architecture 115 116config ARCH_X86_32 117 bool "x86_32" 118 help 119 Support the x86_32 architecture 120 121config ARCH_X86_64 122 bool "x86_64" 123 help 124 Support the x86_64 architecture 125 126config ARCH_ARM64 127 bool "ARM64" 128 help 129 Support the ARM64 architecture 130 131config ARCH_MOCK 132 bool "Mock architecture (for unit tests)" 133 help 134 This enables the mock architecture (for unit tests) that is intended 135 to be used for testing purposes, to either test payloads or libpayload itself. 136 It provides necessary headers, but requires mocking (providing implementation 137 for) arch-specific functions. 138 139endchoice 140 141config ARCH_X86 142 bool 143 default y if ARCH_X86_32 || ARCH_X86_64 144 help 145 Support the x86 architecture 146 147config MULTIBOOT 148 bool "Multiboot header support" 149 depends on ARCH_X86 150 default y if !CHROMEOS 151 152config HEAP_SIZE 153 int "Heap size" 154 default 131072 155 help 156 This is the heap size (malloc'able size) available 157 to the payload. 158 159 If unsure, set to 131072 (128K) 160 161config STACK_SIZE 162 int "Stack size" 163 default 16384 164 help 165 This is the stack size available to the payload. 166 167 If unsure, set to 16384 (16K) 168 169config BASE_ADDRESS 170 hex "Base address" 171 default 0x04000000 if ARCH_ARM 172 default 0x80100000 if ARCH_ARM64 173 default 0x00100000 if ARCH_X86 174 default 0x00000000 if ARCH_MOCK 175 help 176 This is the base address for the payload. 177 178 If unsure, set to 0x00100000 on x86, 179 0x04000000 on ARM or 0x80100000 on ARM64. 180 181endmenu 182 183menu "Standard Libraries" 184 185config LIBC 186 bool "Enable C library support" 187 default y 188 189config CURSES 190 bool "Build a curses library" 191 default y if !CHROMEOS 192 193choice 194 prompt "Curses implementation" 195 default PDCURSES 196 depends on CURSES 197 198config TINYCURSES 199 bool "TinyCurses" 200 help 201 TinyCurses was the first curses implementation for libpayload. 202 It features low memory consumption, static allocation of larger 203 data structures (so few or no memory allocation calls) and a 204 reduced feature set. 205 206config PDCURSES 207 bool "PDCurses" 208 help 209 libpayload's PDCurses port provides a full features curses 210 implementation, including libpanel, libmenu and libform (which 211 are taken from ncurses). 212 It requires more system resources, in particularily heap memory. 213 214endchoice 215 216source "libcbfs/Kconfig" 217 218config LZMA 219 bool "LZMA decoder" 220 default y 221 help 222 LZMA decoder implementation, usable eg. by CBFS, 223 but also externally. 224 225config LZ4 226 bool "LZ4 decoder" 227 default y 228 help 229 Decoder implementation for the LZ4 compression algorithm. 230 Adds standalone functions (CBFS support coming soon). 231 232source "vboot/Kconfig" 233 234endmenu 235 236menu "Console Options" 237 238config SKIP_CONSOLE_INIT 239 bool "Skip initializing the consoles at startup" 240 default y if CHROMEOS 241 default n 242 help 243 Normally, libpayload will initialize console input/output on startup 244 before the payload itself gets control. This option disables that 245 behavior and leaves console initialization up to the payload. 246 247config CBMEM_CONSOLE 248 bool "Send output to the in memory CBMEM console" 249 default y 250 251config SERIAL_CONSOLE 252 bool "See output on the serial port console" 253 default y 254 255config 8250_SERIAL_CONSOLE 256 bool "8250-compatible serial port driver (including IO and MMIO)" 257 depends on SERIAL_CONSOLE 258 default y if ARCH_X86 259 260config S5P_SERIAL_CONSOLE 261 bool "Exynos SOC, S5P compatible serial port driver" 262 depends on SERIAL_CONSOLE 263 default n 264 265config IPQ806X_SERIAL_CONSOLE 266 bool "IPQ806x SOC compatible serial port driver" 267 depends on SERIAL_CONSOLE 268 default n 269 270config IPQ40XX_SERIAL_CONSOLE 271 bool "IPQ40xx SOC compatible serial port driver" 272 depends on SERIAL_CONSOLE 273 default n 274 275config QCS405_SERIAL_CONSOLE 276 bool "QCS405 SOC compatible serial port driver" 277 depends on SERIAL_CONSOLE 278 default n 279 280config QUALCOMM_QUPV3_SERIAL_CONSOLE 281 bool "Qualcomm QUPV3 serial port driver" 282 depends on SERIAL_CONSOLE 283 default n 284 285config PL011_SERIAL_CONSOLE 286 bool "PL011 compatible serial port driver" 287 depends on 8250_SERIAL_CONSOLE 288 default n 289 290config SERIAL_IOBASE 291 ## This default is currently not used on non-x86 systems. 292 hex "Default I/O base for the serial port (default 0x3f8)" 293 depends on SERIAL_CONSOLE && ARCH_X86 294 default 0x3f8 295 296config SERIAL_SET_SPEED 297 bool "Override the serial console baud rate" 298 default n 299 depends on SERIAL_CONSOLE 300 301config SERIAL_BAUD_RATE 302 int "Serial console baud rate (default 115200)" 303 depends on SERIAL_SET_SPEED 304 default 115200 305 306config SERIAL_ACS_FALLBACK 307 bool "Use plain ASCII characters for ACS" 308 default n 309 depends on SERIAL_CONSOLE 310 help 311 The alternate character set (ACS) is used for drawing lines and 312 displaying a couple of other special graphics characters. The 313 ACS characters generally look good on screen, but can be difficult 314 to cut and paste from a terminal window to a text editor. 315 316 Say 'y' here if you want to always use plain ASCII characters to 317 approximate the appearance of ACS characters on the serial port 318 console. 319 320config VIDEO_CONSOLE 321 bool "See output on a video console" 322 default y 323 324config VGA_VIDEO_CONSOLE 325 bool "VGA video console driver" 326 depends on ARCH_X86 && VIDEO_CONSOLE 327 default y if !CHROMEOS 328 329config GEODELX_VIDEO_CONSOLE 330 bool "Geode LX video console driver" 331 depends on ARCH_X86 && VIDEO_CONSOLE 332 default n 333 334config COREBOOT_VIDEO_CONSOLE 335 bool "coreboot video console driver" 336 depends on VIDEO_CONSOLE && !GEODELX_VIDEO_CONSOLE 337 default y if CHROMEOS 338 default n 339 help 340 Say Y here if coreboot switched to a graphics mode and 341 your payload wants to use it. 342 343config COREBOOT_VIDEO_CENTERED 344 bool "Center a classic 80x25 console on bigger screens" 345 depends on COREBOOT_VIDEO_CONSOLE 346 help 347 Say 'y' here if your payload is hardcoded to a 80x25 console. Otherwise 348 its output would look squeezed into the upper-left corner of the screen. 349 350config FONT_SCALE_FACTOR 351 int "Scale factor for the included font" 352 depends on GEODELX_VIDEO_CONSOLE || COREBOOT_VIDEO_CONSOLE 353 default 0 354 help 355 By default (value of 0), the scale factor is automatically 356 calculated to ensure at least 130 columns (when possible). 357 358config CBGFX_FAST_RESAMPLE 359 bool "CBGFX: use faster (less pretty) image scaling" 360 default n 361 help 362 When payloads use the CBGFX library to draw .BMPs on the screen, 363 they will be resampled with an anti-aliasing filter to scale to the 364 requested output size. The default implementation should normally be 365 fast enough, but if desired this option can make it about 50-100% 366 faster at the cost of quality. (It changes the 'a' parameter in the 367 Lanczos resampling algorithm from 3 to 2.) 368 369 Only affects .BMPs that aren't already provided at the right size. 370 371config PC_I8042 372 bool "A common PC i8042 driver" 373 default y if PC_KEYBOARD || PC_MOUSE 374 default n 375 help 376 To be used by PC_KEYBOARD and PC_MOUSE. 377 378config PC_MOUSE 379 bool "Allow input from a PC mouse" 380 default n if CHROMEOS 381 default y if ARCH_X86 # uses IO 382 default n 383 help 384 PS/2 mouse driver on top of PC_I8042. 385 386config PC_KEYBOARD 387 bool "Allow input from a PC keyboard" 388 default y if ARCH_X86 # uses IO 389 default n 390 391config PC_KEYBOARD_LAYOUT_US 392 bool "English (US) keyboard layout" 393 depends on PC_KEYBOARD 394 default y 395 396config PC_KEYBOARD_LAYOUT_DE 397 bool "German keyboard layout" 398 depends on PC_KEYBOARD 399 default n 400 401config PC_KEYBOARD_TRANSLATION 402 bool "Enable or Disable translation in PC keyboard set 2 on exit" 403 depends on PC_KEYBOARD 404 default y 405 406endmenu 407 408menu "Drivers" 409 410config PCI 411 bool "Support for PCI devices" 412 default y if ARCH_X86 413 default n 414 415config PCI_IO_OPS 416 bool "Support for PCI devices with port IO" 417 depends on PCI && IO_ADDRESS_SPACE 418 default y if ARCH_X86 419 default n 420 421config PCIE_MEDIATEK 422 bool "Support for PCIe devices on MediaTek platforms" 423 depends on PCI && !PCI_IO_OPS 424 default n 425 426config PCIE_QCOM 427 bool "Support for PCIe devices on Qualcomm platforms" 428 depends on PCI && !PCI_IO_OPS 429 default n 430 431config NVRAM 432 bool "Support for reading/writing NVRAM bytes" 433 depends on ARCH_X86 # for now 434 default y 435 436config MOUSE_CURSOR 437 bool "Support for mouse cursor handling" 438 default y if PC_MOUSE 439 default n 440 help 441 Provides a common interface for various mouse cursor drivers. 442 * Supports up to 32 buttons. 443 * Supports 3 axis mice. 444 * Applies simple cursor acceleration. 445 * Allows to set cursor acceleration and cursor speed. 446 447config RTC_PORT_EXTENDED_VIA 448 bool "Extended RTC ports are 0x74/0x75" 449 default n 450 help 451 For recent chipsets with 256 NVRAM bytes, you have to access the 452 upper 128 bytes (128-255) using two different I/O ports, 453 usually 0x72/0x73. 454 455 On some chipsets this can be a different set of ports, though. 456 The VIA VT8237R for example only recognizes the ports 0x74/0x75 457 for accessing the high 128 NVRAM bytes (as seems to be the case for 458 multiple VIA chipsets). 459 460 If you want to read or write CMOS bytes on computers with one of 461 these chipsets, say 'y' here. 462 463config SPEAKER 464 bool "Support for PC speaker" 465 depends on ARCH_X86 466 default y if !CHROMEOS 467 468source "drivers/timer/Kconfig" 469source "drivers/storage/Kconfig" 470source "drivers/usb/Kconfig" 471 472endmenu 473 474menu "Debugging" 475 depends on DEVELOPER 476 477config DEBUG_MALLOC 478 bool "Debug memory allocator" 479 default n 480 help 481 Select this option if you want to debug the memory allocator. This 482 option logs all uses of the following functions: 483 484 void free(void *ptr); 485 void *malloc(size_t size); 486 void *calloc(size_t nmemb, size_t size); 487 void *realloc(void *ptr, size_t size); 488 void *memalign(size_t align, size_t size); 489 490 Say N here unless you are debugging memory allocator problems. 491 492endmenu 493 494config BIG_ENDIAN 495 default n 496 bool 497 498config LITTLE_ENDIAN 499 default n 500 bool 501 502config IO_ADDRESS_SPACE 503 default n 504 bool 505 help 506 This option is turned on if the target system has a separate 507 IO address space. This is typically only the case on x86. 508 509source "arch/arm/Kconfig" 510source "arch/arm64/Kconfig" 511source "arch/x86/Kconfig" 512source "arch/mock/Kconfig" 513