b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
| 2 | # |
| 3 | # Copyright (C) 2006-2013 OpenWrt.org |
| 4 | # Copyright (C) 2016 LEDE Project |
| 5 | |
| 6 | config EXPERIMENTAL |
| 7 | bool "Enable experimental features by default" |
| 8 | help |
| 9 | Set this option to build with latest bleeding edge features |
| 10 | which may or may not work as expected. |
| 11 | If you would like to help the development of OpenWrt, you are |
| 12 | encouraged to set this option and provide feedback (both |
| 13 | positive and negative). But do so only if you know how to |
| 14 | recover your device in case of flashing potentially non-working |
| 15 | firmware. |
| 16 | |
| 17 | If you plan to use this build in production, say NO! |
| 18 | |
| 19 | menu "Global build settings" |
b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 20 | config MBTK_BUILD_PROJECT |
| 21 | string |
| 22 | prompt "MBTK Build Project" |
| 23 | default "T108" |
| 24 | help |
| 25 | MBTK Build Project : T108/L508/L509/L508_X6 |
| 26 | |
| 27 | config MBTK_ADB_SEC_SUPPORT |
| 28 | bool "Config support for MBTK ADB sec." |
| 29 | default n |
b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 30 | |
b.liu | b17525e | 2025-05-14 17:22:29 +0800 | [diff] [blame] | 31 | config MBTK_DRIVERS |
| 32 | bool "Config MBTK interface driver for ASR 1803/1806" |
| 33 | depends on TARGET_mmp_asr1803 || TARGET_mmp_asr1806 |
| 34 | default y |
| 35 | select KERNEL_MISC_MBTK_PLAT_IRQ |
| 36 | select KERNEL_MISC_MBTK_SDH |
| 37 | select KERNEL_AIC_WLAN_SUPPORT |
| 38 | select KERNEL_AIC8800_WLAN_SUPPORT |
| 39 | select KERNEL_AIC8800_BTLPM_SUPPORT |
| 40 | select KERNEL_AIC_FW_PATH |
| 41 | select PACKAGE_kmod-cfg80211 |
| 42 | select PACKAGE_kmod-lib80211 |
| 43 | select PACKAGE_kmod-mac80211 |
| 44 | |
| 45 | |
| 46 | config CUSTOMER_DRIVERS |
| 47 | bool "Config Customer customization driver for ASR1803/1806" |
| 48 | depends on TARGET_mmp_asr1803 || TARGET_mmp_asr1806 |
| 49 | default n |
| 50 | select KERNEL_MFD_TAS5431_AMPLIFIER |
| 51 | select KERNEL_MISC_CUSTOMER_POWER_CTRL |
| 52 | |
b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 53 | config MPIPE_SHARE_NETWORK |
| 54 | bool "Config support internal access to the internet in pipe mode" |
| 55 | help |
| 56 | Not support large packets, i.e. fragment packet, need to control the packet |
| 57 | length to be less than MTU(default 1500). |
| 58 | default n |
| 59 | |
| 60 | config IPV6_POLICY_ROUTING |
| 61 | bool "Support configure IPv6 policy routes in dnsmasq" |
| 62 | help |
| 63 | Only works in MIFI mode and supports multiple PDN. |
| 64 | default n |
| 65 | |
| 66 | config SPI_LCD |
| 67 | bool "Config SPI interface driver for LCD" |
| 68 | default n |
| 69 | select KERNEL_FB |
| 70 | select KERNEL_FB_SPI_LCD |
| 71 | |
| 72 | config LCDC_SPI |
| 73 | bool "Config LCDC SPI interface driver for ASR 190x/1806" |
| 74 | depends on TARGET_mmp_asr1901 || TARGET_mmp_asr1903 || TARGET_mmp_asr1906 || TARGET_mmp_asr1806 |
| 75 | default n |
| 76 | select KERNEL_FB |
| 77 | select KERNEL_FB_ASR |
| 78 | select KERNEL_FB_ASR_SPI |
| 79 | |
| 80 | config LCDC_MCU |
| 81 | bool "Config LCDC MCU interface driver for ASR 190x/1806" |
| 82 | depends on TARGET_mmp_asr1901 || TARGET_mmp_asr1903 || TARGET_mmp_asr1906 || TARGET_mmp_asr1806 |
| 83 | default n |
| 84 | select KERNEL_FB |
| 85 | select KERNEL_FB_ASR |
| 86 | select KERNEL_FB_ASR_MCU |
| 87 | |
| 88 | config LCDC_MIPI |
| 89 | bool "Config LCDC MIPI interface driver for ASR 1806/1903" |
| 90 | depends on TARGET_mmp_asr1806 || TARGET_mmp_asr1903 |
| 91 | default n |
| 92 | select KERNEL_FB |
| 93 | select KERNEL_FB_ASR |
| 94 | select KERNEL_FB_ASR_MIPI |
| 95 | |
| 96 | config POSE |
| 97 | bool "Config support for POS-E" |
| 98 | depends on TARGET_mmp_asr1806_FACT301 |
| 99 | default n |
| 100 | select PACKAGE_camera |
| 101 | select PACKAGE_evtest |
| 102 | select PACKAGE_tslib |
| 103 | select KERNEL_POSE |
| 104 | select LCDC_MIPI |
| 105 | select KERNEL_PWM |
| 106 | select KERNEL_PWM_PXA |
| 107 | select KERNEL_PWM_SYSFS |
| 108 | select KERNEL_BACKLIGHT_CLASS_DEVICE |
| 109 | select KERNEL_BACKLIGHT_PWM |
| 110 | select KERNEL_INPUT_TOUCHSCREEN |
| 111 | select KERNEL_TOUCHSCREEN_PROPERTIES |
| 112 | select KERNEL_TOUCHSCREEN_EDT_FT5X06 |
| 113 | select CAMERA |
| 114 | help |
| 115 | This includes LCD and CAMERA functions, in addition to wifi and eth are |
| 116 | also support. |
| 117 | |
| 118 | config POSL |
| 119 | bool "Config support for POS-L" |
| 120 | depends on TARGET_mmp_asr1806_FACT301 |
| 121 | default n |
| 122 | select PACKAGE_camera |
| 123 | select PACKAGE_evtest |
| 124 | select PACKAGE_tslib |
| 125 | select KERNEL_POSL |
| 126 | select LCDC_SPI |
| 127 | select KERNEL_PWM |
| 128 | select KERNEL_PWM_PXA |
| 129 | select KERNEL_PWM_SYSFS |
| 130 | select KERNEL_BACKLIGHT_CLASS_DEVICE |
| 131 | select KERNEL_BACKLIGHT_PWM |
| 132 | select KERNEL_INPUT_TOUCHSCREEN |
| 133 | select KERNEL_TOUCHSCREEN_PROPERTIES |
| 134 | select KERNEL_TOUCHSCREEN_ASR_TSC |
| 135 | select CAMERA |
| 136 | help |
| 137 | This includes LCD and camera functions, in addition to wifi support. |
| 138 | |
| 139 | config AB_SYSTEM |
| 140 | bool "Config support for A/B system" |
| 141 | default n |
| 142 | select KERNEL_AB_SYSTEM |
| 143 | |
| 144 | config ASR_SDTIM |
| 145 | bool "Config support for Single DTIM" |
| 146 | default n |
| 147 | select KERNEL_ASR_SDTIM |
| 148 | |
| 149 | config SEC |
| 150 | bool "All-in-one config support for security features" |
| 151 | default n |
| 152 | select TEE_OS |
| 153 | select SELINUX |
| 154 | select SECURE_DM |
| 155 | |
| 156 | config TEE_OS |
| 157 | bool "Config support for TEE OS" |
| 158 | default n |
| 159 | select KERNEL_TEE |
| 160 | select KERNEL_OPTEE |
| 161 | select KERNEL_ASR_OPTEE_VIRTUAL_UART |
| 162 | select KERNEL_ASR_OPTEE_LOG_LEVEL |
| 163 | select PACKAGE_optee_client |
| 164 | select PACKAGE_optee_app |
| 165 | select HWRANDOM |
| 166 | select CIPHER_TEST |
| 167 | select SECURE_STORAGE |
| 168 | select ACIPHER_TEST |
| 169 | select KEY_TEST |
| 170 | |
| 171 | config LIB_ATPS |
| 172 | bool "Config support libatps(asr trust platform services lib)" |
| 173 | default n |
| 174 | select KERNEL_CRYPTO |
| 175 | select KERNEL_CRYPTO_USER_API |
| 176 | select KERNEL_CRYPTO_USER_API_SKCIPHER |
| 177 | select KERNEL_CRYPTO_USER_API_HASH |
| 178 | select KERNEL_CONFIG_CRYPTO_RSA |
| 179 | select HARDWARE_AES_ENGINE |
| 180 | |
| 181 | config HARDWARE_AES_ENGINE |
| 182 | bool "Config support hardware AES engine" |
| 183 | default n |
| 184 | |
| 185 | config SECURE_DM |
| 186 | bool "Config support for dm device and select dm-verity by default" |
| 187 | select KERNEL_MD |
| 188 | select KERNEL_BLK_DEV_DM |
| 189 | select KERNEL_DM_VERITY |
| 190 | select KERNEL_DM_INIT |
| 191 | select KERNEL_DM_USER |
| 192 | depends on TARGET_ROOTFS_SQUASHFS |
| 193 | |
| 194 | config SECURE_DM_CRYPT |
| 195 | bool "Config support for dm-crypt" |
| 196 | depends on SECURE_DM |
| 197 | default n |
| 198 | select KERNEL_DM_CRYPT |
| 199 | |
| 200 | config SECURE_IMA |
| 201 | bool "Config support for IMA enable" |
| 202 | default n |
| 203 | select KERNEL_SECURITY |
| 204 | select KERNEL_UBIFS_FS_SECURITY |
| 205 | select KERNEL_INTEGRITY |
| 206 | select KERNEL_IMA |
| 207 | select KERNEL_IMA_APPRAISE |
| 208 | select KERNEL_IMA_APPRAISE_BOOTPARAM |
| 209 | select TARGET_ROOTFS_INITRAMFS |
| 210 | select KERNEL_SIGNATURE |
| 211 | select KERNEL_INTEGRITY_SIGNATURE |
| 212 | select PACKAGE_libkeyutils |
| 213 | select PACKAGE_keyctl |
| 214 | select PACKAGE_libopenssl |
| 215 | select PACKAGE_ima-evm-utils |
| 216 | select KERNEL_EVM |
| 217 | select KERNEL_INTEGRITY_ASYMMETRIC_KEYS |
| 218 | select KERNEL_EVM_LOAD_X509 |
| 219 | select KERNEL_CRYPTO_RNG |
| 220 | select KERNEL_ENCRYPTED_KEYS |
| 221 | select KERNEL_TRUSTED_KEYS |
| 222 | select PACKAGE_attr |
| 223 | select KERNEL_AUDIT |
| 224 | select KERNEL_INTEGRITY_AUDIT |
| 225 | select KERNEL_STRICT_KERNEL_RWX |
| 226 | |
| 227 | config QSPINAND_64M |
| 228 | bool |
| 229 | prompt "Enable QSPI NAND 64M support" |
| 230 | default n |
| 231 | select KERNEL_QSPINAND_64M |
| 232 | help |
| 233 | Enable QSPI NAND 64M support. |
| 234 | |
| 235 | config MODULE_BUILDIN |
| 236 | bool |
| 237 | prompt "Enable Kernel modules buildin" |
| 238 | default n |
| 239 | help |
| 240 | Enable Enable Kernel modules buildin. |
| 241 | |
| 242 | config CAMERA |
| 243 | bool "Config Camera interface driver for ASR platform" |
| 244 | depends on TARGET_mmp_asr1806 || TARGET_mmp_asr1903 |
| 245 | default n |
| 246 | select KERNEL_ASR_CAMERA |
| 247 | select KERNEL_MEDIA_CAMERA_SUPPORT |
| 248 | |
| 249 | config UART_921600 |
| 250 | bool "Config support uart baudrate 921600" |
| 251 | default n |
| 252 | |
| 253 | config DAILY |
| 254 | bool "Enable experimental features for automatic daily builds" |
| 255 | default n |
| 256 | |
| 257 | config DSDS |
| 258 | bool "Config support for Dual SIM Dual Standby" |
| 259 | default n |
| 260 | select KERNEL_ASR_DSDS |
| 261 | |
| 262 | config JSON_OVERVIEW_IMAGE_INFO |
| 263 | bool "Create JSON info file overview per target" |
| 264 | default y |
| 265 | help |
| 266 | Create a JSON info file called profiles.json in the target |
| 267 | directory containing machine readable list of built profiles |
| 268 | and resulting images. |
| 269 | |
| 270 | config JSON_CYCLONEDX_SBOM |
| 271 | bool "Create CycloneDX SBOM JSON" |
| 272 | default BUILDBOT |
| 273 | help |
| 274 | Create a JSON files *.bom.cdx.json in the build |
| 275 | directory containing Software Bill Of Materials in CycloneDX |
| 276 | format. |
| 277 | |
| 278 | config ALL_NONSHARED |
| 279 | bool "Select all target specific packages by default" |
| 280 | select ALL_KMODS |
| 281 | default BUILDBOT |
| 282 | |
| 283 | config ALL_KMODS |
| 284 | bool "Select all kernel module packages by default" |
| 285 | |
| 286 | config ALL |
| 287 | bool "Select all userspace packages by default" |
| 288 | select ALL_KMODS |
| 289 | select ALL_NONSHARED |
| 290 | |
| 291 | config BUILDBOT |
| 292 | bool "Set build defaults for automatic builds (e.g. via buildbot)" |
| 293 | help |
| 294 | This option changes several defaults to be more suitable for |
| 295 | automatic builds. This includes the following changes: |
| 296 | - Deleting build directories after compiling (to save space) |
| 297 | - Enabling per-device rootfs support |
| 298 | ... |
| 299 | |
| 300 | config SIGNED_PACKAGES |
| 301 | bool "Cryptographically signed package lists" |
| 302 | default y |
| 303 | |
| 304 | config SIGNATURE_CHECK |
| 305 | bool "Enable signature checking in opkg" |
| 306 | default SIGNED_PACKAGES |
| 307 | |
| 308 | config DOWNLOAD_CHECK_CERTIFICATE |
| 309 | bool "Enable TLS certificate verification during package download" |
| 310 | default y |
| 311 | |
| 312 | config USE_APK |
| 313 | imply PACKAGE_apk-mbedtls |
| 314 | bool "Use APK instead of OPKG to build distribution (BROKEN)" |
| 315 | depends on BROKEN |
| 316 | |
| 317 | comment "General build options" |
| 318 | |
| 319 | config TESTING_KERNEL |
| 320 | bool "Use the testing kernel version" |
| 321 | depends on HAS_TESTING_KERNEL |
| 322 | default EXPERIMENTAL |
| 323 | help |
| 324 | If the target supports a newer kernel version than the default, |
| 325 | you can use this config option to enable it |
| 326 | |
| 327 | |
| 328 | config DISPLAY_SUPPORT |
| 329 | bool "Show packages that require graphics support (local or remote)" |
| 330 | |
| 331 | config BUILD_PATENTED |
| 332 | bool "Compile with support for patented functionality" |
| 333 | help |
| 334 | When this option is disabled, software which provides patented functionality |
| 335 | will not be built. In case software provides optional support for patented |
| 336 | functionality, this optional support will get disabled for this package. |
| 337 | |
| 338 | config BUILD_NLS |
| 339 | bool "Compile with full language support" |
| 340 | help |
| 341 | When this option is enabled, packages are built with the full versions of |
| 342 | iconv and GNU gettext instead of the default OpenWrt stubs. If uClibc is |
| 343 | used, it is also built with locale support. |
| 344 | |
| 345 | config SHADOW_PASSWORDS |
| 346 | bool |
| 347 | default y |
| 348 | |
| 349 | config CLEAN_IPKG |
| 350 | bool |
| 351 | prompt "Remove ipkg/opkg status data files in final images" |
| 352 | help |
| 353 | This removes all ipkg/opkg status data files from the target directory |
| 354 | before building the root filesystem. |
| 355 | |
| 356 | config IPK_FILES_CHECKSUMS |
| 357 | bool |
| 358 | prompt "Record files checksums in package metadata" |
| 359 | depends on !USE_APK |
| 360 | help |
| 361 | This makes file checksums part of package metadata. It increases size |
| 362 | but provides you with pkg_check command to check for flash corruptions. |
| 363 | |
| 364 | config INCLUDE_CONFIG |
| 365 | bool "Include build configuration in firmware" if DEVEL |
| 366 | help |
| 367 | If enabled, buildinfo files will be stored in /etc/build.* of firmware. |
| 368 | |
| 369 | config REPRODUCIBLE_DEBUG_INFO |
| 370 | bool "Make debug information reproducible" |
| 371 | default BUILDBOT |
| 372 | help |
| 373 | This strips the local build path out of debug information. This has the |
| 374 | advantage of making it reproducible, but the disadvantage of making local |
| 375 | debugging using ./scripts/remote-gdb harder, since the debug data will |
| 376 | no longer point to the full path on the build host. |
| 377 | |
| 378 | config COLLECT_KERNEL_DEBUG |
| 379 | bool |
| 380 | prompt "Collect kernel debug information" |
| 381 | select KERNEL_DEBUG_INFO |
| 382 | default BUILDBOT |
| 383 | help |
| 384 | This collects debugging symbols from the kernel and all compiled modules. |
| 385 | Useful for release builds, so that kernel issues can be debugged offline |
| 386 | later. |
| 387 | |
| 388 | menu "Kernel build options" |
| 389 | |
| 390 | source "config/Config-kernel.in" |
| 391 | |
| 392 | endmenu |
| 393 | |
| 394 | comment "Package build options" |
| 395 | |
| 396 | config DEBUG |
| 397 | bool |
| 398 | prompt "Compile packages with debugging info" |
| 399 | help |
| 400 | Adds -g3 to the CFLAGS. |
| 401 | |
| 402 | config USE_GC_SECTIONS |
| 403 | bool |
| 404 | prompt "Dead code and data elimination for all packages (EXPERIMENTAL)" |
| 405 | help |
| 406 | Places functions and data items into its own sections to use the linker's |
| 407 | garbage collection capabilites. |
| 408 | Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections |
| 409 | |
| 410 | config USE_LTO |
| 411 | bool |
| 412 | prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)" |
| 413 | help |
| 414 | Adds LTO flags to the CFLAGS and LDFLAGS. |
| 415 | Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto |
| 416 | |
| 417 | config MOLD |
| 418 | depends on (aarch64 || arm || i386 || i686 || m68k || powerpc || powerpc64 || sh4 || x86_64) |
| 419 | depends on !GCC_USE_VERSION_11 |
| 420 | def_bool $(shell, ./config/check-hostcxx.sh 10 2 12) |
| 421 | |
| 422 | config USE_MOLD |
| 423 | bool |
| 424 | prompt "Use the mold linker for all packages" |
| 425 | depends on MOLD |
| 426 | help |
| 427 | Link packages with mold, a modern linker |
| 428 | Packages can opt-out via setting PKG_BUILD_FLAGS:=no-mold |
| 429 | |
| 430 | config IPV6 |
| 431 | def_bool y |
| 432 | |
| 433 | comment "Stripping options" |
| 434 | |
| 435 | choice |
| 436 | prompt "Binary stripping method" |
| 437 | default USE_STRIP if USE_GLIBC |
| 438 | default USE_SSTRIP |
| 439 | help |
| 440 | Select the binary stripping method you wish to use. |
| 441 | |
| 442 | config NO_STRIP |
| 443 | bool "none" |
| 444 | help |
| 445 | This will install unstripped binaries (useful for native |
| 446 | compiling/debugging). |
| 447 | |
| 448 | config USE_STRIP |
| 449 | bool "strip" |
| 450 | help |
| 451 | This will install binaries stripped using strip from binutils. |
| 452 | |
| 453 | config USE_SSTRIP |
| 454 | bool "sstrip" |
| 455 | depends on !USE_GLIBC |
| 456 | help |
| 457 | This will install binaries stripped using sstrip. |
| 458 | endchoice |
| 459 | |
| 460 | config STRIP_ARGS |
| 461 | string |
| 462 | prompt "Strip arguments" |
| 463 | depends on USE_STRIP |
| 464 | default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG |
| 465 | default "--strip-all" |
| 466 | help |
| 467 | Specifies arguments passed to the strip command when stripping binaries. |
| 468 | |
| 469 | config SSTRIP_DISCARD_TRAILING_ZEROES |
| 470 | bool "Strip trailing zero bytes" |
| 471 | depends on USE_SSTRIP && !USE_MOLD |
| 472 | default y |
| 473 | help |
| 474 | Use sstrip's -z option to discard trailing zero bytes |
| 475 | |
| 476 | config STRIP_KERNEL_EXPORTS |
| 477 | bool "Strip unnecessary exports from the kernel image" |
| 478 | depends on !LINUX_6_6 |
| 479 | help |
| 480 | Reduces kernel size by stripping unused kernel exports from the kernel |
| 481 | image. Note that this might make the kernel incompatible with any kernel |
| 482 | modules that were not selected at the time the kernel image was created. |
| 483 | |
| 484 | config USE_MKLIBS |
| 485 | bool "Strip unnecessary functions from libraries" |
| 486 | help |
| 487 | Reduces libraries to only those functions that are necessary for using all |
| 488 | selected packages (including those selected as <M>). Note that this will |
| 489 | make the system libraries incompatible with most of the packages that are |
| 490 | not selected during the build process. |
| 491 | |
| 492 | choice |
| 493 | prompt "Preferred standard C++ library" |
| 494 | default USE_LIBSTDCXX if USE_GLIBC |
| 495 | default USE_UCLIBCXX |
| 496 | help |
| 497 | Select the preferred standard C++ library for all packages that support this. |
| 498 | |
| 499 | config USE_UCLIBCXX |
| 500 | bool "uClibc++" |
| 501 | |
| 502 | config USE_LIBSTDCXX |
| 503 | bool "libstdc++" |
| 504 | endchoice |
| 505 | |
| 506 | comment "Hardening build options" |
| 507 | |
| 508 | config PKG_CHECK_FORMAT_SECURITY |
| 509 | bool |
| 510 | prompt "Enable gcc format-security" |
| 511 | default y |
| 512 | help |
| 513 | Add -Wformat -Werror=format-security to the CFLAGS. You can disable |
| 514 | this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package |
| 515 | Makefile. |
| 516 | |
| 517 | choice |
| 518 | prompt "User space ASLR PIE compilation" |
| 519 | default PKG_ASLR_PIE_NONE if ((SMALL_FLASH || LOW_MEMORY_FOOTPRINT) && !SDK) |
| 520 | default PKG_ASLR_PIE_REGULAR |
| 521 | help |
| 522 | Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS. |
| 523 | This enables package build as Position Independent Executables (PIE) |
| 524 | to protect against "return-to-text" attacks. This belongs to the |
| 525 | feature of Address Space Layout Randomisation (ASLR), which is |
| 526 | implemented by the kernel and the ELF loader by randomising the |
| 527 | location of memory allocations. This makes memory addresses harder |
| 528 | to predict when an attacker is attempting a memory-corruption exploit. |
| 529 | You can disable this per package by adding PKG_ASLR_PIE:=0 in the package |
| 530 | Makefile. |
| 531 | Be ware that ASLR increases the binary size. |
| 532 | config PKG_ASLR_PIE_NONE |
| 533 | bool "None" |
| 534 | help |
| 535 | PIE is deactivated for all applications |
| 536 | config PKG_ASLR_PIE_REGULAR |
| 537 | bool "Regular" |
| 538 | help |
| 539 | PIE is activated for some binaries, mostly network exposed applications |
| 540 | config PKG_ASLR_PIE_ALL |
| 541 | bool "All" |
| 542 | select BUSYBOX_DEFAULT_PIE |
| 543 | help |
| 544 | PIE is activated for all applications |
| 545 | endchoice |
| 546 | |
| 547 | choice |
| 548 | prompt "User space Stack-Smashing Protection" |
| 549 | default PKG_CC_STACKPROTECTOR_REGULAR |
| 550 | help |
| 551 | Enable GCC Stack Smashing Protection (SSP) for userspace applications |
| 552 | config PKG_CC_STACKPROTECTOR_NONE |
| 553 | bool "None" |
| 554 | help |
| 555 | No stack smashing protection. |
| 556 | config PKG_CC_STACKPROTECTOR_REGULAR |
| 557 | bool "Regular" |
| 558 | help |
| 559 | Protects functions with vulnerable objects. |
| 560 | This includes functions with buffers larger than 8 bytes or calls to alloca. |
| 561 | config PKG_CC_STACKPROTECTOR_STRONG |
| 562 | bool "Strong" |
| 563 | help |
| 564 | Like Regular, but also protects functions with |
| 565 | local arrays or references to local frame addresses. |
| 566 | config PKG_CC_STACKPROTECTOR_ALL |
| 567 | bool "All" |
| 568 | help |
| 569 | Protects all functions. |
| 570 | endchoice |
| 571 | |
| 572 | choice |
| 573 | prompt "Kernel space Stack-Smashing Protection" |
| 574 | default KERNEL_CC_STACKPROTECTOR_REGULAR |
| 575 | help |
| 576 | Enable GCC Stack-Smashing Protection (SSP) for the kernel |
| 577 | config KERNEL_CC_STACKPROTECTOR_NONE |
| 578 | bool "None" |
| 579 | help |
| 580 | No stack smashing protection. |
| 581 | config KERNEL_CC_STACKPROTECTOR_REGULAR |
| 582 | bool "Regular" |
| 583 | help |
| 584 | Protects functions with vulnerable objects. |
| 585 | This includes functions with buffers larger than 8 bytes or calls to alloca. |
| 586 | config KERNEL_CC_STACKPROTECTOR_STRONG |
| 587 | bool "Strong" |
| 588 | help |
| 589 | Like Regular, but also protects functions with |
| 590 | local arrays or references to local frame addresses. |
| 591 | endchoice |
| 592 | |
| 593 | config KERNEL_STACKPROTECTOR |
| 594 | bool |
| 595 | default KERNEL_CC_STACKPROTECTOR_REGULAR || KERNEL_CC_STACKPROTECTOR_STRONG |
| 596 | |
| 597 | config KERNEL_STACKPROTECTOR_STRONG |
| 598 | bool |
| 599 | default KERNEL_CC_STACKPROTECTOR_STRONG |
| 600 | |
| 601 | choice |
| 602 | prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)" |
| 603 | default PKG_FORTIFY_SOURCE_1 |
| 604 | help |
| 605 | Enable the _FORTIFY_SOURCE macro which introduces additional |
| 606 | checks to detect buffer-overflows in the following standard library |
| 607 | functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy, |
| 608 | strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf, |
| 609 | gets. "Conservative" (_FORTIFY_SOURCE set to 1) only introduces |
| 610 | checks that shouldn't change the behavior of conforming programs, |
| 611 | while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is |
| 612 | added, but some conforming programs might fail. |
| 613 | config PKG_FORTIFY_SOURCE_NONE |
| 614 | bool "None" |
| 615 | config PKG_FORTIFY_SOURCE_1 |
| 616 | bool "Conservative" |
| 617 | config PKG_FORTIFY_SOURCE_2 |
| 618 | bool "Aggressive" |
| 619 | endchoice |
| 620 | |
| 621 | choice |
| 622 | prompt "Enable RELRO protection" |
| 623 | default PKG_RELRO_FULL |
| 624 | help |
| 625 | Enable a link-time protection known as RELRO (Relocation Read Only) |
| 626 | which helps to protect from certain type of exploitation techniques |
| 627 | altering the content of some ELF sections. "Partial" RELRO makes the |
| 628 | .dynamic section not writeable after initialization, introducing |
| 629 | almost no performance penalty, while "full" RELRO also marks the GOT |
| 630 | as read-only at the cost of initializing all of it at startup. |
| 631 | config PKG_RELRO_NONE |
| 632 | bool "None" |
| 633 | config PKG_RELRO_PARTIAL |
| 634 | bool "Partial" |
| 635 | config PKG_RELRO_FULL |
| 636 | bool "Full" |
| 637 | endchoice |
| 638 | |
| 639 | config TARGET_ROOTFS_SECURITY_LABELS |
| 640 | bool |
| 641 | select KERNEL_SQUASHFS_XATTR |
| 642 | select KERNEL_EXT4_FS_SECURITY |
| 643 | select KERNEL_F2FS_FS_SECURITY |
| 644 | select KERNEL_UBIFS_FS_SECURITY |
| 645 | select KERNEL_JFFS2_FS_SECURITY |
| 646 | |
| 647 | config SELINUX |
| 648 | bool "Enable SELinux" |
| 649 | select KERNEL_SECURITY_SELINUX |
| 650 | select TARGET_ROOTFS_SECURITY_LABELS |
| 651 | select PACKAGE_procd-selinux |
| 652 | select PACKAGE_busybox-selinux |
| 653 | help |
| 654 | This option enables SELinux kernel features, applies security labels |
| 655 | in squashfs rootfs and selects the selinux-variants of busybox and procd. |
| 656 | |
| 657 | Selecting this option results in about 0.5MiB of additional flash space |
| 658 | usage accounting for increased kernel and rootfs size. |
| 659 | |
| 660 | choice |
| 661 | prompt "default SELinux type" |
| 662 | depends on TARGET_ROOTFS_SECURITY_LABELS |
| 663 | default SELINUXTYPE_dssp |
| 664 | help |
| 665 | Select SELinux policy to be installed and used for applying rootfs labels. |
| 666 | |
| 667 | config SELINUXTYPE_targeted |
| 668 | bool "targeted" |
| 669 | select PACKAGE_refpolicy |
| 670 | help |
| 671 | SELinux Reference Policy (refpolicy) |
| 672 | |
| 673 | config SELINUXTYPE_dssp |
| 674 | bool "dssp" |
| 675 | select PACKAGE_selinux-policy-local |
| 676 | help |
| 677 | Defensec SELinux Security Policy -- OpenWrt edition |
| 678 | |
| 679 | endchoice |
| 680 | |
| 681 | config USE_SECCOMP |
| 682 | bool "Enable SECCOMP" |
| 683 | select KERNEL_SECCOMP |
| 684 | select PACKAGE_procd-seccomp |
| 685 | depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64) |
| 686 | depends on !TARGET_uml |
| 687 | default y |
| 688 | help |
| 689 | This option enables seccomp kernel features to safely |
| 690 | execute untrusted bytecode and selects the seccomp-variants |
| 691 | of procd |
| 692 | |
| 693 | endmenu |