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