-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuilding.html
101 lines (82 loc) · 3.94 KB
/
building.html
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
<html>
<head>
<title>A Visual Expedition Inside the Linux File Systems - The Building Process</title>
<meta name="author" content="Razvan Musaloiu-E." />
<meta name="keywords" content="file systems visual expedition filesystems" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="style.css" />
</head>
<body><div id="everything">
<h2>The Building Process</h2>
<p>Trying to build all the file systems from 2.6.x is quite a
challenge by itself due the span of more than 5 years which passed
from 2.6.0 (December 2003) to 2.6.29 (March 2009).
Luckily, <tt>kbuild</tt>, the makefile-based build system did not
change that much and I had to divide the releases in two groups:
2.6.0 to 2.6.12 (older half) and 1.6.13 o 2.6.29 (newer half). For
the first one I had to use the
<p/>
<div class='command'><tt>make -C ... SUBDIRS=...</tt><em>module.o</em></div>
<p>command while for the second I was able to use a simpler one</p>
<div class='command'><tt>make fs/</tt><em>fs/module.ko</em>.</div>
<p>In both cases the sequence of configuration commands was the following:</p>
<div class='command'><tt>make mrproper<br />
make allmodconfig<br />
make prepare</tt></div>
<p>On the toolchain front I used the latest binutils (2.19.1) from
Debian 5.0 <em>Lenny</em> and two GCC versions: the 4.1.2, the latest
GCC from the 4.1 series that is available in Debian
Unstable <em>Sid</em> for the newer half and a manually-compiled
2.95.3 for the older one. To get 2.6.16 to 2.6.21 to compile I also
had to manually add an include for <tt>limits.h</tt> in
the <tt>scripts/mod/sumversion.c</tt>.
</p>
<p>From the storage perspective, the 30 kernel trees weight about 1.1 GB
in tar.bz2 form, 7.4 GB unpacked and 12.4 GB when all the file
systems are compiled. To put things into perspective, after <tt>make
bzImage</tt> the 2.6.29 is 1.3 GB and gets to 3.8 GB after <tt>make
modules</tt>. This is, of course, an upper bound because the kernel
was configured with <tt>make allmodconfig</tt>. A few more details:
the bzImage obtained this way was 3.7 MB and the 2595 .ko files that
were produced sum up to a hefty size of 889 MB.
</p>
<div class="figure">
<div class="caption">
<a name="sizes" id="sizes"><span class="sans"><b>Various sizes of the 2.6.x kernels.</b></span></a>
From bottom to top, the number indicate: the size of the .tar.bz2
archive, the uncompresses size, the size after all the file
systems were compiled.
</div>
<img src="building.png" />
</div>
<hr class="sep" />
<div class="figure">
<div class="caption">
<a name="scorecard" id="scorecard"><span class="sans"><b>The scorecard of the compilation success.</b></span></a>
The line between 2.6.12 and 2.6.13 indicates the place where the
make command had to be slightly changed. The number of rows is
65. The number of successful compiled file systems for 2.6.29 is
54. The total number of compiled file systems is
1377. <em>ext4</em> shows up with two names: <em>ext4</em>
and <em>ext4dev</em>. A notable thing is the "no file system left
behind" syndrome: once it got in the tree, a file system almost
never dies. There is only one true exception for this
rule: <em>intermezzo</em>. The other two are <em>devfs</em>
and <em>jffs</em> which were deprecated in favor of their
descendants, <em>sysfs</em> and <em>jffs2</em>.
</div>
<img src="summary.png" />
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-319751-2");
pageTracker._trackPageview();
} catch(err) {}</script>
<script src="http://razvan.musaloiu.com/software/utracker/utracker.js" type="text/javascript"></script>
</body>
</html>