1Overview of Kbuild Commands 224 January 1999 3Michael Elizabeth Chastain, <mailto:mec@shout.net> 4 5 6 7=== Introduction 8 9Someday we'll get our arms around all this stuff and clean it up 10a little! Meanwhile, this file describes the system as it is today. 11 12 13 14=== Quick Start 15 16If you are building a kernel for the first time, here are the commands 17you need: 18 19 make config 20 make dep 21 make bzImage 22 23Instead of 'make config', you can run 'make menuconfig' for a full-screen 24text interface, or 'make xconfig' for an X interface using TCL/TK. 25 26'make bzImage' will leave your new kernel image in arch/i386/boot/bzImage. 27You can also use 'make bzdisk' or 'make bzlilo'. 28 29See the lilo documentation for more information on how to use lilo. 30You can also use the 'loadlin' program to boot Linux from MS-DOS. 31 32Some computers won't work with 'make bzImage', either due to hardware 33problems or very old versions of lilo or loadlin. If your kernel image 34is small, you may use 'make zImage', 'make zdisk', or 'make zlilo' 35on theses systems. 36 37If you find a file name 'vmlinux' in the top directory of the source tree, 38just ignore it. This is an intermediate file and you can't boot from it. 39 40Other architectures: the information above is oriented towards the 41i386. On other architectures, there are no 'bzImage' files; simply 42use 'zImage' or 'vmlinux' as appropriate for your architecture. 43 44Note: the difference between 'zImage' files and 'bzImage' files is that 45'bzImage' uses a different layout and a different loading algorithm, 46and thus has a larger capacity. Both files use gzip compression. 47The 'bz' in 'bzImage' stands for 'big zImage', not for 'bzip'! 48 49 50 51=== Top Level Makefile targets 52 53Here are the targets available at the top level: 54 55 make config, make oldconfig, make menuconfig, make xconfig 56 57 Configure the Linux kernel. You must do this before almost 58 anything else. 59 60 config line-oriented interface 61 oldconfig line-oriented interface, re-uses old values 62 menuconfig curses-based full-screen interface 63 xconfig X window system interface 64 65 make checkconfig 66 67 This runs a little perl script that checks the source tree for 68 missing instances of #include <linux/config.h>. Someone needs to 69 do this occasionally, because the C preprocessor will silently give 70 bad results if these symbols haven't been included (it treats 71 undefined symbols in preprocessor directives as defined to 0). 72 Superfluous uses of #include <linux/config.h> are also reported, 73 but you can ignore these, because smart CONFIG_* dependencies 74 make them harmless. 75 76 You can run 'make checkconfig' without configuring the kernel. 77 Also, 'make checkconfig' does not modify any files. 78 79 make checkhelp 80 81 This runs another little perl script that checks the source tree 82 for options that are in Config.in files but are not documented 83 in scripts/Configure.help. Again, someone needs to do this 84 occasionally. If you are adding configuration options, it's 85 nice if you do it before you publish your patch! 86 87 You can run 'make checkhelp' without configuring the kernel. 88 Also, 'make checkhelp' does not modify any files. 89 90 make dep, make depend 91 92 'make dep' is a synonym for the long form, 'make depend'. 93 94 This command does two things. First, it computes dependency 95 information about which .o files depend on which .h files. 96 It records this information in a top-level file named .hdepend 97 and in one file per source directory named .depend. 98 99 Second, if you have CONFIG_MODVERSIONS enabled, 'make dep' 100 computes symbol version information for all of the files that 101 export symbols (note that both resident and modular files may 102 export symbols). 103 104 If you do not enable CONFIG_MODVERSIONS, you only have to run 105 'make dep' once, right after the first time you configure 106 the kernel. The .hdepend files and the .depend file are 107 independent of your configuration. 108 109 If you do enable CONFIG_MODVERSIONS, you must run 'make dep' 110 every time you change your configuration, because the module 111 symbol version information depends on the configuration. 112 113[to be continued ...] 114