mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
Compare commits
804
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
125f436763 | ||
|
|
3af093a503 | ||
|
|
9a43953b56 | ||
|
|
8dbf5c8999 | ||
|
|
e8b13ced38 | ||
|
|
f557cee7dc | ||
|
|
53f9ac3175 | ||
|
|
89e617e847 | ||
|
|
bf0c591485 | ||
|
|
ea8f03e60c | ||
|
|
193d1e43d9 | ||
|
|
508a5c4f33 | ||
|
|
6cd4433d3e | ||
|
|
fe11b298f6 | ||
|
|
bce46bf7f1 | ||
|
|
22cd659922 | ||
|
|
1d99c80935 | ||
|
|
c819ffee91 | ||
|
|
79a9f283de | ||
|
|
2ba51692ac | ||
|
|
005098fb1b | ||
|
|
bde9a318fb | ||
|
|
5ac9679fb0 | ||
|
|
7a1b51024a | ||
|
|
b8aa16f505 | ||
|
|
8e68069b48 | ||
|
|
4fe8c0ccf6 | ||
|
|
4ace38464e | ||
|
|
8a4848921a | ||
|
|
8932e40756 | ||
|
|
6d8ace6ee5 | ||
|
|
07741fe577 | ||
|
|
1499969120 | ||
|
|
2b55611a79 | ||
|
|
1262b6e7ef | ||
|
|
6884fee4be | ||
|
|
2b7a7354d9 | ||
|
|
f307cbf7c6 | ||
|
|
257fff664f | ||
|
|
041e243877 | ||
|
|
fb908db4ad | ||
|
|
660e9c195f | ||
|
|
ac1ef04cde | ||
|
|
eb5d4d6776 | ||
|
|
cce5686ea2 | ||
|
|
4022b1bcb5 | ||
|
|
8243a69201 | ||
|
|
577b70d724 | ||
|
|
16ca69f719 | ||
|
|
255d37589f | ||
|
|
31831d933f | ||
|
|
e92d461e1c | ||
|
|
b929761836 | ||
|
|
01eb2cd1f4 | ||
|
|
b84bec9188 | ||
|
|
5b5f6dc772 | ||
|
|
e15e075464 | ||
|
|
5b00a4c20d | ||
|
|
4d4f67b1af | ||
|
|
e86d8458da | ||
|
|
3a65add281 | ||
|
|
e43909c66d | ||
|
|
31def8459d | ||
|
|
12ce4272ee | ||
|
|
dc8bf1d248 | ||
|
|
7b676b85ea | ||
|
|
6355ac9d94 | ||
|
|
3fa2fbb8bd | ||
|
|
84fbf16f40 | ||
|
|
50396703ad | ||
|
|
6525b81507 | ||
|
|
11902433a2 | ||
|
|
fcac0d870d | ||
|
|
3316fed9db | ||
|
|
b9d0cc9dcf | ||
|
|
5d759a9d09 | ||
|
|
caa7c3508b | ||
|
|
de89ab8289 | ||
|
|
4e69adb6ab | ||
|
|
0accb2cab8 | ||
|
|
065f6e0a20 | ||
|
|
4f29a8af45 | ||
|
|
a1d48b992f | ||
|
|
7b43bbe40e | ||
|
|
b42b9b7e22 | ||
|
|
9b1392428c | ||
|
|
8f31d2ff88 | ||
|
|
54566a13ae | ||
|
|
36caa9beb0 | ||
|
|
2524288202 | ||
|
|
dcf4389bde | ||
|
|
469abceb70 | ||
|
|
7b7b9a3f1b | ||
|
|
a756a4a485 | ||
|
|
19f1b8c40b | ||
|
|
d58ebbc94c | ||
|
|
2269fa15f8 | ||
|
|
36ccd040ac | ||
|
|
6e7a81f3aa | ||
|
|
d1d9022b1f | ||
|
|
3b2816320b | ||
|
|
49597fd5cb | ||
|
|
7899a91337 | ||
|
|
e8911332da | ||
|
|
4db8e630b4 | ||
|
|
e4dc4ce8a5 | ||
|
|
3c9fc981a2 | ||
|
|
2e08dad5a8 | ||
|
|
cc1da3b822 | ||
|
|
0c05e9955d | ||
|
|
bbed85e657 | ||
|
|
25fee2345c | ||
|
|
fc2a2dc3d7 | ||
|
|
7c7f8f73ea | ||
|
|
6194afc326 | ||
|
|
4e64061a42 | ||
|
|
00cdabfa51 | ||
|
|
61b109a5ca | ||
|
|
d8544dae43 | ||
|
|
7dd44efcfa | ||
|
|
90537aaed7 | ||
|
|
5eebfaf282 | ||
|
|
0151ef5e78 | ||
|
|
703e8d6852 | ||
|
|
cf4f0a7199 | ||
|
|
df002327f6 | ||
|
|
cd23d85031 | ||
|
|
da7278fc6d | ||
|
|
3e41ca492a | ||
|
|
756934392a | ||
|
|
47bd75581e | ||
|
|
f91040a45f | ||
|
|
e60b85f661 | ||
|
|
53673d9532 | ||
|
|
7c1993fc4c | ||
|
|
6ced081a2d | ||
|
|
ee9202997b | ||
|
|
f8111d3b54 | ||
|
|
631d47d206 | ||
|
|
b27b4d206d | ||
|
|
3ca7f4621f | ||
|
|
3217288404 | ||
|
|
ad2df4cd66 | ||
|
|
772e28b8c2 | ||
|
|
c18257ea65 | ||
|
|
58b292f419 | ||
|
|
0a57f3c3fd | ||
|
|
3201624b93 | ||
|
|
3ff3b071ea | ||
|
|
bf88d91883 | ||
|
|
f5bc93e4de | ||
|
|
a44e6361bc | ||
|
|
6ebab1bf0b | ||
|
|
76deb4cec4 | ||
|
|
ca305dc1b1 | ||
|
|
2c48c7472d | ||
|
|
f891c6f7e4 | ||
|
|
cba84c4d9c | ||
|
|
36ae96d649 | ||
|
|
c97b7d2098 | ||
|
|
7c16231fec | ||
|
|
e184c99216 | ||
|
|
d932c071e9 | ||
|
|
51955d52d8 | ||
|
|
f8b4503f1b | ||
|
|
80d0f93b30 | ||
|
|
1548282786 | ||
|
|
4fcd549f56 | ||
|
|
321b3d6a1d | ||
|
|
1e42fdd201 | ||
|
|
05202f5eb0 | ||
|
|
d53e46f0a9 | ||
|
|
f711a2453a | ||
|
|
fada891e5c | ||
|
|
52c5e2e399 | ||
|
|
e2a3acbed0 | ||
|
|
c628bca2ae | ||
|
|
86dbc3fcbc | ||
|
|
24bd9d82c1 | ||
|
|
eaf934e523 | ||
|
|
2369202e83 | ||
|
|
9ab2360b15 | ||
|
|
afbae72a33 | ||
|
|
970554010c | ||
|
|
db6d85e1ff | ||
|
|
c65ae440c8 | ||
|
|
4339b22d7a | ||
|
|
58a5878421 | ||
|
|
fe3f7e4580 | ||
|
|
b225b42f05 | ||
|
|
f90c3eaf90 | ||
|
|
58703b663c | ||
|
|
2364cf3673 | ||
|
|
1ed089ed1a | ||
|
|
522de743e8 | ||
|
|
20ac296c28 | ||
|
|
73d5c0f09c | ||
|
|
6d4bf545d3 | ||
|
|
bd9abb21c5 | ||
|
|
cc7647f7d5 | ||
|
|
b687a97ef2 | ||
|
|
e6e09deced | ||
|
|
204a870ff7 | ||
|
|
d6f4c1c620 | ||
|
|
86d5582ec2 | ||
|
|
cfce0b1fae | ||
|
|
4c73310092 | ||
|
|
a5ef4c14d6 | ||
|
|
0c8552cfae | ||
|
|
b7f9f38e29 | ||
|
|
dde92f1985 | ||
|
|
30ec0405c4 | ||
|
|
3c5148ff24 | ||
|
|
dfccfe6d92 | ||
|
|
a751da838c | ||
|
|
c34bb04818 | ||
|
|
479bc51947 | ||
|
|
b0c95fd0d4 | ||
|
|
9f4689e21d | ||
|
|
93718b5a41 | ||
|
|
2a06ebce5c | ||
|
|
bff4f998b4 | ||
|
|
30817e1ce8 | ||
|
|
205b46d5bc | ||
|
|
68ef83eeae | ||
|
|
f6d0d914e3 | ||
|
|
60ea787e84 | ||
|
|
7cb0e801d5 | ||
|
|
2fa19ba691 | ||
|
|
f66b84f480 | ||
|
|
278681dc7b | ||
|
|
4388810ef9 | ||
|
|
8d74a9f3f3 | ||
|
|
3190c1f483 | ||
|
|
ca6e068bb9 | ||
|
|
f7eda1235f | ||
|
|
70b173af35 | ||
|
|
a4dea0d17f | ||
|
|
5ca9541403 | ||
|
|
4ea83d7811 | ||
|
|
843ddd9712 | ||
|
|
686f75d678 | ||
|
|
41e19993b5 | ||
|
|
a0c6c8b9af | ||
|
|
973e6f4129 | ||
|
|
daa965eccc | ||
|
|
6e8c6154fb | ||
|
|
59d735d43f | ||
|
|
4cd09c4b6a | ||
|
|
79ae0cd9e8 | ||
|
|
aaccdfc4ba | ||
|
|
f70e5d2409 | ||
|
|
6ff5668ee4 | ||
|
|
728d26ca30 | ||
|
|
f9e7ef1b41 | ||
|
|
3c17445bfd | ||
|
|
f51d8ce561 | ||
|
|
4232395f9f | ||
|
|
502a79c799 | ||
|
|
3a150c2b37 | ||
|
|
1ea7f95da6 | ||
|
|
d05b7706ed | ||
|
|
d619861976 | ||
|
|
36fd6bd0fa | ||
|
|
e5fd53e574 | ||
|
|
902ee9ccaf | ||
|
|
3785f597a0 | ||
|
|
61928d1323 | ||
|
|
a8ac7eb3f9 | ||
|
|
3793b1777b | ||
|
|
62e7ed8b60 | ||
|
|
49312f5981 | ||
|
|
eca369e8d0 | ||
|
|
e9d94149ef | ||
|
|
044d8501b5 | ||
|
|
9e195f47c2 | ||
|
|
cd403b1f05 | ||
|
|
074b0023e7 | ||
|
|
cfbf950f5d | ||
|
|
40c293d41e | ||
|
|
d6fa625300 | ||
|
|
62cba90d65 | ||
|
|
cd93e2f5f9 | ||
|
|
f2ca2f3ea2 | ||
|
|
60415d246c | ||
|
|
fa820ff30d | ||
|
|
b7e8ad7e6d | ||
|
|
49230cb103 | ||
|
|
2f97c78528 | ||
|
|
030d695853 | ||
|
|
00a436ee38 | ||
|
|
123b813394 | ||
|
|
247a4c4a73 | ||
|
|
a5694fb1e4 | ||
|
|
fc528f1b0d | ||
|
|
8e5f64e0d3 | ||
|
|
5efd8753fb | ||
|
|
c7159c3bdb | ||
|
|
e86ba8bd19 | ||
|
|
2edd28f97b | ||
|
|
19477b0574 | ||
|
|
7c0ea24c90 | ||
|
|
68c2bd1e7b | ||
|
|
9e3e10d2c1 | ||
|
|
c610524eb0 | ||
|
|
c2e925be16 | ||
|
|
61fb567304 | ||
|
|
dfee6ac3ec | ||
|
|
348785cfbc | ||
|
|
4b1637c671 | ||
|
|
1372bfd60a | ||
|
|
e85272f436 | ||
|
|
3a598264dc | ||
|
|
f633d9e9c8 | ||
|
|
2601d0686b | ||
|
|
d20f9609ce | ||
|
|
cf58c5c2a9 | ||
|
|
13aaba9380 | ||
|
|
dc1c0a6ccf | ||
|
|
00865a8027 | ||
|
|
9417ebb550 | ||
|
|
7b3aef444e | ||
|
|
fb4f1e3253 | ||
|
|
f30b5c9ca2 | ||
|
|
006737bcc6 | ||
|
|
c325ead317 | ||
|
|
cccfe78a6a | ||
|
|
acc6543257 | ||
|
|
7519621c59 | ||
|
|
1b97631a73 | ||
|
|
ca6efbe093 | ||
|
|
3c8e99279f | ||
|
|
71840f80e9 | ||
|
|
00deed40cc | ||
|
|
d24002df4f | ||
|
|
2f0dff243a | ||
|
|
207a82b176 | ||
|
|
47148b669b | ||
|
|
9f4cb39873 | ||
|
|
fb01925bdf | ||
|
|
b1cdb09358 | ||
|
|
f8e4561c47 | ||
|
|
29aa359512 | ||
|
|
8593e88271 | ||
|
|
8fe3b6de83 | ||
|
|
8eff936f97 | ||
|
|
110ade1398 | ||
|
|
da863ed2de | ||
|
|
5c6112a372 | ||
|
|
65d6a086d0 | ||
|
|
455795862c | ||
|
|
002f8f7c21 | ||
|
|
e3daf570b2 | ||
|
|
d917526690 | ||
|
|
dac1ed52b8 | ||
|
|
ad50fc1180 | ||
|
|
76b7a59d9b | ||
|
|
2d772c5c9a | ||
|
|
9e3eca6950 | ||
|
|
582e55cdc4 | ||
|
|
5ac0d65e2e | ||
|
|
b810c311d0 | ||
|
|
8dd10ab852 | ||
|
|
b16aca65b6 | ||
|
|
33c3b18d40 | ||
|
|
e7a1ff1759 | ||
|
|
81ec37db03 | ||
|
|
ce0052dca8 | ||
|
|
7561bde29d | ||
|
|
728e74eef6 | ||
|
|
4928cfdad2 | ||
|
|
06adfc82ff | ||
|
|
f5588d2f41 | ||
|
|
1f2d29244a | ||
|
|
13a32db008 | ||
|
|
6664288bbc | ||
|
|
579f60a4e5 | ||
|
|
9790818856 | ||
|
|
a2622ee1cc | ||
|
|
2315cb466c | ||
|
|
19a2446669 | ||
|
|
092f32f05b | ||
|
|
11236082ea | ||
|
|
636299cc50 | ||
|
|
84cd6e2879 | ||
|
|
0f8fdcc8b2 | ||
|
|
f6a7cd3d17 | ||
|
|
2a5ae102fe | ||
|
|
9bbcd45d64 | ||
|
|
009bf82dbc | ||
|
|
1301164d4c | ||
|
|
14b7a703a9 | ||
|
|
aa7121490f | ||
|
|
261bf12dcf | ||
|
|
324e93a919 | ||
|
|
5b956a8ac8 | ||
|
|
98be6a00af | ||
|
|
62eafe888b | ||
|
|
504e540242 | ||
|
|
225b464978 | ||
|
|
69e36bc547 | ||
|
|
b3ccacd20f | ||
|
|
11f52a0d70 | ||
|
|
c6c180757e | ||
|
|
0bcf40674e | ||
|
|
bda2eea18d | ||
|
|
b5381c0919 | ||
|
|
4a1f0661d6 | ||
|
|
a9509cdf9a | ||
|
|
aa4e796168 | ||
|
|
af670e41f3 | ||
|
|
5fb0adb667 | ||
|
|
6ee3c49cc8 | ||
|
|
1b38e4d0cf | ||
|
|
abca3d8f72 | ||
|
|
35662478d7 | ||
|
|
36854134df | ||
|
|
9015cd0364 | ||
|
|
6728379880 | ||
|
|
fa8456816f | ||
|
|
7f6d84c46f | ||
|
|
454e26626c | ||
|
|
e8e3b99925 | ||
|
|
a1fafbfb0e | ||
|
|
563b471fc7 | ||
|
|
e705c4bdf8 | ||
|
|
f1c162c0c6 | ||
|
|
16cbb2b422 | ||
|
|
3c5fa0cfe3 | ||
|
|
d91146efac | ||
|
|
2455b65f2e | ||
|
|
7d54a86a52 | ||
|
|
211c9922c4 | ||
|
|
4e0e3cc8af | ||
|
|
443bdcb325 | ||
|
|
fbd0ada4bb | ||
|
|
9f8d97188c | ||
|
|
8b4dd784f7 | ||
|
|
7ab4e9c240 | ||
|
|
028049bbd4 | ||
|
|
bef3d7d863 | ||
|
|
b6092dd0ea | ||
|
|
520ec8572d | ||
|
|
558f2f176e | ||
|
|
8d3a5e79b9 | ||
|
|
77219c6e56 | ||
|
|
952982deb9 | ||
|
|
ca924e1180 | ||
|
|
1e402724c6 | ||
|
|
eef046d8a5 | ||
|
|
436fb5ce95 | ||
|
|
529a2dc5e0 | ||
|
|
c786d8603e | ||
|
|
a4a19300f1 | ||
|
|
e01f0b9514 | ||
|
|
72ca6286fb | ||
|
|
1b9e348ef6 | ||
|
|
fa003769c5 | ||
|
|
05581f3233 | ||
|
|
c13d2ca24e | ||
|
|
063d1c64f3 | ||
|
|
bc61b4d21f | ||
|
|
4056902921 | ||
|
|
f0ae3c922f | ||
|
|
9a41c6b1d4 | ||
|
|
21236a8556 | ||
|
|
5ad5c7796a | ||
|
|
7d6453ac9c | ||
|
|
c67be0dccd | ||
|
|
ada4cc670d | ||
|
|
edb9c0d7b0 | ||
|
|
3899310dca | ||
|
|
1a651ece2c | ||
|
|
9b91c55408 | ||
|
|
cbda4d4b31 | ||
|
|
3c0de98670 | ||
|
|
0eb234f7be | ||
|
|
e92b021096 | ||
|
|
505fa5c440 | ||
|
|
bc0e0af007 | ||
|
|
e4f6307b46 | ||
|
|
e326ae2ea3 | ||
|
|
55b7e8a890 | ||
|
|
72bae78465 | ||
|
|
06663a489d | ||
|
|
d17cbe8f8f | ||
|
|
07f1a2818d | ||
|
|
bec90507d7 | ||
|
|
c7b6b37e1d | ||
|
|
0651145eca | ||
|
|
1675300153 | ||
|
|
bbc286b007 | ||
|
|
7ca6bf9d91 | ||
|
|
83038ffbbc | ||
|
|
f85b90abd2 | ||
|
|
8ba5340fb8 | ||
|
|
f6e3c77ef1 | ||
|
|
3c5b1b14d9 | ||
|
|
a87a341417 | ||
|
|
2d191cc4fb | ||
|
|
fc73dcd7ac | ||
|
|
2a5087243f | ||
|
|
81850d7016 | ||
|
|
84f224a0d7 | ||
|
|
5aef9e78a5 | ||
|
|
d08bfbd094 | ||
|
|
2b8c514095 | ||
|
|
310b41da89 | ||
|
|
ce7c6fd0a9 | ||
|
|
5ff25f9b8f | ||
|
|
26fef18cb8 | ||
|
|
98ca2ba846 | ||
|
|
92fca67cf5 | ||
|
|
215f9012d5 | ||
|
|
9337ad1a47 | ||
|
|
1974a490d8 | ||
|
|
31f1004b74 | ||
|
|
32f9590f2a | ||
|
|
3792b0a01e | ||
|
|
cf37f79b94 | ||
|
|
0a1cbcf442 | ||
|
|
456c1219ee | ||
|
|
4d452e493f | ||
|
|
ba86939fcb | ||
|
|
9cc70dceb4 | ||
|
|
eb321e77f7 | ||
|
|
fa8457769b | ||
|
|
4e418f40bc | ||
|
|
b56d735993 | ||
|
|
562b652532 | ||
|
|
547c203a98 | ||
|
|
098d98d047 | ||
|
|
ab6cc80541 | ||
|
|
b9ff0c2f81 | ||
|
|
a936d03921 | ||
|
|
c62dcb6fa0 | ||
|
|
b0574dee64 | ||
|
|
07996ed613 | ||
|
|
85c66cb4c8 | ||
|
|
7c4acb2539 | ||
|
|
687f54b6b8 | ||
|
|
bfbcbe125e | ||
|
|
b9104596eb | ||
|
|
f328ddf8bb | ||
|
|
899a275d55 | ||
|
|
1bb94397a5 | ||
|
|
844cb6f07d | ||
|
|
d140ed69d8 | ||
|
|
ef1679fa92 | ||
|
|
9fe0449a36 | ||
|
|
a2018f29ff | ||
|
|
80d4c36c2e | ||
|
|
a92313f507 | ||
|
|
b92f3d57e2 | ||
|
|
041bbcac27 | ||
|
|
18c2360755 | ||
|
|
7692b3eab6 | ||
|
|
a033c6beb3 | ||
|
|
68b1a3d231 | ||
|
|
adcd2008e1 | ||
|
|
4ca2160923 | ||
|
|
817ae7fd92 | ||
|
|
13d0ca1bd4 | ||
|
|
372831bc72 | ||
|
|
161b9f4dde | ||
|
|
2745c43fd4 | ||
|
|
1a1f49c966 | ||
|
|
5343bda835 | ||
|
|
9f3e0b8ec5 | ||
|
|
1f9a7e6efc | ||
|
|
ca0ad141b6 | ||
|
|
a6d7cb06db | ||
|
|
a40c3176c2 | ||
|
|
9f88649c8c | ||
|
|
8bc82ce256 | ||
|
|
c95941d65d | ||
|
|
a3d2f9bee9 | ||
|
|
ee4e0d44b3 | ||
|
|
f273c77790 | ||
|
|
61a9fc4684 | ||
|
|
8ab768e9d4 | ||
|
|
7b326e1351 | ||
|
|
c6ec01220b | ||
|
|
8fb66b3a69 | ||
|
|
0612bf14c0 | ||
|
|
d7c7eb7897 | ||
|
|
d0f94a1f1c | ||
|
|
3195af515d | ||
|
|
482c5a1631 | ||
|
|
9d7344365c | ||
|
|
c17c927969 | ||
|
|
821c05373e | ||
|
|
7c1baa7ada | ||
|
|
8ae7fd5f6f | ||
|
|
4b1ec86348 | ||
|
|
24b486cfc3 | ||
|
|
1f6d422a9a | ||
|
|
f4c8bacd5a | ||
|
|
c14ac03919 | ||
|
|
42afef19eb | ||
|
|
460515b963 | ||
|
|
08ba682d78 | ||
|
|
19c9df87bc | ||
|
|
28f2016a13 | ||
|
|
e865376cd5 | ||
|
|
0f2f1a5cc4 | ||
|
|
ded4da6a6e | ||
|
|
fa2dd120e4 | ||
|
|
2e5bb743c7 | ||
|
|
ec2469fa84 | ||
|
|
0263e922f1 | ||
|
|
f0932cbf46 | ||
|
|
8f83254679 | ||
|
|
4e769ee998 | ||
|
|
191c0eea0a | ||
|
|
8d19545f6b | ||
|
|
41df320a22 | ||
|
|
45ec04e62e | ||
|
|
3764236446 | ||
|
|
bd47df86dc | ||
|
|
c16ba0eb9d | ||
|
|
5f9112c4a8 | ||
|
|
1e67cbf7d0 | ||
|
|
5a0b14429c | ||
|
|
1a8f41bc4c | ||
|
|
ce8fc4e5a0 | ||
|
|
07b947e669 | ||
|
|
c7b7ecb074 | ||
|
|
d66e649b3f | ||
|
|
18637363ba | ||
|
|
adadc62ff3 | ||
|
|
43921a97ca | ||
|
|
3ccfc3bed1 | ||
|
|
55d36b7e2b | ||
|
|
9bfb72e5d8 | ||
|
|
50016e0e32 | ||
|
|
88efa06787 | ||
|
|
ba8c5e1f8c | ||
|
|
073695fe81 | ||
|
|
133581fe5c | ||
|
|
dc73edd77c | ||
|
|
dc267a70d2 | ||
|
|
c58d9a073e | ||
|
|
84bf7c7d5d | ||
|
|
d6279335bb | ||
|
|
dfe653fc49 | ||
|
|
4ea54f2d0a | ||
|
|
e8d6ef494e | ||
|
|
47ba3d654e | ||
|
|
be514997d2 | ||
|
|
694616c180 | ||
|
|
7aca93df60 | ||
|
|
8d969f6798 | ||
|
|
5ef3bd9c37 | ||
|
|
e7e309350c | ||
|
|
3c77f34cc1 | ||
|
|
95a60f61ce | ||
|
|
99c588976f | ||
|
|
82889257ad | ||
|
|
f2151e4b57 | ||
|
|
6ec8139b75 | ||
|
|
2430aa08f4 | ||
|
|
f0ef2907eb | ||
|
|
cb145227ae | ||
|
|
6fdc01aaf8 | ||
|
|
3b34bb5343 | ||
|
|
6608e1b9e2 | ||
|
|
20d2c3d284 | ||
|
|
e079197cd6 | ||
|
|
04ed0a2bf7 | ||
|
|
c085904fd1 | ||
|
|
9bf749438c | ||
|
|
d409155dc8 | ||
|
|
69be37a233 | ||
|
|
83b3d5eee0 | ||
|
|
434d8607cc | ||
|
|
29286d8365 | ||
|
|
25de0c4bba | ||
|
|
7e9a0794d0 | ||
|
|
0f4f88a9d9 | ||
|
|
d52edd8638 | ||
|
|
4d1186c003 | ||
|
|
10436796ef | ||
|
|
afd18d4fa3 | ||
|
|
ce03b57275 | ||
|
|
0623b3f394 | ||
|
|
89b82dcc84 | ||
|
|
50fa325cd0 | ||
|
|
70ba31d512 | ||
|
|
c19c1a588f | ||
|
|
1d4df6991d | ||
|
|
cec4786ec2 | ||
|
|
cb6a267f1e | ||
|
|
5cbce8e5a6 | ||
|
|
edec404c96 | ||
|
|
a7575f806c | ||
|
|
9fac49f209 | ||
|
|
5b7c93c156 | ||
|
|
95dfefd185 | ||
|
|
cb7e6d5e4e | ||
|
|
d66583f802 | ||
|
|
f6fb25a807 | ||
|
|
fc6fa9d5e2 | ||
|
|
6336679de2 | ||
|
|
bdd07e3f83 | ||
|
|
225bd167d7 | ||
|
|
f5611449b1 | ||
|
|
ec20f58cbc | ||
|
|
f4d54f710a | ||
|
|
efbf4469d4 | ||
|
|
2465e9eb0b | ||
|
|
1c5533a18f | ||
|
|
9350d46a2a | ||
|
|
bd6d015f8e | ||
|
|
9819c1d771 | ||
|
|
31ce1aae5f | ||
|
|
a0ca5d0c06 | ||
|
|
45d89b3d1a | ||
|
|
d3b0391801 | ||
|
|
a75a6efb40 | ||
|
|
01997403fe | ||
|
|
d2b9bc0db8 | ||
|
|
0d6c15713b | ||
|
|
5f44ad81f0 | ||
|
|
447e862f7e | ||
|
|
cc1aa59379 | ||
|
|
8b55b165f2 | ||
|
|
b1c1211adb | ||
|
|
cfd87522af | ||
|
|
b06ee733ef | ||
|
|
adbb228ab7 | ||
|
|
dbcd1c22b7 | ||
|
|
16d25afeb3 | ||
|
|
7e5417927c | ||
|
|
9ad024eb56 | ||
|
|
765c4a7662 | ||
|
|
bef8f221fd | ||
|
|
421dbceb11 | ||
|
|
05b7b72e3c | ||
|
|
d60914e5b6 | ||
|
|
22c4b56b59 | ||
|
|
d654cfa0fd | ||
|
|
0efa52337e | ||
|
|
05930f0511 | ||
|
|
be705674e1 | ||
|
|
8c2e2a840c | ||
|
|
7920c7861f | ||
|
|
074ac263be | ||
|
|
0daef3e856 | ||
|
|
08ca05f500 | ||
|
|
8a1b524d47 | ||
|
|
d61ce9f2a4 | ||
|
|
4cf606a18e | ||
|
|
eea6c34440 | ||
|
|
3688d873d4 | ||
|
|
db34e7d7f1 | ||
|
|
e269083de6 | ||
|
|
ab6e2839e5 | ||
|
|
b0016b886e | ||
|
|
b296e6bad2 | ||
|
|
651a5cbd66 | ||
|
|
3f99b1e9c0 | ||
|
|
d34ac5a182 | ||
|
|
8d793b9a7e | ||
|
|
90ed71c809 | ||
|
|
8fa9d1fb3a | ||
|
|
5223272174 | ||
|
|
17b6dcd892 | ||
|
|
5cb4326ac5 | ||
|
|
48b4b138ff | ||
|
|
4b55a25ce8 | ||
|
|
791601f51d | ||
|
|
5cf05b32d2 | ||
|
|
8b2e640b8c | ||
|
|
553fec6022 | ||
|
|
6b874486ce | ||
|
|
b117211d4a | ||
|
|
6239c1ac50 | ||
|
|
ae8a5f8069 | ||
|
|
23e6ed1deb | ||
|
|
acd07871bc | ||
|
|
4080247fe9 | ||
|
|
6f9468d1b7 | ||
|
|
6658d7314d | ||
|
|
d72f916818 | ||
|
|
ae07073cec | ||
|
|
30aa899004 | ||
|
|
ad4a9bed29 | ||
|
|
79d769da3f | ||
|
|
e1a55a7b85 | ||
|
|
7f437f37f3 | ||
|
|
9a77866af3 | ||
|
|
9e5921e84c | ||
|
|
b5cfb73063 | ||
|
|
cb5190119e | ||
|
|
d30c778c28 | ||
|
|
9a37393599 | ||
|
|
b7c560f837 | ||
|
|
1ce29ae611 | ||
|
|
dabb354821 | ||
|
|
38e0cfc823 | ||
|
|
228a5751f2 | ||
|
|
d2dee25f8c | ||
|
|
f397c4797c |
No files matched your search
@@ -0,0 +1,9 @@
|
||||
.deps
|
||||
Makefile
|
||||
autom4te.cache
|
||||
config.cache
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
stamp-h
|
||||
stamp-h1
|
||||
@@ -1 +0,0 @@
|
||||
po/exclude.pot binary
|
||||
-285
@@ -1,285 +0,0 @@
|
||||
#
|
||||
# Ignore patterns in this directory and all subdirectories.
|
||||
#
|
||||
*.1
|
||||
*.8
|
||||
*.a
|
||||
*.exec
|
||||
*.exec.exe
|
||||
*.image
|
||||
*.image.exe
|
||||
*.img
|
||||
*.log
|
||||
*.lst
|
||||
*.marker
|
||||
*.mod
|
||||
*.o
|
||||
*.pf2
|
||||
*.pp
|
||||
*.pyc
|
||||
*.trs
|
||||
*~
|
||||
.deps-core/
|
||||
.deps-util/
|
||||
.deps/
|
||||
.dirstamp
|
||||
DISTLIST
|
||||
GPATH
|
||||
GRTAGS
|
||||
GSYMS
|
||||
GTAGS
|
||||
Makefile
|
||||
Makefile.in
|
||||
ascii.bitmaps
|
||||
genkernsyms.sh
|
||||
gensymlist.sh
|
||||
grub-bin2h
|
||||
grub-emu
|
||||
grub-emu-lite
|
||||
grub-emu-lite.exe
|
||||
grub-emu.exe
|
||||
grub-macho2img
|
||||
grub_emu_init.c
|
||||
grub_emu_init.h
|
||||
grub_probe_init.c
|
||||
grub_probe_init.h
|
||||
grub_script.tab.c
|
||||
grub_script.tab.h
|
||||
grub_script.yy.c
|
||||
grub_script.yy.h
|
||||
grub_script_check_init.c
|
||||
grub_script_check_init.h
|
||||
grub_setup_init.c
|
||||
grub_setup_init.h
|
||||
mdate-sh
|
||||
mod-*.c
|
||||
update-grub_lib
|
||||
widthspec.bin
|
||||
|
||||
#
|
||||
# Ignore patterns relative to this .gitignore file's directory.
|
||||
#
|
||||
/00_header
|
||||
/10_*
|
||||
/20_linux_xen
|
||||
/30_os-prober
|
||||
/30_uefi-firmware
|
||||
/40_custom
|
||||
/41_custom
|
||||
/ABOUT-NLS
|
||||
/ChangeLog
|
||||
/INSTALL.grub
|
||||
/Makefile.util.am
|
||||
/Makefile.utilgcry.def
|
||||
/aclocal.m4
|
||||
/ahci_test
|
||||
/ascii.h
|
||||
/autom4te.cache/
|
||||
/btrfs_test
|
||||
/build-aux/
|
||||
/build-grub-gen-asciih
|
||||
/build-grub-gen-widthspec
|
||||
/build-grub-mkfont
|
||||
/cdboot_test
|
||||
/cmp_test
|
||||
/compile
|
||||
/config-util.h
|
||||
/config-util.h.in
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/contrib
|
||||
/core_compress_test
|
||||
/cpio_test
|
||||
/date_test
|
||||
/depcomp
|
||||
/docs/*.info
|
||||
/docs/*.info-[0-9]*
|
||||
/docs/stamp-1
|
||||
/docs/stamp-vti
|
||||
/docs/version-dev.texi
|
||||
/docs/version.texi
|
||||
/ehci_test
|
||||
/erofs_test
|
||||
/example_grub_script_test
|
||||
/example_scripted_test
|
||||
/example_unit_test
|
||||
/exfat_test
|
||||
/ext234_test
|
||||
/f2fs_test
|
||||
/fat_test
|
||||
/fddboot_test
|
||||
/file_filter_test
|
||||
/garbage-gen
|
||||
/garbage-gen.exe
|
||||
/gettext_strings_test
|
||||
/gnulib/
|
||||
/grub-2.[0-9]*/
|
||||
/grub-2.[0-9]*.tar.gz
|
||||
/grub-bios-setup
|
||||
/grub-bios-setup.exe
|
||||
/grub-core/*.module
|
||||
/grub-core/*.module.exe
|
||||
/grub-core/*.pp
|
||||
/grub-core/Makefile.core.am
|
||||
/grub-core/Makefile.gcry.def
|
||||
/grub-core/bootinfo.txt
|
||||
/grub-core/build-grub-module-verifier
|
||||
/grub-core/build-grub-pe2elf.exe
|
||||
/grub-core/contrib
|
||||
/grub-core/gdb_grub
|
||||
/grub-core/genmod.sh
|
||||
/grub-core/gensyminfo.sh
|
||||
/grub-core/gentrigtables
|
||||
/grub-core/gentrigtables.exe
|
||||
/grub-core/gmodule.pl
|
||||
/grub-core/grub.chrp
|
||||
/grub-core/kernel.img.bin
|
||||
/grub-core/lib/gnulib
|
||||
/grub-core/lib/libgcrypt-grub
|
||||
/grub-core/lib/libtasn1-grub
|
||||
/grub-core/modinfo.sh
|
||||
/grub-core/rs_decoder.h
|
||||
/grub-core/symlist.c
|
||||
/grub-core/symlist.h
|
||||
/grub-core/tests/asn1/tests
|
||||
/grub-core/trigtables.c
|
||||
/grub-core/unidata.c
|
||||
/grub-editenv
|
||||
/grub-editenv.exe
|
||||
/grub-file
|
||||
/grub-file.exe
|
||||
/grub-fs-tester
|
||||
/grub-fstest
|
||||
/grub-fstest.exe
|
||||
/grub-glue-efi
|
||||
/grub-glue-efi.exe
|
||||
/grub-install
|
||||
/grub-install.exe
|
||||
/grub-kbdcomp
|
||||
/grub-macbless
|
||||
/grub-macbless.exe
|
||||
/grub-menulst2cfg
|
||||
/grub-menulst2cfg.exe
|
||||
/grub-mk*
|
||||
/grub-mount
|
||||
/grub-ofpathname
|
||||
/grub-ofpathname.exe
|
||||
/grub-probe
|
||||
/grub-probe.exe
|
||||
/grub-protect
|
||||
/grub-protect.exe
|
||||
/grub-reboot
|
||||
/grub-render-label
|
||||
/grub-render-label.exe
|
||||
/grub-script-check
|
||||
/grub-script-check.exe
|
||||
/grub-set-default
|
||||
/grub-shell
|
||||
/grub-shell-tester
|
||||
/grub-sparc64-setup
|
||||
/grub-sparc64-setup.exe
|
||||
/grub-syslinux2cfg
|
||||
/grub-syslinux2cfg.exe
|
||||
/grub_cmd_date
|
||||
/grub_cmd_echo
|
||||
/grub_cmd_regexp
|
||||
/grub_cmd_set_date
|
||||
/grub_cmd_sleep
|
||||
/grub_cmd_test
|
||||
/grub_cmd_tr
|
||||
/grub_fstest_init.c
|
||||
/grub_fstest_init.h
|
||||
/grub_func_test
|
||||
/grub_script_blanklines
|
||||
/grub_script_blockarg
|
||||
/grub_script_break
|
||||
/grub_script_comments
|
||||
/grub_script_continue
|
||||
/grub_script_dollar
|
||||
/grub_script_echo1
|
||||
/grub_script_echo_keywords
|
||||
/grub_script_escape_comma
|
||||
/grub_script_eval
|
||||
/grub_script_expansion
|
||||
/grub_script_final_semicolon
|
||||
/grub_script_for1
|
||||
/grub_script_functions
|
||||
/grub_script_gettext
|
||||
/grub_script_if
|
||||
/grub_script_leading_whitespace
|
||||
/grub_script_no_commands
|
||||
/grub_script_not
|
||||
/grub_script_return
|
||||
/grub_script_setparams
|
||||
/grub_script_shift
|
||||
/grub_script_strcmp
|
||||
/grub_script_test
|
||||
/grub_script_vars1
|
||||
/grub_script_while1
|
||||
/gzcompress_test
|
||||
/hddboot_test
|
||||
/help_test
|
||||
/hfs_test
|
||||
/hfsplus_test
|
||||
/include/grub/cpu
|
||||
/include/grub/gcrypt/g10lib.h
|
||||
/include/grub/gcrypt/gcrypt.h
|
||||
/include/grub/machine
|
||||
/install-sh
|
||||
/iso9660_test
|
||||
/jfs_test
|
||||
/lib/libgcrypt-grub
|
||||
/libgrub_a_init.c
|
||||
/lzocompress_test
|
||||
/luks1_test
|
||||
/luks2_test
|
||||
/m4/*
|
||||
!/m4/ax_check_link_flag.m4
|
||||
/minixfs_test
|
||||
/missing
|
||||
/netboot_test
|
||||
/nilfs2_test
|
||||
/ntfs_test
|
||||
/ohci_test
|
||||
/partmap_test
|
||||
/pata_test
|
||||
/po/*.gmo
|
||||
/po/*.mo
|
||||
/po/Makefile.in.in
|
||||
/po/Makevars
|
||||
/po/Makevars.template
|
||||
/po/POTFILES
|
||||
/po/POTFILES-shell.in
|
||||
/po/POTFILES.in
|
||||
/po/Rules-quot
|
||||
/po/grub.pot
|
||||
/po/remove-potcdate.sed
|
||||
/po/stamp-po
|
||||
/printf_test
|
||||
/priority_queue_unit_test
|
||||
/pseries_test
|
||||
/reiserfs_test
|
||||
/romfs_test
|
||||
/squashfs_test
|
||||
/stamp-h
|
||||
/stamp-h.in
|
||||
/stamp-h1
|
||||
/syslinux_test
|
||||
/tar_test
|
||||
/test_sha512sum
|
||||
/test_unset
|
||||
/tests/syslinux/ubuntu10.04_grub.cfg
|
||||
/texinfo.tex
|
||||
/udf_test
|
||||
/uhci_test
|
||||
/util/bash-completion.d/grub
|
||||
/widthspec.h
|
||||
/xfs_test
|
||||
/xzcompress_test
|
||||
/zfs_test
|
||||
/zfs_zstd_test
|
||||
-109
@@ -1,109 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0+
|
||||
# Originally Copyright Roger Meier <r.meier@siemens.com>
|
||||
# Adapted for GRUB by Alexander Graf <agraf@suse.de>
|
||||
#
|
||||
# Build GRUB on Travis CI - https://www.travis-ci.org/
|
||||
#
|
||||
|
||||
dist: xenial
|
||||
|
||||
language: c
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- autopoint
|
||||
- libsdl1.2-dev
|
||||
- lzop
|
||||
- ovmf
|
||||
- python
|
||||
- qemu-system
|
||||
- unifont
|
||||
|
||||
env:
|
||||
global:
|
||||
# Include all cross toolchain paths, so we can just call them later down.
|
||||
- PATH=/tmp/qemu-install/bin:/tmp/grub/bin:/usr/bin:/bin:/tmp/cross/gcc-8.1.0-nolibc/aarch64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/arm-linux-gnueabi/bin:/tmp/cross/gcc-8.1.0-nolibc/ia64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/mips64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/powerpc64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv32-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/riscv64-linux/bin:/tmp/cross/gcc-8.1.0-nolibc/sparc64-linux/bin
|
||||
|
||||
before_script:
|
||||
# Install necessary toolchains based on $CROSS_TARGETS variable.
|
||||
- mkdir /tmp/cross
|
||||
# These give us binaries like /tmp/cross/gcc-8.1.0-nolibc/ia64-linux/bin/ia64-linux-gcc
|
||||
- for i in $CROSS_TARGETS; do
|
||||
( cd /tmp/cross; wget -t 3 -O - https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-$i.tar.xz | tar xJ );
|
||||
done
|
||||
|
||||
script:
|
||||
# Comments must be outside the command strings below, or the Travis parser
|
||||
# will get confused.
|
||||
- ./bootstrap
|
||||
|
||||
# Build all selected GRUB targets.
|
||||
- for target in $GRUB_TARGETS; do
|
||||
plat=${target#*-};
|
||||
arch=${target%-*};
|
||||
[ "$arch" = "arm64" ] && arch=aarch64-linux;
|
||||
[ "$arch" = "arm" ] && arch=arm-linux-gnueabi;
|
||||
[ "$arch" = "ia64" ] && arch=ia64-linux;
|
||||
[ "$arch" = "mipsel" ] && arch=mips64-linux;
|
||||
[ "$arch" = "powerpc" ] && arch=powerpc64-linux;
|
||||
[ "$arch" = "riscv32" ] && arch=riscv32-linux;
|
||||
[ "$arch" = "riscv64" ] && arch=riscv64-linux;
|
||||
[ "$arch" = "sparc64" ] && arch=sparc64-linux;
|
||||
echo "Building $target";
|
||||
mkdir obj-$target;
|
||||
JOBS=`getconf _NPROCESSORS_ONLN 2> /dev/null || echo 1`;
|
||||
[ "$JOBS" == 1 ] || JOBS=$(($JOBS + 1));
|
||||
( cd obj-$target && ../configure --target=$arch --with-platform=$plat --prefix=/tmp/grub && make -j$JOBS && make -j$JOBS install ) &> log || ( cat log; false );
|
||||
done
|
||||
|
||||
# Our test canary.
|
||||
- echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" > grub.cfg
|
||||
|
||||
# Assemble images and possibly run them.
|
||||
- for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal; done
|
||||
|
||||
# Run images we know how to run.
|
||||
- if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -m 512 -no-reboot -nographic -net nic -net user,tftp=.,bootfile=grub-x86_64-efi | tee grub.log && grep "hello world" grub.log; fi
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# Each env setting here is a dedicated build.
|
||||
- name: "x86_64"
|
||||
env:
|
||||
- GRUB_TARGETS="x86_64-efi x86_64-xen"
|
||||
- name: "i386"
|
||||
env:
|
||||
- GRUB_TARGETS="i386-coreboot i386-efi i386-ieee1275 i386-multiboot i386-pc i386-qemu i386-xen i386-xen_pvh"
|
||||
- name: "powerpc"
|
||||
env:
|
||||
- GRUB_TARGETS="powerpc-ieee1275"
|
||||
- CROSS_TARGETS="powerpc64-linux"
|
||||
- name: "sparc64"
|
||||
env:
|
||||
- GRUB_TARGETS="sparc64-ieee1275"
|
||||
- CROSS_TARGETS="sparc64-linux"
|
||||
- name: "ia64"
|
||||
env:
|
||||
- GRUB_TARGETS="ia64-efi"
|
||||
- CROSS_TARGETS="ia64-linux"
|
||||
- name: "mips"
|
||||
env:
|
||||
- GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
|
||||
- CROSS_TARGETS="mips64-linux"
|
||||
- name: "arm"
|
||||
env:
|
||||
- GRUB_TARGETS="arm-coreboot arm-efi arm-uboot"
|
||||
- CROSS_TARGETS="arm-linux-gnueabi"
|
||||
- name: "arm64"
|
||||
env:
|
||||
- GRUB_TARGETS="arm64-efi"
|
||||
- CROSS_TARGETS="aarch64-linux"
|
||||
- name: "riscv32"
|
||||
env:
|
||||
- GRUB_TARGETS="riscv32-efi"
|
||||
- CROSS_TARGETS="riscv32-linux"
|
||||
- name: "riscv64"
|
||||
env:
|
||||
- GRUB_TARGETS="riscv64-efi"
|
||||
- CROSS_TARGETS="riscv64-linux"
|
||||
@@ -1,23 +1,54 @@
|
||||
VaX#n8 (real name unknown) wrote shared_src/fsys_ext2fs.c.
|
||||
|
||||
Heiko Schroeder rewrote shared_src/stage1.S to be more readable.
|
||||
|
||||
The following authors assigned copyright on their work to the Free
|
||||
Software Foundation:
|
||||
|
||||
Yoshinori K. Okuji designed and implemented the initial version.
|
||||
Erich Stefan Boleyn originally designed and implemented GRUB.
|
||||
|
||||
Jeroen Dekkers added initrd support, Multiboot support, and fixed bugs
|
||||
in ext2fs.
|
||||
Gordon Matzigkeit adopted GRUB into the GNU Project. He fixed several
|
||||
bugs, added symbolic link support to shared_src/fsys_ext2fs.c, and
|
||||
began the implementation of /sbin/grub. He was an official maintainer.
|
||||
|
||||
Marco Gerards added ext2fs support, grub-emu, a new command-line
|
||||
engine, and fixed many bugs.
|
||||
Yoshinori K. Okuji contributed many bugfixes and new features, such as
|
||||
working LBA support, /sbin/grub support for configuration files, the
|
||||
script /sbin/grub-install, the utility /bin/mbchk, the new engine for
|
||||
builtin commands, disk swapping support, keyboard configuration support,
|
||||
network support, online help support, command-line history support,
|
||||
hidden menu support, the new Linux loader, serial terminal support,
|
||||
single-line editing support, the utility /sbin/grub-md5-crypt, the new
|
||||
GRUB manual, and several new commands. He is the current official
|
||||
maintainer.
|
||||
|
||||
Omniflux added terminfo and serial support.
|
||||
Peter Astrand added support for a color menu.
|
||||
|
||||
Vincent Pelletier added Sparc64 support.
|
||||
Pavel Roskin contributed many bugfixes and new features, such as FreeBSD
|
||||
support for the grub shell, and configure process cleanups.
|
||||
|
||||
Hollis Blanchard implemented many parts of PowerPC support.
|
||||
Klaus Reichl wrote stage2/fsys_minix.c.
|
||||
|
||||
Tomas Ebenlendr added the command chainloader into the normal mode,
|
||||
fixed some bugs.
|
||||
Per Lundberg added graphics support to the Multiboot Specification.
|
||||
|
||||
Guillem Jover merged architecture-independent ELF support code.
|
||||
Jochen Hoenicke rewrote stage2/fsys_fat.c and wrote
|
||||
stage2/fsys_reiserfs.c and stage2/md5.c.
|
||||
|
||||
Vesa Jaaskelainen added VBE support.
|
||||
Christoph Plattner added support for Net Boot Image Proposal.
|
||||
|
||||
Frank Mehnert added support for hercules console.
|
||||
|
||||
Kristoffer Branemyr added VSTa filesystem support.
|
||||
|
||||
Serguei Tzukanov added JFS and XFS support.
|
||||
|
||||
Jason Thomas added Linux DAC960 support and support for hiding/unhiding
|
||||
logical partitions, and did a significant bugfix for the terminal stuff.
|
||||
|
||||
Tilmann Bubeck added support for vt100-incompatible terminals.
|
||||
|
||||
KB Sriram added a better detection of FAT filesystem and fixed a
|
||||
network device completion.
|
||||
|
||||
Eric Kvaalen fixed a lot of problems in the GRUB manual.
|
||||
|
||||
Leonid Lisovskiy added El Torito support.
|
||||
@@ -1,3 +1,7 @@
|
||||
Open bugs and issues are captured in the GRUB bug tracking system:
|
||||
See the Bug Tracking System for GNU GRUB on Savannah. The URL is:
|
||||
|
||||
https://savannah.gnu.org/bugs/?group=grub
|
||||
http://savannah.gnu.org/bugs/?group_id=68 (without SSL)
|
||||
|
||||
or
|
||||
|
||||
https://savannah.gnu.org/bugs/?group_id=68 (with SSL)
|
||||
@@ -1,626 +1,285 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
NO WARRANTY
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -645,30 +304,37 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,360 +0,0 @@
|
||||
-*- Text -*-
|
||||
|
||||
This is the GRUB. Welcome.
|
||||
|
||||
This file contains instructions for compiling and installing the GRUB.
|
||||
|
||||
Where this document refers to packages names, they are named according to the
|
||||
Debian 11 package repositories. These packages can be found by searching
|
||||
https://packages.debian.org/.
|
||||
|
||||
The Requirements
|
||||
================
|
||||
|
||||
GRUB depends on some software packages installed into your system. If
|
||||
you don't have any of them, please obtain and install them before
|
||||
configuring the GRUB.
|
||||
|
||||
* GCC 5.1.0 or later
|
||||
Experimental support for clang 8.0.0 or later (results in much bigger binaries)
|
||||
for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64
|
||||
* GNU Make
|
||||
* GNU Bison 2.3 or later
|
||||
* GNU gettext
|
||||
* GNU binutils 2.9.1.0.23 or later
|
||||
* Flex 2.5.35 or later
|
||||
* pkg-config
|
||||
* GNU patch
|
||||
* wget (for downloading updated translations)
|
||||
* Other standard GNU/Unix tools
|
||||
* a libc with large file support (e.g. glibc 2.1 or later)
|
||||
|
||||
On GNU/Linux, you also need:
|
||||
|
||||
* libdevmapper 1.02.34 or later (recommended)
|
||||
|
||||
For optional grub-emu features, you need:
|
||||
|
||||
* SDL (recommended)
|
||||
* libpciaccess (optional)
|
||||
|
||||
To build GRUB's graphical terminal (gfxterm), you need:
|
||||
|
||||
* FreeType 2.1.5 or later
|
||||
* GNU Unifont
|
||||
|
||||
To build grub-mkfont the unicode fonts are required (xfonts-unifont package
|
||||
on Debian).
|
||||
|
||||
To build the optional grub-protect utility the following is needed:
|
||||
|
||||
* libtasn1 (libtasn1-6-dev on Debian)
|
||||
|
||||
If you use a development snapshot or want to hack on GRUB you may
|
||||
need the following.
|
||||
|
||||
* Python 3 (NOTE: python 2.6 should still work, but it's not tested)
|
||||
* Autoconf 2.64 or later
|
||||
* Automake 1.14 or later
|
||||
|
||||
Your distro may package cross-compiling toolchains such as the following
|
||||
incomplete list on Debian: gcc-aarch64-linux-gnu, gcc-arm-linux-gnueabihf,
|
||||
gcc-mips-linux-gnu, gcc-mipsel-linux-gnu, gcc-powerpc64-linux-gnu,
|
||||
gcc-riscv64-linux-gnu, gcc-sparc64-linux-gnu, mingw-w64 and mingw-w64-tools.
|
||||
|
||||
More cross compiling toolchains can be found at the following trusted sites:
|
||||
|
||||
* https://mirrors.kernel.org/pub/tools/crosstool/
|
||||
* https://toolchains.bootlin.com/
|
||||
|
||||
Prerequisites for running make-check successfully:
|
||||
|
||||
* qemu, specifically the binary "qemu-system-ARCH" where ARCH is the
|
||||
architecture GRUB has been built for; the "qemu-system" package on Debian
|
||||
will install all needed qemu architectures
|
||||
* OVMF, for EFI platforms (packages ovmf, ovmf-ia32, qemu-efi-arm, and
|
||||
qemu-efi-aarch64)
|
||||
* OpenBIOS, for ieee1275 platforms (packages openbios-ppc and openbios-sparc)
|
||||
* xorriso 1.2.9 or later, for grub-mkrescue and grub-shell
|
||||
* wamerican, for grub-fs-tester
|
||||
* mtools, FAT tools for EFI platforms
|
||||
* xfonts-unifont, for the functional tests
|
||||
* swtpm-tools and tpm2-tools, for TPM2 key protector tests
|
||||
|
||||
* If running a Linux kernel the following modules must be loaded:
|
||||
- fuse, loop
|
||||
- btrfs, erofs, ext4, f2fs, fat, hfs, hfsplus, jfs, mac-roman, minix, nilfs2,
|
||||
reiserfs, udf, xfs
|
||||
- On newer kernels, the exfat kernel modules may be used instead of the
|
||||
exfat FUSE filesystem
|
||||
- Kernel version 6.12.x was the last series to include reiserfs support,
|
||||
so later kernels will fail the reiser filesystem test.
|
||||
* The following are Debian named packages required mostly for the full
|
||||
suite of filesystem testing (but some are needed by other tests as well):
|
||||
- btrfs-progs, dosfstools, e2fsprogs, erofs-utils, exfatprogs, exfat-fuse,
|
||||
f2fs-tools, genromfs, hfsprogs, jfsutils, nilfs-tools, ntfs-3g,
|
||||
reiserfsprogs, squashfs-tools, reiserfsprogs, udftools, xfsprogs, zfs-fuse
|
||||
- exfat-fuse, if not using the exfat kernel module
|
||||
- gzip, lzop, xz-utils
|
||||
- attr, cpio, g++, gawk, parted, recode, tar, util-linux
|
||||
|
||||
Note that `make check' will run and many tests may complete successfully
|
||||
with only a subset of these prerequisites. However, some tests may fail
|
||||
due to missing prerequisites.
|
||||
|
||||
To build the documentation you'll need:
|
||||
* texinfo, for the info and html documentation
|
||||
* texlive, for building the dvi and pdf documentation (optional)
|
||||
|
||||
To use the gdb_grub GDB script you'll need:
|
||||
* readelf (binutils package)
|
||||
* objdump (binutils package)
|
||||
* GNU Debugger > 7, built with python support (gdb package)
|
||||
* Python >= 3.5 (python3 package)
|
||||
|
||||
Configuring the GRUB
|
||||
====================
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a
|
||||
file `config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try to
|
||||
figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.ac' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
|
||||
Building the GRUB
|
||||
=================
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code.
|
||||
|
||||
2. Type `./bootstrap'.
|
||||
|
||||
The autogen.sh (called by bootstrap) uses python. By default it is
|
||||
autodetected, but it can be overridden by setting the PYTHON variable.
|
||||
|
||||
3. Type `./configure' to configure the package for your system.
|
||||
If you're using `csh' on an old version of System V, you might
|
||||
need to type `sh ./configure' instead to prevent `csh' from trying
|
||||
to execute `configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
4. Type `make' to compile the package.
|
||||
|
||||
5. Optionally, type `make check' to run any self-tests that come with
|
||||
the package. Note that many of the tests require root privileges and
|
||||
a specially crafted environment in order to run.
|
||||
|
||||
6. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
7. Type `make html' or `make pdf' to generate the html or pdf
|
||||
documentation. Note, these are not built by default.
|
||||
|
||||
8. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Cross-compiling the GRUB
|
||||
========================
|
||||
|
||||
GRUB defines 3 platforms:
|
||||
|
||||
- "Build" is the one which build systems runs on.
|
||||
- "Host" is where you execute GRUB utils.
|
||||
- "Target" is where GRUB itself runs.
|
||||
|
||||
For grub-emu host and target must be the same but may differ from build.
|
||||
|
||||
If build and host are different make check isn't available.
|
||||
|
||||
If build and host are different man pages are not generated.
|
||||
|
||||
As an example imagine you have a build system running on FreeBSD on sparc
|
||||
which prepares packages for developers running amd64 GNU/Linux laptop and
|
||||
they need to make images for ARM board running U-boot. In this case:
|
||||
|
||||
build=sparc64-freebsd
|
||||
host=amd64-linux-gnu
|
||||
target=arm-uboot
|
||||
|
||||
For this example the configure line might look like (more details below)
|
||||
(some options are optional and included here for completeness but some rarely
|
||||
used options are omitted):
|
||||
|
||||
./configure --build=sparc64-freebsd --host=x86_64-linux-gnu \
|
||||
--target=arm-linux-gnueabihf --with-platform=efi \
|
||||
BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config \
|
||||
HOST_CC=x86_64-linux-gnu-gcc HOST_CFLAGS='-g -O2' \
|
||||
PKG_CONFIG=x86_64-linux-gnu-pkg-config TARGET_CC=arm-linux-gnueabihf-gcc \
|
||||
TARGET_CFLAGS='-Os -march=armv8.3-a' TARGET_CCASFLAGS='-march=armv8.3-a' \
|
||||
TARGET_OBJCOPY=arm-linux-gnueabihf-objcopy \
|
||||
TARGET_STRIP=arm-linux-gnueabihf-strip TARGET_NM=arm-linux-gnueabihf-nm \
|
||||
TARGET_RANLIB=arm-linux-gnueabihf-ranlib LEX=flex
|
||||
|
||||
Note, that the autoconf 2.65 manual states that when using the --host argument
|
||||
to configure, the --build argument should be specified as well. Not sending
|
||||
--build, enters a compatibility mode that will be removed in the future.
|
||||
|
||||
Normally, for building a GRUB on amd64 with tools to run on amd64 to
|
||||
generate images to run on ARM, using your Linux distribution's
|
||||
packaged cross compiler, the following would suffice:
|
||||
|
||||
./configure --target=arm-linux-gnueabihf --with-platform=efi
|
||||
|
||||
You need to use following options to specify tools and platforms. For minimum
|
||||
version look at prerequisites. All tools not mentioned in this section under
|
||||
corresponding platform are not needed for the platform in question.
|
||||
|
||||
- For build
|
||||
1. --build= to autoconf name of build.
|
||||
2. BUILD_CC= to gcc able to compile for build. This is used, for
|
||||
example, to compile build-gentrigtables which is then run to
|
||||
generate sin and cos tables.
|
||||
3. BUILD_CFLAGS= for C options for build.
|
||||
4. BUILD_CPPFLAGS= for C preprocessor options for build.
|
||||
5. BUILD_LDFLAGS= for linker options for build.
|
||||
6. BUILD_PKG_CONFIG= for pkg-config for build (optional).
|
||||
|
||||
- For host
|
||||
1. --host= to autoconf name of host.
|
||||
2. CC= for gcc able to compile for host.
|
||||
3. CFLAGS= for C options for host.
|
||||
4. HOST_CC= for gcc able to compile for host.
|
||||
5. HOST_CFLAGS= for C options for host.
|
||||
6. HOST_CPPFLAGS= for C preprocessor options for host.
|
||||
7. HOST_LDFLAGS= for linker options for host.
|
||||
8. PKG_CONFIG= for pkg-config for host (optional).
|
||||
9. Libdevmapper if any must be in standard linker folders (-ldevmapper) (optional).
|
||||
10. Libfuse if any must be in standard linker folders (-lfuse) (optional).
|
||||
11. Libzfs if any must be in standard linker folders (-lzfs) (optional).
|
||||
12. Liblzma if any must be in standard linker folders (-llzma) (optional).
|
||||
Note: The HOST_* variables override not prefixed variables.
|
||||
|
||||
- For target
|
||||
1. --target= to autoconf cpu name of target.
|
||||
2. --with-platform to choose firmware.
|
||||
3. TARGET_CC= for gcc able to compile for target.
|
||||
4. TARGET_CFLAGS= for C options for target.
|
||||
5. TARGET_CPPFLAGS= for C preprocessor options for target.
|
||||
6. TARGET_CCASFLAGS= for assembler options for target.
|
||||
7. TARGET_LDFLAGS= for linker options for target.
|
||||
8. TARGET_OBJCOPY= for objcopy for target.
|
||||
9. TARGET_STRIP= for strip for target.
|
||||
10. TARGET_NM= for nm for target.
|
||||
11. TARGET_RANLIB= for ranlib for target.
|
||||
Note: If the TARGET_* variables are not specified then they will default
|
||||
to be the same as the host variables. If host variables are not
|
||||
specified then the TARGET_* variables will default to be the same
|
||||
as not prefixed variables.
|
||||
|
||||
- Additionally for emu, for host and target.
|
||||
1. SDL is looked for in standard linker directories (-lSDL) (optional)
|
||||
2. libpciaccess is looked for in standard linker directories (-lpciaccess) (optional)
|
||||
|
||||
- Platform-agnostic tools and data.
|
||||
1. make is the tool you execute after ./configure.
|
||||
2. Bison is specified in YACC= variable
|
||||
3. Flex is specified in LEX= variable
|
||||
4. GNU unifont and Djvu sans are looked for in standard directories.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. `cd' to the directory where you want the object files
|
||||
and executables to go and run the `configure' script. `configure'
|
||||
automatically checks for the source code in the directory that
|
||||
`configure' is in and in `..'.
|
||||
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix by giving `configure' the option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If
|
||||
you give `configure' the option `--exec-prefix=PATH', the package will
|
||||
use PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for
|
||||
particular kinds of files. Run `configure --help' for a list of the
|
||||
directories you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure'
|
||||
the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Please note, however, that the GRUB knows where it is located in the
|
||||
filesystem. If you have installed it in an unusual location, the
|
||||
system might not work properly, or at all. The chief utility of these
|
||||
options for the GRUB is to allow you to "install" in some alternate
|
||||
location, and then copy these to the actual root filesystem later.
|
||||
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
List of current GRUB maintainers and some basic information about the project
|
||||
=============================================================================
|
||||
|
||||
Here is the list of current GRUB maintainers:
|
||||
- Leo Sandoval <lsandova@redhat.com>,
|
||||
- Marta Lewandowska <mlewando@redhat.com>,
|
||||
- Alex Burmashev <alexander.burmashev@oracle.com>,
|
||||
- Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>.
|
||||
|
||||
The maintainers drive and overlook the GRUB development.
|
||||
|
||||
If you found a security vulnerability in the GRUB please check the SECURITY
|
||||
file to get more information how to properly report this kind of bugs to
|
||||
the maintainers.
|
||||
|
||||
The GRUB development happens on the grub-devel mailing list [1]. The latest
|
||||
GRUB source code is available at freedesktop git repository [2].
|
||||
|
||||
Users can also ask for help on the same grub-devel mailing list [1].
|
||||
|
||||
List of past GRUB maintainers and people who strongly contributed to the project
|
||||
================================================================================
|
||||
|
||||
Here is the list, sorted alphabetically, of past GRUB maintainers and people who
|
||||
strongly contributed to the project:
|
||||
- Andrei Borzenkov,
|
||||
- Bryan Ford,
|
||||
- Daniel Kiper,
|
||||
- Erich Stefan Boleyn,
|
||||
- Gordon Matzigkeit,
|
||||
- Yoshinori K. Okuji.
|
||||
|
||||
|
||||
[1] https://lists.freedesktop.org/postorius/lists/grub-devel.lists.freedesktop.org/
|
||||
[2] https://gitlab.freedesktop.org/gnu-grub/grub/
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
-*- text -*-
|
||||
|
||||
This is a list of random notes for GRUB maintainers. If you are not a
|
||||
maintainer, you need to ask maintainers to do these instead of doing
|
||||
these yourself.
|
||||
|
||||
How to update the online manual: (FIXME: this is obsoelete)
|
||||
1. Copy docs/*.texi (excluding "multiboot.texi") to fencepost.gnu.org.
|
||||
2. Make a symbolic link from ~mohit/gnudoc/gnudoc_template to the
|
||||
directory under which *.texi were copied, if the link isn't present.
|
||||
3. Run ``~mohit/gnudoc/gendocs.sh grub "GNU GRUB Manual"''.
|
||||
4. Copy the contents of the directory ``manual'' to
|
||||
gnudist.gnu.org:~ftp/gnu/Manuals/grub-VERSION (VERSION is, for
|
||||
example, 1.0).
|
||||
5. Run ``ln -sf grub-VERSION grub'' in gnudist.gnu.org:~ftp/gnu/Manuals.
|
||||
6. Run ``cd grub; ln -s grub.html index.html''.
|
||||
7. Verify the new online manual with a WWW browser.
|
||||
8. Update manual.html by hand.
|
||||
|
||||
How to release a version:
|
||||
1. Check out the source tree from the CVS from scratch.
|
||||
2. Check if ``make distcheck'' succeeds.
|
||||
3. Run ``util/grub-image''.
|
||||
4. Check the resulted images, for example, using bochs.
|
||||
5. Copy grub-VERSION.tar.gz, grub-VERSION-i386-pc.tar.gz and
|
||||
grub-VERSION-i386-pc.ext2fs to fencepost.gnu.org:~ftp/gnu/grub.
|
||||
6. Move older files in that directory above to the directory ``old'',
|
||||
if you think they are eyesores.
|
||||
7. Post an announcement to bug-grub@gnu.org. It would be a good idea to
|
||||
send a carbon copy to bug-hurd@gnu.org and
|
||||
debian-hurd@lists.debian.org. If the announcement is for a stable
|
||||
version, you can inform info-gnu@gnu.org as well.
|
||||
8. Optionally, post an announcement to Freshmeat.net.
|
||||
|
||||
Legal issues:
|
||||
1. If a patch is not significant (in size), you don't have to care about
|
||||
the copyright.
|
||||
2. If a patch is significant, you shouldn't apply the patch to the CVS.
|
||||
Before doing that, you must ask the contributor to assign or disclaim
|
||||
the copyright. Send ``/gd/gnuorg/request-assign.changes'' or
|
||||
``/gd/gnuorg/request-assign.future'' to the contributor, and wait
|
||||
until the FSF finishes the legal work.
|
||||
3. You can check if a contributor has already assigned his/her copyright
|
||||
to the FSF by looking at ``/gd/gnuorg/copyright.list''.
|
||||
|
||||
What you should have in your mind:
|
||||
1. Don't add features unnecessarily! You may think it is a Good Thing to
|
||||
have more features, but you must be prepared for more burdens.
|
||||
DO THAT ONLY IF YOU BELIEVE THAT THE FEATURE IS ESSENTIAL.
|
||||
2. Don't break backward-compatibility! Don't apply any patch which could
|
||||
break existing features. Otherwise you would receive a lot of
|
||||
complaints. DO THAT ONLY IF YOU BELIEVE THAT THE INCOMPATIBILITY IS
|
||||
INEVITABLE.
|
||||
3. Write good code. Be not satisfied with ad hoc workarounds or quick
|
||||
hacks. NEVER WRITE BAD CODE.
|
||||
|
||||
Resources:
|
||||
* http://www.gnu.org/prep/maintain_toc.html
|
||||
* http://www.gnu.org/prep/standards_toc.html
|
||||
* http://www.gnu.org/server/fsf-html-style-sheet.html
|
||||
+4
-494
@@ -1,494 +1,4 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
|
||||
|
||||
DEPDIR = .deps-util
|
||||
SUBDIRS = grub-core/lib/gnulib .
|
||||
if COND_real_platform
|
||||
SUBDIRS += grub-core
|
||||
endif
|
||||
SUBDIRS += po docs util/bash-completion.d
|
||||
|
||||
include $(top_srcdir)/conf/Makefile.common
|
||||
include $(top_srcdir)/conf/Makefile.extra-dist
|
||||
|
||||
AM_CFLAGS = $(HOST_CFLAGS)
|
||||
AM_LDFLAGS = $(HOST_LDFLAGS)
|
||||
AM_CPPFLAGS = $(HOST_CPPFLAGS) $(CPPFLAGS_DEFAULT)
|
||||
AM_CCASFLAGS = $(HOST_CCASFLAGS) $(CCASFLAGS_DEFAULT)
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
CFLAGS_PROGRAM += $(CFLAGS_GNULIB)
|
||||
LDFLAGS_PROGRAM += $(LDFLAGS_GNULIB)
|
||||
CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB)
|
||||
CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB)
|
||||
|
||||
include $(srcdir)/Makefile.util.am
|
||||
|
||||
check_SCRIPTS = $(check_SCRIPTS_native) $(check_SCRIPTS_nonnative)
|
||||
check_PROGRAMS = $(check_PROGRAMS_native) $(check_PROGRAMS_nonnative)
|
||||
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
|
||||
|
||||
check-native:
|
||||
$(MAKE) TESTS="$(check_PROGRAMS_native) $(check_SCRIPTS_native)" check
|
||||
check-nonnative:
|
||||
$(MAKE) TESTS="$(check_PROGRAMS_nonnative) $(check_SCRIPTS_nonnative)" check
|
||||
|
||||
# XXX Use Automake's LEX & YACC support
|
||||
grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y
|
||||
$(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y
|
||||
grub_script.tab.c: grub_script.tab.h
|
||||
CLEANFILES += grub_script.tab.c grub_script.tab.h
|
||||
|
||||
# For the lexer.
|
||||
grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l
|
||||
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l
|
||||
grub_script.yy.c: grub_script.yy.h
|
||||
CLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||
|
||||
# For libgrub.a
|
||||
libgrub.pp: config-util.h grub_script.tab.h grub_script.yy.h $(libgrubmods_a_SOURCES) $(libgrubkern_a_SOURCES)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrubmods_a_CPPFLAGS) $(libgrubkern_a_CPPFLAGS) $(CPPFLAGS) \
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libgrub.pp
|
||||
|
||||
libgrub_a_init.lst: libgrub.pp
|
||||
cat $< | grep '^@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libgrub_a_init.lst
|
||||
|
||||
libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh
|
||||
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += libgrub_a_init.c
|
||||
|
||||
# For grub-fstest
|
||||
grub_fstest.pp: config-util.h $(grub_fstest_SOURCES)
|
||||
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(grub_fstest_CPPFLAGS) $(CPPFLAGS) \
|
||||
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += grub_fstest.pp
|
||||
|
||||
grub_fstest_init.lst: libgrub.pp grub_fstest.pp
|
||||
cat $^ | grep '^@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += grub_fstest_init.lst
|
||||
|
||||
grub_fstest_init.c: grub_fstest_init.lst $(top_srcdir)/geninit.sh
|
||||
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += grub_fstest_init.c
|
||||
|
||||
if COND_HAVE_FONT_SOURCE
|
||||
pkgdata_DATA += unicode.pf2 ascii.pf2 euro.pf2 ascii.h widthspec.h
|
||||
endif
|
||||
|
||||
starfield_theme_files = $(srcdir)/themes/starfield/blob_w.png $(srcdir)/themes/starfield/boot_menu_c.png $(srcdir)/themes/starfield/boot_menu_e.png $(srcdir)/themes/starfield/boot_menu_ne.png $(srcdir)/themes/starfield/boot_menu_n.png $(srcdir)/themes/starfield/boot_menu_nw.png $(srcdir)/themes/starfield/boot_menu_se.png $(srcdir)/themes/starfield/boot_menu_s.png $(srcdir)/themes/starfield/boot_menu_sw.png $(srcdir)/themes/starfield/boot_menu_w.png $(srcdir)/themes/starfield/slider_c.png $(srcdir)/themes/starfield/slider_n.png $(srcdir)/themes/starfield/slider_s.png $(srcdir)/themes/starfield/starfield.png $(srcdir)/themes/starfield/terminal_box_c.png $(srcdir)/themes/starfield/terminal_box_e.png $(srcdir)/themes/starfield/terminal_box_ne.png $(srcdir)/themes/starfield/terminal_box_n.png $(srcdir)/themes/starfield/terminal_box_nw.png $(srcdir)/themes/starfield/terminal_box_se.png $(srcdir)/themes/starfield/terminal_box_s.png $(srcdir)/themes/starfield/terminal_box_sw.png $(srcdir)/themes/starfield/terminal_box_w.png $(srcdir)/themes/starfield/theme.txt $(srcdir)/themes/starfield/README $(srcdir)/themes/starfield/COPYING.CC-BY-SA-3.0
|
||||
|
||||
build-grub-mkfont$(BUILD_EXEEXT): util/grub-mkfont.c grub-core/unidata.c grub-core/kern/emu/misc.c util/misc.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-mkfont\" $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS)
|
||||
CLEANFILES += build-grub-mkfont$(BUILD_EXEEXT)
|
||||
|
||||
garbage-gen$(BUILD_EXEEXT): util/garbage-gen.c
|
||||
$(BUILD_CC) -o $@ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) $^
|
||||
CLEANFILES += garbage-gen$(BUILD_EXEEXT)
|
||||
EXTRA_DIST += util/garbage-gen.c
|
||||
|
||||
build-grub-gen-asciih$(BUILD_EXEEXT): util/grub-gen-asciih.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
|
||||
CLEANFILES += build-grub-gen-asciih$(BUILD_EXEEXT)
|
||||
|
||||
build-grub-gen-widthspec$(BUILD_EXEEXT): util/grub-gen-widthspec.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror
|
||||
CLEANFILES += build-grub-gen-widthspec$(BUILD_EXEEXT)
|
||||
|
||||
if COND_STARFIELD
|
||||
starfield_DATA = dejavu_10.pf2 dejavu_12.pf2 dejavu_bold_14.pf2 dejavu_14.pf2 dejavu_16.pf2 $(starfield_theme_files)
|
||||
dejavu_10.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -s 10 -o $@ $(DJVU_FONT_SOURCE)
|
||||
CLEANFILES += dejavu_10.pf2
|
||||
dejavu_12.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -s 12 -o $@ $(DJVU_FONT_SOURCE)
|
||||
CLEANFILES += dejavu_12.pf2
|
||||
dejavu_14.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -s 14 -o $@ $(DJVU_FONT_SOURCE)
|
||||
CLEANFILES += dejavu_14.pf2
|
||||
dejavu_bold_14.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -b -s 14 -o $@ $(DJVU_FONT_SOURCE)
|
||||
CLEANFILES += dejavu_bold_14.pf2
|
||||
dejavu_16.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -s 16 -o $@ $(DJVU_FONT_SOURCE)
|
||||
CLEANFILES += dejavu_16.pf2
|
||||
else
|
||||
starfield_DATA =
|
||||
endif
|
||||
|
||||
EXTRA_DIST += $(starfield_theme_files)
|
||||
EXTRA_DIST += $(srcdir)/themes/starfield/src/slider_s.xcf $(srcdir)/themes/starfield/src/slider_n.xcf $(srcdir)/themes/starfield/src/slider_c.xcf $(srcdir)/themes/starfield/src/blob_nw.xcf $(srcdir)/themes/starfield/src/bootmenu/center.xcf $(srcdir)/themes/starfield/src/bootmenu/corner.xcf $(srcdir)/themes/starfield/src/bootmenu/side.xcf $(srcdir)/themes/starfield/src/terminalbox/side.xcf $(srcdir)/themes/starfield/src/terminalbox/corner.xcf $(srcdir)/themes/starfield/src/terminalbox/center.xcf
|
||||
|
||||
unicode.pf2: $(FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -o $@ $(FONT_SOURCE) || (rm -f $@; exit 1)
|
||||
CLEANFILES += unicode.pf2
|
||||
|
||||
# Arrows and lines are needed to draw the menu, so always include them
|
||||
UNICODE_ARROWS=0x2190-0x2193
|
||||
UNICODE_LINES=0x2501-0x251B
|
||||
|
||||
ascii.pf2: $(FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES) || (rm -f $@; exit 1)
|
||||
CLEANFILES += ascii.pf2
|
||||
|
||||
euro.pf2: $(FONT_SOURCE) build-grub-mkfont$(BUILD_EXEEXT)
|
||||
./build-grub-mkfont$(BUILD_EXEEXT) -o $@ $(FONT_SOURCE) -r 0x0-0x4ff,0x1e00-0x1fff,$(UNICODE_ARROWS),$(UNICODE_LINES) || (rm -f $@; exit 1)
|
||||
CLEANFILES += euro.pf2
|
||||
|
||||
ascii.h: $(FONT_SOURCE) build-grub-gen-asciih$(BUILD_EXEEXT)
|
||||
./build-grub-gen-asciih$(BUILD_EXEEXT) $(FONT_SOURCE) $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += ascii.h
|
||||
|
||||
widthspec.h: $(FONT_SOURCE) build-grub-gen-widthspec$(BUILD_EXEEXT)
|
||||
./build-grub-gen-widthspec$(BUILD_EXEEXT) $(FONT_SOURCE) $@ || (rm -f $@; exit 1)
|
||||
CLEANFILES += widthspec.h
|
||||
|
||||
# Install config.h into platformdir
|
||||
nodist_platform_HEADERS = config.h
|
||||
|
||||
pkgdata_DATA += grub-mkconfig_lib
|
||||
|
||||
|
||||
if COND_real_platform
|
||||
|
||||
if COND_i386_coreboot
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_multiboot
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_ieee1275
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_qemu
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_pc
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_efi
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_x86_64_efi
|
||||
QEMU32=qemu-system-x86_64
|
||||
MINIMUM_CPU_LINUX=core2duo
|
||||
endif
|
||||
|
||||
linux.init.x86_64: $(srcdir)/grub-core/tests/boot/linux.init-x86_64.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -static -m64 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux.init.i386: $(srcdir)/grub-core/tests/boot/linux.init-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -static -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux.init.mips: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
||||
$(TARGET_CC) -o $@ $< -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux.init.ppc: $(srcdir)/grub-core/tests/boot/linux.init-ppc.S
|
||||
$(TARGET_CC) -o $@ $< -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux.init.mipsel: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
||||
$(TARGET_CC) -o $@ $< -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux.init.loongson: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
||||
$(TARGET_CC) -o $@ $< -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -DREBOOT=1
|
||||
|
||||
multiboot.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -static -ffreestanding -nostdlib -nostdinc -DTARGET_MULTIBOOT=1 -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
||||
|
||||
kfreebsd.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -static -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include
|
||||
|
||||
kfreebsd.aout: kfreebsd.elf
|
||||
$(TARGET_OBJCOPY) -O a.out-i386-linux $< $@ -j .text
|
||||
|
||||
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -static -DTARGET_CHAINLOADER=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x7c00 -m32
|
||||
|
||||
pc-chainloader.bin: pc-chainloader.elf
|
||||
$(TARGET_OBJCOPY) -O binary --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $< $@;
|
||||
|
||||
ntldr.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -DTARGET_NTLDR=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -static -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0 -m32
|
||||
|
||||
ntldr.bin: ntldr.elf
|
||||
$(TARGET_OBJCOPY) -O binary --strip-unneeded -j .text $< $@;
|
||||
|
||||
multiboot2.elf: $(srcdir)/grub-core/tests/boot/kernel-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -static -o $@ $< -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0x100000 -m32 -I$(srcdir)/include -DTARGET_MULTIBOOT2=1
|
||||
|
||||
kfreebsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kfreebsd.init-x86_64.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m64 -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@
|
||||
|
||||
kfreebsd.init.i386: $(srcdir)/grub-core/tests/boot/kfreebsd.init-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m32 -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\" && freebsd-brandelf -t FreeBSD $@
|
||||
|
||||
knetbsd.init.i386: $(srcdir)/grub-core/tests/boot/kbsd.init-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m32 -static -nostdlib -nostdinc -DTARGET_NETBSD=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
kopenbsd.init.i386: $(srcdir)/grub-core/tests/boot/kbsd.init-i386.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m32 -static -nostdlib -nostdinc -DTARGET_OPENBSD=1 -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
knetbsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kbsd.init-x86_64.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m64 -DTARGET_NETBSD=1 -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
kopenbsd.init.x86_64: $(srcdir)/grub-core/tests/boot/kbsd.init-x86_64.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
$(TARGET_CC) -o $@ $< -m64 -DTARGET_OPENBSD=1 -static -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
||||
|
||||
linux-initramfs.mips: linux.init.mips Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
linux-initramfs.ppc: linux.init.ppc Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
linux-initramfs.mipsel: linux.init.mipsel Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
linux-initramfs.loongson: linux.init.loongson Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
linux-initramfs.i386: linux.init.i386 Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
linux-initramfs.x86_64: linux.init.x86_64 Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && cp $< $$TDIR/init && (cd $$TDIR && echo ./init | cpio -R 0:0 --quiet --dereference -o -H newc) | gzip > $@ && rm -rf $$TDIR
|
||||
|
||||
kfreebsd-mfsroot.i386.img: kfreebsd.init.i386 Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||
|
||||
knetbsd.image.i386: knetbsd.init.i386 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||
|
||||
kopenbsd.image.i386: kopenbsd.init.i386 $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 128k -f 10 -o minfree=0,version=1 $@ $$TDIR && bsdlabel -f -R $@ $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt && rm -rf $$TDIR || rm -f $@
|
||||
|
||||
kopenbsd.image.x86_64: kopenbsd.init.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 128k -f 10 -o minfree=0,version=1 $@ $$TDIR && bsdlabel -f -R $@ $(srcdir)/grub-core/tests/boot/kopenbsdlabel.txt && rm -rf $$TDIR || rm -f $@
|
||||
|
||||
knetbsd.miniroot-image.i386.img: knetbsd.image.i386 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386
|
||||
$(TARGET_OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.i386 $@
|
||||
|
||||
kfreebsd-mfsroot.x86_64.img: kfreebsd.init.x86_64 Makefile
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -t ffs -s 30m -f 1000 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||
|
||||
knetbsd.image.x86_64: knetbsd.init.x86_64 $(srcdir)/grub-core/tests/boot/kbsd.spec.txt
|
||||
TDIR=`mktemp -d "$${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` && mkdir $$TDIR/dev && mkdir $$TDIR/sbin && cp $< $$TDIR/sbin/init && makefs -F $(srcdir)/grub-core/tests/boot/kbsd.spec.txt -t ffs -s 64k -f 10 -o minfree=0,version=1 $@ $$TDIR && rm -rf $$TDIR
|
||||
|
||||
knetbsd.miniroot-image.x86_64.img: knetbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64
|
||||
$(TARGET_OBJCOPY) --add-section=miniroot=$< $(GRUB_PAYLOADS_DIR)/knetbsd.miniroot.x86_64 $@
|
||||
|
||||
CLEANFILES += linux.init.i386 kfreebsd.init.i386 linux.init.x86_64 linux-initramfs.i386 linux-initramfs.x86_64
|
||||
|
||||
kfreebsd-mfsroot.i386.gz: kfreebsd-mfsroot.i386.img
|
||||
gzip < $< > $@
|
||||
|
||||
bootcheck-kfreebsd-i386: kfreebsd-mfsroot.i386.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.i386 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/mfsroot.gz=kfreebsd-mfsroot.i386.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.i386 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
kfreebsd-mfsroot.x86_64.gz: kfreebsd-mfsroot.x86_64.img
|
||||
gzip < $< > $@
|
||||
|
||||
bootcheck-kfreebsd-x86_64: kfreebsd-mfsroot.x86_64.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/mfsroot.gz=kfreebsd-mfsroot.x86_64.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
knetbsd.miniroot-image.i386.gz: knetbsd.miniroot-image.i386.img
|
||||
gzip < $< > $@
|
||||
|
||||
bootcheck-knetbsd-i386: knetbsd.miniroot-image.i386.gz $(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/miniroot.gz=knetbsd.miniroot-image.i386.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-kopenbsd-i386: kopenbsd.image.i386 $(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/ramdisk=kopenbsd.image.i386 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-kopenbsd-x86_64: kopenbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/ramdisk=kopenbsd.image.x86_64 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
knetbsd.miniroot-image.x86_64.gz: knetbsd.miniroot-image.x86_64.img
|
||||
gzip < $< > $@
|
||||
|
||||
bootcheck-knetbsd-x86_64: knetbsd.miniroot-image.x86_64.gz $(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/miniroot.gz=knetbsd.miniroot-image.x86_64.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg --qemu-opts="-cpu $(MINIMUM_CPU_LINUX)" | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-mips: linux-initramfs.mips $(GRUB_PAYLOADS_DIR)/linux.mips $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.mips --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mips $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-ppc: linux-initramfs.ppc $(GRUB_PAYLOADS_DIR)/linux.ppc $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.ppc --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.ppc $(srcdir)/grub-core/tests/boot/linux-ppc.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-mipsel: linux-initramfs.mipsel $(GRUB_PAYLOADS_DIR)/linux.mipsel $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.mipsel --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mipsel $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-loongson: linux-initramfs.loongson $(GRUB_PAYLOADS_DIR)/linux.loongson $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.loongson --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.loongson $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux16-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux16-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-multiboot: multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/multiboot.elf=multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-multiboot2: multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/multiboot2.elf=multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-kfreebsd-aout: kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/kfreebsd.aout=kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-pc-chainloader: pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/pc-chainloader.bin=pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-ntldr: ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/ntldr.bin=ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
if COND_i386_efi
|
||||
# NetBSD has no support for finding ACPI on EFI
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-kfreebsd-x86_64 bootcheck-kfreebsd-i386
|
||||
endif
|
||||
|
||||
if COND_x86_64_efi
|
||||
# NetBSD has no support for finding ACPI on EFI
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-kfreebsd-x86_64 bootcheck-kfreebsd-i386
|
||||
endif
|
||||
|
||||
if COND_i386_multiboot
|
||||
# *BSD requires ACPI
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64
|
||||
endif
|
||||
|
||||
|
||||
if COND_i386_qemu
|
||||
# *BSD requires ACPI
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64
|
||||
endif
|
||||
|
||||
if COND_i386_coreboot
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-knetbsd-x86_64 bootcheck-kfreebsd-x86_64 bootcheck-kfreebsd-i386
|
||||
endif
|
||||
|
||||
if COND_i386_ieee1275
|
||||
# *BSD requires ACPI
|
||||
#legacy protocol (linux16) makes early BIOS calls.
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64
|
||||
endif
|
||||
|
||||
if COND_i386_pc
|
||||
#pc chainloader by definition is only for i386-pc
|
||||
#ntldr and bootmgr require BIOS.
|
||||
#legacy protocol (linux16) makes early BIOS calls.
|
||||
# 32-bit NetBSD crashes early on non-BIOS
|
||||
BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-knetbsd-x86_64 bootcheck-kfreebsd-x86_64 bootcheck-kfreebsd-i386 bootcheck-pc-chainloader bootcheck-ntldr bootcheck-linux16-i386 bootcheck-linux16-x86_64 bootcheck-knetbsd-i386
|
||||
endif
|
||||
|
||||
if COND_mips_loongson
|
||||
BOOTCHECKS = bootcheck-linux-loongson
|
||||
endif
|
||||
|
||||
if COND_mipsel
|
||||
if COND_mips_qemu_mips
|
||||
BOOTCHECKS = bootcheck-linux-mipsel
|
||||
endif
|
||||
endif
|
||||
if COND_mipseb
|
||||
if COND_mips_qemu_mips
|
||||
BOOTCHECKS = bootcheck-linux-mips
|
||||
endif
|
||||
endif
|
||||
|
||||
if COND_powerpc_ieee1275
|
||||
BOOTCHECKS = bootcheck-linux-ppc
|
||||
endif
|
||||
|
||||
.PHONY: bootcheck-linux-i386 bootcheck-linux-x86_64 \
|
||||
bootcheck-kfreebsd-i386 bootcheck-kfreebsd-x86_64 \
|
||||
bootcheck-knetbsd-i386 bootcheck-knetbsd-x86_64 \
|
||||
bootcheck-linux-mips FORCE
|
||||
|
||||
# Randomly generated
|
||||
SUCCESSFUL_BOOT_STRING=3e49994fd5d82b7c9298d672d774080d
|
||||
# tianocore cd access is very slow
|
||||
BOOTCHECK_TIMEOUT=180
|
||||
|
||||
bootcheck: $(BOOTCHECKS)
|
||||
|
||||
if COND_i386_coreboot
|
||||
FS_PAYLOAD_MODULES ?= $(shell cat grub-core/fs.lst)
|
||||
default_payload.elf: grub-mkstandalone grub-mkimage FORCE
|
||||
test -f $@ && rm $@ || true
|
||||
pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test serial multiboot cbmemc linux16 gzio echo help syslinuxcfg xnu $(FS_PAYLOAD_MODULES) password_pbkdf2 $(EXTRA_PAYLOAD_MODULES)' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST += grub-core/tests/boot/kbsd.init-i386.S grub-core/tests/boot/kbsd.init-x86_64.S grub-core/tests/boot/kbsd.spec.txt grub-core/tests/boot/kernel-8086.S grub-core/tests/boot/kernel-i386.S grub-core/tests/boot/kfreebsd-aout.cfg grub-core/tests/boot/kfreebsd.cfg grub-core/tests/boot/kfreebsd.init-i386.S grub-core/tests/boot/kfreebsd.init-x86_64.S grub-core/tests/boot/knetbsd.cfg grub-core/tests/boot/kopenbsd.cfg grub-core/tests/boot/kopenbsdlabel.txt grub-core/tests/boot/linux16.cfg grub-core/tests/boot/linux.cfg grub-core/tests/boot/linux.init-i386.S grub-core/tests/boot/linux.init-mips.S grub-core/tests/boot/linux.init-ppc.S grub-core/tests/boot/linux.init-x86_64.S grub-core/tests/boot/linux-ppc.cfg grub-core/tests/boot/multiboot2.cfg grub-core/tests/boot/multiboot.cfg grub-core/tests/boot/ntldr.cfg grub-core/tests/boot/pc-chainloader.cfg grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
|
||||
windowsdir=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows
|
||||
windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
|
||||
test -d $(windowsdir) && rm -rf $(windowsdir) || true
|
||||
test -d $(windowsdir) || mkdir $(windowsdir)
|
||||
$(MAKE) -C po $(AM_MAKEFLAGS) windowsdir
|
||||
$(MAKE) -C grub-core $(AM_MAKEFLAGS) windowsdir
|
||||
test -d $(windowsdir)/themes || mkdir $(windowsdir)/themes
|
||||
test -d $(windowsdir)/themes/starfield || mkdir $(windowsdir)/themes/starfield
|
||||
for x in $(PROGRAMS); do \
|
||||
if [ x$(STRIP) != x ]; then $(STRIP) $$x -o $(windowsdir)/$$x; \
|
||||
else cp -fp $$x $(windowsdir)/$$x; fi; \
|
||||
done
|
||||
for x in $(pkgdata_DATA); do \
|
||||
cp -fp $$x $(windowsdir)/$$x; \
|
||||
done
|
||||
for x in $(starfield_DATA); do \
|
||||
cp -fp $$x $(windowsdir)/themes/starfield/$$(basename $$x); \
|
||||
done
|
||||
for x in $(GRUB_WINDOWS_EXTRA_DIST); do \
|
||||
cp -fp $$x $(windowsdir); \
|
||||
done
|
||||
|
||||
windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
|
||||
windowszip: windowsdir
|
||||
test -f $(windowszip) && rm $(windowszip) || true
|
||||
zip -r $(windowszip) $(windowsdir)
|
||||
rm -rf $(windowsdir)
|
||||
|
||||
EXTRA_DIST += linguas.sh
|
||||
|
||||
changelog_start_date = 2015-01-23
|
||||
gitlog_to_changelog = $(top_srcdir)/build-aux/gitlog-to-changelog
|
||||
|
||||
ChangeLog: FORCE
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
$(gitlog_to_changelog) --srcdir=$(top_srcdir) --since=$(changelog_start_date) > '$@.tmp'; \
|
||||
rm -f '$@'; mv '$@.tmp' '$@'; \
|
||||
else \
|
||||
touch $@; \
|
||||
fi
|
||||
|
||||
syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg
|
||||
|
||||
# Mimic simplify_filename from grub-core/lib/syslinux_parse.c, so that we
|
||||
# can predict its behaviour in tests. We have to pre-substitute this before
|
||||
# calling config.status, as config.status offers no reliable way to hook in
|
||||
# a command between setting ac_abs_top_srcdir and emitting output files.
|
||||
tests/syslinux/ubuntu10.04_grub.cfg: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg.in
|
||||
simplified_abs_top_srcdir=`echo "$(abs_top_srcdir)" | sed 's,//,/,g; s,/\./,/,g; :loop; s,/[^/][^/]*/\.\.\(/\|$$\),\1,; t loop'`; \
|
||||
sed "s,@simplified_abs_top_srcdir@,$$simplified_abs_top_srcdir,g" $(srcdir)/tests/syslinux/ubuntu10.04_grub.cfg.in | $(top_builddir)/config.status --file=$@:-
|
||||
CLEANFILES += tests/syslinux/ubuntu10.04_grub.cfg
|
||||
# Do not change this order if you don't know what you are doing.
|
||||
AUTOMAKE_OPTIONS = 1.7 gnu
|
||||
SUBDIRS = netboot stage2 stage1 lib grub util docs
|
||||
EXTRA_DIST = BUGS MAINTENANCE
|
||||
-1479
File diff suppressed because it is too large.
Load diff
@@ -1,26 +1,23 @@
|
||||
This is GRUB 2, the second version of the GRand Unified Bootloader.
|
||||
GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more
|
||||
robust, more powerful, and more portable.
|
||||
This is GNU GRUB, the GRand Unified Bootloader. GRUB is intended to
|
||||
provide important bootloader features that are missing from typical
|
||||
personal computer BIOSes:
|
||||
|
||||
See the file NEWS for a description of recent changes to GRUB 2.
|
||||
- provides fully-featured command line and graphical interfaces
|
||||
- recognizes fdisk partitions and BSD disklabels
|
||||
- can dynamically read Linux ext2fs, ReiserFS, JFS and XFS, BSD ufs,
|
||||
MS-DOS FAT16 and FAT32, Minix fs, and VSTa fs filesystems, plus
|
||||
hardcoded blocklists
|
||||
- can boot Multiboot-compliant kernels (such as GNU Mach), as well
|
||||
as standard Linux and *BSD kernels
|
||||
|
||||
See the file NEWS for a description of recent changes to GRUB.
|
||||
|
||||
If you are interested in the network support, see the file
|
||||
README.netboot under the directory netboot.
|
||||
|
||||
See the file INSTALL for instructions on how to build and install the
|
||||
GRUB 2 data and program files.
|
||||
GRUB data and program files. See the GRUB manual for details about
|
||||
using GRUB as your boot loader. Type "info grub" in the shell prompt.
|
||||
|
||||
See the file MAINTAINERS for information about the GRUB maintainers, etc.
|
||||
|
||||
If you found a security vulnerability in the GRUB please check the SECURITY
|
||||
file to get more information how to properly report this kind of bugs to
|
||||
the maintainers.
|
||||
|
||||
Please visit the official web page of GRUB 2, for more information.
|
||||
Please visit the official web page of GNU GRUB, for more information.
|
||||
The URL is <http://www.gnu.org/software/grub/grub.html>.
|
||||
|
||||
More extensive documentation is available in the Info manual,
|
||||
accessible using 'info grub' after building and installing GRUB 2.
|
||||
|
||||
There are a number of important user-visible differences from the
|
||||
first version of GRUB, now known as GRUB Legacy. For a summary, please
|
||||
see:
|
||||
|
||||
info grub Introduction 'Changes from GRUB Legacy'
|
||||
@@ -1,62 +0,0 @@
|
||||
Security Policy
|
||||
===============
|
||||
|
||||
To report a vulnerability see "Reporting a Vulnerability" below.
|
||||
|
||||
|
||||
Security Incident Policy
|
||||
========================
|
||||
|
||||
Security bug reports are treated with special attention and are handled
|
||||
differently from normal bugs. In particular, security sensitive bugs are not
|
||||
handled in public but in private. Information about the bug and access to it
|
||||
is restricted to people in the security group, the individual engineers that
|
||||
work on fixing it, and any other person who needs to be involved for organisational
|
||||
reasons. The process is handled by the security team, which decides on the people
|
||||
involved in order to fix the issue. It is also guaranteed that the person reporting
|
||||
the issue has visibility into the process of fixing it. Any security issue gets
|
||||
prioritized according to its security rating. The issue is opened up to the public
|
||||
in coordination with the release schedule and the reporter.
|
||||
|
||||
|
||||
Disclosure Policy
|
||||
=================
|
||||
|
||||
Everyone involved in the handling of a security issue - including the reporter -
|
||||
is required to adhere to the following policy. Any information related to
|
||||
a security issue must be treated as confidential and only shared with trusted
|
||||
partners if necessary, for example to coordinate a release or manage exposure
|
||||
of clients to the issue. No information must be disclosed to the public before
|
||||
the embargo ends. The embargo time is agreed upon by all involved parties. It
|
||||
should be as short as possible without putting any users at risk.
|
||||
|
||||
|
||||
Supported Versions
|
||||
==================
|
||||
|
||||
Only the most recent version of the GRUB is supported.
|
||||
|
||||
|
||||
Reporting a Vulnerability
|
||||
=========================
|
||||
|
||||
The security report should be encrypted with the PGP keys and sent to ALL email
|
||||
addresses listed below. Every vulnerability report will be assessed within
|
||||
72 hours of receiving it. If the outcome of the assessment is that the report
|
||||
describes a security issue, the report will be transferred into an issue on the
|
||||
internal vulnerability project for further processing. The reporter is updated
|
||||
on each step of the process.
|
||||
|
||||
While there's currently no bug bounty program we appreciate every report.
|
||||
|
||||
* Contact: Marta Lewandowska <mlewando@redhat.com>
|
||||
* PGP Key Fingerprint: 5B21 5739 7348 6620 C0FF 7073 DDF0 92F7 4C8F 619B
|
||||
|
||||
* Contact: Leonardo Sandoval Gonzalez <lsandova@redhat.com>
|
||||
* PGP Key Fingerprint: DFB6 2CC1 A987 E6C7 6EBF 8143 916E C070 8CDF DDFD
|
||||
|
||||
* Contact: Alex Burmashev <alexander.burmashev@oracle.com>
|
||||
* PGP Key Fingerprint: 50A4 EC06 EF7E B84D 67E0 3BB6 2AE2 C87E 28EF 2E6E
|
||||
|
||||
* Contact: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
||||
* PGP Key Fingerprint: E53D 497F 3FA4 2AD8 C9B4 D1E8 35A9 3B74 E82E 4209
|
||||
@@ -1,38 +1,124 @@
|
||||
GRUB 2 would not be what it is today without the invaluable help of
|
||||
GRUB would not be what it is today without the invaluable help of
|
||||
everybody who was kind enough to spend time testing it and reporting
|
||||
bugs.
|
||||
|
||||
The following people made especially gracious contributions of their
|
||||
time and energy in helping to track down bugs, add new features, and
|
||||
generally assist in the GRUB 2 maintainership process:
|
||||
generally assist in the GRUB maintainership process:
|
||||
|
||||
Andrey Shuvikov <mr_hyro@yahoo.com>
|
||||
Bibo Mao <bibo.mao@intel.com>
|
||||
David Miller <davem@davemloft.net>
|
||||
Guillem Jover <guillem@hadrons.org>
|
||||
Harley D. Eades III <hde@foobar-qux.org>
|
||||
Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>
|
||||
Hollis Blanchard <hollis@penguinppc.org>
|
||||
Jeroen Dekkers <jeroen@dekkers.cx>
|
||||
Johan Rydberg <jrydberg@gnu.org>
|
||||
Marco Gerards <marco@gnu.org>
|
||||
Michael Guntsche <mike@it-loops.com>
|
||||
NIIBE Yutaka <gniibe@m17n.org>
|
||||
Omniflux <omniflux@omniflux.com>
|
||||
Robert Bihlmeyer <robbe@orcus.priv.at>
|
||||
Roger Leigh <rleigh@whinlatter.ukfsn.org>
|
||||
Ruslan Nikolaev <nruslan@mail.com>
|
||||
Adam Lackorzynski <adam@os.inf.tu-dresden.de>
|
||||
Adrian Phillips <a.phillips@dnmi.no>
|
||||
Alban Crequy <alban.crequy@apinc.org>
|
||||
Alessandro Rubini <rubini@gnu.org>
|
||||
Alexander K. Hudek <alexhudek@home.com>
|
||||
Alexander Langer <alex@big.endian.de>
|
||||
Alfred M. Szmidt <ams@kemisten.nu>
|
||||
Andrew Clausen <clausen@gnu.org>
|
||||
Andrew Walrond <andrew@walrond.org>
|
||||
Ben Liblit <liblit@eecs.berkeley.edu>
|
||||
Bernhard Treutwein <Bernhard.Treutwein@Verwaltung.Uni-Muenchen.DE>
|
||||
Bodo Rueskamp <br@itchigo.com>.
|
||||
Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
|
||||
Bradford Hovinen <hovinen@redrose.net>
|
||||
Brian Brunswick <brian@skarpsey.demon.co.uk>
|
||||
Bryan Ford <baford@cs.utah.edu>
|
||||
Cedric Ware <ware@com.enst.fr>
|
||||
Chip Salzenberg <chip@valinux.com>
|
||||
Christian Jones <chjones@aleph0.com>
|
||||
Christoph Plattner <Christoph.Plattner@dot.at>
|
||||
Damian Ivereigh <damian@cisco.com>
|
||||
David Weinehall <tao@debian.org>
|
||||
Dan J. Walters <djw@cs.utexas.edu>
|
||||
Daniel Farrell <s2108287@student.rmit.edu.au>
|
||||
Daniel Pittman <daniel@rimspace.net>
|
||||
Daniel Wagner <wagi@gmx.ch>
|
||||
Danilo Godec <danci@agenda.si>
|
||||
Dennis Kitzman <dennis-kitzman@uiowa.edu>
|
||||
Derrik Pates <dpates@dsdk12.net>
|
||||
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
|
||||
Eduard Guzovsky <eguzovsk@enterasys.com>
|
||||
Edward Killips <ekillips@triton.net>
|
||||
Egmont Koblinger <egmont@uhulinux.hu>
|
||||
Eric Hanchrow <erich@microsoft.com>
|
||||
Erik Schoenfelder <schoenfr@gaertner.de>
|
||||
Eugene Doudine <dudin@np.nk.nornik.ru>
|
||||
Florian Hatat <mininet@wanadoo.fr>
|
||||
Frank Mehnert <fm3@os.inf.tu-dresden.de>
|
||||
Gary Poppitz <gpoppitz@tachyon.net>
|
||||
Goran Koruga <goran.koruga@hermes.si>
|
||||
Hal Snyder <hal@vailsys.com>
|
||||
HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp>
|
||||
Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
|
||||
Henrik Nordstrom <hno@marasystems.com>
|
||||
Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at>
|
||||
Hidetoshi Nishimaki <nishimaki@mxs.nes.nec.co.jp>
|
||||
Hisazumi Kenji <nel@soraneko.com>
|
||||
HORIKAWA Kazunori <kaz-hori@tkd.att.ne.jp>
|
||||
Ilguiz Latypov <ilatypov@superbt.com>
|
||||
Jan Fricke <fricke@uni-greifswald.de>
|
||||
Jan Zerebecki <jan.list@elite-pferde.de>
|
||||
Jason Thomas <jason@topic.com.au>
|
||||
Jean-Jacques Michel <jjmichel@linbox.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
Jochen Hoenicke <jochen@gnu.org>
|
||||
Johannes Kroeger <hanne@squirrel.owl.de>
|
||||
John Goerzen <jgoerzen@complete.org>
|
||||
John Tobey <spam@john-edwin-tobey.org>
|
||||
Josip Rodin <joy@cibalia.gkvk.hr>
|
||||
Julien Bordet <julien.bordet@int-evry.fr>
|
||||
Julien Perrot <julien.perrot@iie.cnam.fr>
|
||||
Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>
|
||||
Karsten Scheibler <karsten.scheibler@student.uni-halle.de>
|
||||
KB Sriram <mail_kb@yahoo.com>
|
||||
Khimenko Victor <grub@khim.sch57.msk.ru>
|
||||
Klaus Reichl <klaus.reichl@alcatel.at>
|
||||
Kristoffer Branemyr <ztion@swipnet.se>
|
||||
Kunihiro Ishiguro <kunihiro@zebra.org>
|
||||
Leendert Meyer <leen.meyer@home.nl>
|
||||
Leonid Lisovskiy <lly@pisem.net>
|
||||
M. Meiarashi <mes@st.rim.or.jp>
|
||||
Mark Kettenis <kettenis@chello.nl>
|
||||
Mark Lundeberg <aa026@pgfn.bc.ca>
|
||||
Matt Perry <matt@primefactor.com>
|
||||
Matt Yourst <yourst@mit.edu>
|
||||
Matthias Granberry <matthias@slurpee.org>
|
||||
Matthias Kretschmer <m.kretschmer@bsdger.org>
|
||||
Michael Hohmuth <hohmuth@innocent.com>
|
||||
Michael Sullivan <mike@trdlnk.com>
|
||||
Mike Meyer <mwm@mired.org>
|
||||
Miles Bader <miles@gnu.org>
|
||||
NATORI Shin <natori@adm.s.u-tokyo.ac.jp>
|
||||
Neal H Walfield <neal@walfield.org>
|
||||
Neelkanth Natu <neelnatu@yahoo.com>
|
||||
OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
Pavel Roskin <proski@gnu.org>
|
||||
Per Lundberg <plundis@byggdok.se>
|
||||
Peter Astrand <altic@lysator.liu.se>
|
||||
Ralf Medow <ralf.medow@t-online.de>
|
||||
Ramon van Handel <vhandel@chem.vu.nl>
|
||||
Robert Millan <robertmh@gnu.org>
|
||||
Roderich Schupp <rsch@ExperTeam.de>
|
||||
Rogelio M. Serrano Jr. <rogelio@victorio.com>
|
||||
Sergey Matveychuk <sem@ciam.ru>
|
||||
Serguei Tzukanov <tzukanov@narod.ru>
|
||||
Stefan Ondrejicka <ondrej@idata.sk>
|
||||
Stephen Early <steve@greenend.org.uk>
|
||||
Steven Dick <ssd.gnu@mmae.ucf.edu>
|
||||
Sven Wegener <swegener@gentoo.org>
|
||||
Takehiro Suzuki <takehiro@coral.ocn.ne.jp>
|
||||
Taketo Kabe <kabe@sra-tohoku.co.jp>
|
||||
Thierry DELHAISE <thierry.delhaise@delhaise.com>
|
||||
Thierry Laronde <thierry.laronde@polynum.com>
|
||||
Thomas Schweikle <tschweikle@fiducia.de>
|
||||
Thomas Schwinge <kischde@gmx.net>
|
||||
Tilmann Bubeck <t.bubeck@reinform.de>
|
||||
Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
|
||||
Tomas Ebenlendr <ebik@ucw.cz>
|
||||
Tristan Gingold <tristan.gingold@bull.net>
|
||||
Tsuneyoshi Yasuo <tuneyoshi@naic.co.jp>
|
||||
Vesa Jaaskelainen <chaac@nic.fi>
|
||||
Vincent Guffens <guffens@inma.ucl.ac.be>
|
||||
Vincent Pelletier <subdino2004@yahoo.fr>
|
||||
Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Also, we thank the projects GNU Automake and LZMA. Some code
|
||||
was stolen from them.
|
||||
|
||||
This project was supported by Information-technology Promotion Agency,
|
||||
Japan.
|
||||
Torsten Duwe <duwe@caldera.de>
|
||||
Uwe Dannowski <ud3@ira.uka.de>
|
||||
VaX#n8 <vax@linkdead.paranoia.com>
|
||||
Vesa Jaaskelainen <jaaskela@tietomyrsky.fi>
|
||||
Yedidyah Bar-David <didi@post.tau.ac.il>
|
||||
Yury V. Umanets <umka@namesys.com>
|
||||
Yuri Zaporogets <yuriz@ukr.net>
|
||||
Vitaly Fertman <vitaly@namesys.com>
|
||||
@@ -1,9 +1,102 @@
|
||||
-*- Mode: Outline -*-
|
||||
|
||||
Before working on improving GRUB, it's very important that you
|
||||
Before working on anything in this file, it's very important that you
|
||||
make contact with the core GRUB developers. Things herein might be
|
||||
slightly out of date or otherwise not easy to understand at first
|
||||
glance. So write to <grub-devel@gnu.org> first.
|
||||
glance. So write to <bug-grub@gnu.org> first.
|
||||
|
||||
For bug tracking, refer to:
|
||||
Priorities:
|
||||
Reported bugs generally have top priority.
|
||||
Non-reported and non-encountered bugs (things we know don't work,
|
||||
but don't really impede things) have lower priority.
|
||||
Things in this file are ranked with one to three !; the more, the
|
||||
higher priority.
|
||||
|
||||
http://savannah.gnu.org/bugs/?group=grub
|
||||
|
||||
Things that should be done before 1.0:
|
||||
|
||||
* Finish the Multiboot Speicification 0.7. !!!
|
||||
|
||||
* Add more --disable-FOO options to configure, so that you can create a
|
||||
minimum GRUB image. This is useful for boot floppies because of the size
|
||||
restriction. !
|
||||
|
||||
* Implement a new version of track_int13, using Virtual 8086 Mode. !!!
|
||||
|
||||
* Add missing features of graphics support. !!
|
||||
|
||||
Things that should _not_ be done before 1.0:
|
||||
|
||||
* Add configuration inclusion support by adding a command "include". !
|
||||
|
||||
* Add automatic configuration support.
|
||||
|
||||
* Add bunzip2 support.
|
||||
|
||||
* Define the module system.
|
||||
|
||||
* Add BSD syntax support, using results of ioprobe to map drives. !
|
||||
(0x1f0-0x1f7 = primary IDE, 0x170-0x176 = secondary,
|
||||
0x1e8-0x1ef = tertiary, 0x168-0x16f = quaternary).
|
||||
|
||||
* Add a real scripting language, possibly retaining backward
|
||||
compatibility so that old config files can be used.
|
||||
|
||||
* Add internationalization support, emulating gettext as much as is
|
||||
feasible.
|
||||
|
||||
* Support other architectures than i386-pc.
|
||||
|
||||
* Add real memory management.
|
||||
|
||||
|
||||
Things that may be done anytime:
|
||||
|
||||
* Port the script ``grub-install'' to OpenBSD. At least you will have to
|
||||
modify the function `convert' so that it can translate a native device
|
||||
name into the corresponding GRUB drive representation. !
|
||||
|
||||
* Add a command to run a GRUB script file. !!
|
||||
|
||||
* Add commands to manipulate the menu from the command-line interface. !
|
||||
|
||||
* Make symbolic links work for BSD FFS.
|
||||
|
||||
* Add indirect block support to the BSD FFS filesystem code, so files
|
||||
larger than 16MB can be read.
|
||||
|
||||
* Fix-up FreeBSD, NetBSD (and OpenBSD ?) command-line boot
|
||||
parameters.
|
||||
|
||||
* Support embedding a Stage 1.5 in the "bootloader" area of a FFS
|
||||
partition. (We already have the code, but need an approval by an
|
||||
expert before turning on the support. Any volunteers?)
|
||||
|
||||
* Support embedding a Stage 1.5 in the EXT2_BOOT_LOADER_INO of an ext2fs
|
||||
partition, so that it won't be accidentally erased or modified by
|
||||
the kernel.
|
||||
|
||||
* Add ISA PnP support.
|
||||
|
||||
* Add more filesystems support (NTFS, etc.)
|
||||
|
||||
* Add more remote console support (parallel and net).
|
||||
|
||||
* Add (real) RAID support.
|
||||
|
||||
? Add a partition naming syntax that means ``the first partition of
|
||||
this type''. We need this for clean Hurd install floppies.
|
||||
Nope. Improving the `find' command would solve this problem.
|
||||
|
||||
* Add CDROM-chainloading support. It would be enough to support only
|
||||
BIOSes which have bootable-CDROM support (so you may use the "Bootable
|
||||
CDROM" BIOS calls). It is not trivial to support BIOSes without the
|
||||
capability to boot CDROM.
|
||||
|
||||
? Divide pxegrub into two parts, so the initial image doesn't exceed
|
||||
the 32KB limit. I'm not sure if this is really necessary, because the
|
||||
PXE standard just says that it is _recommended_ to improve the
|
||||
modularity of a boot image. Obviously, this reason doesn't apply to
|
||||
GRUB, as pxegrub is merely a secondary boot loader. So whether this
|
||||
task should be done depends on if existing PXE ROMs support >32KB
|
||||
images or not, after all.
|
||||
+257
-413
@@ -1,50 +1,12 @@
|
||||
dnl Redefine AC_LANG_PROGRAM with a "-Wstrict-prototypes -Werror"-friendly
|
||||
dnl version. Patch submitted to bug-autoconf in 2009-09-16.
|
||||
m4_define([AC_LANG_PROGRAM(C)],
|
||||
[$1
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
dnl Do *not* indent the following line: there may be CPP directives.
|
||||
dnl Don't move the `;' right after for the same reason.
|
||||
$2
|
||||
;
|
||||
return 0;
|
||||
}])
|
||||
|
||||
|
||||
dnl Check whether target compiler is working
|
||||
AC_DEFUN([grub_PROG_TARGET_CC],
|
||||
[AC_MSG_CHECKING([whether target compiler is working])
|
||||
AC_CACHE_VAL(grub_cv_prog_target_cc,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);
|
||||
]], [[]])],
|
||||
[grub_cv_prog_target_cc=yes],
|
||||
[grub_cv_prog_target_cc=no])
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_prog_target_cc])
|
||||
|
||||
if test "x$grub_cv_prog_target_cc" = xno; then
|
||||
AC_MSG_ERROR([cannot compile for the target])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl grub_ASM_USCORE checks if C symbols get an underscore after
|
||||
dnl compiling to assembler.
|
||||
dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
|
||||
dnl Erich Boleyn and modified by Yoshinori K. Okuji.
|
||||
dnl Erich Boleyn and modified by OKUJI Yoshinori
|
||||
AC_DEFUN([grub_ASM_USCORE],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_EGREP])
|
||||
AC_MSG_CHECKING([if C symbols get an underscore after compilation])
|
||||
AC_CACHE_VAL(grub_cv_asm_uscore,
|
||||
[cat > conftest.c <<\EOF
|
||||
int func (int *);
|
||||
int
|
||||
func (int *list)
|
||||
{
|
||||
@@ -59,16 +21,19 @@ else
|
||||
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
|
||||
fi
|
||||
|
||||
if $EGREP '(^|[^_[:alnum]])_func' conftest.s >/dev/null 2>&1; then
|
||||
HAVE_ASM_USCORE=1
|
||||
if grep _func conftest.s >/dev/null 2>&1; then
|
||||
grub_cv_asm_uscore=yes
|
||||
else
|
||||
HAVE_ASM_USCORE=0
|
||||
grub_cv_asm_uscore=no
|
||||
fi
|
||||
|
||||
rm -f conftest*])
|
||||
|
||||
if test "x$grub_cv_asm_uscore" = xyes; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_ASM_USCORE], $grub_cv_asm_uscore,
|
||||
[Define if C symbols get an underscore after compilation])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_asm_uscore])
|
||||
])
|
||||
|
||||
@@ -76,10 +41,9 @@ AC_MSG_RESULT([$grub_cv_asm_uscore])
|
||||
dnl Some versions of `objcopy -O binary' vary their output depending
|
||||
dnl on the link address.
|
||||
AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
|
||||
[AC_MSG_CHECKING([whether ${TARGET_OBJCOPY} works for absolute addresses])
|
||||
[AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
|
||||
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
|
||||
[cat > conftest.c <<\EOF
|
||||
void cmain (void);
|
||||
void
|
||||
cmain (void)
|
||||
{
|
||||
@@ -92,25 +56,14 @@ else
|
||||
AC_MSG_ERROR([${CC-cc} cannot compile C source code])
|
||||
fi
|
||||
grub_cv_prog_objcopy_absolute=yes
|
||||
for link_addr in 0x2000 0x8000 0x7C00; do
|
||||
|
||||
target_img_base_ld="${TARGET_IMG_BASE_LDOPT}"
|
||||
case "$target_img_base_ld" in
|
||||
*_grub_text_base)
|
||||
target_img_base_ld="${target_img_base_ld}=$link_addr"
|
||||
;;
|
||||
*)
|
||||
target_img_base_ld="${target_img_base_ld},$link_addr"
|
||||
;;
|
||||
esac
|
||||
|
||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${target_img_base_ld} conftest.o -o conftest.exec]); then :
|
||||
for link_addr in 2000 8000 7C00; do
|
||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
|
||||
else
|
||||
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
|
||||
fi
|
||||
if AC_TRY_COMMAND([${TARGET_OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then :
|
||||
if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
|
||||
else
|
||||
AC_MSG_ERROR([${TARGET_OBJCOPY-objcopy} cannot create binary files])
|
||||
AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
|
||||
fi
|
||||
if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then
|
||||
mv -f conftest conftest.old
|
||||
@@ -120,403 +73,294 @@ for link_addr in 0x2000 0x8000 0x7C00; do
|
||||
fi
|
||||
done
|
||||
rm -f conftest*])
|
||||
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])
|
||||
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])])
|
||||
|
||||
if test "x$grub_cv_prog_objcopy_absolute" = xno; then
|
||||
AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils])
|
||||
fi
|
||||
])
|
||||
dnl Mass confusion!
|
||||
dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
|
||||
dnl instructions, but implicitly insert addr32 and data32 bytes so
|
||||
dnl that the code works in real mode''.
|
||||
dnl
|
||||
dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit
|
||||
dnl instructions,'' which seems right. This requires the programmer
|
||||
dnl to explicitly insert addr32 and data32 instructions when they want
|
||||
dnl them.
|
||||
dnl
|
||||
dnl We only support the newer versions, because the old versions cause
|
||||
dnl major pain, by requiring manual assembly to get 16-bit instructions into
|
||||
dnl stage1/stage1.S.
|
||||
AC_DEFUN([grub_ASM_ADDR32],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
|
||||
AC_MSG_CHECKING([for .code16 addr32 assembler support])
|
||||
AC_CACHE_VAL(grub_cv_asm_addr32,
|
||||
[cat > conftest.s.in <<\EOF
|
||||
.code16
|
||||
l1: @ADDR32@ movb %al, l1
|
||||
EOF
|
||||
|
||||
|
||||
dnl Supply --build-id=none to ld if building modules.
|
||||
dnl This suppresses warnings from ld on some systems
|
||||
AC_DEFUN([grub_PROG_LD_BUILD_ID_NONE],
|
||||
[AC_MSG_CHECKING([whether linker accepts --build-id=none])
|
||||
AC_CACHE_VAL(grub_cv_prog_ld_build_id_none,
|
||||
[save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id=none"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_prog_ld_build_id_none=yes],
|
||||
[grub_cv_prog_ld_build_id_none=no])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_prog_ld_build_id_none])
|
||||
|
||||
if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check nm
|
||||
AC_DEFUN([grub_PROG_NM_WORKS],
|
||||
[AC_MSG_CHECKING([whether nm works])
|
||||
AC_CACHE_VAL(grub_cv_prog_nm_works,
|
||||
[
|
||||
nm_works_tmp_dir="$(mktemp -d "./confXXXXXX")"
|
||||
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[]], [[]])])
|
||||
$TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_works_tmp_dir/ef"
|
||||
if $TARGET_NM "$nm_works_tmp_dir/ef" > /dev/null; then
|
||||
grub_cv_prog_nm_works=yes
|
||||
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
|
||||
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
|
||||
else
|
||||
grub_cv_prog_nm_minus_p=no
|
||||
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
|
||||
fi
|
||||
rm "$nm_works_tmp_dir/ef"
|
||||
rmdir "$nm_works_tmp_dir"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_prog_nm_works])
|
||||
|
||||
if test "x$grub_cv_prog_nm_works" != xyes; then
|
||||
AC_MSG_ERROR([nm does not work])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Supply -P to nm
|
||||
AC_DEFUN([grub_PROG_NM_MINUS_P],
|
||||
[AC_MSG_CHECKING([whether nm accepts -P])
|
||||
AC_CACHE_VAL(grub_cv_prog_nm_minus_p,
|
||||
[
|
||||
nm_minus_p_tmp_dir="$(mktemp -d "./confXXXXXX")"
|
||||
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[]], [[]])])
|
||||
$TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_minus_p_tmp_dir/ef"
|
||||
if $TARGET_NM -P "$nm_minus_p_tmp_dir/ef" 2>&1 > /dev/null; then
|
||||
grub_cv_prog_nm_minus_p=yes
|
||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||
grub_cv_asm_addr32=yes
|
||||
else
|
||||
grub_cv_prog_nm_minus_p=no
|
||||
grub_cv_asm_addr32=no
|
||||
fi
|
||||
rm "$nm_minus_p_tmp_dir/ef"
|
||||
rmdir "$nm_minus_p_tmp_dir"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_prog_nm_minus_p])
|
||||
|
||||
if test "x$grub_cv_prog_nm_minus_p" = xyes; then
|
||||
TARGET_NMFLAGS_MINUS_P="-P"
|
||||
rm -f conftest*])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_asm_addr32])])
|
||||
|
||||
dnl
|
||||
dnl Later versions of GAS requires that addr32 and data32 prefixes
|
||||
dnl appear in the same lines as the instructions they modify, while
|
||||
dnl earlier versions requires that they appear in separate lines.
|
||||
AC_DEFUN([grub_ASM_PREFIX_REQUIREMENT],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(dnl
|
||||
[whether addr32 must be in the same line as the instruction])
|
||||
AC_CACHE_VAL(grub_cv_asm_prefix_requirement,
|
||||
[cat > conftest.s <<\EOF
|
||||
.code16
|
||||
l1: addr32 movb %al, l1
|
||||
EOF
|
||||
|
||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||
grub_cv_asm_prefix_requirement=yes
|
||||
else
|
||||
TARGET_NMFLAGS_MINUS_P=
|
||||
grub_cv_asm_prefix_requirement=no
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Supply --defined-only to nm
|
||||
AC_DEFUN([grub_PROG_NM_DEFINED_ONLY],
|
||||
[AC_MSG_CHECKING([whether nm accepts --defined-only])
|
||||
AC_CACHE_VAL(grub_cv_prog_nm_defined_only,
|
||||
[
|
||||
nm_defined_only_tmp_dir="$(mktemp -d "./confXXXXXX")"
|
||||
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[]], [[]])])
|
||||
$TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_defined_only_tmp_dir/ef"
|
||||
if $TARGET_NM --defined-only "$nm_defined_only_tmp_dir/ef" 2>&1 > /dev/null; then
|
||||
grub_cv_prog_nm_defined_only=yes
|
||||
rm -f conftest*])
|
||||
|
||||
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
|
||||
grub_tmp_addr32="addr32"
|
||||
grub_tmp_data32="data32"
|
||||
else
|
||||
grub_cv_prog_nm_defined_only=no
|
||||
grub_tmp_addr32="addr32;"
|
||||
grub_tmp_data32="data32;"
|
||||
fi
|
||||
rm "$nm_defined_only_tmp_dir/ef"
|
||||
rmdir "$nm_defined_only_tmp_dir"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_prog_nm_defined_only])
|
||||
|
||||
if test "x$grub_cv_prog_nm_defined_only" = xyes; then
|
||||
TARGET_NMFLAGS_DEFINED_ONLY=--defined-only
|
||||
AC_DEFINE_UNQUOTED([ADDR32], $grub_tmp_addr32,
|
||||
[Define it to \"addr32\" or \"addr32;\" to make GAS happy])
|
||||
AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32,
|
||||
[Define it to \"data32\" or \"data32;\" to make GAS happy])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])])
|
||||
|
||||
dnl
|
||||
dnl Older versions of GAS require that absolute indirect calls/jumps are
|
||||
dnl not prefixed with `*', while later versions warn if not prefixed.
|
||||
AC_DEFUN([grub_ASM_ABSOLUTE_WITHOUT_ASTERISK],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(dnl
|
||||
[whether an absolute indirect call/jump must not be prefixed with an asterisk])
|
||||
AC_CACHE_VAL(grub_cv_asm_absolute_without_asterisk,
|
||||
[cat > conftest.s <<\EOF
|
||||
lcall *(offset)
|
||||
offset:
|
||||
.long 0
|
||||
.word 0
|
||||
EOF
|
||||
|
||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||
grub_cv_asm_absolute_without_asterisk=no
|
||||
else
|
||||
TARGET_NMFLAGS_DEFINED_ONLY=
|
||||
grub_cv_asm_absolute_without_asterisk=yes
|
||||
fi
|
||||
|
||||
rm -f conftest*])
|
||||
|
||||
if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then
|
||||
AC_DEFINE(ABSOLUTE_WITHOUT_ASTERISK, 1, [Define if an absolute indirect call/jump must NOT be prefixed with `*'])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_asm_absolute_without_asterisk])])
|
||||
|
||||
dnl
|
||||
dnl grub_CHECK_START_SYMBOL checks if start is automatically defined by
|
||||
dnl the compiler.
|
||||
dnl Written by OKUJI Yoshinori
|
||||
AC_DEFUN([grub_CHECK_START_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if start is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_start_symbol,
|
||||
[AC_TRY_LINK([], [asm ("incl start")],
|
||||
grub_cv_check_start_symbol=yes,
|
||||
grub_cv_check_start_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_start_symbol" = xyes; then
|
||||
AC_DEFINE(HAVE_START_SYMBOL, 1, [Define if start is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_start_symbol])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl grub_CHECK_USCORE_START_SYMBOL checks if _start is automatically
|
||||
dnl defined by the compiler.
|
||||
dnl Written by OKUJI Yoshinori
|
||||
AC_DEFUN([grub_CHECK_USCORE_START_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if _start is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_start_symbol,
|
||||
[AC_TRY_LINK([], [asm ("incl _start")],
|
||||
grub_cv_check_uscore_start_symbol=yes,
|
||||
grub_cv_check_uscore_start_symbol=no)])
|
||||
|
||||
dnl Check what symbol is defined as a bss start symbol.
|
||||
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
|
||||
AC_DEFUN([grub_CHECK_BSS_START_SYMBOL],
|
||||
if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
|
||||
AC_DEFINE(HAVE_USCORE_START_SYMBOL, 1, [Define if _start is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL checks if __bss_start is
|
||||
dnl automatically defined by the compiler.
|
||||
dnl Written by Michael Hohmoth.
|
||||
AC_DEFUN([grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if __bss_start is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_uscore_bss_start_symbol,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);
|
||||
]],
|
||||
[[asm ("incl __bss_start")]])],
|
||||
[grub_cv_check_uscore_uscore_bss_start_symbol=yes],
|
||||
[grub_cv_check_uscore_uscore_bss_start_symbol=no])])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_uscore_bss_start_symbol])
|
||||
|
||||
AC_MSG_CHECKING([if edata is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_edata_symbol,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);]],
|
||||
[[asm ("incl edata")]])],
|
||||
[grub_cv_check_edata_symbol=yes],
|
||||
[grub_cv_check_edata_symbol=no])])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_edata_symbol])
|
||||
|
||||
AC_MSG_CHECKING([if _edata is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_edata_symbol,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);]],
|
||||
[[asm ("incl _edata")]])],
|
||||
[grub_cv_check_uscore_edata_symbol=yes],
|
||||
[grub_cv_check_uscore_edata_symbol=no])])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_edata_symbol])
|
||||
[AC_TRY_LINK([], [asm ("incl __bss_start")],
|
||||
grub_cv_check_uscore_uscore_bss_start_symbol=yes,
|
||||
grub_cv_check_uscore_uscore_bss_start_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
|
||||
BSS_START_SYMBOL=__bss_start
|
||||
elif test "x$grub_cv_check_edata_symbol" = xyes; then
|
||||
BSS_START_SYMBOL=edata
|
||||
elif test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
|
||||
BSS_START_SYMBOL=_edata
|
||||
else
|
||||
AC_MSG_ERROR([none of __bss_start, edata or _edata is defined])
|
||||
AC_DEFINE(HAVE_USCORE_USCORE_BSS_START_SYMBOL, 1, [Define if __bss_start is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_uscore_bss_start_symbol])
|
||||
])
|
||||
|
||||
dnl Check what symbol is defined as an end symbol.
|
||||
dnl Written by Yoshinori K. Okuji.
|
||||
dnl
|
||||
dnl grub_CHECK_EDATA_SYMBOL checks if edata is automatically defined by the
|
||||
dnl compiler.
|
||||
dnl Written by Michael Hohmuth.
|
||||
AC_DEFUN([grub_CHECK_EDATA_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if edata is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_edata_symbol,
|
||||
[AC_TRY_LINK([], [asm ("incl edata")],
|
||||
grub_cv_check_edata_symbol=yes,
|
||||
grub_cv_check_edata_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_edata_symbol" = xyes; then
|
||||
AC_DEFINE(HAVE_EDATA_SYMBOL, 1, [Define if edata is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_edata_symbol])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl grub_CHECK_USCORE_EDATA_SYMBOL checks if _edata is automatically
|
||||
dnl defined by the compiler.
|
||||
dnl Written by Michael Hohmuth.
|
||||
AC_DEFUN([grub_CHECK_USCORE_EDATA_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if _edata is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_edata_symbol,
|
||||
[AC_TRY_LINK([], [asm ("incl _edata")],
|
||||
grub_cv_check_uscore_edata_symbol=yes,
|
||||
grub_cv_check_uscore_edata_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
|
||||
AC_DEFINE(HAVE_USCORE_EDATA_SYMBOL, 1, [Define if _edata is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_edata_symbol])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl grub_CHECK_END_SYMBOL checks if end is automatically defined by the
|
||||
dnl compiler.
|
||||
dnl Written by OKUJI Yoshinori
|
||||
AC_DEFUN([grub_CHECK_END_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if end is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_end_symbol,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);]],
|
||||
[[asm ("incl end")]])],
|
||||
[grub_cv_check_end_symbol=yes],
|
||||
[grub_cv_check_end_symbol=no])])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_end_symbol])
|
||||
|
||||
AC_MSG_CHECKING([if _end is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_end_symbol,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
asm (".globl start; start:");
|
||||
void __main (void);
|
||||
void __main (void) {}
|
||||
int main (void);]],
|
||||
[[asm ("incl _end")]])],
|
||||
[grub_cv_check_uscore_end_symbol=yes],
|
||||
[grub_cv_check_uscore_end_symbol=no])])
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])
|
||||
[AC_TRY_LINK([], [asm ("incl end")],
|
||||
grub_cv_check_end_symbol=yes,
|
||||
grub_cv_check_end_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_end_symbol" = xyes; then
|
||||
END_SYMBOL=end
|
||||
elif test "x$grub_cv_check_uscore_end_symbol" = xyes; then
|
||||
END_SYMBOL=_end
|
||||
else
|
||||
AC_MSG_ERROR([neither end nor _end is defined])
|
||||
AC_DEFINE(HAVE_END_SYMBOL, 1, [Define if end is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_end_symbol])
|
||||
])
|
||||
|
||||
|
||||
dnl Check if the C compiler supports the stack protector
|
||||
AC_DEFUN([grub_CHECK_STACK_PROTECTOR],[
|
||||
[# Stack smashing protector.
|
||||
ssp_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector'])
|
||||
# Is this a reliable test case?
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
void foo (void) { volatile char a[8]; a[3]; }
|
||||
]])])
|
||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||
# `ac_compile' like this correct, after all?
|
||||
if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
else
|
||||
ssp_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
[# Strong stack smashing protector.
|
||||
ssp_strong_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector-strong'])
|
||||
# Is this a reliable test case?
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
void foo (void) { volatile char a[8]; a[3]; }
|
||||
]])])
|
||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||
# `ac_compile' like this correct, after all?
|
||||
if eval "$ac_compile -S -fstack-protector-strong -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
else
|
||||
ssp_strong_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
[# Global stack smashing protector.
|
||||
ssp_global_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' accepts `-mstack-protector-guard=global'])
|
||||
# Is this a reliable test case?
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
void foo (void) { volatile char a[8]; a[3]; }
|
||||
]])])
|
||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||
# `ac_compile' like this correct, after all?
|
||||
if eval "$ac_compile -S -fstack-protector -mstack-protector-guard=global -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
else
|
||||
ssp_global_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
dnl
|
||||
dnl grub_CHECK_USCORE_END_SYMBOL checks if _end is automatically defined
|
||||
dnl by the compiler.
|
||||
dnl Written by OKUJI Yoshinori
|
||||
AC_DEFUN([grub_CHECK_USCORE_END_SYMBOL],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING([if _end is defined by the compiler])
|
||||
AC_CACHE_VAL(grub_cv_check_uscore_end_symbol,
|
||||
[AC_TRY_LINK([], [asm ("incl _end")],
|
||||
grub_cv_check_uscore_end_symbol=yes,
|
||||
grub_cv_check_uscore_end_symbol=no)])
|
||||
|
||||
if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
|
||||
AC_DEFINE(HAVE_USCORE_END_SYMBOL, 1, [Define if end is defined])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])
|
||||
])
|
||||
|
||||
dnl Check if the C compiler supports `-mstack-arg-probe' (Cygwin).
|
||||
AC_DEFUN([grub_CHECK_STACK_ARG_PROBE],[
|
||||
[# Smashing stack arg probe.
|
||||
sap_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
void foo (void) { volatile char a[8]; a[3]; }
|
||||
]])])
|
||||
[if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
else
|
||||
sap_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
])
|
||||
dnl grub_DEFINE_FILE(MACRO_NAME, FILE_NAME, DESCRIPTION)
|
||||
dnl grub_DEFINE_FILE defines a macro as the contents of a file safely.
|
||||
dnl Replace some escape sequences, because autoconf doesn't handle them
|
||||
dnl gracefully.
|
||||
dnl Written by OKUJI Yoshinori.
|
||||
AC_DEFUN([grub_DEFINE_FILE],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
# Because early versions of GNU sed 3.x are too buggy, use a C program
|
||||
# instead of shell commands. *sigh*
|
||||
cat >conftest.c <<\EOF
|
||||
#include <stdio.h>
|
||||
|
||||
dnl Check if ln -s can handle directories properly (mingw).
|
||||
AC_DEFUN([grub_CHECK_LINK_DIR],[
|
||||
AC_MSG_CHECKING([whether ln -s can handle directories properly])
|
||||
[mkdir testdir 2>/dev/null
|
||||
case $srcdir in
|
||||
[\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
|
||||
*) reldir=../$srcdir/include/grub/util ;;
|
||||
esac
|
||||
if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[link_dir=yes
|
||||
else
|
||||
link_dir=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi
|
||||
rm -rf testdir]
|
||||
])
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int c;
|
||||
|
||||
dnl Check if the C compiler supports `-fPIE'.
|
||||
AC_DEFUN([grub_CHECK_PIE],[
|
||||
[# Position independent executable.
|
||||
pie_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default])
|
||||
# Is this a reliable test case?
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
#ifdef __PIE__
|
||||
int main() {
|
||||
return 0;
|
||||
while ((c = getchar ()) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '\n':
|
||||
fputs ("\\n", stdout);
|
||||
break;
|
||||
case '\r':
|
||||
fputs ("\\r", stdout);
|
||||
break;
|
||||
case '\\':
|
||||
fputs ("\\\\", stdout);
|
||||
break;
|
||||
case '"':
|
||||
fputs ("\\\"", stdout);
|
||||
break;
|
||||
default:
|
||||
putchar (c);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#error NO __PIE__ DEFINED
|
||||
#endif
|
||||
]])])
|
||||
EOF
|
||||
|
||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||
# `ac_compile' like this correct, after all?
|
||||
if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} conftest.c -o conftest]) && test -s conftest; then
|
||||
grub_tmp_value=`./conftest < "[$2]"`
|
||||
else
|
||||
pie_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
])
|
||||
|
||||
AC_DEFUN([grub_CHECK_LINK_PIE],[
|
||||
[# Position independent executable.
|
||||
link_nopie_needed=no]
|
||||
AC_MSG_CHECKING([whether linker needs disabling of PIE to work])
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[]])])
|
||||
|
||||
[if eval "$ac_compile -Wl,-r -nostdlib -Werror -o conftest.o" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([no])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.o
|
||||
else
|
||||
link_nopie_needed=yes]
|
||||
AC_MSG_RESULT([yes])
|
||||
[fi]
|
||||
])
|
||||
|
||||
|
||||
dnl Check if the Linker supports `-no-pie'.
|
||||
AC_DEFUN([grub_CHECK_NO_PIE],
|
||||
[AC_MSG_CHECKING([whether linker accepts -no-pie])
|
||||
AC_CACHE_VAL(grub_cv_cc_ld_no_pie,
|
||||
[save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_ld_no_pie=yes],
|
||||
[grub_cv_cc_ld_no_pie=no])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_cc_ld_no_pie])
|
||||
nopie_possible=no
|
||||
if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
|
||||
nopie_possible=yes
|
||||
AC_MSG_ERROR([${CC-cc} failed to produce an executable file])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([grub_CHECK_NO_PIE_ONEWORD],
|
||||
[AC_MSG_CHECKING([whether linker accepts -nopie])
|
||||
AC_CACHE_VAL(grub_cv_cc_ld_no_pie_oneword,
|
||||
[save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||
[grub_cv_cc_ld_no_pie_oneword=yes],
|
||||
[grub_cv_cc_ld_no_pie_oneword=no])
|
||||
LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
AC_MSG_RESULT([$grub_cv_cc_ld_no_pie_oneword])
|
||||
nopie_oneword_possible=no
|
||||
if test "x$grub_cv_cc_ld_no_pie_oneword" = xyes ; then
|
||||
nopie_oneword_possible=yes
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check if the C compiler supports `-fPIC'.
|
||||
AC_DEFUN([grub_CHECK_PIC],[
|
||||
[# Position independent executable.
|
||||
pic_possible=yes]
|
||||
AC_MSG_CHECKING([whether `$CC' has `-fPIC' as default])
|
||||
# Is this a reliable test case?
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
||||
#ifdef __PIC__
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#error NO __PIC__ DEFINED
|
||||
#endif
|
||||
]])])
|
||||
|
||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
||||
# `ac_compile' like this correct, after all?
|
||||
if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then]
|
||||
AC_MSG_RESULT([yes])
|
||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
||||
rm -f conftest.s
|
||||
else
|
||||
pic_possible=no]
|
||||
AC_MSG_RESULT([no])
|
||||
[fi]
|
||||
])
|
||||
|
||||
dnl Create an output variable with the transformed name of a GRUB utility
|
||||
dnl program.
|
||||
AC_DEFUN([grub_TRANSFORM],[dnl
|
||||
AC_SUBST(AS_TR_SH([$1]), [`AS_ECHO([$1]) | sed "$program_transform_name"`])dnl
|
||||
AC_DEFINE_UNQUOTED([$1], "$grub_tmp_value", [$3])
|
||||
rm -f conftest*
|
||||
])
|
||||
@@ -1,20 +0,0 @@
|
||||
/* on arm clang doesn't support .arch directive */
|
||||
|
||||
.text
|
||||
.syntax unified
|
||||
|
||||
#if !defined (__thumb2__)
|
||||
.arch armv7a
|
||||
.arm
|
||||
#else
|
||||
.arch armv7
|
||||
.thumb
|
||||
#endif
|
||||
mcr p15, 0, r11, c7, c14, 2
|
||||
|
||||
/* clang restricts access to dsb/isb despite .arch */
|
||||
dsb
|
||||
isb
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/* on x86 old clang doesn't support .code16
|
||||
newer clang supports it but creates 6-byte jumps instead of 3-byte ones
|
||||
which makes us go over boot sector size.
|
||||
Starting with 3.9 clang emits 3-byte jumps but still creates 8-bytes movl
|
||||
instead of 5-bytes, so code overflows into data. */
|
||||
|
||||
.code16
|
||||
jmp far
|
||||
.org 4
|
||||
jmp nearer
|
||||
.org 6
|
||||
movl nearer, %ebx
|
||||
.org 11
|
||||
.space 100
|
||||
nearer:
|
||||
.space 200
|
||||
far:
|
||||
.byte 0
|
||||
@@ -1,4 +0,0 @@
|
||||
/* on x86 old clang doesn't support .code16 */
|
||||
|
||||
.code16
|
||||
movb %al, %bl
|
||||
@@ -1,11 +0,0 @@
|
||||
/* on mips clang doesn't support privilegied instructions, doubleword store/load
|
||||
and crashes with hand-written assembly
|
||||
*/
|
||||
|
||||
.set mips3
|
||||
sync
|
||||
ld $t2, 0($t1)
|
||||
|
||||
a:
|
||||
addiu $t1, $s0, (b - a)
|
||||
b: nop
|
||||
@@ -1,8 +0,0 @@
|
||||
/* clang <= 3.3 doesn't handle most of ppc assembly, not even inline assembly
|
||||
used by gcrypt */
|
||||
/* Cache invalidation loop is a fair test. */
|
||||
li 5, 0
|
||||
1: icbi 5, 3
|
||||
addi 5, 5, 32
|
||||
cmpw 5, 4
|
||||
blt 1b
|
||||
@@ -1,9 +0,0 @@
|
||||
.text
|
||||
1:
|
||||
/* A small list of examples of what clang doesn't support. */
|
||||
clr %o0
|
||||
lduw [%o4 + 4], %o4
|
||||
and %o6, ~0xff, %o6
|
||||
stw %o5, [%o3]
|
||||
bne,pt %icc, 1b
|
||||
nop
|
||||
+6
-162
@@ -1,165 +1,9 @@
|
||||
#! /usr/bin/env bash
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -e grub-core/lib/gnulib/stdlib.in.h ]; then
|
||||
echo "Gnulib not yet bootstrapped; run ./bootstrap instead." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Detect python
|
||||
if [ -z "$PYTHON" ]; then
|
||||
for i in python3 python3.10 python; do
|
||||
if command -v "$i" > /dev/null 2>&1; then
|
||||
PYTHON="$i"
|
||||
echo "Using $PYTHON..."
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$PYTHON" ]; then
|
||||
echo "python not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export LC_COLLATE=C
|
||||
unset LC_ALL
|
||||
|
||||
find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -ipath './gnulib/*' ! -ipath './grub-core/lib/gnulib/*' |sort > po/POTFILES.in
|
||||
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
|
||||
|
||||
echo "Importing unicode..."
|
||||
${PYTHON} util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
|
||||
|
||||
echo "Importing libgcrypt..."
|
||||
${PYTHON} util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
|
||||
sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
|
||||
sed -n -f util/import_gcrypt_inth.sed < grub-core/lib/libgcrypt/src/gcrypt-int.h >> include/grub/gcrypt/gcrypt.h
|
||||
if [ -f include/grub/gcrypt/g10lib.h ]; then
|
||||
rm include/grub/gcrypt/g10lib.h
|
||||
fi
|
||||
if [ -d grub-core/lib/libgcrypt-grub/mpi/generic ]; then
|
||||
rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
|
||||
fi
|
||||
cp grub-core/lib/libgcrypt-grub/src/g10lib.h include/grub/gcrypt/g10lib.h
|
||||
cp -R grub-core/lib/libgcrypt/mpi/generic grub-core/lib/libgcrypt-grub/mpi/generic
|
||||
|
||||
for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c; do
|
||||
if [ -h grub-core/lib/libgcrypt-grub/mpi/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/mpi/"$x" ]; then
|
||||
rm grub-core/lib/libgcrypt-grub/mpi/"$x"
|
||||
fi
|
||||
cp grub-core/lib/libgcrypt-grub/mpi/generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
|
||||
done
|
||||
|
||||
for x in sha256-ssse3-amd64.S sha256-avx-amd64.S sha256-avx2-bmi2-amd64.S sha256-intel-shaext.c sha512-ssse3-amd64.S sha512-avx-amd64.S sha512-avx2-bmi2-amd64.S sha512-avx512-amd64.S; do
|
||||
if [ -h grub-core/lib/libgcrypt-grub/cipher/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/cipher/"$x" ]; then
|
||||
rm grub-core/lib/libgcrypt-grub/cipher/"$x"
|
||||
fi
|
||||
cp grub-core/lib/libgcrypt/cipher/"$x" grub-core/lib/libgcrypt-grub/cipher/"$x"
|
||||
done
|
||||
|
||||
if [ -f grub-core/lib/libgcrypt-grub/src/hwfeatures.c ]; then
|
||||
rm grub-core/lib/libgcrypt-grub/src/hwfeatures.c
|
||||
fi
|
||||
|
||||
for x in grub-core/lib/libgcrypt-patches/*.patch; do
|
||||
patch -i $x -p1
|
||||
done
|
||||
|
||||
echo "Importing libtasn1..."
|
||||
if [ -d grub-core/lib/libtasn1-grub ]; then
|
||||
rm -rf grub-core/lib/libtasn1-grub
|
||||
fi
|
||||
|
||||
mkdir -p grub-core/lib/libtasn1-grub/lib
|
||||
cp grub-core/lib/libtasn1/lib/*.[ch] grub-core/lib/libtasn1-grub/lib
|
||||
cp grub-core/lib/libtasn1/libtasn1.h grub-core/lib/libtasn1-grub/
|
||||
|
||||
if [ -d grub-core/tests/asn1/tests ]; then
|
||||
rm -rf grub-core/tests/asn1/tests
|
||||
fi
|
||||
|
||||
mkdir grub-core/tests/asn1/tests
|
||||
cp grub-core/lib/libtasn1/tests/*.[ch] grub-core/tests/asn1/tests
|
||||
|
||||
for patch in \
|
||||
0001-libtasn1-disable-code-not-needed-in-grub.patch \
|
||||
0002-libtasn1-replace-strcat-with-strcpy-in-_asn1_str_cat.patch \
|
||||
0003-libtasn1-replace-strcat-with-_asn1_str_cat.patch \
|
||||
0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch \
|
||||
0005-libtasn1-Use-grub_divmod64-for-division.patch \
|
||||
0006-libtasn1-fix-the-potential-buffer-overrun.patch \
|
||||
0007-asn1_test-include-asn1_test.h-only.patch \
|
||||
0008-asn1_test-rename-the-main-functions-to-the-test-name.patch \
|
||||
0009-asn1_test-return-either-0-or-1-to-reflect-the-result.patch \
|
||||
0010-asn1_test-remove-verbose-and-the-unnecessary-printf.patch \
|
||||
0011-asn1_test-print-the-error-messages-with-grub_printf.patch \
|
||||
0012-asn1_test-use-the-grub-specific-functions-and-types.patch \
|
||||
0013-asn1_test-enable-the-testcase-only-when-GRUB_LONG_MA.patch ; do
|
||||
patch -p1 -i grub-core/lib/libtasn1-patches/$patch
|
||||
done
|
||||
|
||||
echo "Generating Automake input..."
|
||||
|
||||
# Automake doesn't like including files from a path outside the project.
|
||||
rm -f contrib grub-core/contrib
|
||||
if [ "x${GRUB_CONTRIB}" != x ]; then
|
||||
[ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
|
||||
[ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
|
||||
fi
|
||||
|
||||
UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
|
||||
CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
|
||||
|
||||
for extra in contrib/*/Makefile.util.def; do
|
||||
if test -e "$extra"; then
|
||||
UTIL_DEFS="$UTIL_DEFS $extra"
|
||||
fi
|
||||
done
|
||||
|
||||
for extra in contrib/*/Makefile.core.def; do
|
||||
if test -e "$extra"; then
|
||||
CORE_DEFS="$CORE_DEFS $extra"
|
||||
fi
|
||||
done
|
||||
|
||||
${PYTHON} gentpl.py $UTIL_DEFS > Makefile.util.am
|
||||
${PYTHON} gentpl.py $CORE_DEFS > grub-core/Makefile.core.am
|
||||
|
||||
for extra in contrib/*/Makefile.common; do
|
||||
if test -e "$extra"; then
|
||||
echo "include $extra" >> Makefile.util.am
|
||||
echo "include $extra" >> grub-core/Makefile.core.am
|
||||
fi
|
||||
done
|
||||
|
||||
for extra in contrib/*/Makefile.util.common; do
|
||||
if test -e "$extra"; then
|
||||
echo "include $extra" >> Makefile.util.am
|
||||
fi
|
||||
done
|
||||
|
||||
for extra in contrib/*/Makefile.core.common; do
|
||||
if test -e "$extra"; then
|
||||
echo "include $extra" >> grub-core/Makefile.core.am
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Saving timestamps..."
|
||||
echo timestamp > stamp-h.in
|
||||
|
||||
if [ -z "$FROM_BOOTSTRAP" ]; then
|
||||
# Unaided autoreconf is likely to install older versions of many files
|
||||
# than the ones provided by Gnulib, but in most cases this won't matter
|
||||
# very much. This mode is provided so that you can run ./autogen.sh to
|
||||
# regenerate the GRUB build system in an unpacked release tarball (perhaps
|
||||
# after patching it), even on systems that don't have access to
|
||||
# gnulib.git.
|
||||
echo "Running autoreconf..."
|
||||
cp -a INSTALL INSTALL.grub
|
||||
autoreconf -vif
|
||||
mv INSTALL.grub INSTALL
|
||||
fi
|
||||
aclocal
|
||||
autoconf
|
||||
autoheader
|
||||
automake -a -c -f
|
||||
|
||||
exit 0
|
||||
-128
@@ -1,128 +0,0 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
# Copyright (C) 2006-2022 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
GNULIB_REVISION=9f48fb992a3d7e96610c4ce8be969cff2d61a01b
|
||||
|
||||
# gnulib modules used by this package.
|
||||
# mbswidth is used by fix-width.diff's changes to argp rather than directly.
|
||||
gnulib_modules="
|
||||
argp
|
||||
base64
|
||||
error
|
||||
filevercmp
|
||||
fnmatch
|
||||
getdelim
|
||||
getline
|
||||
gettext-h
|
||||
gitlog-to-changelog
|
||||
mbswidth
|
||||
progname
|
||||
realloc-gnu
|
||||
regex
|
||||
save-cwd
|
||||
stdbool
|
||||
"
|
||||
|
||||
gnulib_tool_option_extras="\
|
||||
--no-conditional-dependencies \
|
||||
--no-vc-files \
|
||||
"
|
||||
|
||||
gnulib_name=libgnu
|
||||
source_base=grub-core/lib/gnulib
|
||||
gnulib_extra_files="
|
||||
build-aux/install-sh
|
||||
build-aux/mdate-sh
|
||||
build-aux/texinfo.tex
|
||||
build-aux/depcomp
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
"
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||
--from-code=UTF-8\\\
|
||||
'
|
||||
|
||||
checkout_only_file=
|
||||
copy=true
|
||||
vc_ignore=
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.64
|
||||
automake 1.14
|
||||
gettext -
|
||||
git 1.5.5
|
||||
patch -
|
||||
tar -
|
||||
"
|
||||
|
||||
# bootstrap doesn't give us a reasonable way to stop Automake from
|
||||
# overwriting this, so we just copy our version aside and put it back later.
|
||||
cp -a INSTALL INSTALL.grub
|
||||
|
||||
bootstrap_post_import_hook () {
|
||||
set -e
|
||||
|
||||
# Instead of patching our gnulib and therefore maintaining a fork, submit
|
||||
# changes to gnulib and update the hash above when they've merged. Do not
|
||||
# add new patches here.
|
||||
for patchname in fix-width \
|
||||
fix-regcomp-resource-leak \
|
||||
fix-regexec-resource-leak \
|
||||
fix-gcc-15-compile \
|
||||
fix-unused-value; do
|
||||
patch -d grub-core/lib/gnulib -p2 \
|
||||
< "grub-core/lib/gnulib-patches/$patchname.patch"
|
||||
done
|
||||
|
||||
for patchname in \
|
||||
0001-Support-POTFILES-shell \
|
||||
0002-Handle-gettext_printf-shell-function \
|
||||
0003-Make-msgfmt-output-in-little-endian \
|
||||
0004-Use-SHELL-rather-than-bin-sh; do
|
||||
patch -d po -p3 \
|
||||
< "po/gettext-patches/$patchname.patch"
|
||||
done
|
||||
FROM_BOOTSTRAP=1 ./autogen.sh
|
||||
set +e # bootstrap expects this
|
||||
}
|
||||
|
||||
bootstrap_epilogue () {
|
||||
mv INSTALL.grub INSTALL
|
||||
|
||||
if [ "x$SKIP_PO" = "x" ]; then
|
||||
# Generate LINGUAS with all supported languages. Bootstrap will
|
||||
# generate a LINGUAS, but it will not contain the autogenerated
|
||||
# languages.
|
||||
autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
|
||||
|
||||
{
|
||||
# NOTE: xargs has no POSIX compliant way to avoid running the program
|
||||
# given as an argument when there are no input lines. So ensure that
|
||||
# basename is always run with at least one argument, the empty string,
|
||||
# and ignore the first line of output.
|
||||
ls po/*.po | xargs -L 100 basename -s .po -a "" | tail -n +2
|
||||
for x in $autogenerated; do
|
||||
rm -f "po/$x.po"
|
||||
echo "$x"
|
||||
done
|
||||
} | sort | uniq | xargs >po/LINGUAS
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2004-10-12.08
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -1,154 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
CFLAGS_PLATFORM=
|
||||
|
||||
export LC_COLLATE := C
|
||||
unexport LC_ALL
|
||||
|
||||
# Platform specific options
|
||||
if COND_sparc64_ieee1275
|
||||
LDFLAGS_PLATFORM = -Wl,-melf64_sparc
|
||||
endif
|
||||
if COND_arm
|
||||
if !COND_emu
|
||||
LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
|
||||
endif
|
||||
endif
|
||||
if COND_arm64
|
||||
CFLAGS_PLATFORM += -mcmodel=large
|
||||
endif
|
||||
if COND_powerpc_ieee1275
|
||||
CFLAGS_PLATFORM += -mcpu=powerpc
|
||||
endif
|
||||
if COND_HAVE_PCI
|
||||
CFLAGS_PLATFORM += -DGRUB_HAS_PCI
|
||||
endif
|
||||
|
||||
CPPFLAGS_GCRY_ASM = @CPPFLAGS_GCRY_ASM@
|
||||
|
||||
# Other options
|
||||
|
||||
CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\"
|
||||
CPPFLAGS_DEFAULT += -I$(builddir)
|
||||
CPPFLAGS_DEFAULT += -I$(srcdir)
|
||||
CPPFLAGS_DEFAULT += -I$(top_builddir)
|
||||
CPPFLAGS_DEFAULT += -I$(top_srcdir)
|
||||
CPPFLAGS_DEFAULT += -I$(top_srcdir)/include
|
||||
CPPFLAGS_DEFAULT += -I$(top_builddir)/include
|
||||
CPPFLAGS_DEFAULT += -I$(top_srcdir)/grub-core/lib/libgcrypt-grub/src/
|
||||
CCASFLAGS_DEFAULT = $(CPPFLAGS_DEFAULT) -DASM_FILE=1
|
||||
BUILD_CPPFLAGS += $(CPPFLAGS_DEFAULT)
|
||||
|
||||
CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
LDFLAGS_KERNEL = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC)
|
||||
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
|
||||
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx
|
||||
if !COND_emu
|
||||
if COND_HAVE_ASM_USCORE
|
||||
LDFLAGS_KERNEL += -Wl,--defsym=_malloc=_grub_malloc -Wl,--defsym=_free=_grub_free
|
||||
else
|
||||
LDFLAGS_KERNEL += -Wl,--defsym=malloc=grub_malloc -Wl,--defsym=free=grub_free
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r
|
||||
CPPFLAGS_MODULE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
||||
CCASFLAGS_MODULE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||
|
||||
CFLAGS_IMAGE = $(CFLAGS_PLATFORM) -fno-builtin
|
||||
LDFLAGS_IMAGE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-S
|
||||
CPPFLAGS_IMAGE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
||||
CCASFLAGS_IMAGE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||
|
||||
CFLAGS_PROGRAM =
|
||||
LDFLAGS_PROGRAM =
|
||||
CPPFLAGS_PROGRAM =
|
||||
CCASFLAGS_PROGRAM =
|
||||
|
||||
CFLAGS_LIBRARY =
|
||||
CPPFLAGS_LIBRARY =
|
||||
CCASFLAGS_LIBRARY =
|
||||
|
||||
# Other variables
|
||||
|
||||
grubconfdir = $(sysconfdir)/grub.d
|
||||
platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
|
||||
starfielddir = $(pkgdatadir)/themes/starfield
|
||||
|
||||
CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-error=attributes
|
||||
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/lib/gnulib -I$(top_srcdir)/grub-core/lib/gnulib
|
||||
|
||||
CFLAGS_POSIX = -fno-builtin
|
||||
CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
|
||||
|
||||
CFLAGS_GCRY = -Wno-sign-compare -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
|
||||
CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -D_GCRYPT_CONFIG_H_INCLUDED=1 -I$(top_srcdir)/include/grub/gcrypt
|
||||
|
||||
CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
|
||||
|
||||
# List file macros for recognizing /interesting/ modules
|
||||
CPPFLAGS_FS_LIST = -Dgrub_fs_register=FS_LIST_MARKER
|
||||
CPPFLAGS_VIDEO_LIST= -Dgrub_video_register=VIDEO_LIST_MARKER
|
||||
CPPFLAGS_PARTMAP_LIST = -Dgrub_partition_map_register=PARTMAP_LIST_MARKER
|
||||
CPPFLAGS_PARTTOOL_LIST = -Dgrub_parttool_register=PARTTOOL_LIST_MARKER
|
||||
CPPFLAGS_TERMINAL_LIST = '-Dgrub_term_register_input(...)=INPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_TERMINAL_LIST += '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST = '-Dgrub_register_command(...)=COMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_command_lockdown(...)=COMMAND_LOCKDOWN_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_extcmd_lockdown(...)=EXTCOMMAND_LOCKDOWN_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_FDT_LIST := '-Dgrub_fdtbus_register(...)=FDT_DRIVER_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
|
||||
$(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
|
||||
$(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST) \
|
||||
$(CPPFLAGS_FDT_LIST)
|
||||
|
||||
# Define these variables to calm down automake
|
||||
|
||||
IMG_FILES =
|
||||
MOD_FILES =
|
||||
MODULE_FILES =
|
||||
MARKER_FILES =
|
||||
KERNEL_HEADER_FILES =
|
||||
EXTRA_DEPS =
|
||||
|
||||
bin_SCRIPTS =
|
||||
bin_PROGRAMS =
|
||||
check_SCRIPTS_native =
|
||||
check_SCRIPTS_nonnative =
|
||||
check_PROGRAMS_native =
|
||||
check_PROGRAMS_nonnative =
|
||||
dist_grubconf_DATA =
|
||||
dist_noinst_DATA =
|
||||
grubconf_SCRIPTS =
|
||||
man_MANS =
|
||||
noinst_DATA =
|
||||
noinst_SCRIPTS =
|
||||
noinst_PROGRAMS =
|
||||
noinst_LIBRARIES =
|
||||
pkgdata_DATA =
|
||||
platform_DATA =
|
||||
platform_SCRIPTS =
|
||||
platform_PROGRAMS =
|
||||
sbin_SCRIPTS =
|
||||
sbin_PROGRAMS =
|
||||
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
BUILT_SOURCES =
|
||||
|
||||
# Rules for Automake input
|
||||
|
||||
.PRECIOUS: $(top_srcdir)/Makefile.util.am
|
||||
$(top_srcdir)/Makefile.util.am: $(top_srcdir)/gentpl.py $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def
|
||||
$(PYTHON) $^ > $@.new || (rm -f $@.new; exit 1)
|
||||
mv $@.new $@
|
||||
|
||||
.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
|
||||
$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/gentpl.py $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def
|
||||
if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./bootstrap manually." >&2; exit 1; fi
|
||||
$(PYTHON) $^ > $@.new || (rm -f $@.new; exit 1)
|
||||
mv $@.new $@
|
||||
@@ -1,205 +0,0 @@
|
||||
EXTRA_DIST += autogen.sh
|
||||
EXTRA_DIST += geninit.sh
|
||||
|
||||
EXTRA_DIST += gentpl.py
|
||||
EXTRA_DIST += Makefile.util.def
|
||||
EXTRA_DIST += Makefile.utilgcry.def
|
||||
|
||||
EXTRA_DIST += asm-tests
|
||||
EXTRA_DIST += unicode
|
||||
|
||||
EXTRA_DIST += util/import_gcry.py
|
||||
EXTRA_DIST += util/import_unicode.py
|
||||
|
||||
EXTRA_DIST += docs/man
|
||||
EXTRA_DIST += docs/autoiso.cfg
|
||||
EXTRA_DIST += docs/grub.cfg
|
||||
EXTRA_DIST += docs/osdetect.cfg
|
||||
|
||||
EXTRA_DIST += conf/i386-cygwin-img.lds
|
||||
EXTRA_DIST += conf/i386-pc-kernel.lds
|
||||
|
||||
EXTRA_DIST += grub-core/Makefile.core.def
|
||||
EXTRA_DIST += grub-core/Makefile.gcry.def
|
||||
|
||||
EXTRA_DIST += grub-core/genmoddep.awk
|
||||
EXTRA_DIST += grub-core/genmod.sh.in
|
||||
EXTRA_DIST += grub-core/gensyminfo.sh.in
|
||||
EXTRA_DIST += grub-core/gensymlist.sh
|
||||
EXTRA_DIST += grub-core/genemuinit.sh
|
||||
EXTRA_DIST += grub-core/genemuinitheader.sh
|
||||
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-width.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-resource-leak.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-resource-leak.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-gcc-15-compile.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/01_md.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/02_keccak_sse.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/03_sexp_free.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/04_aria.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/05_disable_rsa_shake.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/06_blake.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/07_disable_64div.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/08_sexp_leak.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/09-blake2b-hash-buffers.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/10-kdf-use-GPG-errs.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/11-kdf-remove-unsupported-kdfs.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/12-kdf-use-grub_divmod64.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/13_add_hwfeatures.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/14_fix_build_shaext.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/15_build_sha256_x86_64_efi_opt_code.patch
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-patches/16_build_sha512_x86_64_efi_opt_code.patch
|
||||
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0001-libtasn1-disable-code-not-needed-in-grub.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0002-libtasn1-replace-strcat-with-strcpy-in-_asn1_str_cat.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0003-libtasn1-replace-strcat-with-_asn1_str_cat.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0004-libtasn1-adjust-the-header-paths-in-libtasn1.h.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0005-libtasn1-Use-grub_divmod64-for-division.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0006-libtasn1-fix-the-potential-buffer-overrun.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0007-asn1_test-include-asn1_test.h-only.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0008-asn1_test-rename-the-main-functions-to-the-test-name.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0009-asn1_test-return-either-0-or-1-to-reflect-the-result.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0010-asn1_test-remove-verbose-and-the-unnecessary-printf.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0011-asn1_test-print-the-error-messages-with-grub_printf.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0012-asn1_test-use-the-grub-specific-functions-and-types.patch
|
||||
EXTRA_DIST += grub-core/lib/libtasn1-patches/0013-asn1_test-enable-the-testcase-only-when-GRUB_LONG_MA.patch
|
||||
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-grub/mpi/generic
|
||||
EXTRA_DIST += grub-core/lib/libtasn1
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/include -name '*.h')
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/lib -name '*.h')
|
||||
EXTRA_DIST += grub-core/efiemu/runtime/config.h
|
||||
EXTRA_DIST += grub-core/tests/crypto_cipher_mode_vectors.h
|
||||
EXTRA_DIST += grub-core/tests/asn1/asn1_test.h
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/tests/asn1/tests -name '*.h')
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/grub-core/commands/tpm2_key_protector -name '*.h')
|
||||
EXTRA_DIST += grub-core/commands/tpm2_key_protector/tpm2key.asn
|
||||
|
||||
EXTRA_DIST += grub-core/commands/appendedsig/appendedsig.h
|
||||
|
||||
EXTRA_DIST += grub-core/lib/LzmaDec.c
|
||||
|
||||
EXTRA_DIST += grub-core/fs/cpio_common.c
|
||||
|
||||
EXTRA_DIST += BUGS
|
||||
EXTRA_DIST += MAINTAINERS
|
||||
EXTRA_DIST += SECURITY
|
||||
EXTRA_DIST += util/i386/efi/grub-dumpdevtree
|
||||
EXTRA_DIST += util/spkmodem-recv.c
|
||||
EXTRA_DIST += util/import_gcrypth.sed
|
||||
EXTRA_DIST += util/import_gcrypt_inth.sed
|
||||
EXTRA_DIST += util/bin2h.c
|
||||
EXTRA_DIST += util/grub-gen-asciih.c
|
||||
EXTRA_DIST += util/grub-gen-widthspec.c
|
||||
EXTRA_DIST += util/grub-module-verifier.c
|
||||
EXTRA_DIST += util/grub-module-verifier32.c
|
||||
EXTRA_DIST += util/grub-module-verifier64.c
|
||||
EXTRA_DIST += util/grub-module-verifierXX.c
|
||||
EXTRA_DIST += util/grub-pe2elf.c
|
||||
|
||||
|
||||
EXTRA_DIST += m4/gnulib-cache.m4
|
||||
EXTRA_DIST += m4/glibc2.m4
|
||||
EXTRA_DIST += m4/gnulib-tool.m4
|
||||
EXTRA_DIST += m4/intdiv0.m4
|
||||
EXTRA_DIST += m4/intl.m4
|
||||
EXTRA_DIST += m4/intldir.m4
|
||||
EXTRA_DIST += m4/intmax.m4
|
||||
EXTRA_DIST += m4/inttypes-pri.m4
|
||||
EXTRA_DIST += m4/lcmessage.m4
|
||||
EXTRA_DIST += m4/lock.m4
|
||||
EXTRA_DIST += m4/printf-posix.m4
|
||||
EXTRA_DIST += m4/threadlib.m4
|
||||
EXTRA_DIST += m4/uintmax_t.m4
|
||||
EXTRA_DIST += m4/visibility.m4
|
||||
EXTRA_DIST += m4/math_h.m4
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/apple/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/aros/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/basic/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/bsd/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/freebsd/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/hurd/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/linux/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/windows/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/sun/hostdisk.c
|
||||
EXTRA_DIST += grub-core/osdep/haiku/hostdisk.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/basic/init.c
|
||||
EXTRA_DIST += grub-core/osdep/windows/init.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/apple/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/aros/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/basic/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/bsd/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/windows/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/freebsd/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/hurd/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/linux/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/sun/getroot.c
|
||||
EXTRA_DIST += grub-core/osdep/haiku/getroot.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/basic/random.c
|
||||
EXTRA_DIST += grub-core/osdep/basic/ofpath.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/unix/password.c
|
||||
EXTRA_DIST += grub-core/osdep/unix/random.c
|
||||
EXTRA_DIST += grub-core/osdep/unix/sleep.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/linux/ofpath.c
|
||||
|
||||
EXTRA_DIST += grub-core/osdep/windows/password.c
|
||||
EXTRA_DIST += grub-core/osdep/windows/random.c
|
||||
EXTRA_DIST += grub-core/osdep/windows/sleep.c
|
||||
|
||||
EXTRA_DIST += po/gettext-patches/0001-Support-POTFILES-shell.patch
|
||||
EXTRA_DIST += po/gettext-patches/0002-Handle-gettext_printf-shell-function.patch
|
||||
EXTRA_DIST += po/gettext-patches/0003-Make-msgfmt-output-in-little-endian.patch
|
||||
EXTRA_DIST += po/gettext-patches/0004-Use-SHELL-rather-than-bin-sh.patch
|
||||
|
||||
EXTRA_DIST += po/POTFILES-shell.in
|
||||
EXTRA_DIST += po/README
|
||||
EXTRA_DIST += po/Rules-translit
|
||||
EXTRA_DIST += po/Rules-windowsdir
|
||||
EXTRA_DIST += po/arabic.sed
|
||||
EXTRA_DIST += po/cyrillic.sed
|
||||
EXTRA_DIST += po/greek.sed
|
||||
EXTRA_DIST += po/grub.d.sed
|
||||
EXTRA_DIST += po/hebrew.sed
|
||||
|
||||
EXTRA_DIST += tests/dfly-mbr-mbexample.mbr.img.gz
|
||||
EXTRA_DIST += tests/dfly-mbr-mbexample.dfly.img.gz
|
||||
EXTRA_DIST += tests/iso9660_ce_loop2.iso.gz
|
||||
EXTRA_DIST += tests/iso9660_ce_loop.iso.gz
|
||||
EXTRA_DIST += tests/iso9660_early_ce.iso.gz
|
||||
|
||||
EXTRA_DIST += coreboot.cfg
|
||||
|
||||
EXTRA_DIST += tests/file_filter/file
|
||||
EXTRA_DIST += tests/file_filter/file.gz
|
||||
EXTRA_DIST += tests/file_filter/file.gz.sig
|
||||
EXTRA_DIST += tests/file_filter/file.lzop
|
||||
EXTRA_DIST += tests/file_filter/file.lzop.sig
|
||||
EXTRA_DIST += tests/file_filter/file.xz
|
||||
EXTRA_DIST += tests/file_filter/file.xz.sig
|
||||
EXTRA_DIST += tests/file_filter/file.zstd
|
||||
EXTRA_DIST += tests/file_filter/file.zstd.sig
|
||||
EXTRA_DIST += tests/file_filter/keys
|
||||
EXTRA_DIST += tests/file_filter/keys.pub
|
||||
EXTRA_DIST += tests/file_filter/test.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/prompt.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/gfxboot.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/adtxt.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/exithelp.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/txt.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/menu.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/stdmenu.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/dtmenu.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/po4a.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/rqtxt.cfg
|
||||
EXTRA_DIST += tests/syslinux/ubuntu10.04_grub.cfg.in
|
||||
@@ -1,58 +0,0 @@
|
||||
/* Linker script to create grub .img files on Cygwin. */
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = _grub_text_base;
|
||||
.text :
|
||||
{
|
||||
start = . ;
|
||||
_start = . ;
|
||||
__start = . ;
|
||||
*(.text)
|
||||
etext = . ;
|
||||
}
|
||||
.data :
|
||||
{
|
||||
__data_start__ = . ;
|
||||
*(.data)
|
||||
/* Do not discard this section. */
|
||||
. = . ;
|
||||
__data_end__ = . ;
|
||||
__rdata_start__ = . ;
|
||||
*(.rdata)
|
||||
__rdata_end__ = . ;
|
||||
*(.pdata)
|
||||
edata = . ;
|
||||
_edata = . ;
|
||||
__edata = . ;
|
||||
}
|
||||
.bss :
|
||||
{
|
||||
__bss_start__ = . ;
|
||||
*(.bss)
|
||||
__common_start__ = . ;
|
||||
*(COMMON)
|
||||
__bss_end__ = . ;
|
||||
}
|
||||
.edata :
|
||||
{
|
||||
*(.edata)
|
||||
/* Do not discard this section. */
|
||||
. = . ;
|
||||
end = . ;
|
||||
_end = . ;
|
||||
__end = . ;
|
||||
}
|
||||
.stab :
|
||||
{
|
||||
*(.stab)
|
||||
}
|
||||
.stabstr :
|
||||
{
|
||||
*(.stabstr)
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT("__rdata_end__"=="edata", ".pdata not empty")
|
||||
ASSERT("__bss_end__" =="end" , ".edata not empty")
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
ENTRY(_start)
|
||||
|
||||
/*
|
||||
* Align sections to a 16-byte boundary. This guarantees ABI compatibility with
|
||||
* C generated code.
|
||||
*/
|
||||
SECTION_ALIGN = 0x10;
|
||||
|
||||
PHDRS {
|
||||
text PT_LOAD FLAGS(7) /* PF_R | PF_W | PF_X */;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/*
|
||||
* Set section alignment to 1. This allows sections to be aligned without
|
||||
* creating holes in the VMA space or gaps in the file.
|
||||
*/
|
||||
. = _grub_text_base;
|
||||
.text ALIGN(0x1) : {
|
||||
_start = .;
|
||||
*(.text .text.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.rodata ALIGN(0x1) : {
|
||||
*(.rodata .rodata.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.module_license ALIGN(0x1) : {
|
||||
*(.module_license)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
} :text
|
||||
.data ALIGN(0x1) : {
|
||||
*(.data .data.*)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
_edata = .;
|
||||
} :text
|
||||
.bss ALIGN(0x1) : {
|
||||
__bss_start = .;
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(SECTION_ALIGN);
|
||||
_end = .;
|
||||
} :text
|
||||
/DISCARD/ : {
|
||||
*(.interp)
|
||||
*(.note*)
|
||||
*(.comment)
|
||||
*(.build-id)
|
||||
}
|
||||
}
|
||||
+93
-136
@@ -1,149 +1,106 @@
|
||||
#undef _LARGEFILE_SOURCE
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#if defined(__PPC__) && !defined(__powerpc__)
|
||||
#define __powerpc__ 1
|
||||
#endif
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#define GCRYPT_NO_DEPRECATED 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
/* Define if an absolute indirect call/jump must NOT be prefixed with `*' */
|
||||
#undef ABSOLUTE_WITHOUT_ASTERISK
|
||||
|
||||
#if @MM_DEBUG@
|
||||
#define MM_DEBUG @MM_DEBUG@
|
||||
#endif
|
||||
/* Define it to \"addr32\" or \"addr32;\" to make GAS happy */
|
||||
#undef ADDR32
|
||||
|
||||
/* Define to 1 to enable disk cache statistics. */
|
||||
#define DISK_CACHE_STATS @DISK_CACHE_STATS@
|
||||
#define BOOT_TIME_STATS @BOOT_TIME_STATS@
|
||||
/* Define if you don't want to pass the mem= option to Linux */
|
||||
#undef AUTO_LINUX_MEM_OPT
|
||||
|
||||
/* We don't need those. */
|
||||
#define MINILZO_CFG_SKIP_LZO_PTR 1
|
||||
#define MINILZO_CFG_SKIP_LZO_UTIL 1
|
||||
#define MINILZO_CFG_SKIP_LZO_STRING 1
|
||||
#define MINILZO_CFG_SKIP_LZO_INIT 1
|
||||
#define MINILZO_CFG_SKIP_LZO1X_1_COMPRESS 1
|
||||
#define MINILZO_CFG_SKIP_LZO1X_DECOMPRESS 1
|
||||
/* Define it to \"data32\" or \"data32;\" to make GAS happy */
|
||||
#undef DATA32
|
||||
|
||||
/* Define if C symbols get an underscore after compilation */
|
||||
#undef HAVE_ASM_USCORE
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if edata is defined */
|
||||
#undef HAVE_EDATA_SYMBOL
|
||||
|
||||
/* Define if end is defined */
|
||||
#undef HAVE_END_SYMBOL
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have a curses library */
|
||||
#undef HAVE_LIBCURSES
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||
#undef HAVE_NCURSES_CURSES_H
|
||||
|
||||
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define if opendisk() in -lutil can be used */
|
||||
#undef HAVE_OPENDISK
|
||||
|
||||
/* Define if start is defined */
|
||||
#undef HAVE_START_SYMBOL
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if _edata is defined */
|
||||
#undef HAVE_USCORE_EDATA_SYMBOL
|
||||
|
||||
/* Define if end is defined */
|
||||
#undef HAVE_USCORE_END_SYMBOL
|
||||
|
||||
/* Define if _start is defined */
|
||||
#undef HAVE_USCORE_START_SYMBOL
|
||||
|
||||
/* Define if __bss_start is defined */
|
||||
#undef HAVE_USCORE_USCORE_BSS_START_SYMBOL
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
#if defined (GRUB_BUILD)
|
||||
# undef ENABLE_NLS
|
||||
# define BUILD_SIZEOF_LONG @BUILD_SIZEOF_LONG@
|
||||
# define BUILD_SIZEOF_VOID_P @BUILD_SIZEOF_VOID_P@
|
||||
# if defined __APPLE__
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define BUILD_WORDS_BIGENDIAN 1
|
||||
# else
|
||||
# define BUILD_WORDS_BIGENDIAN 0
|
||||
# endif
|
||||
# else /* !defined __APPLE__ */
|
||||
# define BUILD_WORDS_BIGENDIAN @BUILD_WORDS_BIGENDIAN@
|
||||
# endif /* !defined __APPLE__ */
|
||||
#elif defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
|
||||
# include <config-util.h>
|
||||
#else /* !defined GRUB_UTIL && defined GRUB_MACHINE */
|
||||
# define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
|
||||
/* Define if C symbols get an underscore after compilation. */
|
||||
# define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
|
||||
/* Define it to one of __bss_start, edata and _edata. */
|
||||
# define BSS_START_SYMBOL @BSS_START_SYMBOL@
|
||||
/* Define it to either end or _end. */
|
||||
# define END_SYMBOL @END_SYMBOL@
|
||||
/* Name of package. */
|
||||
# define PACKAGE "@PACKAGE@"
|
||||
/* Version number of package. */
|
||||
# define VERSION "@VERSION@"
|
||||
/* Define to the full name and version of this package. */
|
||||
# define PACKAGE_STRING "@PACKAGE_STRING@"
|
||||
/* Define to the version of this package. */
|
||||
# define PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
/* Define to the full name of this package. */
|
||||
# define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
# define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
# define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
|
||||
# define GRUB_PLATFORM "@GRUB_PLATFORM@"
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
# define GRUB_STACK_PROTECTOR_INIT @GRUB_STACK_PROTECTOR_INIT@
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
# define RE_ENABLE_I18N 1
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
# define _GNU_SOURCE 1
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
# ifndef _GL_INLINE_HEADER_BEGIN
|
||||
/*
|
||||
* gnulib gets configured against the host, not the target, and the rest of
|
||||
* our buildsystem works around that. This is difficult to avoid as gnulib's
|
||||
* detection requires a more capable system than our target. Instead, we
|
||||
* reach in and set values appropriately - intentionally setting more than the
|
||||
* bare minimum. If, when updating gnulib, something breaks, there's probably
|
||||
* a change needed here or in grub-core/Makefile.core.def.
|
||||
*/
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) \
|
||||
__attribute__ ((__alloc_size__ args))
|
||||
# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
|
||||
# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
|
||||
# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
|
||||
# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
|
||||
# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i)))
|
||||
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
|
||||
# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
|
||||
# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
|
||||
# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE \
|
||||
__attribute__ ((externally_visible))
|
||||
# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
|
||||
# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
|
||||
# define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc))
|
||||
# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
|
||||
# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
|
||||
# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
|
||||
# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
|
||||
# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
|
||||
# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
|
||||
# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
|
||||
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
# define _GL_ATTRIBUTE_RETURNS_NONNULL \
|
||||
__attribute__ ((__returns_nonnull__))
|
||||
# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
|
||||
# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
|
||||
# define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
|
||||
# define _GL_GNUC_PREREQ GNUC_PREREQ
|
||||
# define _GL_INLINE inline
|
||||
# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
|
||||
/* Define if there is user specified preset menu string */
|
||||
#undef PRESET_MENU_STRING
|
||||
|
||||
/* We can't use __has_attribute for these because gcc-5.1 is too old for
|
||||
* that. Everything above is present in that version, though. */
|
||||
# if __GNUC__ >= 7
|
||||
# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
|
||||
# else
|
||||
# define _GL_ATTRIBUTE_FALLTHROUGH /* empty */
|
||||
# endif
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
# ifndef ASM_FILE
|
||||
typedef __INT_FAST32_TYPE__ int_fast32_t;
|
||||
typedef __UINT_FAST32_TYPE__ uint_fast32_t;
|
||||
# endif
|
||||
|
||||
/* Ensure ialloc nests static/non-static inline properly. */
|
||||
# define IALLOC_INLINE static inline
|
||||
|
||||
/*
|
||||
* gnulib uses these for blocking out warnings they can't/won't fix. gnulib
|
||||
* also makes the decision about whether to provide a declaration for
|
||||
* reallocarray() at compile-time, so this is a convenient place to override -
|
||||
* it's used by the ialloc module, which is used by base64.
|
||||
*/
|
||||
# define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push") \
|
||||
void * \
|
||||
reallocarray (void *ptr, unsigned int nmemb, unsigned int size);
|
||||
# define _GL_INLINE_HEADER_END _Pragma ("GCC diagnostic pop")
|
||||
# endif /* !_GL_INLINE_HEADER_BEGIN */
|
||||
|
||||
/* gnulib doesn't build cleanly with older compilers. */
|
||||
# if __GNUC__ < 11
|
||||
_Pragma ("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
# endif
|
||||
|
||||
#endif
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
+629
-2605
File diff suppressed because it is too large.
Load diff
@@ -1,3 +0,0 @@
|
||||
if test -f (cbfsdisk)/etc/grub.cfg; then
|
||||
source (cbfsdisk)/etc/grub.cfg
|
||||
fi
|
||||
@@ -0,0 +1,3 @@
|
||||
.deps
|
||||
Makefile
|
||||
*.info*
|
||||
+41
-5
@@ -1,9 +1,45 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
info_TEXINFOS = grub.texi
|
||||
grub_TEXINFOS = internals.texi fdl.texi
|
||||
man_MANS = grub.8 grub-install.8 grub-md5-crypt.8 grub-terminfo.8
|
||||
HELP2MAN = help2man
|
||||
SRC2TEXI = src2texi
|
||||
noinst_SCRIPTS = $(HELP2MAN) $(SRC2TEXI)
|
||||
|
||||
# AM_MAKEINFOFLAGS = --no-split --no-validate
|
||||
info_TEXINFOS = grub.texi grub-dev.texi
|
||||
grub_TEXINFOS = fdl.texi
|
||||
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS)
|
||||
CLEANFILES = $(noinst_PROGRAMS)
|
||||
|
||||
EXTRA_DIST = font_char_metrics.png font_char_metrics.txt
|
||||
# Cancel the rule %.texi -> %. This rule may confuse make to determine
|
||||
# the dependecies.
|
||||
.texi:
|
||||
|
||||
%.c.texi: %.c $(srcdir)/$(SRC2TEXI)
|
||||
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||
|
||||
%.h.texi: %.h $(srcdir)/$(SRC2TEXI)
|
||||
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||
|
||||
%.S.texi: %.S $(srcdir)/$(SRC2TEXI)
|
||||
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||
|
||||
if MAINTAINER_MODE
|
||||
$(srcdir)/grub.8: ../grub/grub $(srcdir)/$(HELP2MAN)
|
||||
$(PERL) $(srcdir)/$(HELP2MAN) --name="the grub shell" \
|
||||
--section=8 --output=$@ $<
|
||||
|
||||
$(srcdir)/grub-install.8: ../util/grub-install $(srcdir)/$(HELP2MAN)
|
||||
chmod 755 $<
|
||||
$(PERL) $(srcdir)/$(HELP2MAN) --name="install GRUB on your drive" \
|
||||
--section=8 --output=$@ $<
|
||||
|
||||
$(srcdir)/grub-md5-crypt.8: ../util/grub-md5-crypt $(srcdir)/$(HELP2MAN)
|
||||
chmod 755 $<
|
||||
$(PERL) $(srcdir)/$(HELP2MAN) \
|
||||
--name="Encrypt a password in MD5 format" \
|
||||
--section=8 --output=$@ $<
|
||||
|
||||
$(srcdir)/grub-terminfo.8: ../util/grub-terminfo $(srcdir)/$(HELP2MAN)
|
||||
chmod 755 $<
|
||||
$(PERL) $(srcdir)/$(HELP2MAN) \
|
||||
--name="Generate a terminfo command from a terminfo name" \
|
||||
--section=8 --output=$@ $<
|
||||
endif
|
||||
@@ -1,244 +0,0 @@
|
||||
# Sample GRUB script to autodetect operating systems
|
||||
#
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
function pathname { regexp -s 2:"$2" '^(\(.*\))?(/.*)$' "$1"; }
|
||||
function devname { regexp -s "$2" '^(\(.*\)).*$' "$1"; }
|
||||
|
||||
function loopback_iso_entry {
|
||||
realdev="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
if test -f /boot/grub/loopback.cfg; then
|
||||
cfgpath=/boot/grub/loopback.cfg
|
||||
elif test -f /grub/loopback.cfg; then
|
||||
cfgpath=/grub/loopback.cfg
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
|
||||
echo loopback.cfg $isopath: yes
|
||||
menuentry "Boot GRUB Loopback Config from ${realdev}${isopath}" "$realdev" "$isopath" "$cfgpath" {
|
||||
set device="$2"
|
||||
set iso_path="$3"
|
||||
set cfg_path="$4"
|
||||
|
||||
export iso_path
|
||||
loopback loopdev_cfg "${device}${iso_path}"
|
||||
set root=(loopdev_cfg)
|
||||
configfile $cfg_path
|
||||
loopback -d loopdev_cfg
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function grml_iso_entry {
|
||||
realdev="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
result=1
|
||||
for dir in /boot/grml /boot/grmlsmall /boot/grmlmedium; do
|
||||
if ! test -f ${dir}/linux26 -a -f ${dir}/initrd.gz; then continue; fi
|
||||
|
||||
echo grml $isopath: yes
|
||||
result=0
|
||||
menuentry "GRML Linux from ${realdev}${isopath}" \
|
||||
"$realdev" "$isopath" "$dir" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
set grmldir="$4"
|
||||
|
||||
loopback loopdev_grml "${device}${isopath}"
|
||||
set root=(loopdev_grml)
|
||||
linux $grmldir/linux26 findiso="$isopath" apm=power-off quiet \
|
||||
boot=live nomce
|
||||
initrd $grmldir/initrd.gz
|
||||
loopback -d loopdev_grml
|
||||
}
|
||||
done
|
||||
return $result
|
||||
}
|
||||
|
||||
function pmagic_iso_entry {
|
||||
realdev="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
if ! test -f /pmagic/bzImage -a -f /pmagic/initramfs; then return 1; fi
|
||||
|
||||
echo pmagic $isopath: yes
|
||||
menuentry "Parted Magic from ${realdev}${isopath}" "$realdev" "$isopath" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
|
||||
loopback loopdev_pmagic "${device}${isopath}"
|
||||
set root=(loopdev_pmagic)
|
||||
linux /pmagic/bzImage iso_filename="$isopath" edd=off noapic \
|
||||
load_ramdisk=1 prompt_ramdisk=0 rw sleep=10 loglevel=0 \
|
||||
keymap=$langcode
|
||||
initrd /pmagic/initramfs
|
||||
loopback -d loopdev_pmagic
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function sidux_iso_entry {
|
||||
realdev="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
result=1
|
||||
for kernel in /boot/vmlinuz-*-sidux-*; do
|
||||
if ! test -f "$kernel"; then continue; fi
|
||||
regexp -s 1:v1 -s 2:v2 '/boot/vmlinuz-(.*)-sidux-(.*)' "$kernel"
|
||||
|
||||
initrd="/boot/initrd.img-$v1-sidux-$v2"
|
||||
if ! test -f "$initrd"; then continue; fi
|
||||
|
||||
result=0
|
||||
echo sidux $isopath: yes
|
||||
menuentry "Sidux vmlinux-$v1-sidux-$v2 from ${realdev}${isopath}" "$realdev" "$isopath" "$kernel" "$initrd" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
set kernel="$4"
|
||||
set initrd="$5"
|
||||
|
||||
loopback loopdev_sidux "${device}${isopath}"
|
||||
set root=(loopdev_sidux)
|
||||
linux $kernel fromiso=$isopath boot=fll quiet
|
||||
initrd $initrd
|
||||
loopback -d loopdev_sidux
|
||||
}
|
||||
done
|
||||
return $result
|
||||
}
|
||||
|
||||
function slax_iso_entry {
|
||||
realdev="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
if ! test -f /boot/vmlinuz -a -f /boot/initrd.gz; then return 1; fi
|
||||
|
||||
echo slax $isopath: yes
|
||||
menuentry "Slax Linux from ${realdev}${isopath}" "$realdev" "$isopath" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
|
||||
loopback loopdev_slax "${device}${isopath}"
|
||||
set root=(loopdev_slax)
|
||||
linux /boot/vmlinuz from=$isopath ramdisk_size=6666 root=/dev/ram0 rw
|
||||
initrd /boot/initrd.gz
|
||||
loopback -d loopdev_slax
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function tinycore_iso_entry {
|
||||
realpath="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
if ! test -f /boot/bzImage -a -f /boot/tinycore.gz; then return 1; fi
|
||||
|
||||
echo tinycore $isopath: yes
|
||||
menuentry "Tinycore Linux from ${realdev}${isopath}" "$realdev" "$isopath" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
|
||||
loopback loopdev_tiny "${device}${isopath}"
|
||||
set root=(loopdev_tiny)
|
||||
linux /boot/bzImage
|
||||
initrd /boot/tinycore.gz
|
||||
loopback -d loopdev_tiny
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function casper_iso_entry {
|
||||
realpath="$1"
|
||||
isopath="$2"
|
||||
loopdev="$3"
|
||||
|
||||
if ! test -f /casper/vmlinuz; then return 1; fi
|
||||
initrd=
|
||||
for f in /casper/initrd.*z; do
|
||||
if ! test -f "$f"; then continue; fi
|
||||
pathname "$f" initrd
|
||||
done
|
||||
if test -z "$initrd"; then return 1; fi
|
||||
|
||||
echo casper $isopath: yes
|
||||
menuentry "Casper based Linux from ${realdev}${isopath}" "$realdev" "$isopath" "$initrd" {
|
||||
set device="$2"
|
||||
set isopath="$3"
|
||||
set initrd="$4"
|
||||
|
||||
loopback loopdev_casper "${device}${isopath}"
|
||||
set root=(loopdev_casper)
|
||||
linux /casper/vmlinuz boot=casper iso-scan/filename="$isopath" quiet splash noprompt keyb="$langcode" \
|
||||
debian-installer/language="$langcode" console-setup/layoutcode?="$langcode" --
|
||||
initrd $initrd
|
||||
loopback -d loopdev_casper
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function scan_isos {
|
||||
isodirs="$1"
|
||||
|
||||
for dev in (*); do
|
||||
for dir in $isodirs; do
|
||||
for file in ${dev}${dir}/*.iso ${dev}${dir}/*.ISO; do
|
||||
if ! test -f "$file"; then continue; fi
|
||||
|
||||
pathname $file isopath
|
||||
if test -z "$dev" -o -z "$isopath"; then continue; fi
|
||||
|
||||
if ! loopback loopdev_scan "$file"; then continue; fi
|
||||
saved_root=$root
|
||||
set root=(loopdev_scan)
|
||||
|
||||
if loopback_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif grml_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif pmagic_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif sidux_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif slax_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif tinycore_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
elif casper_iso_entry $dev $isopath (loopdev_scan); then true;
|
||||
else true; fi
|
||||
|
||||
set root=$saved_root
|
||||
loopback -d loopdev_scan
|
||||
done
|
||||
done
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
# XXX Remove later
|
||||
insmod serial
|
||||
serial
|
||||
terminal_output --append serial
|
||||
# terminal_input --append serial
|
||||
|
||||
langcode="$lang"
|
||||
|
||||
insmod regexp
|
||||
scan_isos /iso /boot/iso
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1 +0,0 @@
|
||||
Please fill this in.
|
||||
-2536
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,52 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||
.TH GRUB-INSTALL "8" "June 2006" "grub-install (GNU GRUB 0.97)" FSF
|
||||
.SH NAME
|
||||
grub-install \- install GRUB on your drive
|
||||
.SH SYNOPSIS
|
||||
.B grub-install
|
||||
[\fIOPTION\fR] \fIinstall_device\fR
|
||||
.SH DESCRIPTION
|
||||
Install GRUB on your drive.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
print this message and exit
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
print the version information and exit
|
||||
.TP
|
||||
\fB\-\-root\-directory\fR=\fIDIR\fR
|
||||
install GRUB images under the directory DIR
|
||||
instead of the root directory
|
||||
.TP
|
||||
\fB\-\-grub\-shell\fR=\fIFILE\fR
|
||||
use FILE as the grub shell
|
||||
.TP
|
||||
\fB\-\-no\-floppy\fR
|
||||
do not probe any floppy drive
|
||||
.TP
|
||||
\fB\-\-force\-lba\fR
|
||||
force GRUB to use LBA mode even for a buggy
|
||||
BIOS
|
||||
.TP
|
||||
\fB\-\-recheck\fR
|
||||
probe a device map even if it already exists
|
||||
.PP
|
||||
INSTALL_DEVICE can be a GRUB device name or a system device filename.
|
||||
.PP
|
||||
grub-install copies GRUB images into the DIR/boot directory specfied by
|
||||
\fB\-\-root\-directory\fR, and uses the grub shell to install grub into the boot
|
||||
sector.
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B grub-install
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B grub-install
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info grub-install
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
@@ -0,0 +1,32 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||
.TH GRUB-MD5-CRYPT "8" "June 2006" "grub-md5-crypt (GNU GRUB )" FSF
|
||||
.SH NAME
|
||||
grub-md5-crypt \- Encrypt a password in MD5 format
|
||||
.SH SYNOPSIS
|
||||
.B grub-md5-crypt
|
||||
[\fIOPTION\fR]
|
||||
.SH DESCRIPTION
|
||||
Encrypt a password in MD5 format.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
print this message and exit
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
print the version information and exit
|
||||
.TP
|
||||
\fB\-\-grub\-shell\fR=\fIFILE\fR
|
||||
use FILE as the grub shell
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B grub-md5-crypt
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B grub-md5-crypt
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info grub-md5-crypt
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
@@ -0,0 +1,29 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||
.TH GRUB-TERMINFO "8" "June 2006" "grub-terminfo (GNU GRUB 0.97)" FSF
|
||||
.SH NAME
|
||||
grub-terminfo \- Generate a terminfo command from a terminfo name
|
||||
.SH SYNOPSIS
|
||||
.B grub-terminfo
|
||||
\fITERMNAME\fR
|
||||
.SH DESCRIPTION
|
||||
Generate a terminfo command from a terminfo name.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
print this message and exit
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
print the version information and exit
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B grub-terminfo
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B grub-terminfo
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info grub-terminfo
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||
.TH GRUB "8" "June 2006" "grub (GNU GRUB 0.97)" FSF
|
||||
.SH NAME
|
||||
grub \- the grub shell
|
||||
.SH SYNOPSIS
|
||||
.B grub
|
||||
[\fIOPTION\fR]...
|
||||
.SH DESCRIPTION
|
||||
Enter the GRand Unified Bootloader command shell.
|
||||
.TP
|
||||
\fB\-\-batch\fR
|
||||
turn on batch mode for non-interactive use
|
||||
.TP
|
||||
\fB\-\-boot\-drive\fR=\fIDRIVE\fR
|
||||
specify stage2 boot_drive [default=0x0]
|
||||
.TP
|
||||
\fB\-\-config\-file\fR=\fIFILE\fR
|
||||
specify stage2 config_file [default=/boot/grub/menu.lst]
|
||||
.TP
|
||||
\fB\-\-device\-map\fR=\fIFILE\fR
|
||||
use the device map file FILE
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
display this message and exit
|
||||
.TP
|
||||
\fB\-\-hold\fR
|
||||
wait until a debugger will attach
|
||||
.TP
|
||||
\fB\-\-install\-partition\fR=\fIPAR\fR
|
||||
specify stage2 install_partition [default=0x20000]
|
||||
.TP
|
||||
\fB\-\-no\-config\-file\fR
|
||||
do not use the config file
|
||||
.TP
|
||||
\fB\-\-no\-curses\fR
|
||||
do not use curses
|
||||
.TP
|
||||
\fB\-\-no\-floppy\fR
|
||||
do not probe any floppy drive
|
||||
.TP
|
||||
\fB\-\-no\-pager\fR
|
||||
do not use internal pager
|
||||
.TP
|
||||
\fB\-\-preset\-menu\fR
|
||||
use the preset menu
|
||||
.TP
|
||||
\fB\-\-probe\-second\-floppy\fR
|
||||
probe the second floppy drive
|
||||
.TP
|
||||
\fB\-\-read\-only\fR
|
||||
do not write anything to devices
|
||||
.TP
|
||||
\fB\-\-verbose\fR
|
||||
print verbose messages
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
print version information and exit
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B grub
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B grub
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info grub
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
@@ -1,76 +0,0 @@
|
||||
#
|
||||
# Sample GRUB configuration file
|
||||
#
|
||||
|
||||
# Boot automatically after 30 secs.
|
||||
set timeout=30
|
||||
|
||||
# By default, boot the GNU/Linux
|
||||
set default=gnulinux
|
||||
|
||||
# Fallback to GNU/Hurd.
|
||||
set fallback=gnuhurd
|
||||
|
||||
# For booting GNU/Linux
|
||||
menuentry "GNU/Linux" --id gnulinux {
|
||||
set root=(hd0,msdos1)
|
||||
linux /vmlinuz root=/dev/sda1
|
||||
initrd /initrd.img
|
||||
}
|
||||
|
||||
# For booting GNU/Hurd
|
||||
menuentry "GNU (aka GNU/Hurd)" --id gnuhurd {
|
||||
set root=(hd0,msdos1)
|
||||
multiboot /boot/gnumach.gz root=device:hd0s1
|
||||
module /hurd/ext2fs.static ext2fs --readonly \
|
||||
--multiboot-command-line='${kernel-command-line}' \
|
||||
--host-priv-port='${host-port}' \
|
||||
--device-master-port='${device-port}' \
|
||||
--exec-server-task='${exec-task}' -T typed '${root}' \
|
||||
'$(task-create)' '$(task-resume)'
|
||||
module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
|
||||
}
|
||||
|
||||
# For booting FreeBSD
|
||||
menuentry "FreeBSD (or GNU/kFreeBSD), direct boot" {
|
||||
set root=(hd0,msdos1,bsd1)
|
||||
kfreebsd /boot/kernel/kernel
|
||||
kfreebsd_loadenv /boot/device.hints
|
||||
kfreebsd_module /boot/splash.bmp type=splash_image_data
|
||||
set kFreeBSD.vfs.root.mountfrom=ufs:ad0s1a
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (or GNU/kFreeBSD), via /boot/loader" {
|
||||
set root=(hd0,msdos1,bsd1)
|
||||
kfreebsd /boot/loader
|
||||
}
|
||||
|
||||
# For booting NetBSD
|
||||
menuentry "NetBSD" {
|
||||
set root=(hd0,netbsd1)
|
||||
knetbsd /netbsd
|
||||
}
|
||||
|
||||
# For booting OpenBSD
|
||||
menuentry "OpenBSD" {
|
||||
set root=(hd0,openbsd1)
|
||||
kopenbsd /bsd
|
||||
}
|
||||
|
||||
# For booting Microsoft Windows
|
||||
menuentry "Microsoft Windows" {
|
||||
set root=(hd0,msdos1)
|
||||
chainloader +1
|
||||
}
|
||||
|
||||
# For booting Memtest86+
|
||||
menuentry "Memtest86+" {
|
||||
set root=(hd0,1)
|
||||
linux16 /memtest86+.bin
|
||||
}
|
||||
|
||||
# Change the colors.
|
||||
menuentry "Change the colors" {
|
||||
set menu_color_normal=light-green/brown
|
||||
set menu_color_highlight=red/blue
|
||||
}
|
||||
+2465
-9961
File diff suppressed because it is too large.
Load diff
+517
@@ -0,0 +1,517 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Generate a short man page from --help and --version output.
|
||||
# Copyright © 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Written by Brendan O'Dea <bod@compusol.com.au>
|
||||
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||
|
||||
use 5.004;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use Text::Tabs qw(expand);
|
||||
use POSIX qw(strftime setlocale LC_TIME);
|
||||
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '1.23';
|
||||
my $version_info = <<EOT;
|
||||
GNU $this_program $this_version
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Written by Brendan O'Dea <bod\@compusol.com.au>
|
||||
EOT
|
||||
|
||||
my $help_info = <<EOT;
|
||||
`$this_program' generates a man page out of `--help' and `--version' output.
|
||||
|
||||
Usage: $this_program [OPTION]... EXECUTABLE
|
||||
|
||||
-n, --name=STRING use `STRING' as the description for the NAME paragraph
|
||||
-s, --section=SECTION use `SECTION' as the section for the man page
|
||||
-i, --include=FILE include material from `FILE'
|
||||
-I, --opt-include=FILE include material from `FILE' if it exists
|
||||
-o, --output=FILE send output to `FILE'
|
||||
-N, --no-info suppress pointer to Texinfo manual
|
||||
--help print this help, then exit
|
||||
--version print version number, then exit
|
||||
|
||||
EXECUTABLE should accept `--help' and `--version' options.
|
||||
|
||||
Report bugs to <bug-help2man\@gnu.org>.
|
||||
EOT
|
||||
|
||||
my $section = 1;
|
||||
my ($opt_name, @opt_include, $opt_output, $opt_no_info);
|
||||
|
||||
# Parse options.
|
||||
Getopt::Long::config('bundling');
|
||||
GetOptions (
|
||||
'n|name=s' => \$opt_name,
|
||||
's|section=s' => \$section,
|
||||
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
|
||||
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
|
||||
'o|output=s' => \$opt_output,
|
||||
'N|no-info' => \$opt_no_info,
|
||||
help => sub { print $help_info; exit },
|
||||
version => sub { print $version_info; exit },
|
||||
) or die $help_info;
|
||||
|
||||
die $help_info unless @ARGV == 1;
|
||||
|
||||
my %include = ();
|
||||
my %append = ();
|
||||
my @include = (); # retain order given in include file
|
||||
|
||||
# Provide replacement `quote-regex' operator for pre-5.005.
|
||||
BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 }
|
||||
|
||||
# Process include file (if given). Format is:
|
||||
#
|
||||
# [section name]
|
||||
# verbatim text
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /pattern/
|
||||
# verbatim text
|
||||
#
|
||||
|
||||
for (@opt_include)
|
||||
{
|
||||
my ($inc, $required) = @$_;
|
||||
|
||||
next unless -f $inc or $required;
|
||||
die "$this_program: can't open `$inc' ($!)\n"
|
||||
unless open INC, $inc;
|
||||
|
||||
my $key;
|
||||
my $hash = \%include;
|
||||
|
||||
while (<INC>)
|
||||
{
|
||||
# [section]
|
||||
if (/^\[([^]]+)\]/)
|
||||
{
|
||||
$key = uc $1;
|
||||
$key =~ s/^\s+//;
|
||||
$key =~ s/\s+$//;
|
||||
$hash = \%include;
|
||||
push @include, $key unless $include{$key};
|
||||
next;
|
||||
}
|
||||
|
||||
# /pattern/
|
||||
if (m!^/(.*)/([ims]*)!)
|
||||
{
|
||||
my $pat = $2 ? "(?$2)$1" : $1;
|
||||
|
||||
# Check pattern.
|
||||
eval { $key = qr($pat) };
|
||||
if ($@)
|
||||
{
|
||||
$@ =~ s/ at .*? line \d.*//;
|
||||
die "$inc:$.:$@";
|
||||
}
|
||||
|
||||
$hash = \%append;
|
||||
next;
|
||||
}
|
||||
|
||||
# Silently ignore anything before the first
|
||||
# section--allows for comments and revision info.
|
||||
next unless $key;
|
||||
|
||||
$hash->{$key} ||= '';
|
||||
$hash->{$key} .= $_;
|
||||
}
|
||||
|
||||
close INC;
|
||||
|
||||
die "$this_program: no valid information found in `$inc'\n"
|
||||
unless $key;
|
||||
}
|
||||
|
||||
# Compress trailing blank lines.
|
||||
for my $hash (\(%include, %append))
|
||||
{
|
||||
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
|
||||
}
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Turn off localisation of date (for strftime).
|
||||
setlocale LC_TIME, 'C';
|
||||
|
||||
# Grab help and version info from executable.
|
||||
my ($help_text, $version_text) = map {
|
||||
join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null`
|
||||
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||
} qw(help version);
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
|
||||
if ($opt_output)
|
||||
{
|
||||
unlink $opt_output
|
||||
or die "$this_program: can't unlink $opt_output ($!)\n"
|
||||
if -e $opt_output;
|
||||
|
||||
open STDOUT, ">$opt_output"
|
||||
or die "$this_program: can't create $opt_output ($!)\n";
|
||||
}
|
||||
|
||||
# The first line of the --version information is assumed to be in one
|
||||
# of the following formats:
|
||||
#
|
||||
# <version>
|
||||
# <program> <version>
|
||||
# {GNU,Free} <program> <version>
|
||||
# <program> ({GNU,Free} <package>) <version>
|
||||
# <program> - {GNU,Free} <package> <version>
|
||||
#
|
||||
# and seperated from any copyright/author details by a blank line.
|
||||
|
||||
($_, $version_text) = split /\n+/, $version_text, 2;
|
||||
|
||||
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
|
||||
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
|
||||
{
|
||||
$program = $1;
|
||||
$package = $2;
|
||||
$version = $3;
|
||||
}
|
||||
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
|
||||
{
|
||||
$program = $2;
|
||||
$package = $1 ? "$1$2" : $2;
|
||||
$version = $3;
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = $_;
|
||||
}
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# No info for `info' itself.
|
||||
$opt_no_info = 1 if $program eq 'info';
|
||||
|
||||
# --name overrides --include contents.
|
||||
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph.
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version\n";
|
||||
|
||||
# Man pages traditionally have the page title in caps.
|
||||
my $PROGRAM = uc $program;
|
||||
|
||||
# Extract usage clause(s) [if any] for SYNOPSIS.
|
||||
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
|
||||
{
|
||||
my @syn = $2 . $3;
|
||||
|
||||
if ($_ = $4)
|
||||
{
|
||||
s/^\n//;
|
||||
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
|
||||
}
|
||||
|
||||
my $synopsis = '';
|
||||
for (@syn)
|
||||
{
|
||||
$synopsis .= ".br\n" if $synopsis;
|
||||
s!^\S*/!!;
|
||||
s/^(\S+) *//;
|
||||
$synopsis .= ".B $1\n";
|
||||
s/\s+$//;
|
||||
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||
s/^/\\fI/ unless s/^\\fR//;
|
||||
$_ .= '\fR';
|
||||
s/(\\fI)( *)/$2$1/g;
|
||||
s/\\fI\\fR//g;
|
||||
s/^\\fR//;
|
||||
s/\\fI$//;
|
||||
s/^\./\\&./;
|
||||
|
||||
$synopsis .= "$_\n";
|
||||
}
|
||||
|
||||
$include{SYNOPSIS} ||= $synopsis;
|
||||
}
|
||||
|
||||
# Process text, initial section is DESCRIPTION.
|
||||
my $sect = 'DESCRIPTION';
|
||||
$_ = "$help_text\n\n$version_text";
|
||||
|
||||
# Normalise paragraph breaks.
|
||||
s/^\n+//;
|
||||
s/\n*$/\n/;
|
||||
s/\n\n+/\n\n/g;
|
||||
|
||||
# Temporarily exchange leading dots, apostrophes and backslashes for
|
||||
# tokens.
|
||||
s/^\./\x80/mg;
|
||||
s/^'/\x81/mg;
|
||||
s/\\/\x82/g;
|
||||
|
||||
# Start a new paragraph (if required) for these.
|
||||
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
|
||||
|
||||
sub convert_option;
|
||||
|
||||
while (length)
|
||||
{
|
||||
# Convert some standard paragraph names.
|
||||
if (s/^(Options|Examples): *\n//)
|
||||
{
|
||||
$sect = uc $1;
|
||||
next;
|
||||
}
|
||||
|
||||
# Copyright section
|
||||
if (/^Copyright +[(\xa9]/)
|
||||
{
|
||||
$sect = 'COPYRIGHT';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
|
||||
my $copy;
|
||||
($copy, $_) = split /\n\n/, $_, 2;
|
||||
|
||||
for ($copy)
|
||||
{
|
||||
# Add back newline
|
||||
s/\n*$/\n/;
|
||||
|
||||
# Convert iso9959-1 copyright symbol or (c) to nroff
|
||||
# character.
|
||||
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
|
||||
|
||||
# Insert line breaks before additional copyright messages
|
||||
# and the disclaimer.
|
||||
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
}
|
||||
|
||||
$include{$sect} .= $copy;
|
||||
$_ ||= '';
|
||||
next;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||
{
|
||||
$sect = 'REPORTING BUGS';
|
||||
}
|
||||
|
||||
# Author section.
|
||||
elsif (/^Written +by/)
|
||||
{
|
||||
$sect = 'AUTHOR';
|
||||
}
|
||||
|
||||
# Examples, indicated by an indented leading $, % or > are
|
||||
# rendered in a constant width font.
|
||||
if (/^( +)([\$\%>] )\S/)
|
||||
{
|
||||
my $indent = $1;
|
||||
my $prefix = $2;
|
||||
my $break = '.IP';
|
||||
$include{$sect} ||= '';
|
||||
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
|
||||
{
|
||||
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
|
||||
$break = '.br';
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
my $matched = '';
|
||||
$include{$sect} ||= '';
|
||||
|
||||
# Sub-sections have a trailing colon and the second line indented.
|
||||
if (s/^(\S.*:) *\n / /)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$include{$sect} .= qq(.SS "$1"\n);
|
||||
}
|
||||
|
||||
my $indent = 0;
|
||||
my $content = '';
|
||||
|
||||
# Option with description.
|
||||
if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length ($4 || "$1$3");
|
||||
$content = ".TP\n\x83$2\n\x83$5\n";
|
||||
unless ($4)
|
||||
{
|
||||
# Indent may be different on second line.
|
||||
$indent = length $& if /^ {20,}/;
|
||||
}
|
||||
}
|
||||
|
||||
# Option without description.
|
||||
elsif (s/^ {1,10}([+-]\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content = ".HP\n\x83$1\n";
|
||||
$indent = 80; # not continued
|
||||
}
|
||||
|
||||
# Indented paragraph with tag.
|
||||
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".TP\n\x83$2\n\x83$3\n";
|
||||
}
|
||||
|
||||
# Indented paragraph.
|
||||
elsif (s/^( +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".IP\n\x83$2\n";
|
||||
}
|
||||
|
||||
# Left justified paragraph.
|
||||
else
|
||||
{
|
||||
s/(.*)\n//;
|
||||
$matched .= $& if %append;
|
||||
$content = ".PP\n" if $include{$sect};
|
||||
$content .= "$1\n";
|
||||
}
|
||||
|
||||
# Append continuations.
|
||||
while (s/^ {$indent}(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content .= "\x83$1\n"
|
||||
}
|
||||
|
||||
# Move to next paragraph.
|
||||
s/^\n+//;
|
||||
|
||||
for ($content)
|
||||
{
|
||||
# Leading dot and apostrophe protection.
|
||||
s/\x83\./\x80/g;
|
||||
s/\x83'/\x81/g;
|
||||
s/\x83//g;
|
||||
|
||||
# Convert options.
|
||||
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||
}
|
||||
|
||||
# Check if matched paragraph contains /pat/.
|
||||
if (%append)
|
||||
{
|
||||
for my $pat (keys %append)
|
||||
{
|
||||
if ($matched =~ $pat)
|
||||
{
|
||||
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
|
||||
$content .= $append{$pat};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$include{$sect} .= $content;
|
||||
}
|
||||
|
||||
# Refer to the real documentation.
|
||||
unless ($opt_no_info)
|
||||
{
|
||||
$sect = 'SEE ALSO';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
$include{$sect} .= <<EOT;
|
||||
The full documentation for
|
||||
.B $program
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B $program
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info $program
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
EOT
|
||||
}
|
||||
|
||||
# Output header.
|
||||
print <<EOT;
|
||||
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||
.TH $PROGRAM "$section" "$date" "$package $version" FSF
|
||||
EOT
|
||||
|
||||
# Section ordering.
|
||||
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
|
||||
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||
my $filter = join '|', @pre, @post;
|
||||
|
||||
# Output content.
|
||||
for (@pre, (grep ! /^($filter)$/o, @include), @post)
|
||||
{
|
||||
if ($include{$_})
|
||||
{
|
||||
my $quote = /\W/ ? '"' : '';
|
||||
print ".SH $quote$_$quote\n";
|
||||
|
||||
for ($include{$_})
|
||||
{
|
||||
# Replace leading dot, apostrophe and backslash tokens.
|
||||
s/\x80/\\&./g;
|
||||
s/\x81/\\&'/g;
|
||||
s/\x82/\\e/g;
|
||||
print;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
||||
# embolden. Option arguments get italicised.
|
||||
sub convert_option
|
||||
{
|
||||
local $_ = '\fB' . shift;
|
||||
|
||||
s/-/\\-/g;
|
||||
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
{
|
||||
s/=(.)/\\fR=\\fI$1/;
|
||||
s/ (.)/ \\fI$1/;
|
||||
$_ .= '\fR';
|
||||
}
|
||||
|
||||
$_;
|
||||
}
|
||||
@@ -0,0 +1,427 @@
|
||||
@node Internals
|
||||
@appendix Hacking GRUB
|
||||
|
||||
This chapter documents the user-invisible aspect of GRUB.
|
||||
|
||||
As a general rule of software development, it is impossible to keep the
|
||||
descriptions of the internals up-to-date, and it is quite hard to
|
||||
document everything. So refer to the source code, whenever you are not
|
||||
satisfied with this documentation. Please assume that this gives just
|
||||
hints to you.
|
||||
|
||||
@menu
|
||||
* Memory map:: The memory map of various components
|
||||
* Embedded data:: Embedded variables in GRUB
|
||||
* Filesystem interface:: The generic interface for filesystems
|
||||
* Command interface:: The generic interface for built-ins
|
||||
* Bootstrap tricks:: The bootstrap mechanism used in GRUB
|
||||
* I/O ports detection:: How to probe I/O ports used by INT 13H
|
||||
* Memory detection:: How to detect all installed RAM
|
||||
* Low-level disk I/O:: INT 13H disk I/O interrupts
|
||||
* MBR:: The structure of Master Boot Record
|
||||
* Partition table:: The format of partition tables
|
||||
* Submitting patches:: Where and how you should send patches
|
||||
@end menu
|
||||
|
||||
|
||||
@node Memory map
|
||||
@section The memory map of various components
|
||||
|
||||
GRUB consists of two distinct components, called @dfn{stages}, which are
|
||||
loaded at different times in the boot process. Because they run
|
||||
mutual-exclusively, sometimes a memory area overlaps with another
|
||||
memory area. And, even in one stage, a single memory area can be used
|
||||
for various purposes, because their usages are mutually exclusive.
|
||||
|
||||
Here is the memory map of the various components:
|
||||
|
||||
@table @asis
|
||||
@item 0 to 4K-1
|
||||
BIOS and real mode interrupts
|
||||
|
||||
@item 0x07BE to 0x07FF
|
||||
Partition table passed to another boot loader
|
||||
|
||||
@item down from 8K-1
|
||||
Real mode stack
|
||||
|
||||
@item 0x2000 to ?
|
||||
The optional Stage 1.5 is loaded here
|
||||
|
||||
@item 0x2000 to 0x7FFF
|
||||
Command-line buffer for Multiboot kernels and modules
|
||||
|
||||
@item 0x7C00 to 0x7DFF
|
||||
Stage 1 is loaded here by BIOS or another boot loader
|
||||
|
||||
@item 0x7F00 to 0x7F42
|
||||
LBA drive parameters
|
||||
|
||||
@item 0x8000 to ?
|
||||
Stage2 is loaded here
|
||||
|
||||
@item The end of Stage 2 to 416K-1
|
||||
Heap, in particular used for the menu
|
||||
|
||||
@item down from 416K-1
|
||||
Protected mode stack
|
||||
|
||||
@item 416K to 448K-1
|
||||
Filesystem buffer
|
||||
|
||||
@item 448K to 479.5K-1
|
||||
Raw device buffer
|
||||
|
||||
@item 479.5K to 480K-1
|
||||
512-byte scratch area
|
||||
|
||||
@item 480K to 512K-1
|
||||
Buffers for various functions, such as password, command-line, cut and
|
||||
paste, and completion.
|
||||
|
||||
@item The last 1K of lower memory
|
||||
Disk swapping code and data
|
||||
@end table
|
||||
|
||||
See the file @file{stage2/shared.h}, for more information.
|
||||
|
||||
|
||||
@node Embedded data
|
||||
@section Embedded variables in GRUB
|
||||
|
||||
Stage 1 and Stage 2 have embedded variables whose locations are
|
||||
well-defined, so that the installation can patch the binary file
|
||||
directly without recompilation of the stages.
|
||||
|
||||
In Stage 1, these are defined:
|
||||
|
||||
@table @code
|
||||
@item 0x3E
|
||||
The version number (not GRUB's, but the installation mechanism's).
|
||||
|
||||
@item 0x40
|
||||
The boot drive. If it is 0xFF, use a drive passed by BIOS.
|
||||
|
||||
@item 0x41
|
||||
The flag for if forcing LBA.
|
||||
|
||||
@item 0x42
|
||||
The starting address of Stage 2.
|
||||
|
||||
@item 0x44
|
||||
The first sector of Stage 2.
|
||||
|
||||
@item 0x48
|
||||
The starting segment of Stage 2.
|
||||
|
||||
@item 0x1FE
|
||||
The signature (@code{0xAA55}).
|
||||
@end table
|
||||
|
||||
See the file @file{stage1/stage1.S}, for more information.
|
||||
|
||||
In the first sector of Stage 1.5 and Stage 2, the blocklists are
|
||||
recorded between @code{firstlist} and @code{lastlist}. The address of
|
||||
@code{lastlist} is determined when assembling the file
|
||||
@file{stage2/start.S}.
|
||||
|
||||
The trick here is that it is actually read backward, and the first
|
||||
8-byte blocklist is not read here, but after the pointer is decremented
|
||||
8 bytes, then after reading it, it decrements again, reads, and so on,
|
||||
until it is finished. The terminating condition is when the number of
|
||||
sectors to be read in the next blocklist is zero.
|
||||
|
||||
The format of a blocklist can be seen from the example in the code just
|
||||
before the @code{firstlist} label. Note that it is always from the
|
||||
beginning of the disk, but @emph{not} relative to the partition
|
||||
boundaries.
|
||||
|
||||
In the second sector of Stage 1.5 and Stage 2, these are defined:
|
||||
|
||||
@table @asis
|
||||
@item @code{0x6}
|
||||
The version number (likewise, the installation mechanism's).
|
||||
|
||||
@item @code{0x8}
|
||||
The installed partition.
|
||||
|
||||
@item @code{0xC}
|
||||
The saved entry number.
|
||||
|
||||
@item @code{0x10}
|
||||
The identifier.
|
||||
|
||||
@item @code{0x11}
|
||||
The flag for if forcing LBA.
|
||||
|
||||
@item @code{0x12}
|
||||
The version string (GRUB's).
|
||||
|
||||
@item @code{0x12} + @dfn{the length of the version string}
|
||||
The name of a configuration file.
|
||||
@end table
|
||||
|
||||
See the file @file{stage2/asm.S}, for more information.
|
||||
|
||||
|
||||
@node Filesystem interface
|
||||
@section The generic interface for filesystems
|
||||
|
||||
For any particular partition, it is presumed that only one of the
|
||||
@dfn{normal} filesystems such as FAT, FFS, or ext2fs can be used, so
|
||||
there is a switch table managed by the functions in
|
||||
@file{disk_io.c}. The notation is that you can only @dfn{mount} one at a
|
||||
time.
|
||||
|
||||
The blocklist filesystem has a special place in the system. In addition
|
||||
to the @dfn{normal} filesystem (or even without one mounted), you can
|
||||
access disk blocks directly (in the indicated partition) via the block
|
||||
list notation. Using the blocklist filesystem doesn't effect any other
|
||||
filesystem mounts.
|
||||
|
||||
The variables which can be read by the filesystem backend are:
|
||||
|
||||
@vtable @code
|
||||
@item current_drive
|
||||
The current BIOS drive number (numbered from 0, if a floppy, and
|
||||
numbered from 0x80, if a hard disk).
|
||||
|
||||
@item current_partition
|
||||
The current partition number.
|
||||
|
||||
@item current_slice
|
||||
The current partition type.
|
||||
|
||||
@item saved_drive
|
||||
The @dfn{drive} part of the root device.
|
||||
|
||||
@item saved_partition
|
||||
The @dfn{partition} part of the root device.
|
||||
|
||||
@item part_start
|
||||
The current partition starting address, in sectors.
|
||||
|
||||
@item part_length
|
||||
The current partition length, in sectors.
|
||||
|
||||
@item print_possibilities
|
||||
True when the @code{dir} function should print the possible completions
|
||||
of a file, and false when it should try to actually open a file of that
|
||||
name.
|
||||
|
||||
@item FSYS_BUF
|
||||
Filesystem buffer which is 32K in size, to use in any way which the
|
||||
filesystem backend desires.
|
||||
@end vtable
|
||||
|
||||
The variables which need to be written by a filesystem backend are:
|
||||
|
||||
@vtable @code
|
||||
@item filepos
|
||||
The current position in the file, in sectors.
|
||||
|
||||
@strong{Caution:} the value of @var{filepos} can be changed out from
|
||||
under the filesystem code in the current implementation. Don't depend on
|
||||
it being the same for later calls into the backend code!
|
||||
|
||||
@item filemax
|
||||
The length of the file.
|
||||
|
||||
@item disk_read_func
|
||||
The value of @var{disk_read_hook} @emph{only} during reading of data
|
||||
for the file, not any other fs data, inodes, FAT tables, whatever, then
|
||||
set to @code{NULL} at all other times (it will be @code{NULL} by
|
||||
default). If this isn't done correctly, then the @command{testload} and
|
||||
@command{install} commands won't work correctly.
|
||||
@end vtable
|
||||
|
||||
The functions expected to be used by the filesystem backend are:
|
||||
|
||||
@ftable @code
|
||||
@item devread
|
||||
Only read sectors from within a partition. Sector 0 is the first sector
|
||||
in the partition.
|
||||
|
||||
@item grub_read
|
||||
If the backend uses the blocklist code, then @code{grub_read} can be
|
||||
used, after setting @var{block_file} to 1.
|
||||
|
||||
@item print_a_completion
|
||||
If @var{print_possibilities} is true, call @code{print_a_completion} for
|
||||
each possible file name. Otherwise, the file name completion won't work.
|
||||
@end ftable
|
||||
|
||||
The functions expected to be defined by the filesystem backend are
|
||||
described at least moderately in the file @file{filesys.h}. Their usage
|
||||
is fairly evident from their use in the functions in @file{disk_io.c},
|
||||
look for the use of the @var{fsys_table} array.
|
||||
|
||||
@strong{Caution:} The semantics are such that then @samp{mount}ing the
|
||||
filesystem, presume the filesystem buffer @code{FSYS_BUF} is corrupted,
|
||||
and (re-)load all important contents. When opening and reading a file,
|
||||
presume that the data from the @samp{mount} is available, and doesn't
|
||||
get corrupted by the open/read (i.e. multiple opens and/or reads will be
|
||||
done with only one mount if in the same filesystem).
|
||||
|
||||
|
||||
@node Command interface
|
||||
@section The generic interface for built-ins
|
||||
|
||||
GRUB built-in commands are defined in a uniform interface, whether
|
||||
they are menu-specific or can be used anywhere. The definition of a
|
||||
built-in command consists of two parts: the code itself and the table of
|
||||
the information.
|
||||
|
||||
The code must be a function which takes two arguments, a command-line
|
||||
string and flags, and returns an @samp{int} value. The @dfn{flags}
|
||||
argument specifies how the function is called, using a bit mask. The
|
||||
return value must be zero if successful, otherwise non-zero. So it is
|
||||
normally enough to return @var{errnum}.
|
||||
|
||||
The table of the information is represented by the structure
|
||||
@code{struct builtin}, which contains the name of the command, a pointer
|
||||
to the function, flags, a short description of the command and a long
|
||||
description of the command. Since the descriptions are used only for
|
||||
help messages interactively, you don't have to define them, if the
|
||||
command may not be called interactively (such as @command{title}).
|
||||
|
||||
The table is finally registered in the table @var{builtin_table}, so
|
||||
that @code{run_script} and @code{enter_cmdline} can find the
|
||||
command. See the files @file{cmdline.c} and @file{builtins.c}, for more
|
||||
details.
|
||||
|
||||
|
||||
@node Bootstrap tricks
|
||||
@section The bootstrap mechanism used in GRUB
|
||||
|
||||
The disk space can be used in a boot loader is very restricted because
|
||||
a MBR (@pxref{MBR}) is only 512 bytes but it also contains a partition
|
||||
table (@pxref{Partition table}) and a BPB. So the question is how to
|
||||
make a boot loader code enough small to be fit in a MBR.
|
||||
|
||||
However, GRUB is a very large program, so we break GRUB into 2 (or 3)
|
||||
distinct components, @dfn{Stage 1} and @dfn{Stage 2} (and optionally
|
||||
@dfn{Stage 1.5}). @xref{Memory map}, for more information.
|
||||
|
||||
We embed Stage 1 in a MBR or in the boot sector of a partition, and
|
||||
place Stage 2 in a filesystem. The optional Stage 1.5 can be installed
|
||||
in a filesystem, in the @dfn{boot loader} area in a FFS or a ReiserFS,
|
||||
and in the sectors right after a MBR, because Stage 1.5 is enough small
|
||||
and the sectors right after a MBR is normally an unused region. The size
|
||||
of this region is the number of sectors per head minus 1.
|
||||
|
||||
Thus, all Stage1 must do is just load Stage2 or Stage1.5. But even if
|
||||
Stage 1 needs not to support the user interface or the filesystem
|
||||
interface, it is impossible to make Stage 1 less than 400 bytes, because
|
||||
GRUB should support both the CHS mode and the LBA mode (@pxref{Low-level
|
||||
disk I/O}).
|
||||
|
||||
The solution used by GRUB is that Stage 1 loads only the first sector of
|
||||
Stage 2 (or Stage 1.5) and Stage 2 itself loads the rest. The flow of
|
||||
Stage 1 is:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Initialize the system briefly.
|
||||
|
||||
@item
|
||||
Detect the geometry and the accessing mode of the @dfn{loading drive}.
|
||||
|
||||
@item
|
||||
Load the first sector of Stage 2.
|
||||
|
||||
@item
|
||||
Jump to the starting address of the Stage 2.
|
||||
@end enumerate
|
||||
|
||||
The flow of Stage 2 (and Stage 1.5) is:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Load the rest of itself to the real starting address, that is, the
|
||||
starting address plus 512 bytes. The blocklists are stored in the last
|
||||
part of the first sector.
|
||||
|
||||
@item
|
||||
Long jump to the real starting address.
|
||||
@end enumerate
|
||||
|
||||
Note that Stage 2 (or Stage 1.5) does not probe the geometry
|
||||
or the accessing mode of the @dfn{loading drive}, since Stage 1 has
|
||||
already probed them.
|
||||
|
||||
|
||||
@node I/O ports detection
|
||||
@section How to probe I/O ports used by INT 13H
|
||||
|
||||
FIXME: I will write this chapter after implementing the new technique.
|
||||
|
||||
|
||||
|
||||
@node Memory detection
|
||||
@section How to detect all installed RAM
|
||||
|
||||
FIXME: I doubt if Erich didn't write this chapter only himself wholly,
|
||||
so I will rewrite this chapter.
|
||||
|
||||
|
||||
@node Low-level disk I/O
|
||||
@section INT 13H disk I/O interrupts
|
||||
|
||||
FIXME: I'm not sure where some part of the original chapter is derived,
|
||||
so I will rewrite this chapter.
|
||||
|
||||
|
||||
@node MBR
|
||||
@section The structure of Master Boot Record
|
||||
|
||||
FIXME: Likewise.
|
||||
|
||||
|
||||
@node Partition table
|
||||
@section The format of partition tables
|
||||
|
||||
FIXME: Probably the original chapter is derived from "How It Works", so
|
||||
I will rewrite this chapter.
|
||||
|
||||
|
||||
@node Submitting patches
|
||||
@section Where and how you should send patches
|
||||
|
||||
When you write patches for GRUB, please send them to the mailing list
|
||||
@email{bug-grub@@gnu.org}. Here is the list of items of which you
|
||||
should take care:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Please make your patch as small as possible. Generally, it is not a good
|
||||
thing to make one big patch which changes many things. Instead,
|
||||
segregate features and produce many patches.
|
||||
|
||||
@item
|
||||
Use as late code as possible, for the original code. The CVS repository
|
||||
always has the current version (@pxref{Obtaining and Building GRUB}).
|
||||
|
||||
@item
|
||||
Write ChangeLog entries. @xref{Change Logs, , Change Logs, standards,
|
||||
GNU Coding Standards}, if you don't know how to write ChangeLog.
|
||||
|
||||
@item
|
||||
Make patches in unified diff format. @samp{diff -urN} is appropriate in
|
||||
most cases.
|
||||
|
||||
@item
|
||||
Don't make patches reversely. Reverse patches are difficult to read and
|
||||
use.
|
||||
|
||||
@item
|
||||
Be careful enough of the license term and the copyright. Because GRUB
|
||||
is under GNU General Public License, you may not steal code from
|
||||
software whose license is incompatible against GPL. And, if you copy
|
||||
code written by others, you must not ignore their copyrights. Feel free
|
||||
to ask GRUB maintainers, whenever you are not sure what you should do.
|
||||
|
||||
@item
|
||||
If your patch is too large to send in e-mail, put it at somewhere we can
|
||||
see. Usually, you shouldn't send e-mail over 20K.
|
||||
@end itemize
|
||||
@@ -1,6 +0,0 @@
|
||||
[NAME]
|
||||
grub-bios-setup \- set up a device to boot using GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-install (8),
|
||||
.BR grub-mkimage (1),
|
||||
.BR grub-mkrescue (1)
|
||||
@@ -1,5 +0,0 @@
|
||||
[NAME]
|
||||
grub-editenv \- edit GRUB environment block
|
||||
[SEE ALSO]
|
||||
.BR grub-reboot (8),
|
||||
.BR grub-set-default (8)
|
||||
@@ -1,6 +0,0 @@
|
||||
[NAME]
|
||||
grub-emu \- GRUB emulator
|
||||
[SEE ALSO]
|
||||
If you are trying to install GRUB, then you should use
|
||||
.BR grub-install (8)
|
||||
rather than this program.
|
||||
@@ -1,2 +0,0 @@
|
||||
[NAME]
|
||||
grub-file \- check file type
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-fstest \- debug tool for GRUB filesystem drivers
|
||||
[SEE ALSO]
|
||||
.BR grub-probe (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-glue-efi \- generate a fat binary for EFI
|
||||
[DESCRIPTION]
|
||||
grub-glue-efi processes ia32 and amd64 EFI images and glues them according to Apple format.
|
||||
@@ -1,6 +0,0 @@
|
||||
[NAME]
|
||||
grub-install \- install GRUB to a device
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8),
|
||||
.BR grub-mkimage (1),
|
||||
.BR grub-mkrescue (1)
|
||||
@@ -1,10 +0,0 @@
|
||||
[NAME]
|
||||
grub-kbdcomp \- generate a GRUB keyboard layout file
|
||||
[DESCRIPTION]
|
||||
grub-kbdcomp processes a X keyboard layout description in
|
||||
.BR keymaps (5)
|
||||
format into a format that can be used by GRUB's
|
||||
.B keymap
|
||||
command.
|
||||
[SEE ALSO]
|
||||
.BR grub-mklayout (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-macbless \- bless a mac file/directory
|
||||
[SEE ALSO]
|
||||
.BR grub-install (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-macho2img \- convert Mach-O to raw image
|
||||
[SEE ALSO]
|
||||
.BR grub-mkimage (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-menulst2cfg \- transform legacy menu.lst into grub.cfg
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkconfig \- generate a GRUB configuration file
|
||||
[SEE ALSO]
|
||||
.BR grub-install (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkfont \- make GRUB font files
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8)
|
||||
@@ -1,6 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkimage \- make a bootable image of GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-install (8),
|
||||
.BR grub-mkrescue (1),
|
||||
.BR grub-mknetdir (8)
|
||||
@@ -1,10 +0,0 @@
|
||||
[NAME]
|
||||
grub-mklayout \- generate a GRUB keyboard layout file
|
||||
[DESCRIPTION]
|
||||
grub-mklayout processes a keyboard layout description in
|
||||
.BR keymaps (5)
|
||||
format into a format that can be used by GRUB's
|
||||
.B keymap
|
||||
command.
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mknetdir \- prepare a GRUB netboot directory.
|
||||
[SEE ALSO]
|
||||
.BR grub-mkimage (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkpasswd-pbkdf2 \- generate hashed password for GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkrelpath \- make a system path relative to its root
|
||||
[SEE ALSO]
|
||||
.BR grub-probe (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkrescue \- make a GRUB rescue image
|
||||
[SEE ALSO]
|
||||
.BR grub-mkimage (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-mkstandalone \- make a memdisk-based GRUB image
|
||||
[SEE ALSO]
|
||||
.BR grub-mkimage (1)
|
||||
@@ -1,2 +0,0 @@
|
||||
[NAME]
|
||||
grub-mount \- export GRUB filesystem with FUSE
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-ofpathname \- find OpenBOOT path for a device
|
||||
[SEE ALSO]
|
||||
.BR grub-probe (8)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-pe2elf \- convert PE image to ELF
|
||||
[SEE ALSO]
|
||||
.BR grub-mkimage (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-probe \- probe device information for GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-fstest (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-protect \- protect a disk key with a key protector
|
||||
[DESCRIPTION]
|
||||
grub-protect helps to protect a disk encryption key with a specified key protector.
|
||||
@@ -1,5 +0,0 @@
|
||||
[NAME]
|
||||
grub-reboot \- set the default boot entry for GRUB, for the next boot only
|
||||
[SEE ALSO]
|
||||
.BR grub-set-default (8),
|
||||
.BR grub-editenv (1)
|
||||
@@ -1,3 +0,0 @@
|
||||
[NAME]
|
||||
grub-render-label \- generate a .disk_label for Apple Macs.
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-script-check \- check grub.cfg for syntax errors
|
||||
[SEE ALSO]
|
||||
.BR grub-mkconfig (8)
|
||||
@@ -1,5 +0,0 @@
|
||||
[NAME]
|
||||
grub-set-default \- set the saved default boot entry for GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-reboot (8),
|
||||
.BR grub-editenv (1)
|
||||
@@ -1,6 +0,0 @@
|
||||
[NAME]
|
||||
grub-sparc64-setup \- set up a device to boot using GRUB
|
||||
[SEE ALSO]
|
||||
.BR grub-install (8),
|
||||
.BR grub-mkimage (1),
|
||||
.BR grub-mkrescue (1)
|
||||
@@ -1,4 +0,0 @@
|
||||
[NAME]
|
||||
grub-syslinux2cfg \- transform syslinux config into grub.cfg
|
||||
[SEE ALSO]
|
||||
.BR grub-menulst2cfg (8)
|
||||
-205
@@ -1,205 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2007-03-30.02
|
||||
|
||||
# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: mdate-sh [--help] [--version] FILE
|
||||
|
||||
Pretty-print the modification time of FILE.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LC_TIME=C
|
||||
export LC_TIME
|
||||
|
||||
# GNU ls changes its time format in response to the TIME_STYLE
|
||||
# variable. Since we cannot assume `unset' works, revert this
|
||||
# variable to its documented default.
|
||||
if test "${TIME_STYLE+set}" = set; then
|
||||
TIME_STYLE=posix-long-iso
|
||||
export TIME_STYLE
|
||||
fi
|
||||
|
||||
save_arg1=$1
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
else
|
||||
ls_command='ls -l -d'
|
||||
fi
|
||||
# Avoid user/group names that might have spaces, when possible.
|
||||
if ls -n /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command="$ls_command -n"
|
||||
fi
|
||||
|
||||
# A `ls -l' line looks as follows on OS/2.
|
||||
# drwxrwx--- 0 Aug 11 2001 foo
|
||||
# This differs from Unix, which adds ownership information.
|
||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
||||
#
|
||||
# To find the date, we split the line on spaces and iterate on words
|
||||
# until we find a month. This cannot work with files whose owner is a
|
||||
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
|
||||
# will be owned by a user whose name is a month. So we first look at
|
||||
# the extended ls output of the root directory to decide how many
|
||||
# words should be skipped to get the date.
|
||||
|
||||
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
||||
set x`$ls_command /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set dummy x`eval "$ls_command \"\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Because of the dummy argument above, month is in $2.
|
||||
#
|
||||
# On a POSIX system, we should have
|
||||
#
|
||||
# $# = 5
|
||||
# $1 = file size
|
||||
# $2 = month
|
||||
# $3 = day
|
||||
# $4 = year or time
|
||||
# $5 = filename
|
||||
#
|
||||
# On Darwin 7.7.0 and 7.6.0, we have
|
||||
#
|
||||
# $# = 4
|
||||
# $1 = day
|
||||
# $2 = month
|
||||
# $3 = year or time
|
||||
# $4 = filename
|
||||
|
||||
# Get the month.
|
||||
case $2 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
case $3 in
|
||||
???*) day=$1;;
|
||||
*) day=$3; shift;;
|
||||
esac
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# Sample boot menu configuration file
|
||||
#
|
||||
|
||||
# Boot automatically after 30 secs.
|
||||
timeout 30
|
||||
|
||||
# By default, boot the first entry.
|
||||
default 0
|
||||
|
||||
# Fallback to the second entry.
|
||||
fallback 1
|
||||
|
||||
# For booting GNU/Hurd
|
||||
title GNU/Hurd
|
||||
root (hd0,0)
|
||||
kernel /boot/gnumach.gz root=hd0s1
|
||||
module /boot/serverboot.gz
|
||||
|
||||
# For booting GNU/Linux
|
||||
title GNU/Linux
|
||||
root (hd1,0)
|
||||
kernel /vmlinuz root=/dev/hdb1
|
||||
#initrd /initrd.img
|
||||
|
||||
# For booting GNU/kFreeBSD
|
||||
title GNU/kFreeBSD
|
||||
root (hd0,2,a)
|
||||
kernel /boot/loader.gz
|
||||
|
||||
# For booting GNU/kNetBSD
|
||||
title GNU/kNetBSD
|
||||
root (hd0,2,a)
|
||||
kernel --type=netbsd /boot/knetbsd.gz
|
||||
|
||||
# For booting Mach (getting kernel from floppy)
|
||||
title Utah Mach4 multiboot
|
||||
root (hd0,2)
|
||||
pause Insert the diskette now!!
|
||||
kernel (fd0)/boot/kernel root=hd0s3
|
||||
module (fd0)/boot/bootstrap
|
||||
|
||||
# For booting FreeBSD
|
||||
title FreeBSD
|
||||
root (hd0,2,a)
|
||||
kernel /boot/loader
|
||||
|
||||
# For booting NetBSD
|
||||
title NetBSD
|
||||
root (hd0,2,a)
|
||||
kernel --type=netbsd /netbsd
|
||||
|
||||
# For booting OpenBSD
|
||||
title OpenBSD
|
||||
root (hd0,2,a)
|
||||
kernel --type=netbsd /bsd
|
||||
|
||||
# For booting OS/2
|
||||
title OS/2
|
||||
root (hd0,1)
|
||||
makeactive
|
||||
# chainload OS/2 bootloader from the first sector
|
||||
chainloader +1
|
||||
# This is similar to "chainload", but loads a specific file
|
||||
#chainloader /boot/chain.os2
|
||||
|
||||
# For booting Windows NT or Windows95
|
||||
title Windows NT / Windows 95 boot menu
|
||||
rootnoverify (hd0,0)
|
||||
makeactive
|
||||
chainloader +1
|
||||
# For loading DOS if Windows NT is installed
|
||||
# chainload /bootsect.dos
|
||||
|
||||
# For installing GRUB into the hard disk
|
||||
title Install GRUB into the hard disk
|
||||
root (hd0,0)
|
||||
setup (hd0)
|
||||
|
||||
# Change the colors.
|
||||
title Change the colors
|
||||
color light-green/brown blink-red/blue
|
||||
@@ -1,331 +0,0 @@
|
||||
# Sample GRUB script to autodetect operating systems
|
||||
#
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set saved_root=$root
|
||||
|
||||
function freebsd_ufs_variants {
|
||||
set device=$1
|
||||
set fstype=$2
|
||||
set uuid=$3
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device)" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
freebsd /boot/kernel/kernel
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/$uuid
|
||||
frebsd_loadenv /boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (single)" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
freebsd /boot/kernel/kernel --single
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/$uuid
|
||||
frebsd_loadenv /boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (verbose)" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
freebsd /boot/kernel/kernel --verbose
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/$uuid
|
||||
frebsd_loadenv /boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (without ACPI)" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
freebsd /boot/kernel/kernel --verbose
|
||||
unset FreeBSD.acpi_load
|
||||
set FreeBSD.hint.acpi.0.disabled=1
|
||||
set FreeBSD.loader.acpi_disabled_by_user=1
|
||||
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/$uuid
|
||||
frebsd_loadenv /boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (safe mode)" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
freebsd /boot/kernel/kernel --verbose
|
||||
unset FreeBSD.acpi_load
|
||||
set FreeBSD.hint.acpi.0.disabled=1
|
||||
set FreeBSD.loader.acpi_disabled_by_user=1
|
||||
set FreeBSD.hint.apic.0.disabled=1
|
||||
set FreeBSD.hw.ata.ata_dma=0
|
||||
set FreeBSD.hw.ata.atapi_dma=0
|
||||
set FreeBSD.hw.ata.wc=0
|
||||
set FreeBSD.hw.eisa_slots=0
|
||||
set FreeBSD.hint.kbdmux.0.disabled=1
|
||||
set FreeBSD.vfs.root.mountfrom=ufs:ufsid/$uuid
|
||||
frebsd_loadenv /boot/device.hints
|
||||
}
|
||||
}
|
||||
|
||||
function freebsd_zfs_variants {
|
||||
set device=$1
|
||||
set fstype=zfs
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device)" $device {
|
||||
set root=$2
|
||||
|
||||
freebsd /@/boot/kernel/kernel
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
freebsd_module_elf /@/boot/kernel/opensolaris.ko
|
||||
freebsd_module_elf /@/boot/kernel/zfs.ko
|
||||
freebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
probe -l -s name $root
|
||||
set FreeBSD.vfs.root.mountfrom=zfs:$name
|
||||
freebsd_loadenv /@/boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (single)" $device {
|
||||
set root=$2
|
||||
|
||||
freebsd /@/boot/kernel/kernel --single
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
freebsd_module_elf /@/boot/kernel/opensolaris.ko
|
||||
freebsd_module_elf /@/boot/kernel/zfs.ko
|
||||
freebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
probe -l -s name $root
|
||||
set FreeBSD.vfs.root.mountfrom=zfs:$name
|
||||
freebsd_loadenv /@/boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (verbose)" $device {
|
||||
set root=$2
|
||||
|
||||
freebsd /@/boot/kernel/kernel --verbose
|
||||
set FreeBSD.acpi_load=YES
|
||||
set FreeBSD.hint.acpi.0.disabled=0
|
||||
freebsd_module_elf /@/boot/kernel/opensolaris.ko
|
||||
freebsd_module_elf /@/boot/kernel/zfs.ko
|
||||
freebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
probe -l -s name $root
|
||||
set FreeBSD.vfs.root.mountfrom=zfs:$name
|
||||
freebsd_loadenv /@/boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (without ACPI)" $device {
|
||||
set root=$2
|
||||
|
||||
freebsd /@/boot/kernel/kernel --verbose
|
||||
unset FreeBSD.acpi_load
|
||||
set FreeBSD.hint.acpi.0.disabled=1
|
||||
set FreeBSD.loader.acpi_disabled_by_user=1
|
||||
freebsd_module_elf /@/boot/kernel/opensolaris.ko
|
||||
freebsd_module_elf /@/boot/kernel/zfs.ko
|
||||
freebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
probe -l -s name $root
|
||||
set FreeBSD.vfs.root.mountfrom=zfs:$name
|
||||
freebsd_loadenv /@/boot/device.hints
|
||||
}
|
||||
|
||||
menuentry "FreeBSD (on $fstype $device) (safe mode)" $device {
|
||||
set root=$2
|
||||
|
||||
freebsd /@/boot/kernel/kernel --verbose
|
||||
unset FreeBSD.acpi_load
|
||||
set FreeBSD.hint.acpi.0.disabled=1
|
||||
set FreeBSD.loader.acpi_disabled_by_user=1
|
||||
set FreeBSD.hint.apic.0.disabled=1
|
||||
set FreeBSD.hw.ata.ata_dma=0
|
||||
set FreeBSD.hw.ata.atapi_dma=0
|
||||
set FreeBSD.hw.ata.wc=0
|
||||
set FreeBSD.hw.eisa_slots=0
|
||||
set FreeBSD.hint.kbdmux.0.disabled=1
|
||||
freebsd_module_elf /@/boot/kernel/opensolaris.ko
|
||||
freebsd_module_elf /@/boot/kernel/zfs.ko
|
||||
freebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
|
||||
probe -l -s name $root
|
||||
set FreeBSD.vfs.root.mountfrom=zfs:$name
|
||||
freebsd_loadenv /@/boot/device.hints
|
||||
}
|
||||
}
|
||||
|
||||
insmod regexp
|
||||
for dev in (*); do
|
||||
# $device: parenthesis removed from $dev
|
||||
regexp -s device '\((.*)\)' $dev
|
||||
# $fstype: filesystem type identified
|
||||
probe -s fstype -f $dev
|
||||
# uuid: filesystem UUID
|
||||
probe -s uuid -u $dev
|
||||
|
||||
if test -f ($device)/isolinux/isolinux.cfg ; then
|
||||
menuentry "ISOLINUX config (on $device)" $device {
|
||||
set root=$2
|
||||
syslinux_configfile -i /isolinux/isolinux.cfg
|
||||
}
|
||||
fi
|
||||
if test -f ($device)/bootmgr -a -f ($device)/boot/bcd; then
|
||||
menuentry "Windows Vista bootmgr (on $device)" $device {
|
||||
set root=$2
|
||||
chainloader +1
|
||||
}
|
||||
elif test -f ($device)/ntldr -a \
|
||||
-e ($device)/ntdetect.com -a -f ($device)/boot.ini; then
|
||||
menuentry "Windows NT/2000/XP loader (on $device)" $device {
|
||||
set root=$2
|
||||
regexp -s devnum 'hd([0-9]+)' $root
|
||||
if test "$devnum" != "0"; then
|
||||
drivemap -s hd0 $root
|
||||
fi
|
||||
chainloader +1
|
||||
}
|
||||
elif test -f ($device)/windows/win.com; then
|
||||
menuentry "Windows 98/ME (on $device)" $device {
|
||||
set root=$2
|
||||
regexp -s devnum 'hd([0-9]+)' $root
|
||||
if test "$devnum" != "0"; then
|
||||
drivemap -s hd0 $root
|
||||
fi
|
||||
chainloader +1
|
||||
}
|
||||
elif test -f ($device)/io.sys -a -f ($device)/command.com; then
|
||||
menuentry "MS-DOS (on $device)" $device {
|
||||
set root=$2
|
||||
regexp -s devnum 'hd([0-9]+)' $root
|
||||
if test "$devnum" != "0"; then
|
||||
drivemap -s hd0 $root
|
||||
fi
|
||||
chainloader +1
|
||||
}
|
||||
elif test -f ($device)/kernel.sys; then
|
||||
menuentry "FreeDOS (on $device)" $device {
|
||||
set root=$2
|
||||
regexp -s type '([fh])d[0-9]+' $root
|
||||
regexp -s devnum '[fh]d([0-9]+)' $root
|
||||
if test $type = 'h' -a "$devnum" != "0"; then
|
||||
drivemap -s hd0 $root
|
||||
fi
|
||||
chainloader +1
|
||||
}
|
||||
elif test "$fstype" = ufs1 -o "$fstype" = ufs2 -a \
|
||||
-e ($device)/boot/kernel/kernel -a \
|
||||
-e ($device)/boot/device.hints; then
|
||||
|
||||
freebsd_ufs_variants $device $fstype $uuid
|
||||
|
||||
elif test "$fstype" = zfs -a \
|
||||
-e ($device)/@/boot/kernel/kernel -a \
|
||||
-e ($device)/@/boot/device.hints; then
|
||||
|
||||
freebsd_zfs_variants $device
|
||||
|
||||
elif test "$fstype" = hfsplus -a -f ($device)/mach_kernel; then
|
||||
menuentry "Mac OS X/Darwin" $device $uuid {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
|
||||
insmod vbe
|
||||
do_resume=0
|
||||
if [ /var/vm/sleepimage -nt10 / ]; then
|
||||
if xnu_resume /var/vm/sleepimage; then
|
||||
do_resume=1
|
||||
fi
|
||||
fi
|
||||
if [ $do_resume = 1 ]; then
|
||||
xnu_uuid $uuid uuid
|
||||
if [ -f /Extra/DSDT.aml ]; then
|
||||
acpi -e /Extra/DSDT.aml
|
||||
fi
|
||||
xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
|
||||
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
|
||||
xnu_mkext /System/Library/Extensions.mkext
|
||||
else
|
||||
xnu_mkext /System/Library/Extensions
|
||||
fi
|
||||
if [ -f /Extra/Extensions.mkext ]; then
|
||||
xnu_mkext /Extra/Extensions.mkext
|
||||
fi
|
||||
if [ -d /Extra/Extensions ]; then
|
||||
xnu_kextdir /Extra/Extensions
|
||||
fi
|
||||
if [ -f /Extra/devtree.txt ]; then
|
||||
xnu_devtree /Extra/devtree.txt
|
||||
fi
|
||||
if [ -f /Extra/splash.jpg ]; then
|
||||
insmod jpeg
|
||||
xnu_splash /Extra/splash.jpg
|
||||
fi
|
||||
if [ -f /Extra/splash.png ]; then
|
||||
insmod png
|
||||
xnu_splash /Extra/splash.png
|
||||
fi
|
||||
if [ -f /Extra/splash.tga ]; then
|
||||
insmod tga
|
||||
xnu_splash /Extra/splash.tga
|
||||
fi
|
||||
fi
|
||||
}
|
||||
else
|
||||
set root=$device
|
||||
for file in /boot/vmlinuz-* /boot/linux-*; do
|
||||
if test -f $file; then
|
||||
regexp -s version '/boot/vmlinuz-(.*)' $file
|
||||
regexp -s version '/boot/linux-(.*)' $file
|
||||
|
||||
menuentry "Linux $file" $device $uuid $file $version {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
set kernel=$4
|
||||
set version=$5
|
||||
|
||||
linux $kernel root=UUID=$uuid ro
|
||||
if test -f /boot/initrd-$version.img; then
|
||||
initrd /boot/initrd-$version.img
|
||||
elif test -f /boot/initrd.img-$version; then
|
||||
initrd /boot/initrd.img-$version
|
||||
elif test -f /boot/initrd-$version; then
|
||||
initrd /boot/initrd-$version
|
||||
fi
|
||||
}
|
||||
|
||||
menuentry "Linux $file (single)" $device $uuid $file $version {
|
||||
set root=$2
|
||||
set uuid=$3
|
||||
set kernel=$4
|
||||
set version=$5
|
||||
|
||||
linux $kernel root=UUID=$uuid ro single
|
||||
if test -f /boot/initrd-$version.img; then
|
||||
initrd /boot/initrd-$version.img
|
||||
elif test -f /boot/initrd.img-$version; then
|
||||
initrd /boot/initrd.img-$version
|
||||
elif test -f /boot/initrd-$version; then
|
||||
initrd /boot/initrd-$version
|
||||
fi
|
||||
}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
set root=$saved_root
|
||||
@@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Convert a source file to a TeXinfo file. Stolen from glibc.
|
||||
#
|
||||
# Usage: src2texi SRCDIR SRC TEXI
|
||||
|
||||
dir=$1
|
||||
src=`basename $2`
|
||||
texi=`basename $3`
|
||||
|
||||
sed -e 's,[{}],@&,g' \
|
||||
-e 's,/\*\(@.*\)\*/,\1,g' \
|
||||
-e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \
|
||||
-e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g' \
|
||||
${dir}/${src} | expand > ${texi}.new
|
||||
mv -f ${texi}.new ${dir}/${texi}
|
||||
@@ -0,0 +1,4 @@
|
||||
@set UPDATED 8 May 2005
|
||||
@set UPDATED-MONTH May 2005
|
||||
@set EDITION 0.97
|
||||
@set VERSION 0.97
|
||||
-8959
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,4 @@
|
||||
@set UPDATED 8 May 2005
|
||||
@set UPDATED-MONTH May 2005
|
||||
@set EDITION 0.97
|
||||
@set VERSION 0.97
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This gensymlist.sh is free software; the author
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
cat <<EOF
|
||||
/* This file is automatically generated by geninit.sh. DO NOT EDIT! */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/emu/misc.h>
|
||||
|
||||
EOF
|
||||
|
||||
for mod in "$@"; do
|
||||
echo "extern void grub_${mod}_init (void);"
|
||||
echo "extern void grub_${mod}_fini (void);"
|
||||
done
|
||||
|
||||
cat <<EOF
|
||||
void
|
||||
grub_init_all (void)
|
||||
{
|
||||
EOF
|
||||
|
||||
for mod in "$@"; do
|
||||
echo "grub_${mod}_init ();"
|
||||
done
|
||||
|
||||
cat <<EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
void
|
||||
grub_fini_all (void)
|
||||
{
|
||||
EOF
|
||||
|
||||
for mod in "$@"; do
|
||||
echo "grub_${mod}_fini ();"
|
||||
done
|
||||
|
||||
cat <<EOF
|
||||
}
|
||||
EOF
|
||||
@@ -1,915 +0,0 @@
|
||||
#! /usr/bin/python
|
||||
# GRUB -- GRand Unified Bootloader
|
||||
# Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from optparse import OptionParser
|
||||
import re
|
||||
|
||||
#
|
||||
# This is the python script used to generate Makefile.*.am
|
||||
#
|
||||
|
||||
GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
|
||||
"i386_multiboot", "i386_ieee1275", "x86_64_efi",
|
||||
"i386_xen", "x86_64_xen", "i386_xen_pvh",
|
||||
"mips_loongson", "sparc64_ieee1275",
|
||||
"powerpc_ieee1275", "mips_arc", "ia64_efi",
|
||||
"mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
|
||||
"arm_coreboot", "loongarch64_efi", "riscv32_efi", "riscv64_efi" ]
|
||||
|
||||
GROUPS = {}
|
||||
|
||||
GROUPS["common"] = GRUB_PLATFORMS[:]
|
||||
|
||||
# Groups based on CPU
|
||||
GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275" ]
|
||||
GROUPS["x86_64"] = [ "x86_64_efi" ]
|
||||
GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"]
|
||||
GROUPS["mips"] = [ "mips_loongson", "mips_qemu_mips", "mips_arc" ]
|
||||
GROUPS["sparc64"] = [ "sparc64_ieee1275" ]
|
||||
GROUPS["powerpc"] = [ "powerpc_ieee1275" ]
|
||||
GROUPS["arm"] = [ "arm_uboot", "arm_efi", "arm_coreboot" ]
|
||||
GROUPS["arm64"] = [ "arm64_efi" ]
|
||||
GROUPS["loongarch64"] = [ "loongarch64_efi" ]
|
||||
GROUPS["riscv32"] = [ "riscv32_efi" ]
|
||||
GROUPS["riscv64"] = [ "riscv64_efi" ]
|
||||
|
||||
# Groups based on firmware
|
||||
GROUPS["efi"] = [ "i386_efi", "x86_64_efi", "ia64_efi", "arm_efi", "arm64_efi",
|
||||
"loongarch64_efi", "riscv32_efi", "riscv64_efi" ]
|
||||
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
|
||||
GROUPS["uboot"] = [ "arm_uboot" ]
|
||||
GROUPS["xen"] = [ "i386_xen", "x86_64_xen" ]
|
||||
GROUPS["coreboot"] = [ "i386_coreboot", "arm_coreboot" ]
|
||||
|
||||
# emu is a special case so many core functionality isn't needed on this platform
|
||||
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
|
||||
|
||||
# Groups based on hardware features
|
||||
GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_loongson", "mips_qemu_mips",
|
||||
"sparc64_ieee1275", "powerpc_ieee1275"]
|
||||
GROUPS["cmos"].remove("i386_efi"); GROUPS["cmos"].remove("x86_64_efi");
|
||||
GROUPS["pci"] = GROUPS["x86"] + ["mips_loongson"]
|
||||
GROUPS["usb"] = GROUPS["pci"] + ["arm_coreboot"]
|
||||
|
||||
# If gfxterm is main output console integrate it into kernel
|
||||
GROUPS["videoinkernel"] = ["mips_loongson", "i386_coreboot", "arm_coreboot" ]
|
||||
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
|
||||
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
|
||||
|
||||
# Similar for terminfo
|
||||
GROUPS["terminfoinkernel"] = [ "emu", "mips_loongson", "mips_arc", "mips_qemu_mips", "i386_xen_pvh" ] + GROUPS["xen"] + GROUPS["ieee1275"] + GROUPS["uboot"];
|
||||
GROUPS["terminfomodule"] = GRUB_PLATFORMS[:];
|
||||
for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)
|
||||
|
||||
# Flattened Device Trees (FDT)
|
||||
GROUPS["fdt"] = [ "arm64_efi", "arm_uboot", "arm_efi", "loongarch64_efi", "riscv32_efi", "riscv64_efi" ]
|
||||
|
||||
# Needs software helpers for division
|
||||
# Must match GRUB_DIVISION_IN_SOFTWARE in misc.h
|
||||
GROUPS["softdiv"] = GROUPS["arm"] + ["ia64_efi"] + GROUPS["riscv32"]
|
||||
GROUPS["no_softdiv"] = GRUB_PLATFORMS[:]
|
||||
for i in GROUPS["softdiv"]: GROUPS["no_softdiv"].remove(i)
|
||||
|
||||
# Miscellaneous groups scheduled to disappear in future
|
||||
GROUPS["i386_coreboot_multiboot_qemu"] = ["i386_coreboot", "i386_multiboot", "i386_qemu"]
|
||||
GROUPS["nopc"] = GRUB_PLATFORMS[:]; GROUPS["nopc"].remove("i386_pc")
|
||||
|
||||
#
|
||||
# Create platform => groups reverse map, where groups covering that
|
||||
# platform are ordered by their sizes
|
||||
#
|
||||
RMAP = {}
|
||||
for platform in GRUB_PLATFORMS:
|
||||
# initialize with platform itself as a group
|
||||
RMAP[platform] = [ platform ]
|
||||
|
||||
for k in GROUPS.keys():
|
||||
v = GROUPS[k]
|
||||
# skip groups that don't cover this platform
|
||||
if platform not in v: continue
|
||||
|
||||
bigger = []
|
||||
smaller = []
|
||||
# partition currently known groups based on their size
|
||||
for group in RMAP[platform]:
|
||||
if group in GRUB_PLATFORMS: smaller.append(group)
|
||||
elif len(GROUPS[group]) < len(v): smaller.append(group)
|
||||
else: bigger.append(group)
|
||||
# insert in the middle
|
||||
RMAP[platform] = smaller + [ k ] + bigger
|
||||
|
||||
#
|
||||
# Input
|
||||
#
|
||||
|
||||
# We support a subset of the AutoGen definitions file syntax. Specifically,
|
||||
# compound names are disallowed; some preprocessing directives are
|
||||
# disallowed (though #if/#endif are allowed; note that, like AutoGen, #if
|
||||
# skips everything to the next #endif regardless of the value of the
|
||||
# conditional); and shell-generated strings, Scheme-generated strings, and
|
||||
# here strings are disallowed.
|
||||
|
||||
class AutogenToken:
|
||||
(autogen, definitions, eof, var_name, other_name, string, number,
|
||||
semicolon, equals, comma, lbrace, rbrace, lbracket, rbracket) = range(14)
|
||||
|
||||
class AutogenState:
|
||||
(init, need_def, need_tpl, need_semi, need_name, have_name, need_value,
|
||||
need_idx, need_rbracket, indx_name, have_value, done) = range(12)
|
||||
|
||||
class AutogenParseError(Exception):
|
||||
def __init__(self, message, path, line):
|
||||
super(AutogenParseError, self).__init__(message)
|
||||
self.path = path
|
||||
self.line = line
|
||||
|
||||
def __str__(self):
|
||||
return (
|
||||
super(AutogenParseError, self).__str__() +
|
||||
" at file %s line %d" % (self.path, self.line))
|
||||
|
||||
class AutogenDefinition(list):
|
||||
def __getitem__(self, key):
|
||||
try:
|
||||
return super(AutogenDefinition, self).__getitem__(key)
|
||||
except TypeError:
|
||||
for name, value in self:
|
||||
if name == key:
|
||||
return value
|
||||
|
||||
def __contains__(self, key):
|
||||
for name, value in self:
|
||||
if name == key:
|
||||
return True
|
||||
return False
|
||||
|
||||
def get(self, key, default):
|
||||
for name, value in self:
|
||||
if name == key:
|
||||
return value
|
||||
else:
|
||||
return default
|
||||
|
||||
def find_all(self, key):
|
||||
for name, value in self:
|
||||
if name == key:
|
||||
yield value
|
||||
|
||||
class AutogenParser:
|
||||
def __init__(self):
|
||||
self.definitions = AutogenDefinition()
|
||||
self.def_stack = [("", self.definitions)]
|
||||
self.curdef = None
|
||||
self.new_name = None
|
||||
self.cur_path = None
|
||||
self.cur_line = 0
|
||||
|
||||
@staticmethod
|
||||
def is_unquotable_char(c):
|
||||
return (ord(c) in range(ord("!"), ord("~") + 1) and
|
||||
c not in "#,;<=>[\\]`{}?*'\"()")
|
||||
|
||||
@staticmethod
|
||||
def is_value_name_char(c):
|
||||
return c in ":^-_" or c.isalnum()
|
||||
|
||||
def error(self, message):
|
||||
raise AutogenParseError(message, self.cur_file, self.cur_line)
|
||||
|
||||
def read_tokens(self, f):
|
||||
data = f.read()
|
||||
end = len(data)
|
||||
offset = 0
|
||||
while offset < end:
|
||||
while offset < end and data[offset].isspace():
|
||||
if data[offset] == "\n":
|
||||
self.cur_line += 1
|
||||
offset += 1
|
||||
if offset >= end:
|
||||
break
|
||||
c = data[offset]
|
||||
if c == "#":
|
||||
offset += 1
|
||||
try:
|
||||
end_directive = data.index("\n", offset)
|
||||
directive = data[offset:end_directive]
|
||||
offset = end_directive
|
||||
except ValueError:
|
||||
directive = data[offset:]
|
||||
offset = end
|
||||
name, value = directive.split(None, 1)
|
||||
if name == "if":
|
||||
try:
|
||||
end_if = data.index("\n#endif", offset)
|
||||
new_offset = end_if + len("\n#endif")
|
||||
self.cur_line += data[offset:new_offset].count("\n")
|
||||
offset = new_offset
|
||||
except ValueError:
|
||||
self.error("#if without matching #endif")
|
||||
else:
|
||||
self.error("Unhandled directive '#%s'" % name)
|
||||
elif c == "{":
|
||||
yield AutogenToken.lbrace, c
|
||||
offset += 1
|
||||
elif c == "=":
|
||||
yield AutogenToken.equals, c
|
||||
offset += 1
|
||||
elif c == "}":
|
||||
yield AutogenToken.rbrace, c
|
||||
offset += 1
|
||||
elif c == "[":
|
||||
yield AutogenToken.lbracket, c
|
||||
offset += 1
|
||||
elif c == "]":
|
||||
yield AutogenToken.rbracket, c
|
||||
offset += 1
|
||||
elif c == ";":
|
||||
yield AutogenToken.semicolon, c
|
||||
offset += 1
|
||||
elif c == ",":
|
||||
yield AutogenToken.comma, c
|
||||
offset += 1
|
||||
elif c in ("'", '"'):
|
||||
s = []
|
||||
while True:
|
||||
offset += 1
|
||||
if offset >= end:
|
||||
self.error("EOF in quoted string")
|
||||
if data[offset] == "\n":
|
||||
self.cur_line += 1
|
||||
if data[offset] == "\\":
|
||||
offset += 1
|
||||
if offset >= end:
|
||||
self.error("EOF in quoted string")
|
||||
if data[offset] == "\n":
|
||||
self.cur_line += 1
|
||||
# Proper escaping unimplemented; this can be filled
|
||||
# out if needed.
|
||||
s.append("\\")
|
||||
s.append(data[offset])
|
||||
elif data[offset] == c:
|
||||
offset += 1
|
||||
break
|
||||
else:
|
||||
s.append(data[offset])
|
||||
yield AutogenToken.string, "".join(s)
|
||||
elif c == "/":
|
||||
offset += 1
|
||||
if data[offset] == "*":
|
||||
offset += 1
|
||||
try:
|
||||
end_comment = data.index("*/", offset)
|
||||
new_offset = end_comment + len("*/")
|
||||
self.cur_line += data[offset:new_offset].count("\n")
|
||||
offset = new_offset
|
||||
except ValueError:
|
||||
self.error("/* without matching */")
|
||||
elif data[offset] == "/":
|
||||
try:
|
||||
offset = data.index("\n", offset)
|
||||
except ValueError:
|
||||
pass
|
||||
elif (c.isdigit() or
|
||||
(c == "-" and offset < end - 1 and
|
||||
data[offset + 1].isdigit())):
|
||||
end_number = offset + 1
|
||||
while end_number < end and data[end_number].isdigit():
|
||||
end_number += 1
|
||||
yield AutogenToken.number, data[offset:end_number]
|
||||
offset = end_number
|
||||
elif self.is_unquotable_char(c):
|
||||
end_name = offset
|
||||
while (end_name < end and
|
||||
self.is_value_name_char(data[end_name])):
|
||||
end_name += 1
|
||||
if end_name < end and self.is_unquotable_char(data[end_name]):
|
||||
while (end_name < end and
|
||||
self.is_unquotable_char(data[end_name])):
|
||||
end_name += 1
|
||||
yield AutogenToken.other_name, data[offset:end_name]
|
||||
offset = end_name
|
||||
else:
|
||||
s = data[offset:end_name]
|
||||
if s.lower() == "autogen":
|
||||
yield AutogenToken.autogen, s
|
||||
elif s.lower() == "definitions":
|
||||
yield AutogenToken.definitions, s
|
||||
else:
|
||||
yield AutogenToken.var_name, s
|
||||
offset = end_name
|
||||
else:
|
||||
self.error("Invalid input character '%s'" % c)
|
||||
yield AutogenToken.eof, None
|
||||
|
||||
def do_need_name_end(self, token):
|
||||
if len(self.def_stack) > 1:
|
||||
self.error("Definition blocks were left open")
|
||||
|
||||
def do_need_name_var_name(self, token):
|
||||
self.new_name = token
|
||||
|
||||
def do_end_block(self, token):
|
||||
if len(self.def_stack) <= 1:
|
||||
self.error("Too many close braces")
|
||||
new_name, parent_def = self.def_stack.pop()
|
||||
parent_def.append((new_name, self.curdef))
|
||||
self.curdef = parent_def
|
||||
|
||||
def do_empty_val(self, token):
|
||||
self.curdef.append((self.new_name, ""))
|
||||
|
||||
def do_str_value(self, token):
|
||||
self.curdef.append((self.new_name, token))
|
||||
|
||||
def do_start_block(self, token):
|
||||
self.def_stack.append((self.new_name, self.curdef))
|
||||
self.curdef = AutogenDefinition()
|
||||
|
||||
def do_indexed_name(self, token):
|
||||
self.new_name = token
|
||||
|
||||
def read_definitions_file(self, f):
|
||||
self.curdef = self.definitions
|
||||
self.cur_line = 0
|
||||
state = AutogenState.init
|
||||
|
||||
# The following transition table was reduced from the Autogen
|
||||
# documentation:
|
||||
# info -f autogen -n 'Full Syntax'
|
||||
transitions = {
|
||||
AutogenState.init: {
|
||||
AutogenToken.autogen: (AutogenState.need_def, None),
|
||||
},
|
||||
AutogenState.need_def: {
|
||||
AutogenToken.definitions: (AutogenState.need_tpl, None),
|
||||
},
|
||||
AutogenState.need_tpl: {
|
||||
AutogenToken.var_name: (AutogenState.need_semi, None),
|
||||
AutogenToken.other_name: (AutogenState.need_semi, None),
|
||||
AutogenToken.string: (AutogenState.need_semi, None),
|
||||
},
|
||||
AutogenState.need_semi: {
|
||||
AutogenToken.semicolon: (AutogenState.need_name, None),
|
||||
},
|
||||
AutogenState.need_name: {
|
||||
AutogenToken.autogen: (AutogenState.need_def, None),
|
||||
AutogenToken.eof: (AutogenState.done, self.do_need_name_end),
|
||||
AutogenToken.var_name: (
|
||||
AutogenState.have_name, self.do_need_name_var_name),
|
||||
AutogenToken.rbrace: (
|
||||
AutogenState.have_value, self.do_end_block),
|
||||
},
|
||||
AutogenState.have_name: {
|
||||
AutogenToken.semicolon: (
|
||||
AutogenState.need_name, self.do_empty_val),
|
||||
AutogenToken.equals: (AutogenState.need_value, None),
|
||||
AutogenToken.lbracket: (AutogenState.need_idx, None),
|
||||
},
|
||||
AutogenState.need_value: {
|
||||
AutogenToken.var_name: (
|
||||
AutogenState.have_value, self.do_str_value),
|
||||
AutogenToken.other_name: (
|
||||
AutogenState.have_value, self.do_str_value),
|
||||
AutogenToken.string: (
|
||||
AutogenState.have_value, self.do_str_value),
|
||||
AutogenToken.number: (
|
||||
AutogenState.have_value, self.do_str_value),
|
||||
AutogenToken.lbrace: (
|
||||
AutogenState.need_name, self.do_start_block),
|
||||
},
|
||||
AutogenState.need_idx: {
|
||||
AutogenToken.var_name: (
|
||||
AutogenState.need_rbracket, self.do_indexed_name),
|
||||
AutogenToken.number: (
|
||||
AutogenState.need_rbracket, self.do_indexed_name),
|
||||
},
|
||||
AutogenState.need_rbracket: {
|
||||
AutogenToken.rbracket: (AutogenState.indx_name, None),
|
||||
},
|
||||
AutogenState.indx_name: {
|
||||
AutogenToken.semicolon: (
|
||||
AutogenState.need_name, self.do_empty_val),
|
||||
AutogenToken.equals: (AutogenState.need_value, None),
|
||||
},
|
||||
AutogenState.have_value: {
|
||||
AutogenToken.semicolon: (AutogenState.need_name, None),
|
||||
AutogenToken.comma: (AutogenState.need_value, None),
|
||||
},
|
||||
}
|
||||
|
||||
for code, token in self.read_tokens(f):
|
||||
if code in transitions[state]:
|
||||
state, handler = transitions[state][code]
|
||||
if handler is not None:
|
||||
handler(token)
|
||||
else:
|
||||
self.error(
|
||||
"Parse error in state %s: unexpected token '%s'" % (
|
||||
state, token))
|
||||
if state == AutogenState.done:
|
||||
break
|
||||
|
||||
def read_definitions(self, path):
|
||||
self.cur_file = path
|
||||
with open(path) as f:
|
||||
self.read_definitions_file(f)
|
||||
|
||||
defparser = AutogenParser()
|
||||
|
||||
#
|
||||
# Output
|
||||
#
|
||||
|
||||
outputs = {}
|
||||
|
||||
def output(s, section=''):
|
||||
if s == "":
|
||||
return
|
||||
outputs.setdefault(section, [])
|
||||
outputs[section].append(s)
|
||||
|
||||
def write_output(section=''):
|
||||
for s in outputs.get(section, []):
|
||||
print(s, end='')
|
||||
|
||||
#
|
||||
# Global variables
|
||||
#
|
||||
|
||||
def gvar_add(var, value):
|
||||
output(var + " += " + value + "\n")
|
||||
|
||||
#
|
||||
# Per PROGRAM/SCRIPT variables
|
||||
#
|
||||
|
||||
seen_vars = set()
|
||||
|
||||
def vars_init(defn, *var_list):
|
||||
name = defn['name']
|
||||
|
||||
if name not in seen_target and name not in seen_vars:
|
||||
for var in var_list:
|
||||
output(var + " = \n", section='decl')
|
||||
seen_vars.add(name)
|
||||
|
||||
def var_set(var, value):
|
||||
output(var + " = " + value + "\n")
|
||||
|
||||
def var_add(var, value):
|
||||
output(var + " += " + value + "\n")
|
||||
|
||||
#
|
||||
# Variable names and rules
|
||||
#
|
||||
|
||||
canonical_name_re = re.compile(r'[^0-9A-Za-z@_]')
|
||||
canonical_name_suffix = ""
|
||||
|
||||
def set_canonical_name_suffix(suffix):
|
||||
global canonical_name_suffix
|
||||
canonical_name_suffix = suffix
|
||||
|
||||
def cname(defn):
|
||||
return canonical_name_re.sub('_', defn['name'] + canonical_name_suffix)
|
||||
|
||||
def rule(target, source, cmd):
|
||||
if cmd[0] == "\n":
|
||||
output("\n" + target + ": " + source + cmd.replace("\n", "\n\t") + "\n")
|
||||
else:
|
||||
output("\n" + target + ": " + source + "\n\t" + cmd.replace("\n", "\n\t") + "\n")
|
||||
|
||||
#
|
||||
# Handle keys with platform names as values, for example:
|
||||
#
|
||||
# kernel = {
|
||||
# nostrip = emu;
|
||||
# ...
|
||||
# }
|
||||
#
|
||||
def platform_tagged(defn, platform, tag):
|
||||
for value in defn.find_all(tag):
|
||||
for group in RMAP[platform]:
|
||||
if value == group:
|
||||
return True
|
||||
return False
|
||||
|
||||
def if_platform_tagged(defn, platform, tag, snippet_if, snippet_else=None):
|
||||
if platform_tagged(defn, platform, tag):
|
||||
return snippet_if
|
||||
elif snippet_else is not None:
|
||||
return snippet_else
|
||||
|
||||
#
|
||||
# Handle tagged values
|
||||
#
|
||||
# module = {
|
||||
# extra_dist = ...
|
||||
# extra_dist = ...
|
||||
# ...
|
||||
# };
|
||||
#
|
||||
def foreach_value(defn, tag, closure):
|
||||
r = []
|
||||
for value in defn.find_all(tag):
|
||||
r.append(closure(value))
|
||||
return ''.join(r)
|
||||
|
||||
#
|
||||
# Handle best matched values for a platform, for example:
|
||||
#
|
||||
# module = {
|
||||
# cflags = '-Wall';
|
||||
# emu_cflags = '-Wall -DGRUB_EMU=1';
|
||||
# ...
|
||||
# }
|
||||
#
|
||||
def foreach_platform_specific_value(defn, platform, suffix, nonetag, closure):
|
||||
r = []
|
||||
for group in RMAP[platform]:
|
||||
values = list(defn.find_all(group + suffix))
|
||||
if values:
|
||||
for value in values:
|
||||
r.append(closure(value))
|
||||
break
|
||||
else:
|
||||
for value in defn.find_all(nonetag):
|
||||
r.append(closure(value))
|
||||
return ''.join(r)
|
||||
|
||||
#
|
||||
# Handle values from sum of all groups for a platform, for example:
|
||||
#
|
||||
# module = {
|
||||
# common = kern/misc.c;
|
||||
# emu = kern/emu/misc.c;
|
||||
# ...
|
||||
# }
|
||||
#
|
||||
def foreach_platform_value(defn, platform, suffix, closure):
|
||||
r = []
|
||||
for group in RMAP[platform]:
|
||||
for value in defn.find_all(group + suffix):
|
||||
r.append(closure(value))
|
||||
r.sort()
|
||||
return ''.join(r)
|
||||
|
||||
def platform_conditional(platform, closure):
|
||||
output("\nif COND_" + platform + "\n")
|
||||
closure(platform)
|
||||
output("endif\n")
|
||||
|
||||
#
|
||||
# Handle guarding with platform-specific "enable" keys, for example:
|
||||
#
|
||||
# module = {
|
||||
# name = pci;
|
||||
# noemu = bus/pci.c;
|
||||
# emu = bus/emu/pci.c;
|
||||
# emu = commands/lspci.c;
|
||||
#
|
||||
# enable = emu;
|
||||
# enable = i386_pc;
|
||||
# enable = x86_efi;
|
||||
# enable = i386_ieee1275;
|
||||
# enable = i386_coreboot;
|
||||
# };
|
||||
#
|
||||
def foreach_enabled_platform(defn, closure):
|
||||
if 'enable' in defn:
|
||||
for platform in GRUB_PLATFORMS:
|
||||
if platform_tagged(defn, platform, "enable"):
|
||||
platform_conditional(platform, closure)
|
||||
else:
|
||||
for platform in GRUB_PLATFORMS:
|
||||
platform_conditional(platform, closure)
|
||||
|
||||
#
|
||||
# Handle guarding with platform-specific automake conditionals, for example:
|
||||
#
|
||||
# module = {
|
||||
# name = usb;
|
||||
# common = bus/usb/usb.c;
|
||||
# noemu = bus/usb/usbtrans.c;
|
||||
# noemu = bus/usb/usbhub.c;
|
||||
# enable = emu;
|
||||
# enable = i386;
|
||||
# enable = mips_loongson;
|
||||
# emu_condition = COND_GRUB_EMU_SDL;
|
||||
# };
|
||||
#
|
||||
def under_platform_specific_conditionals(defn, platform, closure):
|
||||
output(foreach_platform_specific_value(defn, platform, "_condition", "condition", lambda cond: "if " + cond + "\n"))
|
||||
closure(defn, platform)
|
||||
output(foreach_platform_specific_value(defn, platform, "_condition", "condition", lambda cond: "endif " + cond + "\n"))
|
||||
|
||||
def platform_specific_values(defn, platform, suffix, nonetag):
|
||||
return foreach_platform_specific_value(defn, platform, suffix, nonetag,
|
||||
lambda value: value + " ")
|
||||
|
||||
def platform_values(defn, platform, suffix):
|
||||
return foreach_platform_value(defn, platform, suffix, lambda value: value + " ")
|
||||
|
||||
def extra_dist(defn):
|
||||
return foreach_value(defn, "extra_dist", lambda value: value + " ")
|
||||
|
||||
def extra_dep(defn):
|
||||
return foreach_value(defn, "depends", lambda value: value + " ")
|
||||
|
||||
def platform_sources(defn, p): return platform_values(defn, p, "_head") + platform_values(defn, p, "")
|
||||
def platform_nodist_sources(defn, p): return platform_values(defn, p, "_nodist")
|
||||
|
||||
def platform_startup(defn, p): return platform_specific_values(defn, p, "_startup", "startup")
|
||||
def platform_ldadd(defn, p): return platform_specific_values(defn, p, "_ldadd", "ldadd")
|
||||
def platform_dependencies(defn, p): return platform_specific_values(defn, p, "_dependencies", "dependencies")
|
||||
def platform_cflags(defn, p): return platform_specific_values(defn, p, "_cflags", "cflags")
|
||||
def platform_ldflags(defn, p): return platform_specific_values(defn, p, "_ldflags", "ldflags")
|
||||
def platform_cppflags(defn, p): return platform_specific_values(defn, p, "_cppflags", "cppflags")
|
||||
def platform_ccasflags(defn, p): return platform_specific_values(defn, p, "_ccasflags", "ccasflags")
|
||||
def platform_stripflags(defn, p): return platform_specific_values(defn, p, "_stripflags", "stripflags")
|
||||
def platform_objcopyflags(defn, p): return platform_specific_values(defn, p, "_objcopyflags", "objcopyflags")
|
||||
|
||||
#
|
||||
# Emit snippet only the first time through for the current name.
|
||||
#
|
||||
seen_target = set()
|
||||
|
||||
def first_time(defn, snippet):
|
||||
if defn['name'] not in seen_target:
|
||||
return snippet
|
||||
return ''
|
||||
|
||||
def is_platform_independent(defn):
|
||||
if 'enable' in defn:
|
||||
return False
|
||||
for suffix in [ "", "_head", "_nodist" ]:
|
||||
template = platform_values(defn, GRUB_PLATFORMS[0], suffix)
|
||||
for platform in GRUB_PLATFORMS[1:]:
|
||||
if template != platform_values(defn, platform, suffix):
|
||||
return False
|
||||
|
||||
for suffix in [ "startup", "ldadd", "dependencies", "cflags", "ldflags", "cppflags", "ccasflags", "stripflags", "objcopyflags", "condition" ]:
|
||||
template = platform_specific_values(defn, GRUB_PLATFORMS[0], "_" + suffix, suffix)
|
||||
for platform in GRUB_PLATFORMS[1:]:
|
||||
if template != platform_specific_values(defn, platform, "_" + suffix, suffix):
|
||||
return False
|
||||
for tag in [ "nostrip" ]:
|
||||
template = platform_tagged(defn, GRUB_PLATFORMS[0], tag)
|
||||
for platform in GRUB_PLATFORMS[1:]:
|
||||
if template != platform_tagged(defn, platform, tag):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def module(defn, platform):
|
||||
name = defn['name']
|
||||
set_canonical_name_suffix(".module")
|
||||
|
||||
gvar_add("platform_PROGRAMS", name + ".module")
|
||||
gvar_add("MODULE_FILES", name + ".module$(EXEEXT)")
|
||||
|
||||
var_set(cname(defn) + "_SOURCES", platform_sources(defn, platform) + " ## platform sources")
|
||||
var_set("nodist_" + cname(defn) + "_SOURCES", platform_nodist_sources(defn, platform) + " ## platform nodist sources")
|
||||
var_set(cname(defn) + "_LDADD", platform_ldadd(defn, platform))
|
||||
var_set(cname(defn) + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_MODULE) " + platform_cflags(defn, platform))
|
||||
var_set(cname(defn) + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_MODULE) " + platform_ldflags(defn, platform))
|
||||
var_set(cname(defn) + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_MODULE) " + platform_cppflags(defn, platform))
|
||||
var_set(cname(defn) + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_MODULE) " + platform_ccasflags(defn, platform))
|
||||
var_set(cname(defn) + "_DEPENDENCIES", "$(TARGET_OBJ2ELF) " + platform_dependencies(defn, platform))
|
||||
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
gvar_add("BUILT_SOURCES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
gvar_add("CLEANFILES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
|
||||
gvar_add("MOD_FILES", name + ".mod")
|
||||
gvar_add("MARKER_FILES", name + ".marker")
|
||||
gvar_add("CLEANFILES", name + ".marker")
|
||||
|
||||
for dep in defn.find_all("depends"):
|
||||
gvar_add("EXTRA_DEPS", "depends " + name + " " + dep + ":")
|
||||
|
||||
output("""
|
||||
""" + name + """.marker: $(""" + cname(defn) + """_SOURCES) $(nodist_""" + cname(defn) + """_SOURCES)
|
||||
$(TARGET_CPP) -DGRUB_LST_GENERATOR $(CPPFLAGS_MARKER) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(""" + cname(defn) + """_CPPFLAGS) $(CPPFLAGS) $^ > $@.new || (rm -f $@; exit 1)
|
||||
grep 'MARKER' $@.new | grep -v '^#' > $@; rm -f $@.new
|
||||
""")
|
||||
|
||||
def kernel(defn, platform):
|
||||
name = defn['name']
|
||||
set_canonical_name_suffix(".exec")
|
||||
gvar_add("platform_PROGRAMS", name + ".exec")
|
||||
var_set(cname(defn) + "_SOURCES", platform_startup(defn, platform))
|
||||
var_add(cname(defn) + "_SOURCES", platform_sources(defn, platform))
|
||||
var_set("nodist_" + cname(defn) + "_SOURCES", platform_nodist_sources(defn, platform) + " ## platform nodist sources")
|
||||
var_set(cname(defn) + "_LDADD", platform_ldadd(defn, platform))
|
||||
var_set(cname(defn) + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_KERNEL) " + platform_cflags(defn, platform))
|
||||
var_set(cname(defn) + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_KERNEL) " + platform_ldflags(defn, platform))
|
||||
var_set(cname(defn) + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) " + platform_cppflags(defn, platform))
|
||||
var_set(cname(defn) + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_KERNEL) " + platform_ccasflags(defn, platform))
|
||||
var_set(cname(defn) + "_STRIPFLAGS", "$(AM_STRIPFLAGS) $(STRIPFLAGS_KERNEL) " + platform_stripflags(defn, platform))
|
||||
var_set(cname(defn) + "_DEPENDENCIES", "$(TARGET_OBJ2ELF)")
|
||||
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
gvar_add("BUILT_SOURCES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
gvar_add("CLEANFILES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
|
||||
gvar_add("platform_DATA", name + ".img")
|
||||
gvar_add("CLEANFILES", name + ".img")
|
||||
rule(name + ".img", name + ".exec$(EXEEXT)",
|
||||
if_platform_tagged(defn, platform, "nostrip",
|
||||
"""if test x$(TARGET_APPLE_LINKER) = x1; then \
|
||||
$(TARGET_OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -wd1106 -nu -nd $< $@; \
|
||||
elif test ! -z '$(TARGET_OBJ2ELF)'; then \
|
||||
$(TARGET_OBJ2ELF) $< $@ || (rm -f $@; exit 1); \
|
||||
else cp $< $@; fi""",
|
||||
"""if test x$(TARGET_APPLE_LINKER) = x1; then \
|
||||
$(TARGET_STRIP) -S -x $(""" + cname(defn) + """) -o $@.bin $<; \
|
||||
$(TARGET_OBJCONV) -f$(TARGET_MODULE_FORMAT) -nr:_grub_mod_init:grub_mod_init -nr:_grub_mod_fini:grub_mod_fini -ed2022 -ed2016 -wd1106 -nu -nd $@.bin $@; \
|
||||
rm -f $@.bin; \
|
||||
elif test ! -z '$(TARGET_OBJ2ELF)'; then \
|
||||
""" + "$(TARGET_STRIP) $(" + cname(defn) + "_STRIPFLAGS) -o $@.bin $< && \
|
||||
$(TARGET_OBJ2ELF) $@.bin $@ || (rm -f $@; rm -f $@.bin; exit 1); \
|
||||
rm -f $@.bin; \
|
||||
else """ + "$(TARGET_STRIP) $(" + cname(defn) + "_STRIPFLAGS) -o $@ $<; \
|
||||
fi"""))
|
||||
|
||||
def image(defn, platform):
|
||||
name = defn['name']
|
||||
set_canonical_name_suffix(".image")
|
||||
gvar_add("platform_PROGRAMS", name + ".image")
|
||||
var_set(cname(defn) + "_SOURCES", platform_sources(defn, platform))
|
||||
var_set("nodist_" + cname(defn) + "_SOURCES", platform_nodist_sources(defn, platform) + "## platform nodist sources")
|
||||
var_set(cname(defn) + "_LDADD", platform_ldadd(defn, platform))
|
||||
var_set(cname(defn) + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_IMAGE) " + platform_cflags(defn, platform))
|
||||
var_set(cname(defn) + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_IMAGE) " + platform_ldflags(defn, platform))
|
||||
var_set(cname(defn) + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_IMAGE) " + platform_cppflags(defn, platform))
|
||||
var_set(cname(defn) + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_IMAGE) " + platform_ccasflags(defn, platform))
|
||||
var_set(cname(defn) + "_OBJCOPYFLAGS", "$(OBJCOPYFLAGS_IMAGE) " + platform_objcopyflags(defn, platform))
|
||||
# var_set(cname(defn) + "_DEPENDENCIES", platform_dependencies(defn, platform) + " " + platform_ldadd(defn, platform))
|
||||
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
gvar_add("BUILT_SOURCES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
gvar_add("CLEANFILES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
|
||||
gvar_add("platform_DATA", name + ".img")
|
||||
gvar_add("CLEANFILES", name + ".img")
|
||||
rule(name + ".img", name + ".image$(EXEEXT)", """
|
||||
if test x$(TARGET_APPLE_LINKER) = x1; then \
|
||||
$(MACHO2IMG) $< $@; \
|
||||
else \
|
||||
$(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx -R .interp $< $@; \
|
||||
fi
|
||||
""")
|
||||
|
||||
def library(defn, platform):
|
||||
name = defn['name']
|
||||
set_canonical_name_suffix("")
|
||||
|
||||
vars_init(defn,
|
||||
cname(defn) + "_SOURCES",
|
||||
"nodist_" + cname(defn) + "_SOURCES",
|
||||
cname(defn) + "_CFLAGS",
|
||||
cname(defn) + "_CPPFLAGS",
|
||||
cname(defn) + "_CCASFLAGS")
|
||||
# cname(defn) + "_DEPENDENCIES")
|
||||
|
||||
if name not in seen_target:
|
||||
gvar_add("noinst_LIBRARIES", name)
|
||||
var_add(cname(defn) + "_SOURCES", platform_sources(defn, platform))
|
||||
var_add("nodist_" + cname(defn) + "_SOURCES", platform_nodist_sources(defn, platform))
|
||||
var_add(cname(defn) + "_CFLAGS", first_time(defn, "$(AM_CFLAGS) $(CFLAGS_LIBRARY) ") + platform_cflags(defn, platform))
|
||||
var_add(cname(defn) + "_CPPFLAGS", first_time(defn, "$(AM_CPPFLAGS) $(CPPFLAGS_LIBRARY) ") + platform_cppflags(defn, platform))
|
||||
var_add(cname(defn) + "_CCASFLAGS", first_time(defn, "$(AM_CCASFLAGS) $(CCASFLAGS_LIBRARY) ") + platform_ccasflags(defn, platform))
|
||||
# var_add(cname(defn) + "_DEPENDENCIES", platform_dependencies(defn, platform) + " " + platform_ldadd(defn, platform))
|
||||
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
if name not in seen_target:
|
||||
gvar_add("BUILT_SOURCES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
gvar_add("CLEANFILES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
|
||||
def installdir(defn, default="bin"):
|
||||
return defn.get('installdir', default)
|
||||
|
||||
def manpage(defn, adddeps):
|
||||
name = defn['name']
|
||||
mansection = defn['mansection']
|
||||
|
||||
output("if COND_MAN_PAGES\n")
|
||||
gvar_add("man_MANS", name + "." + mansection)
|
||||
rule(name + "." + mansection, name + " " + adddeps, """
|
||||
chmod a+x """ + name + """
|
||||
PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=""" + mansection + """ -i $(top_srcdir)/docs/man/""" + name + """.h2m -o $@ """ + name + """
|
||||
""")
|
||||
gvar_add("CLEANFILES", name + "." + mansection)
|
||||
output("endif\n")
|
||||
|
||||
def program(defn, platform, test=False):
|
||||
name = defn['name']
|
||||
set_canonical_name_suffix("")
|
||||
|
||||
if 'testcase' in defn:
|
||||
gvar_add("check_PROGRAMS_" + defn['testcase'], name)
|
||||
else:
|
||||
var_add(installdir(defn) + "_PROGRAMS", name)
|
||||
if 'mansection' in defn:
|
||||
manpage(defn, "")
|
||||
|
||||
var_set(cname(defn) + "_SOURCES", platform_sources(defn, platform))
|
||||
var_set("nodist_" + cname(defn) + "_SOURCES", platform_nodist_sources(defn, platform))
|
||||
var_set(cname(defn) + "_LDADD", platform_ldadd(defn, platform))
|
||||
var_set(cname(defn) + "_CFLAGS", "$(AM_CFLAGS) $(CFLAGS_PROGRAM) " + platform_cflags(defn, platform))
|
||||
var_set(cname(defn) + "_LDFLAGS", "$(AM_LDFLAGS) $(LDFLAGS_PROGRAM) " + platform_ldflags(defn, platform))
|
||||
var_set(cname(defn) + "_CPPFLAGS", "$(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM) " + platform_cppflags(defn, platform))
|
||||
var_set(cname(defn) + "_CCASFLAGS", "$(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM) " + platform_ccasflags(defn, platform))
|
||||
# var_set(cname(defn) + "_DEPENDENCIES", platform_dependencies(defn, platform) + " " + platform_ldadd(defn, platform))
|
||||
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
gvar_add("BUILT_SOURCES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
gvar_add("CLEANFILES", "$(nodist_" + cname(defn) + "_SOURCES)")
|
||||
|
||||
def data(defn, platform):
|
||||
var_add("dist_" + installdir(defn) + "_DATA", platform_sources(defn, platform))
|
||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
||||
|
||||
def transform_data(defn, platform):
|
||||
name = defn['name']
|
||||
|
||||
var_add(installdir(defn) + "_DATA", name)
|
||||
|
||||
rule(name, "$(top_builddir)/config.status " + platform_sources(defn, platform) + platform_dependencies(defn, platform), """
|
||||
(for x in """ + platform_sources(defn, platform) + """; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:-
|
||||
chmod a+x """ + name + """
|
||||
""")
|
||||
|
||||
gvar_add("CLEANFILES", name)
|
||||
gvar_add("EXTRA_DIST", extra_dist(defn))
|
||||
gvar_add("dist_noinst_DATA", platform_sources(defn, platform))
|
||||
|
||||
def script(defn, platform):
|
||||
name = defn['name']
|
||||
|
||||
if 'testcase' in defn:
|
||||
gvar_add("check_SCRIPTS_" + defn['testcase'], name)
|
||||
else:
|
||||
var_add(installdir(defn) + "_SCRIPTS", name)
|
||||
if 'mansection' in defn:
|
||||
manpage(defn, "grub-mkconfig_lib")
|
||||
|
||||
rule(name, "$(top_builddir)/config.status " + platform_sources(defn, platform) + platform_dependencies(defn, platform), """
|
||||
(for x in """ + platform_sources(defn, platform) + """; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:-
|
||||
chmod a+x """ + name + """
|
||||
""")
|
||||
|
||||
gvar_add("CLEANFILES", name)
|
||||
gvar_add("EXTRA_DIST", extra_dist(defn))
|
||||
gvar_add("dist_noinst_DATA", platform_sources(defn, platform))
|
||||
|
||||
def rules(target, closure):
|
||||
seen_target.clear()
|
||||
seen_vars.clear()
|
||||
|
||||
for defn in defparser.definitions.find_all(target):
|
||||
if is_platform_independent(defn):
|
||||
under_platform_specific_conditionals(defn, GRUB_PLATFORMS[0], closure)
|
||||
else:
|
||||
foreach_enabled_platform(
|
||||
defn,
|
||||
lambda p: under_platform_specific_conditionals(defn, p, closure))
|
||||
# Remember that we've seen this target.
|
||||
seen_target.add(defn['name'])
|
||||
|
||||
parser = OptionParser(usage="%prog DEFINITION-FILES")
|
||||
_, args = parser.parse_args()
|
||||
|
||||
for arg in args:
|
||||
defparser.read_definitions(arg)
|
||||
|
||||
rules("module", module)
|
||||
rules("kernel", kernel)
|
||||
rules("image", image)
|
||||
rules("library", library)
|
||||
rules("program", program)
|
||||
rules("script", script)
|
||||
rules("data", data)
|
||||
rules("transform_data", transform_data)
|
||||
|
||||
write_output(section='decl')
|
||||
write_output()
|
||||
@@ -1,524 +0,0 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
|
||||
|
||||
DEPDIR=.deps-core
|
||||
|
||||
include $(top_srcdir)/conf/Makefile.common
|
||||
|
||||
CC=$(TARGET_CC)
|
||||
CPP=$(TARGET_CC)
|
||||
CCAS=$(TARGET_CC)
|
||||
RANLIB=$(TARGET_RANLIB)
|
||||
STRIP=$(TARGET_STRIP)
|
||||
|
||||
MACHO2IMG=$(top_builddir)/grub-macho2img
|
||||
|
||||
AM_CFLAGS = $(TARGET_CFLAGS)
|
||||
AM_LDFLAGS = $(TARGET_LDFLAGS)
|
||||
AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
|
||||
AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
|
||||
|
||||
CFLAGS_PROGRAM += $(CFLAGS_PLATFORM)
|
||||
LDFLAGS_PROGRAM += $(LDFLAGS_PLATFORM)
|
||||
CPPFLAGS_PROGRAM += $(CPPFLAGS_PLATFORM)
|
||||
CCASFLAGS_PROGRAM += $(CCASFLAGS_PLATFORM)
|
||||
|
||||
CFLAGS_LIBRARY += $(CFLAGS_PLATFORM) -fno-builtin
|
||||
CPPFLAGS_LIBRARY += $(CPPFLAGS_PLATFORM)
|
||||
CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
|
||||
|
||||
build-grub-pep2elf$(BUILD_EXEEXT): $(top_srcdir)/util/grub-pe2elf.c $(top_srcdir)/grub-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_BUILD=1 -DGRUB_TARGET_WORDSIZE=64 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-pep2elf\" $^
|
||||
CLEANFILES += build-grub-pep2elf$(BUILD_EXEEXT)
|
||||
|
||||
build-grub-pe2elf$(BUILD_EXEEXT): $(top_srcdir)/util/grub-pe2elf.c $(top_srcdir)/grub-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_BUILD=1 -DGRUB_TARGET_WORDSIZE=32 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-pe2elf\" $^
|
||||
CLEANFILES += build-grub-pe2elf$(BUILD_EXEEXT)
|
||||
|
||||
# gentrigtables
|
||||
gentrigtables$(BUILD_EXEEXT): gentrigtables.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) $< $(BUILD_LIBM)
|
||||
CLEANFILES += gentrigtables$(BUILD_EXEEXT)
|
||||
|
||||
build-grub-module-verifier$(BUILD_EXEEXT): $(top_srcdir)/util/grub-module-verifier.c $(top_srcdir)/util/grub-module-verifier32.c $(top_srcdir)/util/grub-module-verifier64.c $(top_srcdir)/grub-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
|
||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-module-verifier\" $^
|
||||
CLEANFILES += build-grub-module-verifier$(BUILD_EXEEXT)
|
||||
|
||||
# trigtables.c
|
||||
trigtables.c: gentrigtables$(BUILD_EXEEXT) gentrigtables.c $(top_srcdir)/configure.ac
|
||||
./gentrigtables$(BUILD_EXEEXT) > $@
|
||||
CLEANFILES += trigtables.c
|
||||
|
||||
# XXX Use Automake's LEX & YACC support
|
||||
grub_script.tab.h: script/parser.y
|
||||
$(YACC) -d -p grub_script_yy -b grub_script $<
|
||||
grub_script.tab.c: grub_script.tab.h
|
||||
CLEANFILES += grub_script.tab.c grub_script.tab.h
|
||||
|
||||
# For the lexer.
|
||||
grub_script.yy.h: script/yylex.l
|
||||
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $<
|
||||
grub_script.yy.c: grub_script.yy.h
|
||||
|
||||
rs_decoder.h: $(srcdir)/lib/reed_solomon.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
|
||||
|
||||
CLEANFILES += grub_script.yy.c grub_script.yy.h
|
||||
|
||||
include $(srcdir)/Makefile.core.am
|
||||
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/sb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/file.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fs.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i18n.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lockdown.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h
|
||||
if COND_emu
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/compiler-rt-emu.h
|
||||
else
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/compiler-rt.h
|
||||
endif
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/key_protector.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/stack_protector.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/verify.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
|
||||
|
||||
if COND_i386_pc
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
endif
|
||||
|
||||
if COND_i386_xen_pvh
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/xen/hypercall.h
|
||||
endif
|
||||
|
||||
if COND_i386_efi
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pmtimer.h
|
||||
endif
|
||||
|
||||
if COND_i386_coreboot
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/coreboot/lbio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_i386_multiboot
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_i386_qemu
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
endif
|
||||
|
||||
if COND_i386_ieee1275
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/alloc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
endif
|
||||
|
||||
if COND_i386_xen
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/xen/hypercall.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||
endif
|
||||
|
||||
if COND_x86_64_xen
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/x86_64/xen/hypercall.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||
endif
|
||||
|
||||
if COND_x86_64_efi
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pmtimer.h
|
||||
endif
|
||||
|
||||
if COND_ia64_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_mips
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h
|
||||
endif
|
||||
|
||||
if COND_mips_arc
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arc/arc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
endif
|
||||
|
||||
if COND_mips_qemu_mips
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
endif
|
||||
|
||||
if COND_mips_loongson
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/time.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cs5536.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pci.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
endif
|
||||
|
||||
if COND_mips_qemu_mips
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
|
||||
endif
|
||||
|
||||
if COND_powerpc_ieee1275
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/alloc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/powerpc/ieee1275/ieee1275.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/powerpc/ieee1275/platform_keystore.h
|
||||
endif
|
||||
|
||||
if COND_sparc64_ieee1275
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
endif
|
||||
|
||||
if COND_arm_uboot
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/uboot/uboot.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/uboot/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
endif
|
||||
|
||||
if COND_arm_coreboot
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdt.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dma.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/coreboot/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdtbus.h
|
||||
endif
|
||||
|
||||
if COND_arm_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_arm64_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_loongarch64_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_riscv32_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_riscv64_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
|
||||
endif
|
||||
|
||||
if COND_emu
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/exec.h
|
||||
if COND_GRUB_EMU_SDL
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
||||
endif
|
||||
if COND_GRUB_EMU_SDL2
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
|
||||
endif
|
||||
if COND_GRUB_EMU_PCI
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libpciaccess.h
|
||||
endif
|
||||
endif
|
||||
|
||||
symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
|
||||
@list='$^'; \
|
||||
for p in $$list; do \
|
||||
echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
|
||||
done
|
||||
CLEANFILES += symlist.h
|
||||
BUILT_SOURCES += symlist.h
|
||||
|
||||
symlist.c: symlist.h gensymlist.sh
|
||||
$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
|
||||
cat symlist.p | $(SHELL) $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
|
||||
rm -f symlist.p
|
||||
CLEANFILES += symlist.c
|
||||
BUILT_SOURCES += symlist.c
|
||||
|
||||
if COND_HAVE_ASM_USCORE
|
||||
ASM_PREFIX=_
|
||||
else
|
||||
ASM_PREFIX=
|
||||
endif
|
||||
|
||||
noinst_DATA += kernel_syms.lst
|
||||
|
||||
kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
|
||||
$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
|
||||
cat kernel_syms.input | grep -v '^#' | sed -n \
|
||||
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
|
||||
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
|
||||
| sort -u >$@
|
||||
rm -f kernel_syms.input
|
||||
CLEANFILES += kernel_syms.lst
|
||||
|
||||
if COND_emu
|
||||
kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h
|
||||
grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
|
||||
kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
|
||||
grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
|
||||
|
||||
grub_emu_init.h: genemuinitheader.sh $(MODULE_FILES)
|
||||
rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@
|
||||
CLEANFILES += grub_emu_init.h
|
||||
|
||||
grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MODULE_FILES)
|
||||
rm -f $@; echo $(MODULE_FILES) | sh $(srcdir)/genemuinit.sh $(TARGET_NM) > $@
|
||||
CLEANFILES += grub_emu_init.c
|
||||
endif
|
||||
|
||||
# List files
|
||||
|
||||
fs.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
|
||||
echo $$b; \
|
||||
fi; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += fs.lst
|
||||
CLEANFILES += fs.lst
|
||||
|
||||
command.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
sed -n \
|
||||
-e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
|
||||
-e "/EXTCOMMAND_LOCKDOWN_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
|
||||
-e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
|
||||
-e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" \
|
||||
-e "/COMMAND_LOCKDOWN_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += command.lst
|
||||
CLEANFILES += command.lst
|
||||
|
||||
partmap.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
|
||||
echo $$b; \
|
||||
fi; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += partmap.lst
|
||||
CLEANFILES += partmap.lst
|
||||
|
||||
terminal.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
sed -n \
|
||||
-e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
|
||||
-e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += terminal.lst
|
||||
CLEANFILES += terminal.lst
|
||||
|
||||
fdt.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
sed -n \
|
||||
-e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
|
||||
-e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += fdt.lst
|
||||
CLEANFILES += fdt.lst
|
||||
|
||||
parttool.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
sed -n \
|
||||
-e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += parttool.lst
|
||||
CLEANFILES += parttool.lst
|
||||
|
||||
video.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
|
||||
echo $$b; \
|
||||
fi; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += video.lst
|
||||
CLEANFILES += video.lst
|
||||
|
||||
# but, crypto.lst is simply copied
|
||||
crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
|
||||
cp $^ $@
|
||||
platform_DATA += crypto.lst
|
||||
CLEANFILES += crypto.lst
|
||||
|
||||
extra_deps.lst:
|
||||
@echo $(EXTRA_DEPS) | sed "s/\s*:\s*/\n/g" > $@
|
||||
|
||||
syminfo.lst: gensyminfo.sh kernel_syms.lst extra_deps.lst $(MODULE_FILES)
|
||||
cat kernel_syms.lst extra_deps.lst > $@.new
|
||||
for m in $(MODULE_FILES); do \
|
||||
sh $< $$m >> $@.new || exit 1; \
|
||||
done
|
||||
mv $@.new $@
|
||||
|
||||
# generate global module dependencies list
|
||||
moddep.lst: syminfo.lst genmoddep.awk video.lst
|
||||
cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
|
||||
platform_DATA += moddep.lst
|
||||
CLEANFILES += config.log syminfo.lst moddep.lst extra_deps.lst
|
||||
|
||||
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT) build-grub-module-verifier$(BUILD_EXEEXT)
|
||||
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
|
||||
platform_DATA += $(MOD_FILES)
|
||||
platform_DATA += modinfo.sh
|
||||
CLEANFILES += $(MOD_FILES)
|
||||
|
||||
if COND_ENABLE_EFIEMU
|
||||
efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
-rm -f $@.bin
|
||||
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
|
||||
if test "x$(TARGET_APPLE_LINKER)" = x1; then \
|
||||
$(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
|
||||
rm -f $@.bin ; \
|
||||
elif test ! -z "$(TARGET_OBJ2ELF)"; then \
|
||||
$(TARGET_OBJ2ELF) $@.bin || (rm -f $@.bin; exit 1); \
|
||||
mv $@.bin $@ ; \
|
||||
else \
|
||||
mv $@.bin $@ ; \
|
||||
fi
|
||||
|
||||
# Link format -arch,x86_64 means Apple linker
|
||||
efiemu64_c.o: efiemu/runtime/efiemu.c
|
||||
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
|
||||
|
||||
efiemu64_s.o: efiemu/runtime/efiemu.S
|
||||
$(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
|
||||
|
||||
efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
|
||||
-rm -f $@
|
||||
-rm -f $@.bin
|
||||
$(TARGET_CC) -m64 $(EFIEMU64_LINK_FORMAT) -nostdlib -static -Wl,-r -o $@.bin $^
|
||||
if test "x$(EFIEMU64_LINK_FORMAT)" = x-arch,x86_64; then \
|
||||
$(TARGET_OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
|
||||
rm -f $@.bin; \
|
||||
else \
|
||||
mv $@.bin $@ ; \
|
||||
fi
|
||||
|
||||
platform_DATA += efiemu32.o efiemu64.o
|
||||
CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
|
||||
endif
|
||||
|
||||
windowsdir=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows
|
||||
windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
|
||||
test -d $(windowsdir)/$(target_cpu)-$(platform) || mkdir $(windowsdir)/$(target_cpu)-$(platform)
|
||||
for x in $(platform_DATA); do \
|
||||
cp -fp $$x $(windowsdir)/$(target_cpu)-$(platform)/$$x; \
|
||||
done
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/decompressor.h>
|
||||
|
||||
void *
|
||||
grub_memset (void *s, int c, grub_size_t len)
|
||||
{
|
||||
grub_uint8_t *ptr;
|
||||
for (ptr = s; len; ptr++, len--)
|
||||
*ptr = c;
|
||||
return s;
|
||||
}
|
||||
|
||||
void *
|
||||
grub_memmove (void *dest, const void *src, grub_size_t n)
|
||||
{
|
||||
char *d = (char *) dest;
|
||||
const char *s = (const char *) src;
|
||||
|
||||
if (d < s)
|
||||
while (n--)
|
||||
*d++ = *s++;
|
||||
else
|
||||
{
|
||||
d += n;
|
||||
s += n;
|
||||
|
||||
while (n--)
|
||||
*--d = *--s;
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
void *
|
||||
grub_memcpy (void *dest, const void *src, grub_size_t n)
|
||||
{
|
||||
return grub_memmove (dest, src, n);
|
||||
}
|
||||
|
||||
int
|
||||
grub_memcmp (const void *s1, const void *s2, grub_size_t n)
|
||||
{
|
||||
const unsigned char *t1 = s1;
|
||||
const unsigned char *t2 = s2;
|
||||
|
||||
while (n--)
|
||||
{
|
||||
if (*t1 != *t2)
|
||||
return (int) *t1 - (int) *t2;
|
||||
|
||||
t1++;
|
||||
t2++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *grub_decompressor_scratch;
|
||||
|
||||
void
|
||||
find_scratch (void *src, void *dst, unsigned long srcsize,
|
||||
unsigned long dstsize)
|
||||
{
|
||||
#ifdef _mips
|
||||
/* Decoding from ROM. */
|
||||
if (((grub_addr_t) src & 0x10000000))
|
||||
{
|
||||
grub_decompressor_scratch = (void *) ALIGN_UP((grub_addr_t) dst + dstsize,
|
||||
256);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if ((char *) src + srcsize > (char *) dst + dstsize)
|
||||
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) src + srcsize,
|
||||
256);
|
||||
else
|
||||
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) dst + dstsize,
|
||||
256);
|
||||
return;
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/decompressor.h>
|
||||
|
||||
void
|
||||
grub_decompress_core (void *src, void *dest, unsigned long n,
|
||||
unsigned long dstsize __attribute__ ((unused)))
|
||||
{
|
||||
char *d = (char *) dest;
|
||||
const char *s = (const char *) src;
|
||||
|
||||
if (d == s)
|
||||
return;
|
||||
|
||||
if (d < s)
|
||||
while (n--)
|
||||
*d++ = *s++;
|
||||
else
|
||||
{
|
||||
d += n;
|
||||
s += n;
|
||||
|
||||
while (n--)
|
||||
*--d = *--s;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/decompressor.h>
|
||||
|
||||
#include "xz.h"
|
||||
#include "xz_stream.h"
|
||||
|
||||
void
|
||||
grub_decompress_core (void *src, void *dst, unsigned long srcsize,
|
||||
unsigned long dstsize)
|
||||
{
|
||||
struct xz_dec *dec;
|
||||
struct xz_buf buf;
|
||||
|
||||
find_scratch (src, dst, srcsize, dstsize);
|
||||
|
||||
dec = xz_dec_init (GRUB_DECOMPRESSOR_DICT_SIZE);
|
||||
|
||||
buf.in = src;
|
||||
buf.in_pos = 0;
|
||||
buf.in_size = srcsize;
|
||||
buf.out = dst;
|
||||
buf.out_pos = 0;
|
||||
buf.out_size = dstsize;
|
||||
|
||||
while (buf.in_pos != buf.in_size)
|
||||
{
|
||||
enum xz_ret xzret;
|
||||
xzret = xz_dec_run (dec, &buf);
|
||||
switch (xzret)
|
||||
{
|
||||
case XZ_MEMLIMIT_ERROR:
|
||||
case XZ_FORMAT_ERROR:
|
||||
case XZ_OPTIONS_ERROR:
|
||||
case XZ_DATA_ERROR:
|
||||
case XZ_BUF_ERROR:
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
/* -*-Asm-*- */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/machine/boot.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <multiboot.h>
|
||||
|
||||
.file "cdboot.S"
|
||||
|
||||
#define CODE_ADDR 0x6000
|
||||
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
||||
|
||||
#define CDSEC_SHIFT 11
|
||||
#define CDBLK_LENG 16
|
||||
|
||||
.text
|
||||
|
||||
.code16
|
||||
|
||||
.globl start, _start
|
||||
|
||||
start:
|
||||
_start:
|
||||
call LOCAL(next)
|
||||
|
||||
LOCAL(next):
|
||||
jmp 1f
|
||||
|
||||
.org 8
|
||||
|
||||
bi_pvd:
|
||||
.long 0 /* LBA of primary volume descriptor. */
|
||||
bi_file:
|
||||
.long 0 /* LBA of boot file. */
|
||||
bi_length:
|
||||
.long 0 /* Length of boot file. */
|
||||
bi_csum:
|
||||
.long 0 /* Checksum of boot file */
|
||||
bi_reserved:
|
||||
.space (10*4) /* Reserved */
|
||||
|
||||
1:
|
||||
popw %bx
|
||||
|
||||
/* Boot from CDROM. */
|
||||
|
||||
xorw %ax, %ax
|
||||
movw %ax, %ss
|
||||
movw $(CODE_ADDR), %sp
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
|
||||
movw $(0x7C00 + err_noboot_msg - start), %si
|
||||
movl %cs: bi_length - LOCAL(next)(%bx), %ecx
|
||||
orl %ecx, %ecx
|
||||
jz LOCAL(fail)
|
||||
|
||||
addl $((1 << CDSEC_SHIFT) - 1), %ecx
|
||||
shrl $CDSEC_SHIFT, %ecx
|
||||
|
||||
movl %cs: bi_file - LOCAL(next)(%bx), %esi
|
||||
|
||||
call LOCAL(read_cdrom)
|
||||
|
||||
ljmp $(DATA_ADDR >> 4), $0
|
||||
|
||||
/*
|
||||
* Parameters:
|
||||
* esi: start sector
|
||||
* ecx: number of sectors
|
||||
*/
|
||||
LOCAL(read_cdrom):
|
||||
xorl %eax, %eax
|
||||
|
||||
/* Number of blocks to read. */
|
||||
pushw $CDBLK_LENG
|
||||
|
||||
/* Block number. */
|
||||
incl %esi
|
||||
pushl %eax
|
||||
pushl %esi
|
||||
|
||||
/* Buffer address. */
|
||||
pushw $((DATA_ADDR - 0x200)>> 4)
|
||||
pushl %eax
|
||||
pushw $0x10
|
||||
|
||||
xorl %edi, %edi
|
||||
movw %sp, %si
|
||||
|
||||
1:
|
||||
movw 0x10(%si), %di
|
||||
cmpl %ecx, %edi
|
||||
jbe 2f
|
||||
movl %ecx, %edi
|
||||
|
||||
2:
|
||||
mov %di, 2(%si)
|
||||
|
||||
pushl %ecx
|
||||
|
||||
movb $0x42, %ah
|
||||
int $0x13
|
||||
|
||||
jnc 3f
|
||||
|
||||
movb $0x42, %ah /* Try again. */
|
||||
int $0x13
|
||||
|
||||
jnc 3f
|
||||
|
||||
2:
|
||||
shrw $1, %di /* Reduce transfer size. */
|
||||
jz LOCAL(cdrom_fail)
|
||||
movw %di, 0x10(%si)
|
||||
movw %di, 2(%si)
|
||||
movb $0x42, %ah
|
||||
int $0x13
|
||||
jc 2b
|
||||
|
||||
3:
|
||||
|
||||
movw %di, %ax
|
||||
shlw $(CDSEC_SHIFT - 4), %ax
|
||||
addw %ax, 6(%si)
|
||||
addl %edi, 8(%si)
|
||||
|
||||
popl %ecx
|
||||
subl %edi, %ecx
|
||||
jnz 1b
|
||||
|
||||
addw $0x12, %sp
|
||||
ret
|
||||
|
||||
LOCAL(cdrom_fail):
|
||||
movw $(0x7C00 + err_cdfail_msg - start), %si
|
||||
|
||||
LOCAL(fail):
|
||||
movb $0x0e, %ah
|
||||
xorw %bx, %bx
|
||||
1:
|
||||
lodsb (%si), %al
|
||||
int $0x10
|
||||
cmpb $0, %al
|
||||
jne 1b
|
||||
1: jmp 1b
|
||||
|
||||
err_noboot_msg:
|
||||
.ascii "no boot info\0"
|
||||
|
||||
err_cdfail_msg:
|
||||
.ascii "cdrom read fails\0"
|
||||
|
||||
.org 0x7FF
|
||||
|
||||
.byte 0
|
||||
@@ -1,295 +0,0 @@
|
||||
/* -*-Asm-*- */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/machine/boot.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <multiboot.h>
|
||||
|
||||
.file "lnxboot.S"
|
||||
|
||||
#define CODE_ADDR 0x6000
|
||||
#define CODE_SECTORS 1
|
||||
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
||||
|
||||
#define BLCK_LENG 0x4000
|
||||
|
||||
.text
|
||||
|
||||
.code16
|
||||
|
||||
.globl start, _start
|
||||
|
||||
data_start:
|
||||
xorl %ebp, %ebp
|
||||
jmp LOCAL(linux_next)
|
||||
|
||||
.org 0x1F1
|
||||
|
||||
setup_sects:
|
||||
.byte CODE_SECTORS
|
||||
root_flags:
|
||||
.word 0
|
||||
syssize:
|
||||
.word 0
|
||||
swap_dev:
|
||||
.word 0
|
||||
ram_size:
|
||||
.word 0
|
||||
vid_mode:
|
||||
.word 0
|
||||
root_dev:
|
||||
.word 0
|
||||
boot_flag:
|
||||
.word 0xAA55
|
||||
|
||||
start:
|
||||
_start:
|
||||
|
||||
jmp LOCAL(linux_init)
|
||||
|
||||
.ascii "HdrS" /* Header signature. */
|
||||
.word 0x0203 /* Header version number. */
|
||||
|
||||
realmode_swtch:
|
||||
.word 0, 0 /* default_switch, SETUPSEG. */
|
||||
start_sys_seg:
|
||||
.word 0x1000 /* Obsolete. */
|
||||
version_ptr:
|
||||
.word 0 /* Version string ptr. */
|
||||
type_of_loader:
|
||||
.byte 0 /* Filled in by boot loader. */
|
||||
loadflags:
|
||||
.byte 1 /* Please load high. */
|
||||
setup_move_size:
|
||||
.word 0 /* Unused. */
|
||||
code32_start:
|
||||
.long 0x100000 /* 32-bit start address. */
|
||||
ramdisk_image:
|
||||
.long 0 /* Loaded ramdisk image address. */
|
||||
ramdisk_size:
|
||||
.long 0 /* Size of loaded ramdisk. */
|
||||
bootsect_kludge:
|
||||
.word 0, 0
|
||||
heap_end_ptr:
|
||||
.word 0
|
||||
pad1:
|
||||
.word 0
|
||||
cmd_line_ptr:
|
||||
.long 0 /* Command line. */
|
||||
ramdisk_max:
|
||||
.long 0xffffffff /* Highest allowed ramdisk address. */
|
||||
|
||||
gdt:
|
||||
.long 0, 0, 0, 0 /* Must be zero. */
|
||||
.word 0xffff /* 64 K segment size. */
|
||||
gdt_src1:
|
||||
.byte 0, 0 ,0 /* Low 24 bits of source address. */
|
||||
.byte 0x93 /* Access rights. */
|
||||
.byte 0 /* Extended access rights. */
|
||||
gdt_src2:
|
||||
.byte 0 /* High 8 bits of source address. */
|
||||
.word 0xffff /* 64 K segment size. */
|
||||
gdt_dst1:
|
||||
.byte 0, 0, 0 /* Low 24 bits of target address. */
|
||||
.byte 0x93 /* Access rights. */
|
||||
.byte 0 /* Extended access rights. */
|
||||
gdt_dst2:
|
||||
.byte 0 /* High 8 bits of source address. */
|
||||
.long 0, 0, 0, 0 /* More space for the BIOS. */
|
||||
|
||||
reg_edx:
|
||||
.byte 0x80, 0, 0xFF, 0xFF
|
||||
|
||||
data_leng:
|
||||
.long 0
|
||||
|
||||
LOCAL(linux_init):
|
||||
movw %cs:(reg_edx - start), %dx
|
||||
movl %cs:(code32_start - start), %ebp
|
||||
|
||||
LOCAL(linux_next):
|
||||
|
||||
call LOCAL(normalize)
|
||||
|
||||
LOCAL(normalize):
|
||||
popw %bx
|
||||
subw $(LOCAL(normalize) - start), %bx
|
||||
shrw $4, %bx
|
||||
movw %cs, %ax
|
||||
addw %bx, %ax
|
||||
pushw %ax
|
||||
pushw $(real_code - start)
|
||||
lret /* Jump to real_code. */
|
||||
|
||||
real_code:
|
||||
subw $0x20, %ax
|
||||
movw %ax, %ds
|
||||
movw (setup_sects - data_start), %cx
|
||||
shlw $7, %cx
|
||||
|
||||
/* Setup stack. */
|
||||
|
||||
xorw %si, %si
|
||||
movw %si, %ss
|
||||
movw $(CODE_ADDR), %sp
|
||||
|
||||
/* Move itself to 0:CODE_ADDR. */
|
||||
|
||||
cld
|
||||
movw %cs, %ax
|
||||
movw %ax, %ds
|
||||
movw $(CODE_ADDR >> 4), %ax
|
||||
movw %ax, %es
|
||||
movw %si, %di
|
||||
|
||||
rep
|
||||
movsl
|
||||
ljmp $(CODE_ADDR >> 4), $(real_code_2 - start)
|
||||
|
||||
real_code_2:
|
||||
|
||||
xchgl %ebp, %esi
|
||||
orl %esi, %esi
|
||||
jnz 1f
|
||||
movw %ds, %si
|
||||
shll $4, %esi
|
||||
addl %ebp, %esi
|
||||
1:
|
||||
|
||||
pushw %es
|
||||
popw %ds
|
||||
|
||||
movl $0x1000, %ecx
|
||||
addl $0x200, %esi
|
||||
movl $DATA_ADDR, %edi
|
||||
|
||||
call LOCAL(move_memory)
|
||||
|
||||
/* Check for multiboot signature. */
|
||||
movl $DATA_ADDR, %edi
|
||||
3:
|
||||
movl %ss:(%edi), %eax
|
||||
cmpl $MULTIBOOT_HEADER_MAGIC, %eax
|
||||
jz 1f
|
||||
addl $4, %edi
|
||||
cmpl $(DATA_ADDR + 0x1000), %edi
|
||||
jne 3b
|
||||
|
||||
movl (ramdisk_image - start), %esi
|
||||
movl (ramdisk_size - start), %ecx
|
||||
movl $(DATA_ADDR - 0x200), %edi
|
||||
jmp 2f
|
||||
|
||||
1:
|
||||
|
||||
movl $(DATA_ADDR + 0x1000), %edi
|
||||
movl %ss:(DATA_ADDR + GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE), %ecx
|
||||
addl $GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE, %ecx
|
||||
|
||||
2:
|
||||
call LOCAL(move_memory)
|
||||
|
||||
movb %dh, %ss:(DATA_ADDR + GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE + 2)
|
||||
movb (reg_edx + 2 - start), %dh
|
||||
movb %dh, %ss:(DATA_ADDR + GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE + 1)
|
||||
|
||||
movb $0xFF, %dh
|
||||
|
||||
ljmp $(DATA_ADDR >> 4), $0
|
||||
|
||||
/*
|
||||
* Parameters:
|
||||
* esi: source address
|
||||
* edi: target address
|
||||
* ecx: number of bytes
|
||||
*/
|
||||
|
||||
LOCAL(move_memory):
|
||||
incl %ecx
|
||||
andb $0xFE, %cl
|
||||
pushw %dx
|
||||
1:
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
pushl %ecx
|
||||
cmpl $BLCK_LENG, %ecx
|
||||
jbe 2f
|
||||
movl $BLCK_LENG, %ecx
|
||||
2:
|
||||
pushl %ecx
|
||||
|
||||
movl %esi, %eax
|
||||
movw %si, (gdt_src1 - start)
|
||||
shrl $16, %eax
|
||||
movb %al, (gdt_src1 + 2 - start)
|
||||
movb %ah, (gdt_src2 - start)
|
||||
|
||||
movl %edi, %eax
|
||||
movw %di, (gdt_dst1 - start)
|
||||
shrl $16, %eax
|
||||
movb %al, (gdt_dst1 + 2 - start)
|
||||
movb %ah, (gdt_dst2 - start)
|
||||
|
||||
movw $(gdt - start), %si
|
||||
movb $0x87, %ah
|
||||
shrw $1, %cx
|
||||
|
||||
int $0x15
|
||||
|
||||
popl %eax
|
||||
popl %ecx
|
||||
popl %edi
|
||||
popl %esi
|
||||
|
||||
jnc 2f
|
||||
movw $(err_int15_msg - start), %si
|
||||
jmp LOCAL(fail)
|
||||
|
||||
2:
|
||||
|
||||
addl %eax, %esi
|
||||
addl %eax, %edi
|
||||
subl %eax, %ecx
|
||||
jnz 1b
|
||||
|
||||
|
||||
popw %dx
|
||||
ret
|
||||
|
||||
/*
|
||||
* Parameters:
|
||||
* si: message
|
||||
*/
|
||||
|
||||
LOCAL(fail):
|
||||
movb $0x0e, %ah
|
||||
xorw %bx, %bx
|
||||
1:
|
||||
lodsb (%si), %al
|
||||
int $0x10
|
||||
cmpb $0, %al
|
||||
jne 1b
|
||||
1: jmp 1b
|
||||
|
||||
err_int15_msg:
|
||||
.ascii "move memory fails\0"
|
||||
|
||||
.org (CODE_SECTORS * 512 + 512)
|
||||
@@ -1,614 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define FIXED_PROPS
|
||||
|
||||
#define LZMA_BASE_SIZE 1846
|
||||
#define LZMA_LIT_SIZE 768
|
||||
|
||||
#define LZMA_PROPERTIES_SIZE 5
|
||||
|
||||
#define kNumTopBits 24
|
||||
#define kTopValue (1 << kNumTopBits)
|
||||
|
||||
#define kNumBitModelTotalBits 11
|
||||
#define kBitModelTotal (1 << kNumBitModelTotalBits)
|
||||
#define kNumMoveBits 5
|
||||
|
||||
|
||||
#define kNumPosBitsMax 4
|
||||
#define kNumPosStatesMax (1 << kNumPosBitsMax)
|
||||
|
||||
#define kLenNumLowBits 3
|
||||
#define kLenNumLowSymbols (1 << kLenNumLowBits)
|
||||
#define kLenNumMidBits 3
|
||||
#define kLenNumMidSymbols (1 << kLenNumMidBits)
|
||||
#define kLenNumHighBits 8
|
||||
#define kLenNumHighSymbols (1 << kLenNumHighBits)
|
||||
|
||||
#define LenChoice 0
|
||||
#define LenChoice2 (LenChoice + 1)
|
||||
#define LenLow (LenChoice2 + 1)
|
||||
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
|
||||
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
||||
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
||||
|
||||
|
||||
#define kNumStates 12
|
||||
#define kNumLitStates 7
|
||||
|
||||
#define kStartPosModelIndex 4
|
||||
#define kEndPosModelIndex 14
|
||||
#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
|
||||
|
||||
#define kNumPosSlotBits 6
|
||||
#define kNumLenToPosStates 4
|
||||
|
||||
#define kNumAlignBits 4
|
||||
#define kAlignTableSize (1 << kNumAlignBits)
|
||||
|
||||
#define kMatchMinLen 2
|
||||
|
||||
#define IsMatch 0
|
||||
#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
|
||||
#define IsRepG0 (IsRep + kNumStates)
|
||||
#define IsRepG1 (IsRepG0 + kNumStates)
|
||||
#define IsRepG2 (IsRepG1 + kNumStates)
|
||||
#define IsRep0Long (IsRepG2 + kNumStates)
|
||||
#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
|
||||
#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
|
||||
#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
|
||||
#define LenCoder (Align + kAlignTableSize)
|
||||
#define RepLenCoder (LenCoder + kNumLenProbs)
|
||||
#define Literal (RepLenCoder + kNumLenProbs)
|
||||
|
||||
#define out_size 8(%ebp)
|
||||
|
||||
#define now_pos -4(%ebp)
|
||||
#define prev_byte -8(%ebp)
|
||||
#define range -12(%ebp)
|
||||
#define code -16(%ebp)
|
||||
#define state -20(%ebp)
|
||||
#define rep0 -24(%ebp)
|
||||
#define rep1 -28(%ebp)
|
||||
#define rep2 -32(%ebp)
|
||||
#define rep3 -36(%ebp)
|
||||
|
||||
#ifdef FIXED_PROPS
|
||||
|
||||
#define FIXED_LC 3
|
||||
#define FIXED_LP 0
|
||||
#define FIXED_PB 2
|
||||
|
||||
#define POS_STATE_MASK ((1 << (FIXED_PB)) - 1)
|
||||
#define LIT_POS_MASK ((1 << (FIXED_LP)) - 1)
|
||||
|
||||
#define LOCAL_SIZE 36
|
||||
|
||||
#else
|
||||
|
||||
#define lc (%ebx)
|
||||
#define lp 4(%ebx)
|
||||
#define pb 8(%ebx)
|
||||
#define probs 12(%ebx)
|
||||
|
||||
#define pos_state_mask -40(%ebp)
|
||||
#define lit_pos_mask -44(%ebp)
|
||||
|
||||
#define LOCAL_SIZE 44
|
||||
|
||||
#endif
|
||||
|
||||
RangeDecoderBitDecode:
|
||||
#ifdef FIXED_PROPS
|
||||
leal (%ebx, %eax, 4), %eax
|
||||
#else
|
||||
shll $2, %eax
|
||||
addl probs, %eax
|
||||
#endif
|
||||
|
||||
movl %eax, %ecx
|
||||
movl (%ecx), %eax
|
||||
|
||||
movl range, %edx
|
||||
shrl $kNumBitModelTotalBits, %edx
|
||||
mull %edx
|
||||
|
||||
cmpl code, %eax
|
||||
jbe 1f
|
||||
|
||||
movl %eax, range
|
||||
movl $kBitModelTotal, %edx
|
||||
subl (%ecx), %edx
|
||||
shrl $kNumMoveBits, %edx
|
||||
addl %edx, (%ecx)
|
||||
clc
|
||||
3:
|
||||
pushf
|
||||
cmpl $kTopValue, range
|
||||
jnc 2f
|
||||
shll $8, code
|
||||
lodsb
|
||||
movb %al, code
|
||||
shll $8, range
|
||||
2:
|
||||
popf
|
||||
ret
|
||||
1:
|
||||
subl %eax, range
|
||||
subl %eax, code
|
||||
movl (%ecx), %edx
|
||||
shrl $kNumMoveBits, %edx
|
||||
subl %edx, (%ecx)
|
||||
stc
|
||||
jmp 3b
|
||||
|
||||
RangeDecoderBitTreeDecode:
|
||||
RangeDecoderReverseBitTreeDecode:
|
||||
movzbl %cl, %ecx
|
||||
xorl %edx, %edx
|
||||
pushl %edx
|
||||
incl %edx
|
||||
pushl %edx
|
||||
|
||||
1:
|
||||
pushl %eax
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
|
||||
addl %edx, %eax
|
||||
call RangeDecoderBitDecode
|
||||
|
||||
popl %edx
|
||||
popl %ecx
|
||||
|
||||
jnc 2f
|
||||
movl 4(%esp), %eax
|
||||
orl %eax, 8(%esp)
|
||||
stc
|
||||
|
||||
2:
|
||||
adcl %edx, %edx
|
||||
popl %eax
|
||||
|
||||
shll $1, (%esp)
|
||||
loop 1b
|
||||
|
||||
popl %ecx
|
||||
subl %ecx, %edx /* RangeDecoderBitTreeDecode */
|
||||
popl %ecx /* RangeDecoderReverseBitTreeDecode */
|
||||
ret
|
||||
|
||||
LzmaLenDecode:
|
||||
pushl %eax
|
||||
addl $LenChoice, %eax
|
||||
call RangeDecoderBitDecode
|
||||
popl %eax
|
||||
jc 1f
|
||||
pushl $0
|
||||
movb $kLenNumLowBits, %cl
|
||||
addl $LenLow, %eax
|
||||
2:
|
||||
movl 12(%esp), %edx
|
||||
shll %cl, %edx
|
||||
addl %edx, %eax
|
||||
3:
|
||||
|
||||
call RangeDecoderBitTreeDecode
|
||||
popl %eax
|
||||
addl %eax, %edx
|
||||
ret
|
||||
|
||||
1:
|
||||
pushl %eax
|
||||
addl $LenChoice2, %eax
|
||||
call RangeDecoderBitDecode
|
||||
popl %eax
|
||||
jc 1f
|
||||
pushl $kLenNumLowSymbols
|
||||
movb $kLenNumMidBits, %cl
|
||||
addl $LenMid, %eax
|
||||
jmp 2b
|
||||
|
||||
1:
|
||||
pushl $(kLenNumLowSymbols + kLenNumMidSymbols)
|
||||
addl $LenHigh, %eax
|
||||
movb $kLenNumHighBits, %cl
|
||||
jmp 3b
|
||||
|
||||
WriteByte:
|
||||
movb %al, prev_byte
|
||||
stosb
|
||||
incl now_pos
|
||||
ret
|
||||
|
||||
/*
|
||||
* int LzmaDecode(CLzmaDecoderState *vs,
|
||||
* const unsigned char *inStream,
|
||||
* unsigned char *outStream,
|
||||
* SizeT outSize);
|
||||
*/
|
||||
|
||||
_LzmaDecodeA:
|
||||
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
subl $LOCAL_SIZE, %esp
|
||||
|
||||
#ifndef ASM_FILE
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
pushl %ebx
|
||||
|
||||
movl %eax, %ebx
|
||||
movl %edx, %esi
|
||||
pushl %ecx
|
||||
#else
|
||||
pushl %edi
|
||||
#endif
|
||||
|
||||
cld
|
||||
|
||||
#ifdef FIXED_PROPS
|
||||
movl %ebx, %edi
|
||||
movl $(Literal + (LZMA_LIT_SIZE << (FIXED_LC + FIXED_LP))), %ecx
|
||||
#else
|
||||
movl $LZMA_LIT_SIZE, %eax
|
||||
movb lc, %cl
|
||||
addb lp, %cl
|
||||
shll %cl, %eax
|
||||
addl $Literal, %eax
|
||||
movl %eax, %ecx
|
||||
movl probs, %edi
|
||||
#endif
|
||||
|
||||
movl $(kBitModelTotal >> 1), %eax
|
||||
|
||||
rep
|
||||
stosl
|
||||
|
||||
popl %edi
|
||||
|
||||
xorl %eax, %eax
|
||||
movl %eax, now_pos
|
||||
movl %eax, prev_byte
|
||||
movl %eax, state
|
||||
|
||||
incl %eax
|
||||
movl %eax, rep0
|
||||
movl %eax, rep1
|
||||
movl %eax, rep2
|
||||
movl %eax, rep3
|
||||
|
||||
#ifndef FIXED_PROPS
|
||||
movl %eax, %edx
|
||||
movb pb, %cl
|
||||
shll %cl, %edx
|
||||
decl %edx
|
||||
movl %edx, pos_state_mask
|
||||
|
||||
movl %eax, %edx
|
||||
movb lp, %cl
|
||||
shll %cl, %edx
|
||||
decl %edx
|
||||
movl %edx, lit_pos_mask;
|
||||
#endif
|
||||
|
||||
/* RangeDecoderInit */
|
||||
negl %eax
|
||||
movl %eax, range
|
||||
|
||||
incl %eax
|
||||
movb $5, %cl
|
||||
|
||||
1:
|
||||
shll $8, %eax
|
||||
lodsb
|
||||
loop 1b
|
||||
|
||||
movl %eax, code
|
||||
|
||||
lzma_decode_loop:
|
||||
movl now_pos, %eax
|
||||
cmpl out_size, %eax
|
||||
|
||||
jb 1f
|
||||
|
||||
#ifndef ASM_FILE
|
||||
xorl %eax, %eax
|
||||
|
||||
popl %ebx
|
||||
popl %edi
|
||||
popl %esi
|
||||
#endif
|
||||
|
||||
movl %ebp, %esp
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
1:
|
||||
#ifdef FIXED_PROPS
|
||||
andl $POS_STATE_MASK, %eax
|
||||
#else
|
||||
andl pos_state_mask, %eax
|
||||
#endif
|
||||
pushl %eax /* posState */
|
||||
movl state, %edx
|
||||
shll $kNumPosBitsMax, %edx
|
||||
addl %edx, %eax
|
||||
pushl %eax /* (state << kNumPosBitsMax) + posState */
|
||||
|
||||
call RangeDecoderBitDecode
|
||||
jc 1f
|
||||
|
||||
movl now_pos, %eax
|
||||
|
||||
#ifdef FIXED_PROPS
|
||||
andl $LIT_POS_MASK, %eax
|
||||
shll $FIXED_LC, %eax
|
||||
movl prev_byte, %edx
|
||||
shrl $(8 - FIXED_LC), %edx
|
||||
#else
|
||||
andl lit_pos_mask, %eax
|
||||
movb lc, %cl
|
||||
shll %cl, %eax
|
||||
negb %cl
|
||||
addb $8, %cl
|
||||
movl prev_byte, %edx
|
||||
shrl %cl, %edx
|
||||
#endif
|
||||
|
||||
addl %edx, %eax
|
||||
movl $LZMA_LIT_SIZE, %edx
|
||||
mull %edx
|
||||
addl $Literal, %eax
|
||||
pushl %eax
|
||||
|
||||
incl %edx /* edx = 1 */
|
||||
|
||||
movl rep0, %eax
|
||||
negl %eax
|
||||
pushl (%edi, %eax) /* matchByte */
|
||||
|
||||
cmpb $kNumLitStates, state
|
||||
jb 5f
|
||||
|
||||
/* LzmaLiteralDecodeMatch */
|
||||
|
||||
3:
|
||||
cmpl $0x100, %edx
|
||||
jae 4f
|
||||
|
||||
xorl %eax, %eax
|
||||
shlb $1, (%esp)
|
||||
adcl %eax, %eax
|
||||
|
||||
pushl %eax
|
||||
pushl %edx
|
||||
|
||||
shll $8, %eax
|
||||
leal 0x100(%edx, %eax), %eax
|
||||
addl 12(%esp), %eax
|
||||
call RangeDecoderBitDecode
|
||||
|
||||
setc %al
|
||||
popl %edx
|
||||
adcl %edx, %edx
|
||||
|
||||
popl %ecx
|
||||
cmpb %cl, %al
|
||||
jz 3b
|
||||
|
||||
5:
|
||||
|
||||
/* LzmaLiteralDecode */
|
||||
|
||||
cmpl $0x100, %edx
|
||||
jae 4f
|
||||
|
||||
pushl %edx
|
||||
movl %edx, %eax
|
||||
addl 8(%esp), %eax
|
||||
call RangeDecoderBitDecode
|
||||
popl %edx
|
||||
adcl %edx, %edx
|
||||
jmp 5b
|
||||
|
||||
4:
|
||||
addl $16, %esp
|
||||
|
||||
movb %dl, %al
|
||||
call WriteByte
|
||||
|
||||
movb state, %al
|
||||
cmpb $4, %al
|
||||
jae 2f
|
||||
xorb %al, %al
|
||||
jmp 3f
|
||||
2:
|
||||
subb $3, %al
|
||||
cmpb $7, %al
|
||||
jb 3f
|
||||
subb $3, %al
|
||||
3:
|
||||
movb %al, state
|
||||
jmp lzma_decode_loop
|
||||
|
||||
1:
|
||||
movl state, %eax
|
||||
addl $IsRep, %eax
|
||||
call RangeDecoderBitDecode
|
||||
jnc 1f
|
||||
|
||||
movl state, %eax
|
||||
addl $IsRepG0, %eax
|
||||
call RangeDecoderBitDecode
|
||||
jc 10f
|
||||
|
||||
movl (%esp), %eax
|
||||
addl $IsRep0Long, %eax
|
||||
call RangeDecoderBitDecode
|
||||
jc 20f
|
||||
|
||||
cmpb $7, state
|
||||
movb $9, state
|
||||
jb 100f
|
||||
addb $2, state
|
||||
100:
|
||||
|
||||
movl $1, %ecx
|
||||
|
||||
3:
|
||||
movl rep0, %edx
|
||||
negl %edx
|
||||
|
||||
4:
|
||||
movb (%edi, %edx), %al
|
||||
call WriteByte
|
||||
loop 4b
|
||||
|
||||
popl %eax
|
||||
popl %eax
|
||||
jmp lzma_decode_loop
|
||||
|
||||
10:
|
||||
movl state, %eax
|
||||
addl $IsRepG1, %eax
|
||||
call RangeDecoderBitDecode
|
||||
movl rep1, %edx
|
||||
jnc 100f
|
||||
|
||||
movl state, %eax
|
||||
addl $IsRepG2, %eax
|
||||
call RangeDecoderBitDecode
|
||||
movl rep2, %edx
|
||||
jnc 1000f
|
||||
movl rep2, %edx
|
||||
xchgl rep3, %edx
|
||||
1000:
|
||||
pushl rep1
|
||||
popl rep2
|
||||
100:
|
||||
xchg rep0, %edx
|
||||
movl %edx, rep1
|
||||
20:
|
||||
|
||||
movl $RepLenCoder, %eax
|
||||
call LzmaLenDecode
|
||||
|
||||
cmpb $7, state
|
||||
movb $8, state
|
||||
jb 100f
|
||||
addb $3, state
|
||||
100:
|
||||
jmp 2f
|
||||
|
||||
1:
|
||||
movl rep0, %eax
|
||||
xchgl rep1, %eax
|
||||
xchgl rep2, %eax
|
||||
movl %eax, rep3
|
||||
|
||||
cmpb $7, state
|
||||
movb $7, state
|
||||
jb 10f
|
||||
addb $3, state
|
||||
10:
|
||||
|
||||
movl $LenCoder, %eax
|
||||
call LzmaLenDecode
|
||||
pushl %edx
|
||||
|
||||
movl $(kNumLenToPosStates - 1), %eax
|
||||
cmpl %eax, %edx
|
||||
jbe 100f
|
||||
movl %eax, %edx
|
||||
100:
|
||||
movb $kNumPosSlotBits, %cl
|
||||
shll %cl, %edx
|
||||
leal PosSlot(%edx), %eax
|
||||
call RangeDecoderBitTreeDecode
|
||||
|
||||
movl %edx, rep0
|
||||
cmpl $kStartPosModelIndex, %edx
|
||||
jb 100f
|
||||
|
||||
movl %edx, %ecx
|
||||
shrl $1, %ecx
|
||||
decl %ecx
|
||||
|
||||
movzbl %dl, %eax
|
||||
andb $1, %al
|
||||
orb $2, %al
|
||||
shll %cl, %eax
|
||||
movl %eax, rep0
|
||||
|
||||
cmpl $kEndPosModelIndex, %edx
|
||||
jae 200f
|
||||
movl rep0, %eax
|
||||
addl $(SpecPos - 1), %eax
|
||||
subl %edx, %eax
|
||||
jmp 300f
|
||||
200:
|
||||
|
||||
subb $kNumAlignBits, %cl
|
||||
|
||||
/* RangeDecoderDecodeDirectBits */
|
||||
xorl %edx, %edx
|
||||
|
||||
1000:
|
||||
shrl $1, range
|
||||
shll $1, %edx
|
||||
|
||||
movl range, %eax
|
||||
cmpl %eax, code
|
||||
jb 2000f
|
||||
subl %eax, code
|
||||
orb $1, %dl
|
||||
2000:
|
||||
|
||||
cmpl $kTopValue, %eax
|
||||
jae 3000f
|
||||
shll $8, range
|
||||
shll $8, code
|
||||
lodsb
|
||||
movb %al, code
|
||||
|
||||
3000:
|
||||
loop 1000b
|
||||
|
||||
movb $kNumAlignBits, %cl
|
||||
shll %cl, %edx
|
||||
addl %edx, rep0
|
||||
|
||||
movl $Align, %eax
|
||||
|
||||
300:
|
||||
call RangeDecoderReverseBitTreeDecode
|
||||
addl %ecx, rep0
|
||||
|
||||
100:
|
||||
incl rep0
|
||||
popl %edx
|
||||
|
||||
2:
|
||||
|
||||
addl $kMatchMinLen, %edx
|
||||
movl %edx, %ecx
|
||||
|
||||
jmp 3b
|
||||
@@ -1,369 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,2009,2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/offsets.h>
|
||||
#include <grub/machine/boot.h>
|
||||
#include <grub/machine/memory.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
|
||||
#define ABS(x) ((x) - LOCAL (base) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
|
||||
|
||||
.file "startup_raw.S"
|
||||
|
||||
.text
|
||||
|
||||
/* Tell GAS to generate 16-bit instructions so that this code works
|
||||
in real mode. */
|
||||
.code16
|
||||
|
||||
.globl start, _start
|
||||
start:
|
||||
_start:
|
||||
LOCAL (base):
|
||||
/*
|
||||
* Guarantee that "main" is loaded at 0x0:0x8200.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
ljmp $0, $(ABS(LOCAL (codestart)) - 0x10000)
|
||||
#else
|
||||
ljmp $0, $ABS(LOCAL (codestart))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is a special data area.
|
||||
*/
|
||||
|
||||
.org GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE
|
||||
LOCAL(compressed_size):
|
||||
.long 0
|
||||
.org GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_SIZE
|
||||
LOCAL(uncompressed_size):
|
||||
.long 0
|
||||
|
||||
.org GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY
|
||||
reed_solomon_redundancy:
|
||||
.long 0
|
||||
.org GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH
|
||||
.short (LOCAL(reed_solomon_part) - _start)
|
||||
|
||||
/*
|
||||
* This is the area for all of the special variables.
|
||||
*/
|
||||
.org GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE
|
||||
LOCAL(boot_dev):
|
||||
.byte 0xFF, 0xFF, 0xFF
|
||||
LOCAL(boot_drive):
|
||||
.byte 0x00
|
||||
|
||||
/* the real mode code continues... */
|
||||
LOCAL (codestart):
|
||||
cli /* we're not safe here! */
|
||||
|
||||
/* set up %ds, %ss, and %es */
|
||||
xorw %ax, %ax
|
||||
movw %ax, %ds
|
||||
movw %ax, %ss
|
||||
movw %ax, %es
|
||||
|
||||
/* set up the real mode/BIOS stack */
|
||||
movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp
|
||||
movl %ebp, %esp
|
||||
|
||||
sti /* we're safe again */
|
||||
|
||||
/* save the boot drive */
|
||||
movb %dl, LOCAL(boot_drive)
|
||||
|
||||
/* reset disk system (%ah = 0) */
|
||||
int $0x13
|
||||
|
||||
/* transition to protected mode */
|
||||
calll real_to_prot
|
||||
|
||||
/* The ".code32" directive takes GAS out of 16-bit mode. */
|
||||
.code32
|
||||
|
||||
cld
|
||||
call grub_gate_a20
|
||||
|
||||
movl LOCAL(compressed_size), %edx
|
||||
#ifdef __APPLE__
|
||||
addl $decompressor_end, %edx
|
||||
subl $(LOCAL(reed_solomon_part)), %edx
|
||||
#else
|
||||
addl $(LOCAL(decompressor_end) - LOCAL(reed_solomon_part)), %edx
|
||||
#endif
|
||||
movl reed_solomon_redundancy, %ecx
|
||||
leal LOCAL(reed_solomon_part), %eax
|
||||
cld
|
||||
call EXT_C (grub_reed_solomon_recover)
|
||||
jmp post_reed_solomon
|
||||
|
||||
#include "../../../kern/i386/realmode.S"
|
||||
|
||||
/*
|
||||
*
|
||||
* This is a workaround for clang adding a section containing only .addrsig
|
||||
* Since clang itself is unable to assemble this pseudo-opcode, just replace
|
||||
* it with .text
|
||||
*
|
||||
*/
|
||||
#define addrsig text
|
||||
#include <rs_decoder.h>
|
||||
#undef addrsig
|
||||
|
||||
.text
|
||||
|
||||
/*
|
||||
* grub_gate_a20(void)
|
||||
*
|
||||
* Gate address-line 20 for high memory.
|
||||
*
|
||||
* This routine is probably overconservative in what it does, but so what?
|
||||
*
|
||||
* It also eats any keystrokes in the keyboard buffer. :-(
|
||||
*/
|
||||
|
||||
grub_gate_a20:
|
||||
gate_a20_test_current_state:
|
||||
/* first of all, test if already in a good state */
|
||||
call gate_a20_check_state
|
||||
testb %al, %al
|
||||
jnz gate_a20_try_bios
|
||||
ret
|
||||
|
||||
gate_a20_try_bios:
|
||||
/* second, try a BIOS call */
|
||||
pushl %ebp
|
||||
call prot_to_real
|
||||
|
||||
.code16
|
||||
movw $0x2401, %ax
|
||||
int $0x15
|
||||
|
||||
calll real_to_prot
|
||||
.code32
|
||||
|
||||
popl %ebp
|
||||
call gate_a20_check_state
|
||||
testb %al, %al
|
||||
jnz gate_a20_try_system_control_port_a
|
||||
ret
|
||||
|
||||
gate_a20_try_system_control_port_a:
|
||||
/*
|
||||
* In macbook, the keyboard test would hang the machine, so we move
|
||||
* this forward.
|
||||
*/
|
||||
/* fourth, try the system control port A */
|
||||
inb $0x92
|
||||
andb $(~0x03), %al
|
||||
orb $0x02, %al
|
||||
outb $0x92
|
||||
|
||||
call gate_a20_check_state
|
||||
testb %al, %al
|
||||
jnz gate_a20_try_keyboard_controller
|
||||
ret
|
||||
|
||||
gate_a20_flush_keyboard_buffer:
|
||||
inb $0x64
|
||||
andb $0x02, %al
|
||||
jnz gate_a20_flush_keyboard_buffer
|
||||
2:
|
||||
inb $0x64
|
||||
andb $0x01, %al
|
||||
jz 3f
|
||||
inb $0x60
|
||||
jmp 2b
|
||||
3:
|
||||
ret
|
||||
|
||||
gate_a20_try_keyboard_controller:
|
||||
/* third, try the keyboard controller */
|
||||
call gate_a20_flush_keyboard_buffer
|
||||
|
||||
movb $0xd1, %al
|
||||
outb $0x64
|
||||
4:
|
||||
inb $0x64
|
||||
andb $0x02, %al
|
||||
jnz 4b
|
||||
|
||||
movb $0xdf, %al
|
||||
outb $0x60
|
||||
call gate_a20_flush_keyboard_buffer
|
||||
|
||||
/* output a dummy command (USB keyboard hack) */
|
||||
movb $0xff, %al
|
||||
outb $0x64
|
||||
call gate_a20_flush_keyboard_buffer
|
||||
|
||||
call gate_a20_check_state
|
||||
testb %al, %al
|
||||
/* everything failed, so restart from the beginning */
|
||||
jnz gate_a20_try_bios
|
||||
ret
|
||||
|
||||
gate_a20_check_state:
|
||||
/* iterate the checking for a while */
|
||||
movl $100, %ecx
|
||||
1:
|
||||
call 3f
|
||||
testb %al, %al
|
||||
jz 2f
|
||||
loop 1b
|
||||
2:
|
||||
ret
|
||||
3:
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
xorl %eax, %eax
|
||||
/* compare the byte at 0x8000 with that at 0x108000 */
|
||||
movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx
|
||||
pushl %ebx
|
||||
/* save the original byte in CL */
|
||||
movb (%ebx), %cl
|
||||
/* store the value at 0x108000 in AL */
|
||||
addl $0x100000, %ebx
|
||||
movb (%ebx), %al
|
||||
/* try to set one less value at 0x8000 */
|
||||
popl %ebx
|
||||
movb %al, %ch
|
||||
decb %ch
|
||||
movb %ch, (%ebx)
|
||||
/* serialize */
|
||||
outb %al, $0x80
|
||||
outb %al, $0x80
|
||||
/* obtain the value at 0x108000 in CH */
|
||||
pushl %ebx
|
||||
addl $0x100000, %ebx
|
||||
movb (%ebx), %ch
|
||||
/* this result is 0 if A20 is on or 1 if it is off */
|
||||
subb %ch, %al
|
||||
/* restore the original */
|
||||
popl %ebx
|
||||
movb %cl, (%ebx)
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
LOCAL(reed_solomon_part):
|
||||
|
||||
/*
|
||||
* Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself).
|
||||
* This uses the a.out kludge to load raw binary to the area starting at 1MB,
|
||||
* and relocates itself after loaded.
|
||||
*/
|
||||
.p2align 2 /* force 4-byte alignment */
|
||||
multiboot_header:
|
||||
/* magic */
|
||||
.long 0x1BADB002
|
||||
/* flags */
|
||||
.long (1 << 16)
|
||||
/* checksum */
|
||||
.long -0x1BADB002 - (1 << 16)
|
||||
/* header addr */
|
||||
.long multiboot_header - _start + 0x100000 + 0x200
|
||||
/* load addr */
|
||||
.long 0x100000
|
||||
/* load end addr */
|
||||
.long 0
|
||||
/* bss end addr */
|
||||
.long 0
|
||||
/* entry addr */
|
||||
.long multiboot_entry - _start + 0x100000 + 0x200
|
||||
|
||||
multiboot_entry:
|
||||
.code32
|
||||
/* obtain the boot device */
|
||||
movl 12(%ebx), %edx
|
||||
|
||||
movl $GRUB_MEMORY_MACHINE_PROT_STACK, %ebp
|
||||
movl %ebp, %esp
|
||||
|
||||
/* relocate the code */
|
||||
#ifdef __APPLE__
|
||||
LOCAL(compressed_size_offset) = LOCAL(compressed_size) - LOCAL(base)
|
||||
movl $0x200, %ecx
|
||||
addl $decompressor_end, %ecx
|
||||
subl $LOCAL(base), %ecx
|
||||
addl LOCAL(compressed_size_offset) + 0x100000 + 0x200, %ecx
|
||||
#else
|
||||
movl $(LOCAL(decompressor_end) - _start + 0x200), %ecx
|
||||
addl LOCAL(compressed_size) - _start + 0x100000 + 0x200, %ecx
|
||||
#endif
|
||||
movl $0x100000, %esi
|
||||
movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi
|
||||
cld
|
||||
rep
|
||||
movsb
|
||||
/* jump to the real address */
|
||||
movl $multiboot_trampoline, %eax
|
||||
jmp *%eax
|
||||
|
||||
multiboot_trampoline:
|
||||
/* fill the boot information */
|
||||
movl %edx, LOCAL(boot_dev)
|
||||
shrl $24, %edx
|
||||
/* enter the usual booting */
|
||||
call prot_to_real
|
||||
.code16
|
||||
jmp LOCAL (codestart)
|
||||
.code32
|
||||
|
||||
post_reed_solomon:
|
||||
|
||||
#ifdef ENABLE_LZMA
|
||||
movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %edi
|
||||
#ifdef __APPLE__
|
||||
movl $decompressor_end, %esi
|
||||
#else
|
||||
movl $LOCAL(decompressor_end), %esi
|
||||
#endif
|
||||
pushl %edi
|
||||
movl LOCAL (uncompressed_size), %ecx
|
||||
leal (%edi, %ecx), %ebx
|
||||
/* Don't remove this push: it's an argument. */
|
||||
push %ecx
|
||||
call _LzmaDecodeA
|
||||
pop %ecx
|
||||
/* _LzmaDecodeA clears DF, so no need to run cld */
|
||||
popl %esi
|
||||
#endif
|
||||
|
||||
movl LOCAL(boot_dev), %edx
|
||||
movl $prot_to_real, %edi
|
||||
movl $real_to_prot, %ecx
|
||||
movl $LOCAL(realidt), %eax
|
||||
jmp *%esi
|
||||
|
||||
#ifdef ENABLE_LZMA
|
||||
#include "lzma_decode.S"
|
||||
#endif
|
||||
|
||||
.p2align 4
|
||||
|
||||
#ifdef __APPLE__
|
||||
.zerofill __DATA, __aa_before_bss, decompressor_end, 10, 0
|
||||
#else
|
||||
.bss
|
||||
LOCAL(decompressor_end):
|
||||
#endif
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/machine/memory.h>
|
||||
#include <grub/machine/boot.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
|
||||
.text
|
||||
.code16
|
||||
.globl _start
|
||||
_start:
|
||||
/* Disable interrupts. */
|
||||
cli
|
||||
|
||||
jmp 1f
|
||||
|
||||
.org GRUB_BOOT_I386_QEMU_CORE_ENTRY_ADDR
|
||||
VARIABLE(grub_core_entry_addr)
|
||||
.long 0
|
||||
1:
|
||||
|
||||
/* Set up %ds, %ss, and %es. */
|
||||
xorw %ax, %ax
|
||||
movw %ax, %ds
|
||||
movw %ax, %ss
|
||||
movw %ax, %es
|
||||
|
||||
/* Set up the real mode stack. */
|
||||
movl $GRUB_MEMORY_MACHINE_REAL_STACK, %esp
|
||||
|
||||
/* Transition to protected mode. We use pushl to force generation
|
||||
of a flat return address. */
|
||||
pushl $1f
|
||||
jmp real_to_prot
|
||||
.code32
|
||||
1:
|
||||
/* Ensure A20 is enabled. We're in qemu, so control port A works
|
||||
and there is no need to wait since there is no real logic, it's
|
||||
all emulated. */
|
||||
inb $0x92
|
||||
andb $(~0x03), %al
|
||||
orb $0x02, %al
|
||||
outb $0x92
|
||||
movl EXT_C(grub_core_entry_addr), %edx
|
||||
jmp *%edx
|
||||
|
||||
#include "../../../kern/i386/realmode.S"
|
||||
|
||||
/* Intel, in its infinite wisdom, decided to put the i8086 entry point
|
||||
*right here* and this is why we need this kludge. */
|
||||
|
||||
.org GRUB_BOOT_MACHINE_SIZE - 16
|
||||
|
||||
.code16
|
||||
|
||||
jmp _start
|
||||
.org GRUB_BOOT_MACHINE_SIZE
|
||||
Loaded 100 of 2332 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user