3 mainmenu "Buildroot $BR2_VERSION Configuration"
5 config BR2_HAVE_DOT_CONFIG
11 option env="BR2_VERSION_FULL"
19 option env="BUILD_DIR"
21 # Hidden config symbols for packages to check system gcc version
22 config BR2_HOST_GCC_VERSION
24 option env="HOST_GCC_VERSION"
26 config BR2_HOST_GCC_AT_LEAST_4_5
28 default y if BR2_HOST_GCC_VERSION = "4 5"
30 config BR2_HOST_GCC_AT_LEAST_4_6
32 default y if BR2_HOST_GCC_VERSION = "4 6"
33 select BR2_HOST_GCC_AT_LEAST_4_5
35 config BR2_HOST_GCC_AT_LEAST_4_7
37 default y if BR2_HOST_GCC_VERSION = "4 7"
38 select BR2_HOST_GCC_AT_LEAST_4_6
40 config BR2_HOST_GCC_AT_LEAST_4_8
42 default y if BR2_HOST_GCC_VERSION = "4 8"
43 select BR2_HOST_GCC_AT_LEAST_4_7
45 config BR2_HOST_GCC_AT_LEAST_4_9
47 default y if BR2_HOST_GCC_VERSION = "4 9"
48 select BR2_HOST_GCC_AT_LEAST_4_8
50 config BR2_HOST_GCC_AT_LEAST_5
52 default y if BR2_HOST_GCC_VERSION = "5"
53 select BR2_HOST_GCC_AT_LEAST_4_9
55 config BR2_HOST_GCC_AT_LEAST_6
57 default y if BR2_HOST_GCC_VERSION = "6"
58 select BR2_HOST_GCC_AT_LEAST_5
60 config BR2_HOST_GCC_AT_LEAST_7
62 default y if BR2_HOST_GCC_VERSION = "7"
63 select BR2_HOST_GCC_AT_LEAST_6
65 # Hidden boolean selected by packages in need of Java in order to build
67 config BR2_NEEDS_HOST_JAVA
70 # Hidden boolean selected by packages in need of javac in order to build
71 # (example: classpath)
72 config BR2_NEEDS_HOST_JAVAC
75 # Hidden boolean selected by packages in need of jar in order to build
76 # (example: classpath)
77 config BR2_NEEDS_HOST_JAR
80 # Hidden boolean selected by pre-built packages for x86, when they
81 # need to run on x86-64 machines (example: pre-built external
82 # toolchains, binary tools like SAM-BA, etc.).
83 config BR2_HOSTARCH_NEEDS_IA32_LIBS
86 # Hidden boolean selected by packages that need to build 32 bits
87 # binaries with the host compiler, even on 64 bits build machines (e.g
89 config BR2_HOSTARCH_NEEDS_IA32_COMPILER
92 # Hidden boolean selected by packages that need the host to have an
94 config BR2_NEEDS_HOST_UTF8_LOCALE
97 source "arch/Config.in"
104 string "Wget command"
105 default "wget --passive-ftp -nd -t 3"
108 string "Subversion (svn) command"
112 string "Bazaar (bzr) command"
123 config BR2_LOCALFILES
124 string "Local files retrieval command"
128 string "Secure copy (scp) command"
132 string "Secure shell (ssh) command"
136 string "Mercurial (hg) command"
140 string "zcat command"
143 Command to be used to extract a gzip'ed file to stdout. zcat
144 is identical to gunzip -c except that the former may not be
145 available on your system.
146 Default is "gzip -d -c"
147 Other possible values include "gunzip -c" or "zcat".
150 string "bzcat command"
153 Command to be used to extract a bzip2'ed file to stdout.
154 bzcat is identical to bunzip2 -c except that the former may
155 not be available on your system.
157 Other possible values include "bunzip2 -c" or "bzip2 -d -c".
160 string "xzcat command"
163 Command to be used to extract a xz'ed file to stdout.
167 string "lzcat command"
170 Command to be used to extract a lzip'ed file to stdout.
171 Default is "lzip -d -c"
173 config BR2_TAR_OPTIONS
177 Options to pass to tar when extracting the sources.
178 E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
183 config BR2_DEFCONFIG_FROM_ENV
185 option env="BR2_DEFCONFIG"
188 string "Location to save buildroot config"
189 default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
190 default "$(CONFIG_DIR)/defconfig"
192 When running 'make savedefconfig', the defconfig file will be
193 saved in this location.
196 string "Download dir"
197 default "$(TOPDIR)/dl"
199 Directory to store all the source files that we need to fetch.
200 If the Linux shell environment has defined the BR2_DL_DIR
201 environment variable, then this overrides this configuration
204 The default is $(TOPDIR)/dl
208 default "$(BASE_DIR)/host"
210 Directory to store all the binary files that are built for the
211 host. This includes the cross compilation toolchain when
212 building the internal buildroot toolchain.
214 The default is $(BASE_DIR)/host
216 menu "Mirrors and Download locations"
218 config BR2_PRIMARY_SITE
219 string "Primary download site"
222 Primary site to download from. If this option is set then
223 buildroot will try to download package source first from this
224 site and try the default if the file is not found.
226 - URIs recognized by $(WGET)
227 - local URIs of the form file://absolutepath
228 - scp URIs of the form scp://[user@]host:path.
230 config BR2_PRIMARY_SITE_ONLY
231 bool "Only allow downloads from primary download site"
232 depends on BR2_PRIMARY_SITE != ""
234 If this option is enabled, downloads will only be attempted
235 from the primary download site. Other locations, like the
236 package's official download location or the backup download
237 site, will not be considered. Therefore, if the package is not
238 present on the primary site, the download fails.
240 This is useful for project developers who want to ensure that
241 the project can be built even if the upstream tarball
244 if !BR2_PRIMARY_SITE_ONLY
246 config BR2_BACKUP_SITE
247 string "Backup download site"
248 default "http://sources.buildroot.net"
250 Backup site to download from. If this option is set then
251 buildroot will fall back to download package sources from here
252 if the normal location fails.
254 config BR2_KERNEL_MIRROR
255 string "Kernel.org mirror"
256 default "https://cdn.kernel.org/pub"
258 kernel.org is mirrored on a number of servers around the
259 world. The following allows you to select your preferred
260 mirror. By default, a CDN is used, which automatically
261 redirects to a mirror geographically close to you.
263 Have a look on the kernel.org site for a list of mirrors, then
264 enter the URL to the base directory. Examples:
266 http://www.XX.kernel.org/pub (XX = country code)
267 http://mirror.aarnet.edu.au/pub/ftp.kernel.org
269 config BR2_GNU_MIRROR
270 string "GNU Software mirror"
271 default "http://ftpmirror.gnu.org"
273 GNU has multiple software mirrors scattered around the
274 world. The following allows you to select your preferred
275 mirror. By default, a generic address is used, which
276 automatically selects an up-to-date and local mirror.
278 Have a look on the gnu.org site for a list of mirrors, then
279 enter the URL to the base directory. Examples:
281 http://ftp.gnu.org/pub/gnu
282 http://mirror.aarnet.edu.au/pub/gnu
284 config BR2_LUAROCKS_MIRROR
285 string "LuaRocks mirror"
286 default "http://rocks.moonscript.org"
290 See http://luarocks.org
292 config BR2_CPAN_MIRROR
293 string "CPAN mirror (Perl packages)"
294 default "http://cpan.metacpan.org"
296 CPAN (Comprehensive Perl Archive Network) is a repository of
297 Perl packages. It has multiple software mirrors scattered
298 around the world. This option allows you to select a mirror.
300 The list of mirrors is available at:
301 http://search.cpan.org/mirror
308 int "Number of jobs to run simultaneously (0 for auto)"
311 Number of jobs to run simultaneously. If 0, determine
312 automatically according to number of CPUs on the host system.
315 bool "Enable compiler cache"
317 This option will enable the use of ccache, a compiler cache.
318 It will cache the result of previous builds to speed up future
319 builds. By default, the cache is stored in
320 $HOME/.buildroot-ccache.
322 Note that Buildroot does not try to invalidate the cache
323 contents when the compiler changes in an incompatible way.
324 Therefore, if you make a change to the compiler version and/or
325 configuration, you are responsible for purging the ccache
326 cache by removing the $HOME/.buildroot-ccache directory.
330 config BR2_CCACHE_DIR
331 string "Compiler cache location"
332 default "$(HOME)/.buildroot-ccache"
334 Where ccache should store cached files.
336 config BR2_CCACHE_INITIAL_SETUP
337 string "Compiler cache initial setup"
339 Initial ccache settings to apply, such as --max-files or
342 For example, if your project is known to require more space
343 than the default max cache size, then you might want to
344 increase the cache size to a suitable amount using the -M
347 The string you specify here is passed verbatim to ccache.
348 Refer to ccache documentation for more details.
350 These initial settings are applied after ccache has been
353 config BR2_CCACHE_USE_BASEDIR
354 bool "Use relative paths"
357 Allow ccache to convert absolute paths within the output
358 directory into relative paths.
360 During the build, many -I include directives are given with an
361 absolute path. These absolute paths end up in the hashes that
362 are computed by ccache. Therefore, when you build from a
363 different directory, the hash will be different and the cached
364 object will not be used.
366 To improve cache performance, set this option to y. This
367 allows ccache to rewrite absolute paths within the output
368 directory into relative paths. Note that only paths within the
369 output directory will be rewritten; therefore, if you change
370 BR2_HOST_DIR to point outside the output directory and
371 subsequently move it to a different location, this will lead
374 This option has as a result that the debug information in the
375 object files also has only relative paths. Therefore, make
376 sure you cd to the build directory before starting gdb. See
377 the section "COMPILING IN DIFFERENT DIRECTORIES" in the ccache
378 manual for more information.
382 config BR2_ENABLE_DEBUG
383 bool "build packages with debugging symbols"
385 Build packages with debugging symbols enabled. All libraries
386 and binaries in the 'staging' directory will have debugging
387 symbols, which allows remote debugging even if libraries and
388 binaries are stripped on the target. Whether libraries and
389 binaries are stripped on the target is controlled by the
390 BR2_STRIP_* options below.
394 prompt "gcc debug level"
397 Set the debug level for gcc
402 Debug level 1 produces minimal information, enough for making
403 backtraces in parts of the program that you don't plan to
404 debug. This includes descriptions of functions and external
405 variables, but no information about local variables and no
411 The default gcc debug level is 2
416 Level 3 includes extra information, such as all the macro
417 definitions present in the program. Some debuggers support
418 macro expansion when you use -g3.
423 prompt "strip command for binaries on target"
424 default BR2_STRIP_strip
426 config BR2_STRIP_strip
428 depends on !BR2_PACKAGE_HOST_ELF2FLT
430 Binaries and libraries in the target filesystem will be
431 stripped using the normal 'strip' command. This allows to save
432 space, mainly by removing debugging symbols. Debugging symbols
433 on the target are needed for native debugging, but not when
434 remote debugging is used.
436 config BR2_STRIP_none
439 Do not strip binaries and libraries in the target filesystem.
442 config BR2_STRIP_EXCLUDE_FILES
443 string "executables that should not be stripped"
444 depends on !BR2_STRIP_none
447 You may specify a space-separated list of binaries and
448 libraries here that should not be stripped on the target.
450 config BR2_STRIP_EXCLUDE_DIRS
451 string "directories that should be skipped when stripping"
452 depends on !BR2_STRIP_none
455 You may specify a space-separated list of directories that
456 should be skipped when stripping. Binaries and libraries in
457 these directories will not be touched. The directories should
458 be specified relative to the target directory, without leading
462 prompt "gcc optimization level"
463 default BR2_OPTIMIZE_S
465 Set the optimization level for gcc
467 config BR2_OPTIMIZE_0
468 bool "optimization level 0"
472 config BR2_OPTIMIZE_1
473 bool "optimization level 1"
475 Optimize. Optimizing compilation takes somewhat more time, and
476 a lot more memory for a large function. With -O, the compiler
477 tries to reduce code size and execution time, without
478 performing any optimizations that take a great deal of
479 compilation time. -O turns on the following optimization
480 flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability
481 -fcprop-registers -floop-optimize -fif-conversion
482 -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts
483 -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename
484 -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants. -O
485 also turns on -fomit-frame-pointer on machines where doing so
486 does not interfere with debugging.
488 config BR2_OPTIMIZE_2
489 bool "optimization level 2"
491 Optimize even more. GCC performs nearly all supported
492 optimizations that do not involve a space-speed tradeoff. The
493 compiler does not perform loop unrolling or function inlining
494 when you specify -O2. As compared to -O, this option increases
495 both compilation time and the performance of the generated
496 code. -O2 turns on all optimization flags specified by -O. It
497 also turns on the following optimization flags:
498 -fthread-jumps -fcrossjumping -foptimize-sibling-calls
499 -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm
500 -fexpensive-optimizations -fstrength-reduce
501 -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves
502 -fpeephole2 -fschedule-insns -fschedule-insns2
503 -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
504 -fdelete-null-pointer-checks -freorder-blocks
505 -freorder-functions -falign-functions -falign-jumps
506 -falign-loops -falign-labels -ftree-vrp -ftree-pre. Please
507 note the warning under -fgcse about invoking -O2 on programs
508 that use computed gotos.
510 config BR2_OPTIMIZE_3
511 bool "optimization level 3"
513 Optimize yet more. -O3 turns on all optimizations specified by
514 -O2 and also turns on the -finline-functions, -funswitch-loops
515 and -fgcse-after-reload options.
517 config BR2_OPTIMIZE_G
518 bool "optimize for debugging"
519 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
521 Optimize for debugging. This enables optimizations that do not
522 interfere with debugging. It should be the optimization level
523 of choice for the standard edit-compile-debug cycle, offering
524 a reasonable level of optimization while maintaining fast
525 compilation and a good debugging experience.
527 config BR2_OPTIMIZE_S
528 bool "optimize for size"
530 Optimize for size. -Os enables all -O2 optimizations that do
531 not typically increase code size. It also performs further
532 optimizations designed to reduce code size. -Os disables the
533 following optimization flags: -falign-functions -falign-jumps
534 -falign-loops -falign-labels -freorder-blocks
535 -freorder-blocks-and-partition -fprefetch-loop-arrays
536 -ftree-vect-loop-version
541 config BR2_GOOGLE_BREAKPAD_ENABLE
542 bool "Enable google-breakpad support"
543 select BR2_PACKAGE_GOOGLE_BREAKPAD
544 depends on BR2_INSTALL_LIBSTDCPP
545 depends on BR2_HOST_GCC_AT_LEAST_4_8 # C++11
546 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
547 depends on BR2_USE_WCHAR
548 depends on BR2_TOOLCHAIN_HAS_THREADS
549 depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC)
550 depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS
552 This option will enable the use of google breakpad, a library
553 and tool suite that allows you to distribute an application to
554 users with compiler-provided debugging information removed,
555 record crashes in compact "minidump" files, send them back to
556 your server and produce C and C++ stack traces from these
557 minidumps. Breakpad can also write minidumps on request for
558 programs that have not crashed.
560 if BR2_GOOGLE_BREAKPAD_ENABLE
562 config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES
563 string "List of executables and libraries to extract symbols from"
566 You may specify a space-separated list of binaries and
567 libraries with full paths relative to $(TARGET_DIR) of which
568 debug symbols will be dumped for further use with google
571 A directory structure that can be used by minidump-stackwalk
574 $(STAGING_DIR)/usr/share/google-breakpad-symbols
579 bool "build code with Stack Smashing Protection"
580 default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy
581 depends on BR2_TOOLCHAIN_HAS_SSP
583 Enable stack smashing protection support using GCC's
584 -fstack-protector option family.
587 http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
590 Note that this requires the toolchain to have SSP support.
591 This is always the case for glibc and eglibc toolchain, but is
592 optional in uClibc toolchains.
597 Disable stack-smashing protection.
599 config BR2_SSP_REGULAR
600 bool "-fstack-protector"
602 Emit extra code to check for buffer overflows, such as stack
603 smashing attacks. This is done by adding a guard variable to
604 functions with vulnerable objects. This includes functions
605 that call alloca, and functions with buffers larger than 8
606 bytes. The guards are initialized when a function is entered
607 and then checked when the function exits. If a guard check
608 fails, an error message is printed and the program exits.
610 config BR2_SSP_STRONG
611 bool "-fstack-protector-strong"
612 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
614 Like -fstack-protector but includes additional functions to be
615 protected - those that have local array definitions, or have
616 references to local frame addresses.
618 comment "Stack Smashing Protection strong needs a toolchain w/ gcc >= 4.9"
619 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
622 bool "-fstack-protector-all"
624 Like -fstack-protector except that all functions are
625 protected. This option might have a significant performance
626 impact on the compiled binaries.
630 comment "Stack Smashing Protection needs a toolchain w/ SSP"
631 depends on !BR2_TOOLCHAIN_HAS_SSP
635 default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED
636 default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED
638 Select the type of libraries you want to use on the target.
640 The default is to build dynamic libraries and use those on the
641 target filesystem, except when the architecture and/or the
642 selected binary format does not support shared libraries.
644 config BR2_STATIC_LIBS
647 Build and use only static libraries. No shared libraries will
648 be installed on the target. This potentially increases your
649 code size and should only be used if you know what you are
650 doing. Note that some packages may not be available when this
651 option is enabled, due to their need for dynamic library
654 config BR2_SHARED_LIBS
656 depends on BR2_BINFMT_SUPPORTS_SHARED
658 Build and use only shared libraries. This is the recommended
659 solution as it saves space and build time.
661 config BR2_SHARED_STATIC_LIBS
662 bool "both static and shared"
663 depends on BR2_BINFMT_SUPPORTS_SHARED
665 Build both shared and static libraries, but link executables
666 dynamically. While building both shared and static libraries
667 take more time and more disk space, having static libraries
668 may be useful to link some of the applications statically.
673 config BR2_PACKAGE_OVERRIDE_FILE
674 string "location of a package override file"
675 default "$(CONFIG_DIR)/local.mk"
677 A package override file is a short makefile that contains
678 variable definitions of the form <pkg>_OVERRIDE_SRCDIR, which
679 allows to tell Buildroot to use an existing directory as the
680 source directory for a particular package. See the Buildroot
681 documentation for more details on this feature.
683 config BR2_GLOBAL_PATCH_DIR
684 string "global patch directories"
686 You may specify a space separated list of one or more
687 directories containing global package patches. For a specific
688 version <packageversion> of a specific package <packagename>,
689 patches are applied as follows:
691 First, the default Buildroot patch set for the package is
692 applied from the package's directory in Buildroot.
694 Then for every directory - <global-patch-dir> - that exists in
695 BR2_GLOBAL_PATCH_DIR, if the directory
696 <global-patch-dir>/<packagename>/<packageversion>/ exists,
697 then all *.patch files in this directory will be applied.
699 Otherwise, if the directory <global-patch-dir>/<packagename>
700 exists, then all *.patch files in the directory will be
705 config BR2_COMPILER_PARANOID_UNSAFE_PATH
706 bool "paranoid check of library/header paths"
709 By default, when this option is disabled, when the Buildroot
710 cross-compiler will encounter an unsafe library or header path
711 (such as /usr/include, or /usr/lib), the compiler will display
714 By enabling this option, this warning is turned into an error,
715 which will completely abort the build when such unsafe paths
718 Note that this mechanism is available for both the internal
719 toolchain (through the toolchain wrapper and binutils patches)
720 and external toolchain backends (through the toolchain wrapper).
722 config BR2_REPRODUCIBLE
723 bool "Make the build reproducible (experimental)"
725 This option will remove all sources of non-reproducibility
726 from the build process. For a given Buildroot configuration,
727 this allows to generate exactly identical binaries from one
728 build to the other, including on different machines.
730 The current implementation is restricted to builds with the
731 same output directory. Many (absolute) paths are recorded in
732 intermediary files, and it is very likely that some of these
733 paths leak into the target rootfs. If you build with the
734 same O=... path, however, the result is identical.
736 This is labeled as an experimental feature, as not all
737 packages behave properly to ensure reproducibility.
743 source "toolchain/Config.in"
745 source "system/Config.in"
747 source "linux/Config.in"
749 source "package/Config.in"
751 source "fs/Config.in"
753 source "boot/Config.in"
755 source "package/Config.in.host"
757 source "Config.in.legacy"
759 source "$BR2_BUILD_DIR/.br2-external.in"