buildroot: split Kernel config options to Config-kernel.in
[openwrt.git] / Config.in
1 # Copyright (C) 2006-2012 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 mainmenu "OpenWrt Configuration"
8
9 config MODULES
10         bool
11         default y
12
13 config HAVE_DOT_CONFIG
14         bool
15         default y
16
17 source "target/Config.in"
18
19 menu "Target Images"
20
21         menuconfig TARGET_ROOTFS_INITRAMFS
22                 bool "ramdisk"
23                 default y if USES_INITRAMFS
24                 help
25                   Embed the rootfs into the kernel (initramfs)
26
27                 choice
28                         prompt "Compression"
29                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
30                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
31                         default TARGET_INITRAMFS_COMPRESSION_NONE
32                         depends on TARGET_ROOTFS_INITRAMFS
33                         help
34                           Select ramdisk compression.
35
36                         config TARGET_INITRAMFS_COMPRESSION_NONE
37                                 bool "none"
38
39                         config TARGET_INITRAMFS_COMPRESSION_GZIP
40                                 bool "gzip"
41
42                         config TARGET_INITRAMFS_COMPRESSION_BZIP2
43                                 bool "bzip2"
44
45                         config TARGET_INITRAMFS_COMPRESSION_LZMA
46                                 bool "lzma"
47
48                         config TARGET_INITRAMFS_COMPRESSION_LZO
49                                 bool "lzo"
50
51                         config TARGET_INITRAMFS_COMPRESSION_XZ
52                                 bool "xz"
53                 endchoice
54
55                 config EXTERNAL_CPIO
56                         string
57                         prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
58                         default ""
59                         help
60                           Kernel uses specified external cpio as INITRAMFS_SOURCE
61
62         comment "Root filesystem archives"
63
64         config TARGET_ROOTFS_CPIOGZ
65                 bool "cpio.gz"
66                 default y if USES_CPIOGZ
67                 help
68                   Build a compressed cpio archive of the the root filesystem
69
70         config TARGET_ROOTFS_TARGZ
71                 bool "tar.gz"
72                 default y if USES_TARGZ
73                 help
74                   Build a compressed tar archive of the the root filesystem
75
76         comment "Root filesystem images"
77
78         config TARGET_ROOTFS_EXT4FS
79                 bool "ext4"
80                 default y if USES_EXT4
81                 help
82                   Ext4 file system with some free space for uml images
83
84         config TARGET_ROOTFS_ISO
85                 bool "iso"
86                 default n
87                 depends on TARGET_x86_generic
88                 help
89                   Create some bootable ISO image
90
91         config TARGET_ROOTFS_JFFS2
92                 bool "jffs2"
93                 default y if USES_JFFS2
94                 help
95                   Build a jffs2 root filesystem
96
97         config TARGET_ROOTFS_JFFS2_NAND
98                 bool "jffs2 for NAND"
99                 default y if USES_JFFS2_NAND
100                 depends on USES_JFFS2_NAND
101                 help
102                   Build a jffs2 root filesystem for NAND flash
103
104         config TARGET_ROOTFS_SQUASHFS
105                 bool "squashfs"
106                 default y if USES_SQUASHFS
107                 help
108                   Build a squashfs-lzma root filesystem
109
110         menuconfig TARGET_ROOTFS_UBIFS
111                 bool "ubifs"
112                 default y if USES_UBIFS
113                 depends on USES_UBIFS
114                 help
115                   Build a ubifs root filesystem
116
117                 choice
118                         prompt "compression"
119                         default TARGET_UBIFS_COMPRESSION_NONE
120                         depends on TARGET_ROOTFS_UBIFS
121                         help
122                           Select compression type
123
124                         config TARGET_UBIFS_COMPRESSION_NONE
125                                 bool "none"
126
127                         config TARGET_UBIFS_COMPRESSION_LZO
128                                 bool "lzo"
129
130                         config TARGET_UBIFS_COMPRESSION_ZLIB
131                                 bool "zlib"
132                 endchoice
133
134                 config TARGET_UBIFS_FREE_SPACE_FIXUP
135                         bool "free space fixup" if TARGET_ROOTFS_UBIFS
136                         default y
137                         help
138                           The file-system free space has to be fixed up on first mount
139
140                 config TARGET_UBIFS_JOURNAL_SIZE
141                         string
142                         prompt "journal size" if TARGET_ROOTFS_UBIFS
143                         default "512KiB"
144
145                 config TARGET_UBIFS_SQUASH_UIDS
146                         bool "squash uids" if TARGET_ROOTFS_UBIFS
147                         default n
148                         help
149                           Squash owners making all files owned by root
150
151         comment "Image Options"
152
153         source "target/linux/*/image/Config.in"
154
155         config TARGET_ROOTFS_PARTSIZE
156                 int "Root filesystem partition size (in MB)"
157                 depends on X86_GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532
158                 default 48
159                 help
160                   Allows you to change the root filesystem partition size
161
162         config TARGET_ROOTFS_MAXINODE
163                 int "Maximum number of inodes in root filesystem"
164                 depends on TARGET_ROOTFS_EXT4FS
165                 default 6000
166                 help
167                   Allows you to change the maximum number of inodes in the root filesystem
168
169         config TARGET_ROOTFS_RESERVED_PCT
170                 int "Percentage of reserved blocks in root filesystem"
171                 depends on TARGET_ROOTFS_EXT4FS
172                 default 0
173                 help
174                   Allows you to change the percentage of reserved blocks in the root filesystem
175
176         menuconfig TARGET_ROOTFS_INCLUDE_KERNEL
177                 bool "Include kernel in root filesystem"
178                 depends on TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS
179                 default n if USES_UBIFS
180                 help
181                   Include the kernel image in the rootfs. Typically the image is placed
182                   below /boot.
183
184                 config TARGET_ROOTFS_INCLUDE_UIMAGE
185                         bool "include uImage" if TARGET_ROOTFS_INCLUDE_KERNEL
186                         default y
187                         help
188                           This option might not apply to all targets. Make sure
189                           to check target/linux/<your_target>/image/Makefile to
190                           see if this option will have any effect.
191
192                 config TARGET_ROOTFS_INCLUDE_ZIMAGE
193                         bool "include zImage" if TARGET_ROOTFS_INCLUDE_KERNEL
194                         default y
195                         help
196                           This option might not apply to all targets. Make sure
197                           to check target/linux/<your_target>/image/Makefile to
198                           see if this option will have any effect.
199
200                 config TARGET_ROOTFS_INCLUDE_FIT
201                         bool "include FIT" if TARGET_ROOTFS_INCLUDE_KERNEL
202                         default y
203                         help
204                           This option might not apply to all targets. Make sure
205                           to check target/linux/<your_target>/image/Makefile to
206                           see if this option will have any effect.
207
208         config TARGET_ROOTFS_INCLUDE_DTB
209                 bool "Include DTB in root filesystem"
210                 depends on TARGET_ROOTFS_UBIFS || TARGET_ROOTFS_EXT4FS
211                 default n if USES_UBIFS
212                 help
213                   Include the device tree blob file(s) in the rootfs. Typically the DTBs
214                   are placed below /boot.
215
216 endmenu
217
218 menu "Global build settings"
219
220         config ALL
221                 bool "Select all packages by default"
222                 default n
223
224         comment "General build options"
225
226         config DISPLAY_SUPPORT
227                 bool "Show packages that require graphics support (local or remote)"
228                 default n
229
230         config BUILD_PATENTED
231                 default y
232                 bool "Compile with support for patented functionality"
233                 help
234                   When this option is disabled, software which provides patented functionality will not be built.
235                   In case software provides optional support for patented functionality,
236                   this optional support will get disabled for this package.
237
238         config BUILD_NLS
239                 default n
240                 bool "Compile with full language support"
241                 help
242                   When this option is enabled, packages are built with the full versions of iconv and GNU gettext
243                   instead of the default OpenWrt stubs. If uClibc is used, it is also built with locale support.
244
245         config BUILD_STATIC_TOOLS
246                 default n
247                 bool "Attempt to link host utilities statically"
248                 help
249                   Linking host utilities like sed or firmware-utils statically increases the portability of the
250                   generated ImageBuilder and SDK tarballs, however it may fail on some Linux distributions.
251
252         config SHADOW_PASSWORDS
253                 bool
254                 prompt "Enable shadow password support"
255                 default y
256                 help
257                   Enable shadow password support.
258
259         config CLEAN_IPKG
260                 bool
261                 prompt "Remove ipkg/opkg status data files in final images"
262                 default n
263                 help
264                   This removes all ipkg/opkg status data files from the target directory before building the root fs
265
266         config COLLECT_KERNEL_DEBUG
267                 bool
268                 prompt "Collect kernel debug information"
269                 select KERNEL_DEBUG_INFO
270                 default n
271                 help
272                   This collects debugging symbols from the kernel and all compiled modules.
273                   Useful for release builds, so that kernel issues can be debugged offline later.
274
275         comment "Kernel build options"
276
277         source "Config-kernel.in"
278
279         comment "Package build options"
280
281         config DEBUG
282                 bool
283                 prompt "Compile packages with debugging info"
284                 default n
285                 help
286                   Adds -g3 to the CFLAGS
287
288         config IPV6
289                 bool
290                 prompt "Enable IPv6 support in packages"
291                 default y
292                 help
293                   Enable IPV6 support in packages (passes --enable-ipv6 to configure scripts).
294
295         config PKG_BUILD_PARALLEL
296                 bool
297                 prompt "Compile certain packages parallelized"
298                 default y
299                 help
300                   This adds a -jX option to certain packages that are known to
301                   behave well for parallel build. By default the package make processes
302                   use the main jobserver, in which case this option only takes effect
303                   when you add -jX to the make command.
304
305                   If you are unsure, select N.
306
307         config PKG_BUILD_USE_JOBSERVER
308                 bool
309                 prompt "Use top-level make jobserver for packages"
310                 depends on PKG_BUILD_PARALLEL
311                 default y
312                 help
313                   This passes the main make process jobserver fds to package builds,
314                   enabling full parallelization across different packages
315
316                   Note that disabling this may overcommit CPU resources depending on the
317                   -j level of the main make process, the number of package
318                   submake jobs selected below and the number of actual CPUs present.
319                   Example: If the main make is passed a -j4 and the submake -j
320                   is also set to 4, we may end up with 16 parallel make processes
321                   in the worst case.
322
323
324         config PKG_BUILD_JOBS
325                 int
326                 prompt "Number of package submake jobs (2-512)"
327                 range 2 512
328                 default 2
329                 depends on PKG_BUILD_PARALLEL && !PKG_BUILD_USE_JOBSERVER
330                 help
331                   The number of jobs (-jX) to pass to packages submake.
332
333         config PKG_DEFAULT_PARALLEL
334                 bool
335                 prompt "Parallelize the default package build rule (May break build)"
336                 depends on PKG_BUILD_PARALLEL
337                 depends on BROKEN
338                 default n
339                 help
340                   Always set the default package build rules to parallel build.
341
342                   WARNING: This may break build or kill your cat, as it builds
343                   packages with multiple jobs that are probably not tested in
344                   a parallel build environment.
345
346                   Only say Y, if you don't mind fixing broken packages.
347                   Before reporting build bugs, set this to N and re-run the build.
348
349         comment "Stripping options"
350
351         choice
352                 prompt "Binary stripping method"
353                 default USE_STRIP   if EXTERNAL_TOOLCHAIN
354                 default USE_STRIP   if USE_GLIBC || USE_EGLIBC || USE_MUSL
355                 default USE_SSTRIP
356                 help
357                   Select the binary stripping method you wish to use.
358
359                 config NO_STRIP
360                         bool "none"
361                         help
362                           This will install unstripped binaries (useful for native compiling/debugging)
363
364                 config USE_STRIP
365                         bool "strip"
366                         help
367                           This will install binaries stripped using strip from binutils
368
369
370                 config USE_SSTRIP
371                         bool "sstrip"
372                         depends on !DEBUG
373                         depends on !USE_GLIBC
374                         depends on !USE_EGLIBC
375                         help
376                           This will install binaries stripped using sstrip
377         endchoice
378
379         config STRIP_ARGS
380                 string
381                 prompt "Strip arguments"
382                 depends on USE_STRIP
383                 default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
384                 default "--strip-all"
385                 help
386                   Specifies arguments passed to the strip command when stripping binaries
387
388         config STRIP_KERNEL_EXPORTS
389                 bool "Strip unnecessary exports from the kernel image"
390                 help
391                   Reduces kernel size by stripping unused kernel exports from the kernel image
392                   Note that this might make the kernel incompatible with any kernel modules that
393                   were not selected at the time the kernel image was created
394
395         config USE_MKLIBS
396                 bool "Strip unnecessary functions from libraries"
397                 help
398                   Reduces libraries to only those functions that are necessary for using all
399                   selected packages (including those selected as <M>)
400                   Note that this will make the system libraries incompatible with most of the packages
401                   that are not selected during the build process
402
403         choice
404                 prompt "Preferred standard C++ library"
405                 default USE_LIBSTDCXX if USE_EGLIBC
406                 default USE_UCLIBCXX
407                 help
408                   Select the preferred standard C++ library for all packages that support this.
409
410                 config USE_UCLIBCXX
411                         bool "uClibc++"
412
413                 config USE_LIBSTDCXX
414                         bool "libstdc++"
415         endchoice
416
417 endmenu
418
419 menuconfig DEVEL
420         bool "Advanced configuration options (for developers)"
421         default n
422
423         config BROKEN
424                 bool "Show broken platforms / packages" if DEVEL
425                 default n
426
427         config DOWNLOAD_FOLDER
428                 string "Download folder" if DEVEL
429                 default ""
430
431         config LOCALMIRROR
432                 string "Local mirror for source packages" if DEVEL
433                 default ""
434
435         config AUTOREBUILD
436                 bool "Automatic rebuild of packages" if DEVEL
437                 default y
438                 help
439                   Automatically rebuild packages when their files change
440
441         config BUILD_SUFFIX
442                 string "Build suffix to append to the BUILD_DIR variable" if DEVEL
443                 default ""
444                 help
445                   Build suffix to append to the BUILD_DIR variable, i.e: build_dir_suffix
446
447         config TARGET_ROOTFS_DIR
448                 string "Override the default TARGET_ROOTFS_DIR variable" if DEVEL
449                 default ""
450                 help
451                   Override the default TARGET_ROOTFS_DIR variable content $(BUILD_DIR) with custom path.
452                   Use this option to re-define the location of the target root file system directory.
453
454         config CCACHE
455                 bool "Use ccache" if DEVEL
456                 default n
457                 help
458                   Compiler cache; see http://ccache.samba.org/
459
460         config EXTERNAL_KERNEL_TREE
461                 string "Use external kernel tree" if DEVEL
462                 default ""
463
464         config KERNEL_GIT_CLONE_URI
465                 string "Enter git repository to clone" if DEVEL
466                 default ""
467                 help
468                   Enter the full git repository path i.e.:
469                   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
470                   This will create a git clone of the kernel in your build
471                   directory.
472
473         config KERNEL_GIT_LOCAL_REPOSITORY
474                 string "Enter path to local reference repository" if DEVEL
475                 default ""
476                 help
477                   Enter a full pathname to a local reference git repository.
478                   In this instance, the --refererence option of git clone will
479                   be used thus creating a quick local clone of your repo.
480
481         config BUILD_LOG
482                 bool "Enable log files during build process" if DEVEL
483                 help
484                   If enabled log files will be written to the ./log directory
485
486         config SRC_TREE_OVERRIDE
487                 bool "Enable package source tree override" if DEVEL
488                 help
489                   If enabled, you can force a package to use a git tree as source
490                   code instead of the normal tarball. Create a symlink 'git-src'
491                   in the package directory, pointing to the .git tree that you want
492                   to pull the source code from
493
494         config EXTRA_OPTIMIZATION
495                 string "Additional compiler options" if DEVEL
496                 default "-fno-caller-saves"
497                 help
498                   Extra Target-independent optimizations to use when building for the target.
499
500 menuconfig TARGET_OPTIONS
501         bool "Target Options"  if DEVEL
502
503         config TARGET_OPTIMIZATION
504                 string "Target Optimizations" if TARGET_OPTIONS
505                 default DEFAULT_TARGET_OPTIMIZATION
506                 help
507                   Optimizations to use when building for the target host.
508
509         config SOFT_FLOAT
510                 bool "Use software floating point by default" if TARGET_OPTIONS
511                 default y
512                 depends on (arm || armeb || powerpc || mipsel || mips || mips64el || mips64) && !HAS_FPU
513                 help
514                   If your target CPU does not have a Floating Point Unit (FPU) or a
515                   kernel FPU emulator, but you still wish to support floating point
516                   functions, then everything will need to be compiled with soft floating
517                   point support (-msoft-float).
518
519                   Most people will answer N.
520
521         config USE_MIPS16
522                 bool "Build packages with MIPS16 instructions" if TARGET_OPTIONS
523                 depends on HAS_MIPS16
524                 depends on !GCC_VERSION_4_6
525                 default y
526                 help
527                   If your target CPU does support the MIPS16 instruction set
528                   and you want to use it for packages, enable this option.
529                   MIPS16 produces smaller binaries thus reducing pressure on
530                   caches and TLB.
531
532                   Most people will answer N.
533
534 source "toolchain/Config.in"
535
536 source "target/imagebuilder/Config.in"
537 source "target/sdk/Config.in"
538 source "target/toolchain/Config.in"
539
540 source "tmp/.config-package.in"