1.\" $NetBSD: config.5,v 1.50 2024/08/13 23:24:23 uwe Exp $ 2.\" 3.\" Copyright (c) 2006, 2007 The NetBSD Foundation. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd August 13, 2024 28.Dt CONFIG 5 29.Os 30.Sh NAME 31.Nm config 32.Nd kernel configuration file syntax 33.Sh DESCRIPTION 34The kernel configuration file specifies the way the kernel should be compiled 35by the rest of the toolchain. 36It is processed by 37.Xr config 1 38to produce a number of files that will allow the user to compile a possibly 39customised kernel. 40One compilation can issue several kernel binaries, with different root and 41dump devices configurations, or with full debugging information. 42.Pp 43This manual page is intended to serve as a complete reference of all aspects 44of the syntax used in the many files processed by 45.Xr config 1 . 46The novice user will prefer looking at the examples given in 47.Xr config.samples 5 48in order to understand better how the default configuration can be changed, 49and how all of its elements interact with each other. 50.Pp 51The kernel configuration file actually contains the description of all the 52options, drivers and source files involved in the kernel compilation, and the 53logic that binds them. 54The 55.Ic machine 56statement, usually found in the 57.Pa std.${MACHINE} 58file, hides this from the user by automatically including all the descriptive 59files spread all around the kernel source tree, the main one being 60.Pa conf/files . 61.Pp 62Thus, the kernel configuration file contains two parts: 63the description of the compilation options, and the selection of those options. 64However, it begins with a small preamble that controls a couple of options of 65.Xr config 1 , 66and a few statements belong to any of the two sections. 67.Pp 68The user controls the options selection part, which is located in a file 69commonly referenced as the 70.Em main configuration file 71or simply the 72.Em kernel configuration file . 73The developer is responsible for describing the options in the relevant files 74from the kernel source tree. 75.Pp 76Statements are separated by new-line characters. 77However, new-line characters can appear in the middle of a given statement, 78with the value of a space character. 79.\" 80.\" 81.Ss OBJECTS AND NAMES 82.\" 83.Xr config 1 84is a rather complicated piece of software that tries to comply with any 85configuration the user might think of. 86Quite a few different objects are manipulated through the kernel configuration 87file, therefore some definitions are needed. 88.\" 89.\" 90.Ss Options and attributes 91.\" 92The basic objects driving the kernel compilation are 93.Em options , 94and are called 95.Em attributes 96in some contexts. 97An attribute 98usually refers to a feature a given piece of hardware might have. 99However, the scope of an attribute is rather wide and can just be a place 100holder to group some source files together. 101.Pp 102There is a special class of attribute, named 103.Em interface attribute , 104which represents a hook that allows a device to attach to (i.e., be a child of) 105another device. 106An interface attribute 107has a (possibly empty) list of 108.Em locators 109to match the actual location of a device. 110For example, on a PCI bus, devices are located by a device number 111that is fixed by the wiring of the motherboard. 112Additionally, each of those devices can appear through several interfaces named 113functions. 114A single PCI device entity is a unique function number of a given device from 115the considered PCI bus. 116Therefore, the locators for a 117.Xr pci 4 118device are 119.Ql dev 120(for device), and 121.Ql function . 122.Pp 123A 124.Em locator 125can either be a single integer value, or an array of integer values. 126It can have a default value, in which case it can be wildcarded with a 127.Ql \&? 128in the options selection section of the configuration file. 129A single locator 130definition can take one of the following forms: 131.Pp 132.Bl -bullet -offset indent -compact 133.It 134.Ar locator 135.It 136.Ar locator\| Ns Li =\| Ns Ar value 137.It 138.Li "\&[" Ns Ar locator\| Ns Li =\| Ns Ar value\| Ns Li "\&]" 139.It 140.Ar locator Ns Li "\&[" Ns Ar length Ns Li "\&]" 141.It 142.Ar locator Ns Li "\&[" Ns Ar length Ns Li "\&]={" \ 143 Ns Ar value\| Ns Li \&, Ar ... Ns Li "\&}" 144.It 145.Li "\&[" Ns Ar locator Ns Li "\&[" Ns Ar length Ns Li "\&]={" \ 146 Ns Ar value\| Ns Li \&, Ar ... Ns Li "\&}]" 147.El 148.Pp 149The variants that specify a default value can be enclosed into square brackets, 150in which case the locator will not have to be specified later in the options 151selection section of the configuration file. 152.Pp 153In the options selection section, the locators are specified when declaring an 154instance as a space-separated list of 155.Dq Ao Ar locator\| Ac \~ Ao Ar value\| Ac 156where value can be the 157.Ql \&? 158wildcard if the locator allows it. 159.\" 160.\" 161.Ss Devices, instances and attachments 162.\" 163The main benefit of the kernel configuration file is to allow the user to avoid 164compiling some drivers, and wire down the configuration of some others. 165We have already seen that devices attach to each other through 166interface attributes, 167but not everything can attach to anything. 168Furthermore, the user has the ability to define precise instances for the 169devices. 170An instance 171is simply the reality of a device when it is probed and attached by the kernel. 172.Pp 173Each driver has a name for its devices. 174It is called the 175.Em base device name 176and is found as 177.Dq Ar base 178in this documentation. 179An 180.Em instance 181is the concatenation of a base device name and a number. 182In the kernel configuration file, instances can sometimes be wildcarded 183(i.e., the number is replaced by a 184.Ql * 185or a 186.Ql \&? ) 187in order to match all the possible instances of a device. 188.Pp 189The usual 190.Ql * 191becomes a 192.Ql \&? 193when the instance name is used as an 194.Em attachment name . 195In the options selection part of the kernel configuration files, an 196.Em attachment 197is an interface attribute 198concatenated with a number or the wildcard 199.Ql \&? . 200.\" 201.\" 202.Ss Pseudo-devices 203.\" 204Some components of the kernel behave like a device although they don't have 205any actual reality in the hardware. 206For example, this is the case for special network devices, such as 207.Xr tun 4 208and 209.Xr tap 4 . 210They are integrated in the kernel as 211.Em pseudo-devices , 212and can have several 213instances and even children, just like normal devices. 214.\" 215.\" 216.Ss Dependencies 217.\" 218The options description part of the kernel configuration file contains all the 219logic that ties the source files together, and it is done first through writing 220down dependencies between 221.Xr config 1 222objects. 223.Pp 224In this documentation, the syntax for 225.Em dependencies 226is a comma-separated list of options and attributes . 227.Pp 228For example, the use of an Ethernet network card requires the source files that 229handle the specificities of that protocol. 230Therefore, all Ethernet network card drivers depend on the 231.Ql ether 232attribute. 233.\" 234.\" 235.Ss Conditions 236.\" 237Finally, source file selection is possible through the help of 238.Em conditionals , 239referred to as 240.Dq Ar condition 241later in this documentation. 242The syntax for those conditions uses well-known operators 243.Pf ( Ql & , 244.Ql \(or , 245and 246.Ql \&! ) 247to combine options and attributes . 248.\" 249.\" 250.Ss CONTEXT NEUTRAL STATEMENTS 251.\" 252.Bl -tag -width Ic -compact 253.\" 254.Pp 255.It Ic version Ar yyyymmdd 256Indicates the syntax version used by the rest of the file, or until the next 257.Ic version 258statement. 259The argument is an ISO date. 260A given 261.Xr config 1 262binary might only be compatible with a limited range of version numbers. 263.\" 264.Pp 265.It Ic include Ar path 266Includes a file. 267The path is relative to the top of the kernel source tree, or the inner-most 268defined 269.Ic prefix . 270.\" 271.Pp 272.It Ic cinclude Ar path 273Conditionally includes a file. 274Contrary to 275.Ic include , 276it will not produce an error if the file does not exist. 277The argument obeys the same rules as for 278.Ic include . 279.\" 280.Pp 281.It Ic prefix Op Ar path 282If 283.Ar path 284is given, it pushes a new prefix for 285.Ic file , 286.Ic include 287and 288.Ic cinclude . 289.Ic prefix 290statements act like a stack, and an empty 291.Ar path 292argument has the latest prefix popped out. 293The 294.Ar path 295argument is either absolute or relative to the current defined prefix, which 296defaults to the top of the kernel source tree. 297.\" 298.Pp 299.It Ic buildprefix Op Ar path 300If 301.Ar path 302is given, it pushes a new build prefix for 303.Ic file . 304.Ic buildprefix 305statements act like a stack, and an empty 306.Ar path 307argument has the latest prefix popped out. 308The 309.Ar path 310argument is relative to the current defined buildprefix, which 311defaults to the top of the kernel build directory. 312When prefix is either absolute or relative out of the kernel source tree 313.Pq Pa \&../ , 314buildprefix must be defined. 315.\" 316.Pp 317.It Ic ifdef Ar attribute 318.It Ic ifndef Ar attribute 319.It Ic elifdef Ar attribute 320.It Ic elifndef Ar attribute 321.It Ic else 322.It Ic endif 323Conditionally interprets portions of the current file. 324Those statements depend on whether or not the given 325.Ar attribute 326has been previously defined, through 327.Ic define 328or any other statement that implicitly defines attributes such as 329.Ic device . 330.El 331.\" 332.\" 333.Ss PREAMBLE 334.\" 335In addition to 336.Ic include , cinclude , 337and 338.Ic prefix , 339the preamble may contain the following optional statements: 340.Bl -tag -width Ic 341.\" 342.It Ic build Ar path 343Defines the build directory for the compilation of the kernel. 344It replaces the default of 345.Pa ../compile/ Ns Aq Ar config-file 346and is superseded by the 347.Fl b 348parameter of 349.Xr config 1 . 350.\" 351.It Ic source Ar path 352Defines the directory in which the source of the kernel lives. 353It replaces the default of 354.Pa ../../../.. 355and is superseded by the 356.Fl s 357parameter of 358.Xr config 1 . 359.El 360.\" 361.\" 362.Ss OPTIONS DESCRIPTION 363.\" 364The user will not usually have to use descriptive statements, as they are meant 365for the developer to tie a given piece of code to the rest of the kernel. 366However, third parties may provide sources to add to the kernel compilation, 367and the logic that binds them to the 368.Nx 369kernel will have to be added to the user-edited configuration file. 370.Pp 371.Bl -tag -width Ic -compact 372.\" 373.Pp 374.It Ic devclass Ar class 375Defines a special attribute, named 376.Em device class . 377A given device cannot belong to more than one device class. 378.Xr config 1 379translates that property by the rule that a device cannot depend on more than 380one device class, and will properly fill the configuration information file it 381generates according to that value. 382.\" 383.Pp 384.It Ic defflag \ 385 Oo Ar file Oc \ 386 Ar option \ 387 Oo Ar option Oo Ar ... Oc Oc \ 388 Op Ic \&: Ar dependencies 389Defines a boolean 390.Ar option , 391that can either be selected or be un-selected by the user with the 392.Ic options 393statement. 394The optional 395.Ar file 396argument names a header file that will contain the C pre-processor definition 397for the option. 398If no file name is given, it will default to 399.Li opt_ Ns Ao Ar option Ac Ns Li \&.h . 400.Xr config 1 401will always create the header file, but if the user choose not to select the 402option, it will be empty. 403Several options can be combined in one header file, for convenience. 404The header file is created in the compilation directory, making them directly 405accessible by source files. 406.\" 407.Pp 408.It Ic defparam \ 409 Oo Ar file Oc \ 410 Ar option Ns Oo Ns Ic = Ns Ar value\^ Oc \ 411 Oo Ns Ic \&:= Ns Ar lint-value Oc \ 412 Oo Ar option Oo Ar ... Oc Oc \ 413 Op Ic \&:\~ Ns Ar dependencies 414Behaves like 415.Ic defflag , 416except the defined option must have a value. 417Such options are not typed: 418they can have either a numeric or a string value. 419If a 420.Ar value 421is specified, it is treated as a default, and the option is 422always defined in the corresponding header file. 423If a 424.Ar lint-value 425is specified, 426.Xr config 1 427will use it as a value when generating a lint configuration with 428.Fl L , 429and ignore it in all other cases. 430.\" 431.Pp 432.It Ic deffs Ar name ... 433Defines a file-system 434.Ar name . 435It is no more than a regular option, as defined by 436.Ic defflag , 437but it allows the user to select the 438file-systems to be compiled in the kernel with the 439.Ic file-system 440statement instead of the 441.Ic options 442statement. 443.\" 444.Pp 445.It Ic obsolete defflag \ 446 Oo Ar file Oc \ 447 Ar option ... 448.It Ic obsolete defparam \ 449 Oo Ar file Oc \ 450 Ar option ... 451Those two statements are identical and mark the listed option names as 452obsolete. 453If the user selects one of the listed options in the kernel configuration 454file, 455.Xr config 1 456will emit a warning and ignore the option. 457The optional 458.Ar file 459argument should match the original definition of the option. 460.\" 461.Pp 462.It Ic mkflagvar \ 463 Ar option ... 464Specifes that an option previously defined with 465.Ic defflag 466should have a variable created in the kernel Makefile if the option 467is selection with an 468.Ic options 469statement. 470No variable is created if the option is not selected. 471The Makefile variable will have the name 472.Li KERNEL_OPT_ Ns Aq Ar option 473and, because options defined with 474.Ic defflag 475are boolean, 476the variable will have the value 477.Dq 1 . 478.\" 479.Pp 480.It Ic define \ 481 Ar attribute \ 482 Oo Ic \&{ Ar locators Ic \&} Oc \ 483 Op Ic \&: Ar dependencies 484Defines an 485.Ar attribute . 486The 487.Ar locators 488list is optional, and can be empty. 489If the pair of braces are present, the locator list is defined and the 490declared attribute becomes an 491.Em interface attribute , 492on which devices can attach. 493.\" 494.Pp 495.It Ic maxpartitions Ar number 496Defines the maximum number of partitions the disklabels for the considered 497architecture can hold. 498This statement cannot be repeated and should only appear in the 499.Pa "std.${ARCH}" 500file. 501.\" 502.Pp 503.It Ic maxusers Ar min default max 504Indicates the range of values that will later be accepted by 505.Xr config 1 506for the 507.Ic maxusers 508statement in the options selection part of the configuration file. 509In case the user doesn't include a 510.Ic maxusers 511statement in the configuration file, the value 512.Ar default 513is used instead. 514.\" 515.Pp 516.It Ic device \ 517 Ar base \ 518 Oo Ic \&{ Ar locators Ic \&} Oc \ 519 Op Ic \&: Ar dependencies 520Declares a device of name 521.Ar base . 522The optional list of 523.Ar locators , 524which can also be empty, indicates the device can have children attached 525directly to it. 526Internally, that means 527.Ar base 528becomes an 529.Em interface attribute . 530For every device the user selects, 531.Xr config 1 532will add the matching 533.Fn CFDRIVER_DECL 534statement to 535.Pa ioconf.c . 536However, it is the responsibility of the developer to add the relevant 537.Fn CFATTACH_DECL_NEW 538line to the source of the device's driver. 539.\" 540.Pp 541.It Ic attach \ 542 Ar base \ 543 Ic at Ar attr\^ \ 544 Ns Oo Ic \&, Ar attr\^ \ 545 Ns Oo Ic \&, Ar ... Oc Oc \ 546 Oo Ic with Ar name Oc \ 547 Op Ic \&: dependencies 548All devices must have at least one declared attachment. 549Otherwise, they will never be found in the 550.Xr autoconf 9 551process. 552The attributes on which an instance of device 553.Ar base 554can attach must be interface attributes, or 555.Ic root 556in case the device is at the top-level, which is usually the case of e.g., 557.Xr mainbus 4 . 558The instances of device 559.Ar base 560will later attach to one interface attribute from the specified list. 561.Pp 562Different 563.Ic attach 564definitions must use different names using the 565.Ic with 566option. 567It is then possible to use the associated 568.Ar name 569as a conditional element in a 570.Ic file 571statement. 572.\" 573.Pp 574.It Ic defpseudo Ar base Op Ic \&: Ar dependencies 575Declares a pseudo-device. 576Those devices don't need an attachment to be declared, they will always be 577attached if they were selected by the user. 578.\" 579.Pp 580.It Ic defpseudodev Ar base \ 581 Oo Ic \&{ Ar locators Ic \&} Oc \ 582 Op Ic \&: Ar dependencies 583Declares a pseudo-device. 584Those devices don't need an attachment to be declared, they will always be 585attached if they were selected by the user. 586This declaration should be used if the pseudodevice uses 587.Xr autoconf 9 588functions to manage its instances or attach children. 589As for normal devices, an optional list of 590.Ar locators 591can be defined, which implies an interface attribute named 592.Ar base , 593allowing the pseudo-device to have children. 594Interface attributes can also be defined in the 595.Ar dependencies 596list. 597.\" 598.Pp 599.It Ic file Ar path \ 600 Oo Ar condition Oc \ 601 Oo Ic needs-count Oc \ 602 Oo Ic needs-flag Oc \ 603 Op Ic compile with Ar rule 604Adds a source file to the list of files to be compiled into the kernel, if the 605.Ar condition 606is met. 607The 608.Ic needs-count 609option indicates that the source file requires the number of all the countable 610objects it depends on (through the 611.Ar condition ) 612to be defined. 613It is usually used for pseudo-devices 614whose number can be specified by the user in the 615.Ic pseudo-device 616statement. 617Countable objects are devices and pseudo-devices. 618For the former, the count is the number of declared instances. 619For the latter, it is the number specified by the user, defaulting to 1. 620The 621.Ic needs-flag 622options requires that a flag indicating the selection of an attribute to 623be created, but the precise number isn't needed. 624This is useful for source files that only partly depend on the attribute, 625and thus need to add pre-processor statements for it. 626.Pp 627Both 628.Ic needs-count 629and 630.Ic needs-flag 631produce a header file for each of the considered attributes. 632The name of that file is 633.Ao Ns Ar attribute Ns Ac Ns Pa \&.h . 634It contains one pre-processor definition of 635.Dv NATTRIBUTE 636set to 0 if the attribute was not selected by the user, or to the number of 637instances of the device in the 638.Ic needs-count 639case, or to 1 in all the other cases. 640.Pp 641The 642.Ar rule 643argument specifies the 644.Xr make 1 645rule that will be used to compile the source file. 646If it is not given, the default rule for the type of the file will be used. 647For a given file, there can be more than one 648.Ic file 649statement, but not from the same configuration source file, and all later 650statements can only specify a 651.Ar rule 652argument, and no 653.Ar condition 654or flags. 655This is useful when a file needs special consideration from one particular 656architecture. 657.Pp 658The path is relative to the top of the kernel source tree, or the inner-most 659defined 660.Ic prefix . 661.\" 662.Pp 663.It Ic object Ar path Op Ar condition 664Adds an object file to the list of objects to be linked into the kernel, if the 665.Ar conditions 666are met. 667This is most useful for third parties providing binary-only components. 668.Pp 669The path is relative to the top of the kernel source tree, or the inner-most 670defined 671.Ic prefix . 672.\" 673.Pp 674.It Ic device-major Ar base Oo Ic char Ar number Oc Oo Ic block Ar number Oc \ 675 Op Ar condition 676Associates a major device number with the device 677.Ar base . 678A device can be a character device, a block device, or both, and can have 679different numbers for each. 680The 681.Ar condition 682indicates when the relevant line should be added to 683.Pa ioconf.c , 684and works just like the 685.Ic file 686statement. 687.\" 688.Pp 689.It Ic makeoptions \ 690 Ar condition name Ns Ic += Ns Ar value \ 691 Ns Op Ic \&, Ar condition name Ns Ic += Ns Ar value \ 692 Ns Op Ic \&, Ar ... 693Appends to a definition in the generated 694.Pa Makefile . 695.Pp 696This variant of 697.Ic makeoptions 698belongs to the options description section. 699The 700.Ar condition 701is mandatory and only 702.Ic += 703can be used. 704Not to be confused with the confusingly similar variant of 705.Ic makeoptions 706used in the selections section. 707.El 708.\" 709.\" 710.Ss OPTIONS SELECTION 711.\" 712.Bl -tag -width Ic 713.\" 714.It Ic machine Ar machine Op Ar arch Op Ar subarch Op Ar ... 715The 716.Ic machine 717statement should appear first in the kernel configuration file, with the 718exception of context-neutral statements. 719It makes 720.Xr config 1 721include, in that order, the following files: 722.Bl -enum 723.It 724.Pa conf/files 725.It 726.Pa arch/${ARCH}/conf/files.${ARCH} 727if defined 728.It 729.Pa arch/${SUBARCH}/conf/files.${SUBARCH} 730for each defined sub-architecture 731.It 732.Pa arch/${MACHINE}/conf/files.${MACHINE} 733.El 734.Pp 735It also defines an attribute for the 736.Ar machine , 737the 738.Ar arch 739and each of the 740.Ar subarch . 741.\" 742.It Ic ioconf Ar name 743Used instead of 744.Ic machine 745in config file snippets for kernel modules to generate just the 746.Pa ioconf.c 747definitions. 748The generated file contains subtrees that start with attachments 749declared with 750.Ic pseudo-root . 751.\" 752.It Ic package Ar path 753Simpler version of: 754.Bd -literal -offset indent 755prefix DIR 756include FILE 757prefix 758.Ed 759.\" 760.It Ic ident Ar string 761Defines the identification string of the kernel. 762This statement is optional, and the name of the main configuration file will be 763used as a default value. 764.\" 765.It Ic no ident 766Deletes any pre-existing identification string of the kernel. 767.\" 768.It Ic maxusers Ar number 769Despite its name, this statement does not limit the maximum number of users on 770the system. 771There is no such limit, actually. 772However, some kernel structures need to be adjusted to accommodate with more 773users, and the 774.Ic maxusers 775parameter is used for example to compute the maximum number of opened files, 776and the maximum number of processes, which itself is used to adjust a few 777other parameters. 778.\" 779.It Ic options \ 780 Ar name Ns Oo Ic = Ns Ar value\^ Oc \ 781 Ns Op Ic \&, Ar name Ns Oo Ic = Ns Ar value\^ Oc \ 782 Ns Op Ic \&, Ar ... 783Selects the option 784.Ar name , 785affecting it a 786.Ar value 787if the options requires it (see the 788.Ic defflag 789and 790.Ic defparam 791statements). 792.Pp 793If the option has not been declared in the options description part of the 794kernel configuration machinery, it will be added as a pre-processor definition 795when source files are compiled. 796If the option has previously been selected, the statement produces a 797warning, and the new 798.Ic options 799statement replaces the original. 800.\" 801.It Ic no options \ 802 Ar name \ 803 Ns Op Ic \&, Ar name \ 804 Ns Op Ic \&, Ar ... 805Un-selects the option 806.Ar name . 807If option 808.Ar name 809has not previously been selected, the statement produces a warning. 810.\" 811.It Ic file-system \ 812 Ar name \ 813 Ns Op Ic \&, Ar name \ 814 Ns Op Ic \&, Ar ... 815Adds support for all the listed file-systems. 816.\" 817.It Ic no file-system \ 818 Ar name \ 819 Ns Op Ic \&, Ar name \ 820 Ns Op Ic \&, Ar ... 821Removes support for all the listed file-systems. 822.\" 823.It Ic config Ar name \ 824 Ic root on Ar device \ 825 Oo Ic type Ar fs Oc \ 826 Op Ic dumps on Ar device 827Adds 828.Ar name 829to the list of kernel binaries to compile from the configuration file, using 830the specified root and dump devices information. 831.Pp 832Any of the 833.Ar device 834and 835.Ar fs 836parameters can be wildcarded with 837.Ql \&? 838to let the kernel automatically discover those values. 839The 840.Ar device 841can also be specified as a quoted specification string. 842The kernel interprets this string like the console input 843when prompting for a root device. 844E.g., 845.Dq Li wedge: Ns Ar NAME\| 846specifies a named disk wedge. 847.Pp 848At least one 849.Ic config 850statement must appear in the configuration file. 851.\" 852.It Ic no config Ar name 853Removes 854.Ar name 855from the list of kernel binaries to compile from the configuration file. 856.\" 857.It Ic pseudo-root Ar instance 858Used in conjunction with 859.Ic ioconf 860in kernel modules. 861Declares an instance of a device that serves as the root for a subtree 862described in the module config. 863The declared 864.Ar instance 865can then be used as an 866.Ar attachment 867for devices in the kernel module. 868Multiple such attachment points may be declared in the config file. 869.Ar instance 870may name a device 871.Pq e.g. Ql pci* 872an interface attribute 873.Pq e.g. Ql audiobus* 874.\" 875.It Ar instance Ic at Ar attachment Op Ar locator-specifications ... 876Configures an instance of a device attaching at a specific location in the 877device tree. 878All parameters can be wildcarded, with a 879.Ql * 880for 881.Ar instance , 882and a 883.Ql \&? 884for 885.Ar attachment 886and the locators. 887.\" 888.It Ic no Ar instance Op Ic at Ar attachment 889Removes the previously configured instances of a device that exactly match the 890given specification. 891If two instances differ only by their locators, both are removed. 892If no 893.Ar attachment 894is specified, all matching instances are removed. 895.Pp 896If 897.Ar instance 898is a bare device name, all the previously defined instances of that device, 899regardless of the numbers or wildcard, are removed. 900.\" 901.It Ic no device at Ar attachment 902Removes all previously configured instances that attach to the specified 903attachment. 904If 905.Ar attachment 906ends with a 907.Ql * , 908all instances attaching to all the variants of 909.Ar attachment 910are removed. 911.\" 912.It Ic pseudo-device Ar device Op Ar number 913Adds support for the specified pseudo-device. 914The parameter 915.Ar number 916is passed to the initialisation function of the pseudo-device, usually to 917indicate how many instances should be created. 918It defaults to 1, and some pseudo-devices ignore that parameter. 919.\" 920.It Ic no pseudo-device Ar name 921Removes support for the specified pseudo-device. 922.\" 923.It Ic makeoptions \ 924 Ar name Ns Ic = Ns Ar value \ 925 Ns Op Ic \&, Ar name Ns Ic += Ns Ar value \ 926 Ns Op Ic \&, Ar ... 927Adds or appends to a definition in the generated 928.Pa Makefile . 929A definition cannot be overridden, it must be removed before it can be added 930again. 931Optionally, if an option 932.Li makeoptions_ Ns Aq Ar name 933is defined with 934.Ic defparam , 935the 936.Ar value 937is defined as an option too. 938.Pp 939This variant of 940.Ic makeoptions 941belongs to the options selection section. 942Both 943.Ic = 944and 945.Ic += 946can be used. 947Not to be confused with the confusingly similar variant of 948.Ic makeoptions 949used in the descriptions section. 950.\" 951.It Ic no makeoptions \ 952 Ar name \ 953 Ns Op Ic \&, Ar name \ 954 Ns Op Ic \&, Ar ... 955Removes one or more definitions from the generated 956.Pa Makefile . 957.\" 958.It Ic select Ar name 959Adds the specified attribute and its dependencies. 960.\" 961.It Ic no select Ar name 962Removes the specified attribute and all the attributes which depend on it. 963.El 964.Sh FILES 965The files are relative to the kernel source top directory (e.g., 966.Pa /usr/src/sys ) . 967.Pp 968.Bl -tag -width ".Pa conf/files" 969.It Pa arch/${MACHINE}/conf/std.${MACHINE} 970Standard configuration for the given architecture. 971This file should always be included. 972.It Pa arch/${MACHINE}/conf/GENERIC 973Standard options selection file for the given architecture. 974Users should always start changing their main kernel configuration file by 975editing a copy of this file. 976.It Pa conf/files 977Main options description file. 978.El 979.Sh EXAMPLES 980.Xr config.samples 5 981uses several examples to cover all the practical aspects of writing or 982modifying a kernel configuration file. 983.Sh SEE ALSO 984.Xr config 1 , 985.Xr options 4 , 986.Xr config.samples 5 , 987.Xr config 9 988