Some confirmations and information about ctags and cscope.
[cascardo/kernel/slides/.git] / 01intro / intro
1 %Introduction
2 %Thadeu Cascardo
3
4 # Linux History
5
6 # What is Linux?
7
8 Linux is a POSIX-compatible modern operating system developed since
9 1991, released under the GPLv2, with contributions by thousands of
10 people. It is mostly written in C, with some assembly code.
11
12 It has grown from a non-portable Intel 386 code with thousands lines to
13 a portable code with support for dozens of architectures and hundreds
14 machines and millions of code.
15
16 # When there was no Linux
17
18 * The GNU system
19 * Minix
20 * The Usenet
21 * Intel 386
22 * Finnish student Linus Torvalds
23
24 # The beginning
25
26 * Licensing
27 * Torvalds and Tanenbaum flamewar
28 * People's contributions
29
30 # Evolution
31
32 Since version 1.2, it has supported more than only Intel x86
33 architectures, including now SPARC, PowerPC, ARM, Alpha, M68K, MIPS,
34 S/390, and many others.
35
36 Since version 2.0, it has supported SMP systems, now running in systems
37 with hundreds of processors, multi-core processors, etc. Since then, its
38 SMP support has put to scale, with most bottlenecks removed.
39
40 # Version control
41
42 * CVS
43 * Bitkeeper
44         - controversy
45         - Andrew Tridgell starts reverse-engineering the storage and
46           saves the day
47 * Linus creates git
48
49 # GregKH presentations
50
51 * Linux's growth in the 2.6 cycle
52
53 # Development model
54
55 # The old development model
56
57 * X.Y.Z
58 * Major and minor versions and releases
59 * Even minor versions are stable
60 * Odd minor versions are for development
61
62 # There is no Linux 2.7
63
64 * Development cycles were getting long
65 * Sometimes, people talk about 3.0 and breaking stuff
66 * A new development model
67
68 # The new versioning model
69
70 * After a given release, there are stable point releases: 2.6.33.X
71 * Release candidates are published by Linus: 2.6.34-rcX
72 * There is a linux-next tree that will help development for the next
73   version: 2.6.35
74
75 # The development model (or how Linus gets all those changes)
76
77 * There are subsystems and there are maintainers for those
78 * People Linus trusts who asks for pulls or send patches
79 * People send patches to maintainers and to LKML for review
80 * Andrew Morton does the "missing patches" collection
81
82 # The documentation
83
84 * Documentation/SubmittingPatches
85 * Documentation/CodingStyle
86 * Documentation/SubmitChecklist
87 * MAINTAINERS
88
89 # The tools people use
90
91 * git
92 * quilt
93 * scripts/checkpatch.pl
94 * scripts/get\\_maintainer.pl
95
96 # Tools
97
98 # ketchup
99
100 * kernel.org distributes tarballs, patches and "subpatches"
101 * ketchup makes it easier to get the right files
102 * Reduces download time
103 * Do not forget to import GPG keys or disable signature verification
104
105 # diff
106
107 * Compare two files or two trees
108 * Recursive: -r
109 * Include new files: -N
110 * Unified diff: -u
111 * Show C function: -p
112
113 # patch
114
115 * Apply changes in a patch file using standard input
116 * patch file is generated using diff
117 * Strip directory prefix: -p N
118 * Reverse patch: -R
119
120 # quilt
121
122 * Organize patch series into a directory
123 * QUILT\\_PATCHES environment variable
124 * quilt new name.patch
125 * quilt add src/file
126 * quilt refresh
127 * quile edit src/file
128 * quilt top
129 * quilt pop [-a]
130 * quilt push [-a]
131 * Never forget to do 'quilt add' before editing a file
132
133 # Linux Tree Layout
134
135 # Architecture
136
137 * arch/ARCH/
138 * arch/ARCH/include/asm/
139 * arch/ARCH/kernel/
140 * arch/ARCH/mm/
141 * arch/ARCH/lib/
142 * arch/ARCH/boot/
143 * arch/ARCH/mach-MACH/
144
145 # Headers
146
147 * include/linux/
148 * arch/ARCH/include/asm/
149 * include/asm-generic/
150 * include/OTHER/
151
152 # Main system
153
154 * kernel/
155 * mm/
156 * lib/
157 * init/
158 * ipc/
159 * fs/
160
161 # Drivers and Filesystems
162
163 * drivers/BUS/
164 * drivers/SUBSYSTEM/
165 * block/
166 * sound/
167 * fs/*
168 * fs/FILESYSTEM/
169
170 # Other subsystems
171
172 * net/
173 * crypto/
174 * security/
175 * virt/
176
177 # Others
178
179 * Documentation/
180 * scripts/
181 * samples/
182 * usr/
183 * tools/
184 * firmware/
185
186 # Browsing code
187
188 # Your editor of choice
189
190 * vim works with ctags
191 * emacs works with etags
192 * make tags
193
194 # cscope
195
196 * -k (kernel mode) ignores /usr/include/
197 * make cscope
198 * vim support
199
200 # lxr
201
202 * FIX_ME
203 * URL website
204
205 # Coding Style
206
207 * Documentation/CodingStyle
208 * scripts/checkpatch.pl
209 * scripts/Lindent
210
211 # git
212
213 # FIX_ME
214
215 # Configuration
216
217 # First configuration
218
219 * make allnoconfig/allyesconfig/allmodconfig
220 * make ranconfig
221 * make defconfig
222 * make config
223 * make menuconfig (requires ncurses)
224 * make xconfig/gconfig
225
226 # Default configurations
227
228 * make XXX\\_defconfig
229 * arch/ARCH/configs
230
231 # Updating configuration
232
233 * make oldconfig
234 * make silentoldconfig
235
236 # Kconfig
237
238 * Menus
239 * Help
240 * Dependencies
241
242 # Configuring for another architecture
243
244 * ARCH=x86\\_64 make menuconfig
245
246 # Building Linux
247
248 # Makefile rules
249
250 * make *image
251 * make bzImage (for x86)
252 * make vmlinux
253 * make modules
254 * make all
255
256 # Installing
257
258 * make modules\\_install
259         - uses INSTALL\\_MOD\\_PATH
260 * make install
261         - uses INSTALL\\_PATH
262
263 # Building out-of-tree
264
265 * make O=BUILDDIR
266
267 # Building packages
268
269 * make deb-pkg
270 * make rpm-pkg
271 * make binrpm-pkg
272 * make tar-pkg
273 * make targz-pkg
274
275 # Booting Linux
276
277 # Kernel parameters
278
279 * Documentation/kernel-parameters.txt
280 * Bootloader configuration
281 * qemu append
282
283 # Init ramdisk
284
285 * Necessary for user space to setup root
286 * filesystem initrd until 2.6.12
287 * initramfs: uses cpio (-H newc)
288
289 # Linux init
290
291 * init/*
292 * /dev/console
293 * init process
294 * kthreadd