mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 10:10:29 +00:00
Compare commits
903
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e29a99ac3b | ||
|
|
d81931d0e5 | ||
|
|
4ca26ce6fb | ||
|
|
a2b54e2d25 | ||
|
|
5409d17bd3 | ||
|
|
2d064744b9 | ||
|
|
7b35cf63f8 | ||
|
|
4f0405eeb3 | ||
|
|
0c2a86c43c | ||
|
|
e560b88901 | ||
|
|
bf9199d49b | ||
|
|
ad6b6cdc4d | ||
|
|
97b01e441b | ||
|
|
5e70f89fc2 | ||
|
|
397e44ae7e | ||
|
|
bb61b2b801 | ||
|
|
0925f33b55 | ||
|
|
f5f7b125aa | ||
|
|
28ac2370a5 | ||
|
|
14b4ef92f6 | ||
|
|
b1bd61d583 | ||
|
|
b6ebeacbeb | ||
|
|
9dcda7e112 | ||
|
|
e8dd274c31 | ||
|
|
6038ec9ee1 | ||
|
|
b915f0e9b0 | ||
|
|
8f2b956726 | ||
|
|
2a040d5aa5 | ||
|
|
5543c48538 | ||
|
|
50a4d243bd | ||
|
|
971c0f24c2 | ||
|
|
3becbd0775 | ||
|
|
91c3452f92 | ||
|
|
c841decd4d | ||
|
|
23e384f800 | ||
|
|
f44ccb3f5c | ||
|
|
432c7554bf | ||
|
|
20ecfc61f1 | ||
|
|
0dc138c770 | ||
|
|
6f07ef1b55 | ||
|
|
14d0f250e5 | ||
|
|
2ef365a7f7 | ||
|
|
9a7d18426c | ||
|
|
1d280f3b29 | ||
|
|
cd35f2089c | ||
|
|
fd393d45aa | ||
|
|
dc375d6161 | ||
|
|
0f86518de8 | ||
|
|
1f40c472d8 | ||
|
|
0ddba31362 | ||
|
|
7b0a7c2675 | ||
|
|
7521ec5fef | ||
|
|
3aeec9ac15 | ||
|
|
68d4322ed7 | ||
|
|
165a055fb8 | ||
|
|
dd2c93cb84 | ||
|
|
054d1faa5a | ||
|
|
bdae35caff | ||
|
|
98b3579549 | ||
|
|
6cf2395e50 | ||
|
|
c4d5a6fc77 | ||
|
|
848276018e | ||
|
|
4c6cea29c4 | ||
|
|
9eaa21f055 | ||
|
|
df6eb305d1 | ||
|
|
81bbea0515 | ||
|
|
cf0400f9e0 | ||
|
|
d10004e9f5 | ||
|
|
a65b34efbf | ||
|
|
1148561e45 | ||
|
|
ab5e33ce95 | ||
|
|
7dd9f0b4e9 | ||
|
|
c1d6d3a00f | ||
|
|
4f12af3748 | ||
|
|
b711494093 | ||
|
|
a997d75fd0 | ||
|
|
f4a573f875 | ||
|
|
5595c7b3b7 | ||
|
|
e5fb242c85 | ||
|
|
48f5611bc8 | ||
|
|
db8e3ea441 | ||
|
|
a8859e523c | ||
|
|
72f94a3927 | ||
|
|
465b7d2564 | ||
|
|
98118caaf2 | ||
|
|
8e4e0d6bf3 | ||
|
|
20bbb84b97 | ||
|
|
08ab8e9181 | ||
|
|
ca3c56e765 | ||
|
|
bc194c0206 | ||
|
|
1a2144be6d | ||
|
|
dd370d33f3 | ||
|
|
dcee2f33c2 | ||
|
|
59848e4e9b | ||
|
|
d47b4b9576 | ||
|
|
7115e50ca6 | ||
|
|
6b23355545 | ||
|
|
39469c9282 | ||
|
|
d8cae8cf39 | ||
|
|
f025d429b9 | ||
|
|
ad24b7208b | ||
|
|
d5efc02ebf | ||
|
|
51dbeac64c | ||
|
|
e741670789 | ||
|
|
dacd27130a | ||
|
|
29bfa2494c | ||
|
|
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
+30
@@ -0,0 +1,30 @@
|
|||||||
|
gendocs.sh
|
||||||
|
lib
|
||||||
|
m4
|
||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
autom4te.cache
|
||||||
|
config.cache
|
||||||
|
config.h
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
stamp-h
|
||||||
|
stamp-h1
|
||||||
|
doc/Makefile
|
||||||
|
doc/*.info*
|
||||||
|
doc/.deps
|
||||||
|
doc/gendocs_template
|
||||||
|
doc/mdate-sh
|
||||||
|
doc/Makefile.in
|
||||||
|
doc/boot.S.texi
|
||||||
|
doc/kernel
|
||||||
|
doc/kernel.c.texi
|
||||||
|
doc/multiboot.h.texi
|
||||||
|
doc/texinfo.tex
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
config.h.in
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
missing
|
||||||
-249
@@ -1,249 +0,0 @@
|
|||||||
00_header
|
|
||||||
10_*
|
|
||||||
20_linux_xen
|
|
||||||
30_os-prober
|
|
||||||
40_custom
|
|
||||||
41_custom
|
|
||||||
*.1
|
|
||||||
*.8
|
|
||||||
aclocal.m4
|
|
||||||
ahci_test
|
|
||||||
ascii.bitmaps
|
|
||||||
ascii.h
|
|
||||||
autom4te.cache
|
|
||||||
build-grub-gen-asciih
|
|
||||||
build-grub-gen-widthspec
|
|
||||||
build-grub-mkfont
|
|
||||||
cdboot_test
|
|
||||||
cmp_test
|
|
||||||
config.cache
|
|
||||||
config.guess
|
|
||||||
config.h
|
|
||||||
config-util.h
|
|
||||||
config-util.h.in
|
|
||||||
config.log
|
|
||||||
config.status
|
|
||||||
config.sub
|
|
||||||
configure
|
|
||||||
core_compress_test
|
|
||||||
DISTLIST
|
|
||||||
docs/*.info
|
|
||||||
docs/stamp-vti
|
|
||||||
docs/version.texi
|
|
||||||
ehci_test
|
|
||||||
example_grub_script_test
|
|
||||||
example_scripted_test
|
|
||||||
example_unit_test
|
|
||||||
*.exec
|
|
||||||
*.exec.exe
|
|
||||||
fddboot_test
|
|
||||||
genkernsyms.sh
|
|
||||||
gensymlist.sh
|
|
||||||
gentrigtables
|
|
||||||
gentrigtables.exe
|
|
||||||
gettext_strings_test
|
|
||||||
grub-bin2h
|
|
||||||
/grub-bios-setup
|
|
||||||
/grub-bios-setup.exe
|
|
||||||
grub_cmd_date
|
|
||||||
grub_cmd_echo
|
|
||||||
grub_cmd_regexp
|
|
||||||
grub_cmd_set_date
|
|
||||||
grub_cmd_sleep
|
|
||||||
/grub-editenv
|
|
||||||
/grub-editenv.exe
|
|
||||||
grub-emu
|
|
||||||
grub-emu-lite
|
|
||||||
grub-emu.exe
|
|
||||||
grub-emu-lite.exe
|
|
||||||
grub_emu_init.c
|
|
||||||
grub_emu_init.h
|
|
||||||
/grub-file
|
|
||||||
/grub-file.exe
|
|
||||||
grub-fstest
|
|
||||||
grub-fstest.exe
|
|
||||||
grub_fstest_init.c
|
|
||||||
grub_fstest_init.h
|
|
||||||
grub_func_test
|
|
||||||
grub-install
|
|
||||||
grub-install.exe
|
|
||||||
grub-kbdcomp
|
|
||||||
/grub-macbless
|
|
||||||
/grub-macbless.exe
|
|
||||||
grub-macho2img
|
|
||||||
/grub-menulst2cfg
|
|
||||||
/grub-menulst2cfg.exe
|
|
||||||
/grub-mk*
|
|
||||||
grub-mount
|
|
||||||
/grub-ofpathname
|
|
||||||
/grub-ofpathname.exe
|
|
||||||
grub-core/build-grub-pe2elf.exe
|
|
||||||
/grub-probe
|
|
||||||
/grub-probe.exe
|
|
||||||
grub_probe_init.c
|
|
||||||
grub_probe_init.h
|
|
||||||
/grub-reboot
|
|
||||||
grub_script_blanklines
|
|
||||||
grub_script_blockarg
|
|
||||||
grub_script_break
|
|
||||||
grub-script-check
|
|
||||||
grub-script-check.exe
|
|
||||||
grub_script_check_init.c
|
|
||||||
grub_script_check_init.h
|
|
||||||
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
|
|
||||||
grub_script.tab.c
|
|
||||||
grub_script.tab.h
|
|
||||||
grub_script.yy.c
|
|
||||||
grub_script.yy.h
|
|
||||||
grub-set-default
|
|
||||||
grub_setup_init.c
|
|
||||||
grub_setup_init.h
|
|
||||||
grub-shell
|
|
||||||
grub-shell-tester
|
|
||||||
grub-sparc64-setup
|
|
||||||
grub-sparc64-setup.exe
|
|
||||||
/grub-syslinux2cfg
|
|
||||||
/grub-syslinux2cfg.exe
|
|
||||||
gzcompress_test
|
|
||||||
hddboot_test
|
|
||||||
help_test
|
|
||||||
*.img
|
|
||||||
*.image
|
|
||||||
*.image.exe
|
|
||||||
include/grub/cpu
|
|
||||||
include/grub/machine
|
|
||||||
install-sh
|
|
||||||
lib/libgcrypt-grub
|
|
||||||
libgrub_a_init.c
|
|
||||||
*.log
|
|
||||||
*.lst
|
|
||||||
lzocompress_test
|
|
||||||
*.marker
|
|
||||||
Makefile
|
|
||||||
*.mod
|
|
||||||
mod-*.c
|
|
||||||
missing
|
|
||||||
netboot_test
|
|
||||||
*.o
|
|
||||||
*.a
|
|
||||||
ohci_test
|
|
||||||
partmap_test
|
|
||||||
pata_test
|
|
||||||
*.pf2
|
|
||||||
*.pp
|
|
||||||
po/*.mo
|
|
||||||
po/grub.pot
|
|
||||||
po/POTFILES
|
|
||||||
po/stamp-po
|
|
||||||
printf_test
|
|
||||||
priority_queue_unit_test
|
|
||||||
pseries_test
|
|
||||||
stamp-h
|
|
||||||
stamp-h1
|
|
||||||
stamp-h.in
|
|
||||||
symlist.c
|
|
||||||
symlist.h
|
|
||||||
trigtables.c
|
|
||||||
*.trs
|
|
||||||
uhci_test
|
|
||||||
update-grub_lib
|
|
||||||
unidata.c
|
|
||||||
xzcompress_test
|
|
||||||
Makefile.in
|
|
||||||
GPATH
|
|
||||||
GRTAGS
|
|
||||||
GSYMS
|
|
||||||
GTAGS
|
|
||||||
compile
|
|
||||||
depcomp
|
|
||||||
mdate-sh
|
|
||||||
texinfo.tex
|
|
||||||
grub-core/lib/libgcrypt-grub
|
|
||||||
.deps
|
|
||||||
.deps-util
|
|
||||||
.deps-core
|
|
||||||
.dirstamp
|
|
||||||
Makefile.util.am
|
|
||||||
contrib
|
|
||||||
grub-core/bootinfo.txt
|
|
||||||
grub-core/Makefile.core.am
|
|
||||||
grub-core/Makefile.gcry.def
|
|
||||||
grub-core/contrib
|
|
||||||
grub-core/gdb_grub
|
|
||||||
grub-core/genmod.sh
|
|
||||||
grub-core/gensyminfo.sh
|
|
||||||
grub-core/gmodule.pl
|
|
||||||
grub-core/grub.chrp
|
|
||||||
grub-core/modinfo.sh
|
|
||||||
grub-core/*.module
|
|
||||||
grub-core/*.module.exe
|
|
||||||
grub-core/*.pp
|
|
||||||
grub-core/kernel.img.bin
|
|
||||||
util/bash-completion.d/grub
|
|
||||||
grub-core/gnulib/alloca.h
|
|
||||||
grub-core/gnulib/arg-nonnull.h
|
|
||||||
grub-core/gnulib/c++defs.h
|
|
||||||
grub-core/gnulib/charset.alias
|
|
||||||
grub-core/gnulib/configmake.h
|
|
||||||
grub-core/gnulib/float.h
|
|
||||||
grub-core/gnulib/getopt.h
|
|
||||||
grub-core/gnulib/langinfo.h
|
|
||||||
grub-core/gnulib/ref-add.sed
|
|
||||||
grub-core/gnulib/ref-del.sed
|
|
||||||
grub-core/gnulib/stdio.h
|
|
||||||
grub-core/gnulib/stdlib.h
|
|
||||||
grub-core/gnulib/string.h
|
|
||||||
grub-core/gnulib/strings.h
|
|
||||||
grub-core/gnulib/sys
|
|
||||||
grub-core/gnulib/unistd.h
|
|
||||||
grub-core/gnulib/warn-on-use.h
|
|
||||||
grub-core/gnulib/wchar.h
|
|
||||||
grub-core/gnulib/wctype.h
|
|
||||||
grub-core/rs_decoder.h
|
|
||||||
widthspec.bin
|
|
||||||
widthspec.h
|
|
||||||
docs/stamp-1
|
|
||||||
docs/version-dev.texi
|
|
||||||
Makefile.utilgcry.def
|
|
||||||
po/*.po
|
|
||||||
po/*.gmo
|
|
||||||
po/LINGUAS
|
|
||||||
po/remove-potcdate.sed
|
|
||||||
include/grub/gcrypt/gcrypt.h
|
|
||||||
include/grub/gcrypt/g10lib.h
|
|
||||||
po/POTFILES.in
|
|
||||||
po/POTFILES-shell.in
|
|
||||||
/grub-glue-efi
|
|
||||||
/grub-render-label
|
|
||||||
/grub-glue-efi.exe
|
|
||||||
/grub-render-label.exe
|
|
||||||
grub-core/gnulib/locale.h
|
|
||||||
grub-core/gnulib/unitypes.h
|
|
||||||
grub-core/gnulib/uniwidth.h
|
|
||||||
build-aux/test-driver
|
|
||||||
/garbage-gen
|
|
||||||
/garbage-gen.exe
|
|
||||||
/grub-fs-tester
|
|
||||||
grub-core/build-grub-module-verifier
|
|
||||||
@@ -1,223 +0,0 @@
|
|||||||
1 Notes on the Free Translation Project
|
|
||||||
***************************************
|
|
||||||
|
|
||||||
Free software is going international! The Free Translation Project is
|
|
||||||
a way to get maintainers of free software, translators, and users all
|
|
||||||
together, so that free software will gradually become able to speak many
|
|
||||||
languages. A few packages already provide translations for their
|
|
||||||
messages.
|
|
||||||
|
|
||||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
|
||||||
assume that the distributed package does use GNU `gettext' internally,
|
|
||||||
itself available at your nearest GNU archive site. But you do _not_
|
|
||||||
need to install GNU `gettext' prior to configuring, installing or using
|
|
||||||
this package with messages translated.
|
|
||||||
|
|
||||||
Installers will find here some useful hints. These notes also
|
|
||||||
explain how users should proceed for getting the programs to use the
|
|
||||||
available translations. They tell how people wanting to contribute and
|
|
||||||
work on translations can contact the appropriate team.
|
|
||||||
|
|
||||||
When reporting bugs in the `intl/' directory or bugs which may be
|
|
||||||
related to internationalization, you should tell about the version of
|
|
||||||
`gettext' which is used. The information can be found in the
|
|
||||||
`intl/VERSION' file, in internationalized packages.
|
|
||||||
|
|
||||||
1.1 Quick configuration advice
|
|
||||||
==============================
|
|
||||||
|
|
||||||
If you want to exploit the full power of internationalization, you
|
|
||||||
should configure it using
|
|
||||||
|
|
||||||
./configure --with-included-gettext
|
|
||||||
|
|
||||||
to force usage of internationalizing routines provided within this
|
|
||||||
package, despite the existence of internationalizing capabilities in the
|
|
||||||
operating system where this package is being installed. So far, only
|
|
||||||
the `gettext' implementation in the GNU C library version 2 provides as
|
|
||||||
many features (such as locale alias, message inheritance, automatic
|
|
||||||
charset conversion or plural form handling) as the implementation here.
|
|
||||||
It is also not possible to offer this additional functionality on top
|
|
||||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
|
||||||
very likely convey even more functionality. So it might be a good idea
|
|
||||||
to change to GNU `gettext' as soon as possible.
|
|
||||||
|
|
||||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
|
||||||
you have installed a recent copy of the GNU gettext package with the
|
|
||||||
included `libintl'.
|
|
||||||
|
|
||||||
1.2 INSTALL Matters
|
|
||||||
===================
|
|
||||||
|
|
||||||
Some packages are "localizable" when properly installed; the programs
|
|
||||||
they contain can be made to speak your own native language. Most such
|
|
||||||
packages use GNU `gettext'. Other packages have their own ways to
|
|
||||||
internationalization, predating GNU `gettext'.
|
|
||||||
|
|
||||||
By default, this package will be installed to allow translation of
|
|
||||||
messages. It will automatically detect whether the system already
|
|
||||||
provides the GNU `gettext' functions. If not, the included GNU
|
|
||||||
`gettext' library will be used. This library is wholly contained
|
|
||||||
within this package, usually in the `intl/' subdirectory, so prior
|
|
||||||
installation of the GNU `gettext' package is _not_ required.
|
|
||||||
Installers may use special options at configuration time for changing
|
|
||||||
the default behaviour. The commands:
|
|
||||||
|
|
||||||
./configure --with-included-gettext
|
|
||||||
./configure --disable-nls
|
|
||||||
|
|
||||||
will, respectively, bypass any pre-existing `gettext' to use the
|
|
||||||
internationalizing routines provided within this package, or else,
|
|
||||||
_totally_ disable translation of messages.
|
|
||||||
|
|
||||||
When you already have GNU `gettext' installed on your system and run
|
|
||||||
configure without an option for your new package, `configure' will
|
|
||||||
probably detect the previously built and installed `libintl.a' file and
|
|
||||||
will decide to use this. This might not be desirable. You should use
|
|
||||||
the more recent version of the GNU `gettext' library. I.e. if the file
|
|
||||||
`intl/VERSION' shows that the library which comes with this package is
|
|
||||||
more recent, you should use
|
|
||||||
|
|
||||||
./configure --with-included-gettext
|
|
||||||
|
|
||||||
to prevent auto-detection.
|
|
||||||
|
|
||||||
The configuration process will not test for the `catgets' function
|
|
||||||
and therefore it will not be used. The reason is that even an
|
|
||||||
emulation of `gettext' on top of `catgets' could not provide all the
|
|
||||||
extensions of the GNU `gettext' library.
|
|
||||||
|
|
||||||
Internationalized packages usually have many `po/LL.po' files, where
|
|
||||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
|
||||||
translations have been forbidden at `configure' time by using the
|
|
||||||
`--disable-nls' switch, all available translations are installed
|
|
||||||
together with the package. However, the environment variable `LINGUAS'
|
|
||||||
may be set, prior to configuration, to limit the installed set.
|
|
||||||
`LINGUAS' should then contain a space separated list of two-letter
|
|
||||||
codes, stating which languages are allowed.
|
|
||||||
|
|
||||||
1.3 Using This Package
|
|
||||||
======================
|
|
||||||
|
|
||||||
As a user, if your language has been installed for this package, you
|
|
||||||
only have to set the `LANG' environment variable to the appropriate
|
|
||||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
|
||||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
|
||||||
suppose that you speak German and live in Germany. At the shell
|
|
||||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
|
||||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
|
||||||
This can be done from your `.login' or `.profile' file, once and for
|
|
||||||
all.
|
|
||||||
|
|
||||||
You might think that the country code specification is redundant.
|
|
||||||
But in fact, some languages have dialects in different countries. For
|
|
||||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
|
||||||
country code serves to distinguish the dialects.
|
|
||||||
|
|
||||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
|
||||||
language and `CC' denoting the country, is the one use on systems based
|
|
||||||
on GNU libc. On other systems, some variations of this scheme are
|
|
||||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
|
||||||
locales supported by your system for your language by running the
|
|
||||||
command `locale -a | grep '^LL''.
|
|
||||||
|
|
||||||
Not all programs have translations for all languages. By default, an
|
|
||||||
English message is shown in place of a nonexistent translation. If you
|
|
||||||
understand other languages, you can set up a priority list of languages.
|
|
||||||
This is done through a different environment variable, called
|
|
||||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
|
||||||
for the purpose of message handling, but you still need to have `LANG'
|
|
||||||
set to the primary language; this is required by other parts of the
|
|
||||||
system libraries. For example, some Swedish users who would rather
|
|
||||||
read translations in German than English for when Swedish is not
|
|
||||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
|
||||||
|
|
||||||
Special advice for Norwegian users: The language code for Norwegian
|
|
||||||
bokma*l changed from `no' to `nb' recently (in 2003). During the
|
|
||||||
transition period, while some message catalogs for this language are
|
|
||||||
installed under `nb' and some older ones under `no', it's recommended
|
|
||||||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
|
|
||||||
older translations are used.
|
|
||||||
|
|
||||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
|
||||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
|
||||||
to denote the language's main dialect. For example, `de' is equivalent
|
|
||||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
|
||||||
(Portuguese as spoken in Portugal) in this context.
|
|
||||||
|
|
||||||
1.4 Translating Teams
|
|
||||||
=====================
|
|
||||||
|
|
||||||
For the Free Translation Project to be a success, we need interested
|
|
||||||
people who like their own language and write it well, and who are also
|
|
||||||
able to synergize with other translators speaking the same language.
|
|
||||||
Each translation team has its own mailing list. The up-to-date list of
|
|
||||||
teams can be found at the Free Translation Project's homepage,
|
|
||||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
|
||||||
area.
|
|
||||||
|
|
||||||
If you'd like to volunteer to _work_ at translating messages, you
|
|
||||||
should become a member of the translating team for your own language.
|
|
||||||
The subscribing address is _not_ the same as the list itself, it has
|
|
||||||
`-request' appended. For example, speakers of Swedish can send a
|
|
||||||
message to `sv-request@li.org', having this message body:
|
|
||||||
|
|
||||||
subscribe
|
|
||||||
|
|
||||||
Keep in mind that team members are expected to participate
|
|
||||||
_actively_ in translations, or at solving translational difficulties,
|
|
||||||
rather than merely lurking around. If your team does not exist yet and
|
|
||||||
you want to start one, or if you are unsure about what to do or how to
|
|
||||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
|
||||||
coordinator for all translator teams.
|
|
||||||
|
|
||||||
The English team is special. It works at improving and uniformizing
|
|
||||||
the terminology in use. Proven linguistic skills are praised more than
|
|
||||||
programming skills, here.
|
|
||||||
|
|
||||||
1.5 Available Packages
|
|
||||||
======================
|
|
||||||
|
|
||||||
Languages are not equally supported in all packages. The following
|
|
||||||
matrix shows the current state of internationalization, as of October
|
|
||||||
2006. The matrix shows, in regard of each package, for which languages
|
|
||||||
PO files have been submitted to translation coordination, with a
|
|
||||||
translation percentage of at least 50%.
|
|
||||||
|
|
||||||
# Matrix here is removed!
|
|
||||||
|
|
||||||
Some counters in the preceding matrix are higher than the number of
|
|
||||||
visible blocks let us expect. This is because a few extra PO files are
|
|
||||||
used for implementing regional variants of languages, or language
|
|
||||||
dialects.
|
|
||||||
|
|
||||||
For a PO file in the matrix above to be effective, the package to
|
|
||||||
which it applies should also have been internationalized and
|
|
||||||
distributed as such by its maintainer. There might be an observable
|
|
||||||
lag between the mere existence a PO file and its wide availability in a
|
|
||||||
distribution.
|
|
||||||
|
|
||||||
If October 2006 seems to be old, you may fetch a more recent copy of
|
|
||||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
|
||||||
matrix with full percentage details can be found at
|
|
||||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
|
||||||
|
|
||||||
1.6 Using `gettext' in new packages
|
|
||||||
===================================
|
|
||||||
|
|
||||||
If you are writing a freely available program and want to
|
|
||||||
internationalize it you are welcome to use GNU `gettext' in your
|
|
||||||
package. Of course you have to respect the GNU Library General Public
|
|
||||||
License which covers the use of the GNU `gettext' library. This means
|
|
||||||
in particular that even non-free programs can use `libintl' as a shared
|
|
||||||
library, whereas only free software can use `libintl' as a static
|
|
||||||
library or use modified versions of `libintl'.
|
|
||||||
|
|
||||||
Once the sources are changed appropriately and the setup can handle
|
|
||||||
the use of `gettext' the only thing missing are the translations. The
|
|
||||||
Free Translation Project is also available for packages which are not
|
|
||||||
developed inside the GNU project. Therefore the information given above
|
|
||||||
applies also for every other Free Software Project. Contact
|
|
||||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
|
||||||
the translation teams.
|
|
||||||
|
|
||||||
@@ -1,23 +1,13 @@
|
|||||||
|
|
||||||
|
Bryan Ford and Erich Stefan Boleyn wrote the initial version of the Multiboot
|
||||||
|
specification.
|
||||||
|
|
||||||
The following authors assigned copyright on their work to the Free
|
The following authors assigned copyright on their work to the Free
|
||||||
Software Foundation:
|
Software Foundation:
|
||||||
|
|
||||||
Yoshinori K. Okuji designed and implemented the initial version.
|
In year 1999, Kunihiro Ishiguro provided the first version that would be
|
||||||
|
imported into GNU GRUB.
|
||||||
|
|
||||||
Jeroen Dekkers added initrd support, Multiboot support, and fixed bugs
|
Yoshinori K. Okuji maintained it during the 1999-2006 period.
|
||||||
in ext2fs.
|
|
||||||
|
|
||||||
Marco Gerards added ext2fs support, grub-emu, a new command-line
|
In year 2000, Per Lundberg added graphics support.
|
||||||
engine, and fixed many bugs.
|
|
||||||
|
|
||||||
Omniflux added terminfo and serial support.
|
|
||||||
|
|
||||||
Vincent Pelletier added Sparc64 support.
|
|
||||||
|
|
||||||
Hollis Blanchard implemented many parts of PowerPC support.
|
|
||||||
|
|
||||||
Tomas Ebenlendr added the command chainloader into the normal mode,
|
|
||||||
fixed some bugs.
|
|
||||||
|
|
||||||
Guillem Jover merged architecture-independent ELF support code.
|
|
||||||
|
|
||||||
Vesa Jaaskelainen added VBE support.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
GRUB team is aware of following problems:
|
|
||||||
- Currently search and assembling multidevice abstractions scans
|
|
||||||
all the devices which can be slow.
|
|
||||||
- Cache isn't used correctly for video which results in slowness.
|
|
||||||
|
|
||||||
While these are bugs their solution has a potential of breaking more and more
|
|
||||||
seriously. So it was decided for 1.99 that they aren't fixed.
|
|
||||||
@@ -0,0 +1,530 @@
|
|||||||
|
2013-10-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Add EFI mmap specification
|
||||||
|
|
||||||
|
2010-09-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: New type for badram.
|
||||||
|
|
||||||
|
2010-09-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: New tags for EFI system table, DHCP ACK, SMBIOS
|
||||||
|
and RSDP.
|
||||||
|
|
||||||
|
2010-07-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Typo fix.
|
||||||
|
|
||||||
|
2010-04-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi (Memory map): Add a remark about type 1.
|
||||||
|
|
||||||
|
2010-04-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi (Terminology): Add a remark that "kernel" may not
|
||||||
|
be a part of OS.
|
||||||
|
|
||||||
|
2010-04-03 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
MIPS support.
|
||||||
|
|
||||||
|
* doc/multiboot2.h (GRUB_MULTIBOOT_ARCHITECTURE_I386): Removed leftover
|
||||||
|
GRUB_ prefix.
|
||||||
|
(MULTIBOOT_ARCHITECTURE_MIPS32): New constant.
|
||||||
|
* doc/multiboot.texi (MIPS machine state): New section.
|
||||||
|
(Header magic fields): New possible value of arcitecture field.
|
||||||
|
|
||||||
|
2010-03-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Removed the promise of BIOS availability.
|
||||||
|
|
||||||
|
2010-03-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Bump version to 1.6.
|
||||||
|
* doc/boot.S: Use tagged multiboot header.
|
||||||
|
* doc/kernel.c (cmain): Parse tagged mbi.
|
||||||
|
* doc/multiboot.texi: Selfishly added myself to authors.
|
||||||
|
(Terminology): New types u_virt and u_phys.
|
||||||
|
(Header address fields): Removed.
|
||||||
|
(Header graphics fields): Likewise.
|
||||||
|
(Header tags): New section.
|
||||||
|
(Information request header tag): Likewise.
|
||||||
|
(Address header tag): Likewise.
|
||||||
|
(Console header tags): Likewise.
|
||||||
|
(Module alignment tag): Likewise.
|
||||||
|
(Header layout): Specify new common header part.
|
||||||
|
(Header magic fields): Likewise.
|
||||||
|
(Machine state): Updated magic value.
|
||||||
|
(Boot information format): Changed to tagged structure.
|
||||||
|
* doc/multiboot2.h: Changed to tagged format.
|
||||||
|
* doc/src2texi: Handle more comments correctly.
|
||||||
|
|
||||||
|
2010-03-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/kernel.c (cmain): Use padding to properly display 64-bit
|
||||||
|
quantities.
|
||||||
|
(printf): Add padding support.
|
||||||
|
Reported by: Soeren D. Schulze.
|
||||||
|
|
||||||
|
2010-02-09 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Fix a typo.
|
||||||
|
Reported by: Trond
|
||||||
|
|
||||||
|
2010-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Define NVS and ACPI memory types.
|
||||||
|
* doc/multiboot.h (MULTIBOOT_MEMORY_ACPI_RECLAIMABLE): New definition.
|
||||||
|
(MULTIBOOT_MEMORY_NVS): Likewise.
|
||||||
|
|
||||||
|
2010-01-15 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* doc/boot.S: Slight adjustment to make makeinfo happy.
|
||||||
|
* doc/kernel.c: Likewise.
|
||||||
|
|
||||||
|
2010-01-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/kernel.c (cmain): Handle EGA text video information.
|
||||||
|
* doc/multiboot.h (MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT): New const.
|
||||||
|
|
||||||
|
2010-01-14 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* COPYING: Replace with GPLv3 text.
|
||||||
|
* doc/boot.S: Update to GPL version 3 or later.
|
||||||
|
* doc/kernel.c: Likewise.
|
||||||
|
|
||||||
|
2010-01-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
2010-01-12 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Video mode amendment by Vladimir Serbinenko. See NEWS file for
|
||||||
|
details.
|
||||||
|
|
||||||
|
* NEWS: Document video mode amendment.
|
||||||
|
* doc/multiboot.texi: Video mode ammendment.
|
||||||
|
* doc/multiboot.h (MULTIBOOT_INFO_VIDEO_INFO): Remove macro.
|
||||||
|
(MULTIBOOT_INFO_VBE_INFO, MULTIBOOT_INFO_FRAMEBUFFER_INFO): New macros.
|
||||||
|
(multiboot_uint8_t): New type.
|
||||||
|
(struct multiboot_color): New structure.
|
||||||
|
(struct multiboot_info): Add new video mode fields.
|
||||||
|
(MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED)
|
||||||
|
(MULTIBOOT_FRAMEBUFFER_TYPE_RGB): New macros.
|
||||||
|
|
||||||
|
* doc/boot.S (MULTIBOOT_HEADER_FLAGS): Add `MULTIBOOT_VIDEO_MODE'.
|
||||||
|
(multiboot_header): Include video mode information.
|
||||||
|
* doc/kernel.c (cmain): Draw a blue diagonal line when video mode
|
||||||
|
information is provided.
|
||||||
|
|
||||||
|
2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Kick out Multiboot 2 draft as a branch. Initially it is
|
||||||
|
identical to Multiboot 1, except for the magic numbers.
|
||||||
|
|
||||||
|
* doc/multiboot.h: Rename to ...
|
||||||
|
* doc/multiboot2.h: ... this. Update all users.
|
||||||
|
(MULTIBOOT_HEADER_MAGIC): Replace with ...
|
||||||
|
(MULTIBOOT2_HEADER_MAGIC): ... this. Update all users.
|
||||||
|
(MULTIBOOT_BOOTLOADER_MAGIC): Replace with ...
|
||||||
|
(MULTIBOOT2_BOOTLOADER_MAGIC): ... this. Update all users.
|
||||||
|
|
||||||
|
2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* doc/multiboot.h (MULTIBOOT_UNSUPPORTED): Remove macro (moved to
|
||||||
|
GRUB).
|
||||||
|
|
||||||
|
2010-01-03 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Install multiboot.h system-wide.
|
||||||
|
|
||||||
|
* doc/Makefile.am (pkginclude_HEADERS): New variable.
|
||||||
|
|
||||||
|
2010-01-03 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* doc/boot.S (MULTIBOOT_HEADER_FLAGS): Redefine using macros.
|
||||||
|
|
||||||
|
2010-01-03 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* Makefile.am (web-manual): Add `all' as dependency.
|
||||||
|
|
||||||
|
2010-01-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* doc/kernel.c (cmain): Add missing cast.
|
||||||
|
|
||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: Use `gnulib-tool' to install gendocs.sh.
|
||||||
|
* Makefile.am (web-manual): New target. Builds a web manual using
|
||||||
|
gendocs.sh.
|
||||||
|
* configure.ac (AC_PREREQ): Require Autoconf 2.59 or later.
|
||||||
|
|
||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Use more standard `doc' directory.
|
||||||
|
|
||||||
|
* docs: Rename to ...
|
||||||
|
* doc: ... this. Update all users.
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Fix an obsolete reference to `docs' directory
|
||||||
|
in GRUB distribution.
|
||||||
|
|
||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Make ia32 libc unnecessary on amd64.
|
||||||
|
|
||||||
|
* configure.ac (CFLAGS): Move down after the basic gcc tests are
|
||||||
|
done. Add `-nostdlib'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* configure.ac: Bump version to 0.6.96.
|
||||||
|
* docs/multiboot.texi: Include `version.texi' instead of hardcoding
|
||||||
|
version number.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/Makefile.am (EXTRA_DIST): Remove `menu.lst'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: Workaround Automake requirement for NEWS and README.
|
||||||
|
We really should have them, but in practice we never had. This
|
||||||
|
ought not be considered a regression.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* BUGS: Remove.
|
||||||
|
* INSTALL: Remove.
|
||||||
|
* NEWS: Remove.
|
||||||
|
* README: Remove.
|
||||||
|
* autogen.sh: Adjust automake flags to add generic files such
|
||||||
|
as `INSTALL', `depcomp', `install-sh' and `missing'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Bump version number to 0.6.96.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Misc editorial changes:
|
||||||
|
|
||||||
|
Avoid using `commercial' as a synonym for `non-free'
|
||||||
|
(see http://www.gnu.org/philosophy/words-to-avoid.html#Commercial).
|
||||||
|
|
||||||
|
Make a clear distinction between kernels and Operating Systems
|
||||||
|
(Linux is a kernel, FreeBSD and NetBSD are Operating Systems, Mach
|
||||||
|
is a microkernel, VSTa is something in-between).
|
||||||
|
|
||||||
|
Use 64-bit types to describe 64-bit datum (instead of splitting in
|
||||||
|
two 32-bit fields). Little endianess assumption applies (as per
|
||||||
|
Terminology section).
|
||||||
|
|
||||||
|
Update status of GNU GRUB relative to version 2.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.h: Replace with include/multiboot.h from GRUB 2 Bazaar
|
||||||
|
trunk.
|
||||||
|
* docs/kernel.c (cmain): Update name references for new multiboot.h
|
||||||
|
header.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.h (MULTIBOOT_HEADER_FLAGS): Moved from here ...
|
||||||
|
* docs/boot.S (MULTIBOOT_HEADER_FLAGS): ... to here.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/boot.S (ASM): Rename to ...
|
||||||
|
(ASM_FILE): ... this.
|
||||||
|
* docs/multiboot.h: Check for `ASM_FILE' instead of `ASM'.
|
||||||
|
|
||||||
|
* docs/multiboot.h (EXT_C, STACK_SIZE): Moved from here ...
|
||||||
|
* docs/boot.S (EXT_C, STACK_SIZE): ... to here.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* docs/fdl.texi: Remove. It's not used.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Prevent generation of .note.gnu.build-id which drastically increases
|
||||||
|
memory requirements of example kernel.
|
||||||
|
|
||||||
|
* docs/Makefile.am (kernel_LDFLAGS): Add '-Wl,--build-id=none'.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* BUGS: New file.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* docs/kernel.c.texi: Removed. It's autogenerated.
|
||||||
|
* docs/multiboot.h.texi: Likewise.
|
||||||
|
* docs/version.texi: Likewise.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* docs/Makefile.am: Remove HELP2MAN.
|
||||||
|
* docs/help2man: Remove.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac: Remove non-multiboot stuff.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* NEWS: Emptied. It contained no multiboot information.
|
||||||
|
* README: Likewise.
|
||||||
|
|
||||||
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* ChangeLog: Remove non-multiboot entries.
|
||||||
|
|
||||||
|
2009-11-13 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: New file.
|
||||||
|
|
||||||
|
2009-11-13 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Remove everything not related to Multiboot. A huge number of files
|
||||||
|
was removed (too many to list them here). The following files were
|
||||||
|
modified:
|
||||||
|
|
||||||
|
* AUTHORS: Remove GRUB-specific bits.
|
||||||
|
* Makefile.am: Likewise.
|
||||||
|
* autogen.sh: Likewise.
|
||||||
|
* configure.ac: Likewise.
|
||||||
|
* docs/Makefile.am: Likewise.
|
||||||
|
|
||||||
|
2009-07-02 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* docs/boot.S: Fix missing newline at the end.
|
||||||
|
* docs/boot.S.texi: Regenerate.
|
||||||
|
|
||||||
|
2008-09-03 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
Based on patch from Ville Skyttä <ville.skytta@iki.fi>
|
||||||
|
* docs/multiboot.texi: Fix some spelling.
|
||||||
|
|
||||||
|
2008-04-10 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* configure.ac: Always use "_cv_" in cache variables for
|
||||||
|
compatibility with Autoconf 2.62.
|
||||||
|
|
||||||
|
2007-10-29 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* configure.ac: Test if '--build-id=none' is supported by the
|
||||||
|
linker and add it to LDFLAGS if possible. Build ID causes
|
||||||
|
objcopy to generate huge binary files.
|
||||||
|
|
||||||
|
2006-06-24 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Reformatted to show the license term
|
||||||
|
and the version number explicitly.
|
||||||
|
|
||||||
|
2006-04-16 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Correct the offset of address
|
||||||
|
fields. Reported by Jeroen Dekkers.
|
||||||
|
|
||||||
|
2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Fix a bug in the byte order of
|
||||||
|
boot_device. I hope this won't affect any OS image.
|
||||||
|
Increased the version number to 0.6.94.
|
||||||
|
|
||||||
|
2004-10-11 Jason Thomas <jason@staff.pnc.com.au>
|
||||||
|
|
||||||
|
Patch from Stefanus Du Toit <sjdutoit@uwaterloo.ca>
|
||||||
|
* docs/kernel.c.texi (cmain): Incremement mod by one, instead of
|
||||||
|
sizeof(module_t), since it's already a pointer of type module_t.
|
||||||
|
* docs/kernel.c (cmain): Do the same.
|
||||||
|
|
||||||
|
2004-04-22 Jeroen Dekkers <jeroen@dekkers.cx>
|
||||||
|
|
||||||
|
* Makefile.am (AUTOMAKE_OPTIONS): Add "gnu".
|
||||||
|
* configure.ac: Update to work with automake 1.8, quote all
|
||||||
|
AC_DEFUN's correctly and provide descriptions for AC_DEFINE's.
|
||||||
|
|
||||||
|
2003-10-19 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
Migrated to newer autotools.
|
||||||
|
|
||||||
|
* configure.in: Removed.
|
||||||
|
* configure.ac: New file. Mostly derived from configure.in.
|
||||||
|
|
||||||
|
2002-07-01 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* Makefile.am (AUTOMAKE_OPTIONS): New variable. Specify the
|
||||||
|
required Automake version explicitly.
|
||||||
|
|
||||||
|
2002-05-23 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
Define the behavior of the boot loader when the load end address
|
||||||
|
and the bss end address are zero in the Multiboot Specification,
|
||||||
|
and add the support into GRUB. I've modified a patch from Yuri
|
||||||
|
Zaporogets <yuriz@ukr.net>.
|
||||||
|
|
||||||
|
* docs/multiboot.texi (The address fields of Multiboot header):
|
||||||
|
Added descriptions about the behavior of the boot loader when
|
||||||
|
LOAD_END_ADDR is zero and BSS_END_ADDR is zero.
|
||||||
|
|
||||||
|
2001-03-03 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi (History): Written.
|
||||||
|
|
||||||
|
2001-01-27 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Start reorganizing Multiboot
|
||||||
|
Specification.
|
||||||
|
|
||||||
|
2001-01-12 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.h [__ELF__] (MULTIBOOT_HEADER_FLAGS): Defined
|
||||||
|
as 0x00000003 instead of 0x00010003.
|
||||||
|
* docs/boot.S (multiboot_header) [__ELF__]: Don't define a.out
|
||||||
|
kludge information.
|
||||||
|
|
||||||
|
* docs/Makefile.am (EXTRA_PROGRAMS): New variable.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (noinst_DATA): Removed.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (noinst_PROGRAMS): Changed to kernel.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_SOURCES): Renamed to ...
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_SOURCES): ... this.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_CFLAGS): Renamed to ...
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_CFLAGS): ... this.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_LDFLAGS): Renamed to ...
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_LDFLAGS): ... this.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel): Removed.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (boot.o): New dependency.
|
||||||
|
(CLEANFILES): New variable.
|
||||||
|
|
||||||
|
2001-01-11 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/Makefile.am [BUILD_EXAMPLE_KERNEL] (noinst_DATA): New
|
||||||
|
variable.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (noinst_PROGRAMS): Likewise.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_SOURCES): Likewise.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_CFLAGS): Likewise.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel_exec_LDFLAGS): Likewise.
|
||||||
|
[BUILD_EXAMPLE_KERNEL] (kernel): New target.
|
||||||
|
* configure.in (--enable-example-kernel): New option.
|
||||||
|
|
||||||
|
* docs/kernel.c (cmain): Cast unsigned long variables to
|
||||||
|
unsigned explicitly, to suppress GCC warnings.
|
||||||
|
|
||||||
|
2000-10-23 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Upgraded to 0.6.92.
|
||||||
|
(Boot information format): Re-designed the graphics table.
|
||||||
|
|
||||||
|
2000-10-20 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
APM BIOS table support is added, based on a patch by Matt Yourst
|
||||||
|
<yourst@mit.edu>.
|
||||||
|
|
||||||
|
* docs/multiboot.texi (Boot information format): Added the
|
||||||
|
definition of APM table format.
|
||||||
|
|
||||||
|
2000-10-16 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
Some of the new Multiboot features are supported. APM support
|
||||||
|
and VESA support are not strictly defined or implemented yet.
|
||||||
|
|
||||||
|
* docs/multiboot.texi (Top): Increase the version number.
|
||||||
|
(Boot information format): Changed the drive information format,
|
||||||
|
because it was not straightforward.
|
||||||
|
|
||||||
|
2000-02-11 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
From Per Lundberg <plundis@byggdok.se>:
|
||||||
|
* docs/multiboot.texi: Added graphics support.
|
||||||
|
|
||||||
|
2000-02-10 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi (Top): Downgrade the version to 0.6.90,
|
||||||
|
since we need more work to release it as 0.7.
|
||||||
|
|
||||||
|
2000-01-03 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/multiboot.texi (Boot information format): Added the
|
||||||
|
descriptions about the fields "config_table" and
|
||||||
|
"boot_loader_name".
|
||||||
|
|
||||||
|
1999-12-31 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* docs/src2texi: Added an extra space into the first line, for
|
||||||
|
the portability issue.
|
||||||
|
|
||||||
|
1999-11-05 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/multiboot.texi (Boot information format): Add the members
|
||||||
|
`drives_addr' and `drives_count' into the Multiboot information
|
||||||
|
structure, and added the descriptions.
|
||||||
|
|
||||||
|
1999-10-27 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/help2man: Upgraded to 1.016.
|
||||||
|
|
||||||
|
1999-10-20 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/Makefile.am (%.c.texi): Use $(SHELL) instead of /bin/sh.
|
||||||
|
(%.h.texi): Likewise.
|
||||||
|
(%.S.texi): Likewise.
|
||||||
|
|
||||||
|
1999-10-17 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/Makefile.am (.texi): Canceled because the dependecies can
|
||||||
|
be circulated.
|
||||||
|
|
||||||
|
1999-10-16 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Include the example source files of a
|
||||||
|
Multiboot kernel.
|
||||||
|
* docs/src2texi: New file.
|
||||||
|
* docs/boot.S: Likewise.
|
||||||
|
* docs/multiboot.h: Likewise.
|
||||||
|
* docs/kernel.c: Likewise.
|
||||||
|
* docs/boot.S.texi: Likewise.
|
||||||
|
* docs/multiboot.h.texi: Likewise.
|
||||||
|
* docs/kernel.c.texi: Likewise.
|
||||||
|
* docs/Makefile.am (EXAMPLES): New varilable.
|
||||||
|
(multiboot_TEXINFOS): Likewise.
|
||||||
|
(SRC2TEXI): Likewise.
|
||||||
|
(noinst_SCRIPTS): Added $(SRC2TEXI).
|
||||||
|
(EXTRA_DIST): Added $(EXAMPLES) and $(multiboot_TEXINFOS).
|
||||||
|
(%.c.texi): New target.
|
||||||
|
(%.h.texi): Likewise.
|
||||||
|
(%.S.texi): Likewise.
|
||||||
|
|
||||||
|
1999-09-13 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* configure.in (--enable-maintainer-mode): Do not use our own
|
||||||
|
rule, but use AM_MAINTAINER_MODE instead. If the maintainer mode
|
||||||
|
is enabled, then check for perl, and if it is not found, print
|
||||||
|
an error message and abort.
|
||||||
|
* docs/Makefile.am (grub.8): Regenerated if MAINTAINER_MODE is
|
||||||
|
defined, instead of GRUB_MAINT. Use the variable PERL rather
|
||||||
|
than running help2man directly.
|
||||||
|
|
||||||
|
1999-06-21 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/Makefile.am (html): Deleted.
|
||||||
|
(txt): Likewise.
|
||||||
|
(EXTRA_DIST): $(txt) and $(html) are removed.
|
||||||
|
* docs/boot-proposal.html: Removed.
|
||||||
|
* docs/errors.html: Likewise.
|
||||||
|
* docs/faq.html: Likewise.
|
||||||
|
* docs/grub.html: Likewise.
|
||||||
|
* docs/install.html: Likewise.
|
||||||
|
* docs/mem64mb.html: Likewise.
|
||||||
|
* docs/technical.html: Likewise.
|
||||||
|
* docs/using.html: Likewise.
|
||||||
|
* docs/PC_partitioning.txt: Likewise.
|
||||||
|
* docs/bios_mapping.txt: Likewise.
|
||||||
|
* docs/commands.txt: Likewise.
|
||||||
|
* docs/embedded_data.txt: Likewise.
|
||||||
|
* docs/filesystem.txt: Likewise.
|
||||||
|
|
||||||
|
1999-05-14 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* docs/Makefile.am (info_TEXINFOS): Added multiboot.texi.
|
||||||
|
* docs/multiboot.texi: New file. From Kunihiro Ishiguro.
|
||||||
-55487
File diff suppressed because it is too large.
Load diff
@@ -1,294 +0,0 @@
|
|||||||
-*- Text -*-
|
|
||||||
|
|
||||||
This is the GRUB. Welcome.
|
|
||||||
|
|
||||||
This file contains instructions for compiling and installing the GRUB.
|
|
||||||
|
|
||||||
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 4.1.3 or later
|
|
||||||
Note: older versions may work but support is limited
|
|
||||||
|
|
||||||
Experimental support for clang 3.3 or later (results in much bigger binaries)
|
|
||||||
for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64
|
|
||||||
Note: clang 3.2 or later works for i386 and x86_64 targets but results in
|
|
||||||
much bigger binaries.
|
|
||||||
earlier versions not tested
|
|
||||||
Note: clang 3.2 or later works for arm
|
|
||||||
earlier versions not tested
|
|
||||||
Note: clang on arm64 is not supported due to
|
|
||||||
https://llvm.org/bugs/show_bug.cgi?id=26030
|
|
||||||
Note: clang 3.3 or later works for mips(el)
|
|
||||||
earlier versions fail to generate .reginfo and hence gprel relocations
|
|
||||||
fail.
|
|
||||||
Note: clang 3.2 or later works for powerpc
|
|
||||||
earlier versions not tested
|
|
||||||
Note: clang 3.5 or later works for sparc64
|
|
||||||
earlier versions return "error: unable to interface with target machine"
|
|
||||||
Note: clang has no support for ia64 and hence you can't compile GRUB
|
|
||||||
for ia64 with clang
|
|
||||||
* GNU Make
|
|
||||||
* GNU Bison 2.3 or later
|
|
||||||
* GNU gettext 0.17 or later
|
|
||||||
* GNU binutils 2.9.1.0.23 or later
|
|
||||||
* Flex 2.5.35 or later
|
|
||||||
* 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)
|
|
||||||
* libusb (optional)
|
|
||||||
|
|
||||||
To build GRUB's graphical terminal (gfxterm), you need:
|
|
||||||
|
|
||||||
* FreeType 2 or later
|
|
||||||
* GNU Unifont
|
|
||||||
|
|
||||||
If you use a development snapshot or want to hack on GRUB you may
|
|
||||||
need the following.
|
|
||||||
|
|
||||||
* Python 2.6 or later
|
|
||||||
* Autoconf 2.60 or later
|
|
||||||
* Automake 1.10.1 or later
|
|
||||||
|
|
||||||
Prerequisites for make-check:
|
|
||||||
|
|
||||||
* qemu, specifically the binary 'qemu-system-i386'
|
|
||||||
* xorriso 1.2.9 or later, for grub-mkrescue and grub-shell
|
|
||||||
|
|
||||||
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. Skip this and following step if you use release tarball and proceed to
|
|
||||||
step 4. If you want translations type `./linguas.sh'.
|
|
||||||
|
|
||||||
3. Type `./autogen.sh'.
|
|
||||||
|
|
||||||
* autogen.sh uses python. By default invocation is "python" but can be
|
|
||||||
overriden by setting variable $PYTHON.
|
|
||||||
|
|
||||||
4. 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.
|
|
||||||
|
|
||||||
6. Type `make' to compile the package.
|
|
||||||
|
|
||||||
7. Optionally, type `make check' to run any self-tests that come with
|
|
||||||
the package.
|
|
||||||
|
|
||||||
8. Type `make install' to install the programs and any data files and
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
9. 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_CC=gcc BUILD_FREETYPE=freetype-config --host=amd64-linux-gnu
|
|
||||||
CC=amd64-linux-gnu-gcc CFLAGS="-g -O2" FREETYPE=amd64-linux-gnu-freetype-config
|
|
||||||
--target=arm --with-platform=uboot TARGET_CC=arm-elf-gcc
|
|
||||||
TARGET_CFLAGS="-Os -march=armv6" TARGET_CCASFLAGS="-march=armv6"
|
|
||||||
TARGET_OBJCOPY="arm-elf-objcopy" TARGET_STRIP="arm-elf-strip"
|
|
||||||
TARGET_NM=arm-elf-nm TARGET_RANLIB=arm-elf-ranlib LEX=gflex
|
|
||||||
|
|
||||||
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_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.
|
|
||||||
2. BUILD_CFLAGS= for C options for build.
|
|
||||||
3. BUILD_CPPFLAGS= for C preprocessor options for build.
|
|
||||||
4. BUILD_LDFLAGS= for linker options for build.
|
|
||||||
5. BUILD_FREETYPE= for freetype-config for build (optional).
|
|
||||||
|
|
||||||
- For host
|
|
||||||
1. --host= to autoconf name of host.
|
|
||||||
2. CC= for gcc able to compile for host
|
|
||||||
3. HOST_CFLAGS= for C options for host.
|
|
||||||
4. HOST_CPPFLAGS= for C preprocessor options for host.
|
|
||||||
5. HOST_LDFLAGS= for linker options for host.
|
|
||||||
6. FREETYPE= for freetype-config for host (optional).
|
|
||||||
7. Libdevmapper if any must be in standard linker folders (-ldevmapper) (optional).
|
|
||||||
8. Libfuse if any must be in standard linker folders (-lfuse) (optional).
|
|
||||||
9. Libzfs if any must be in standard linker folders (-lzfs) (optional).
|
|
||||||
10. Liblzma if any must be in standard linker folders (-llzma) (optional).
|
|
||||||
|
|
||||||
- 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.
|
|
||||||
|
|
||||||
- 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)
|
|
||||||
3. libusb is looked for in standard linker directories (-lusb) (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.
|
|
||||||
+11
-474
@@ -1,474 +1,11 @@
|
|||||||
AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
|
# Do not change this order if you don't know what you are doing.
|
||||||
|
AUTOMAKE_OPTIONS = 1.7 gnu
|
||||||
DEPDIR = .deps-util
|
SUBDIRS = doc
|
||||||
SUBDIRS = grub-core/gnulib .
|
|
||||||
if COND_real_platform
|
.PHONY: web-manual
|
||||||
SUBDIRS += grub-core
|
web-manual: all
|
||||||
endif
|
@cd '$(srcdir)/doc' ; \
|
||||||
SUBDIRS += po docs util/bash-completion.d
|
$(SHELL) ../gendocs.sh -o '$(abs_builddir)/doc/manual' \
|
||||||
|
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
|
||||||
include $(top_srcdir)/conf/Makefile.common
|
"$(PACKAGE_NAME) - $(manual_title)"
|
||||||
include $(top_srcdir)/conf/Makefile.extra-dist
|
@echo " *** Upload the doc/manual directory to web-cvs."
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# 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: 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: $(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
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_multiboot
|
|
||||||
QEMU32=qemu-system-i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_ieee1275
|
|
||||||
QEMU32=qemu-system-i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_qemu
|
|
||||||
QEMU32=qemu-system-i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_pc
|
|
||||||
QEMU32=qemu-system-i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_efi
|
|
||||||
QEMU32=qemu-system-i386
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_x86_64_efi
|
|
||||||
QEMU32=qemu-system-x86_64
|
|
||||||
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 pentium2" | 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
|
|
||||||
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 $(shell cat grub-core/fs.lst) 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
|
|
||||||
|
|
||||||
EXTRA_DIST += ChangeLog ChangeLog-2015
|
|
||||||
|
|
||||||
syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg
|
|
||||||
|
|
||||||
tests/syslinux/ubuntu10.04_grub.cfg: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg.in
|
|
||||||
(for x in tests/syslinux/ubuntu10.04_grub.cfg.in ; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:-
|
|
||||||
CLEANFILES += tests/syslinux/ubuntu10.04_grub.cfg
|
|
||||||
-1351
File diff suppressed because it is too large.
Load diff
@@ -1,703 +0,0 @@
|
|||||||
New in 2.02:
|
|
||||||
|
|
||||||
* New/improved filesystem and disk support:
|
|
||||||
* Big-endian UFS1.
|
|
||||||
* Experimental 64-bit ext2 support.
|
|
||||||
* Various fixes for non-512-byte sector devices.
|
|
||||||
* New `proc' filesystem framework, used by LUKS disks.
|
|
||||||
* Fix DM-RAID partition handling.
|
|
||||||
* New `nativedisk' command to switch from firmware to native disk drivers.
|
|
||||||
* Compressed HFS+.
|
|
||||||
* DragonFly BSD labels.
|
|
||||||
* CBFS (coreboot).
|
|
||||||
* Handle partitioned LVM properly.
|
|
||||||
* Use LVM UUIDs whenever possible.
|
|
||||||
* GPT PReP.
|
|
||||||
* New `progress' module that shows progress information while reading
|
|
||||||
files.
|
|
||||||
* ZFS features support.
|
|
||||||
* ZFS LZ4 support.
|
|
||||||
* XFS V5 format support.
|
|
||||||
* LVM RAID1 support.
|
|
||||||
|
|
||||||
* New/improved terminal and video support:
|
|
||||||
* Monochrome text (matching `hercules' in GRUB Legacy).
|
|
||||||
* Morse code output using system speaker.
|
|
||||||
* `spkmodem' output (simple data protocol using system speaker).
|
|
||||||
* Handle Japanese special keys.
|
|
||||||
* coreboot framebuffer.
|
|
||||||
* Serial on ARC.
|
|
||||||
* Native vt100 handling for grub-emu, replacing the use of the curses
|
|
||||||
library.
|
|
||||||
* New gfxmenu options for terminal window positioning, theme background
|
|
||||||
image handling, and scrollbar padding, plus `item_pixmap_style' and
|
|
||||||
`highlight_overlay'.
|
|
||||||
* Support several more image types (paletted and greyscale).
|
|
||||||
|
|
||||||
* Boot protocol improvements:
|
|
||||||
* Support Apple FAT binaries on non-Apple platforms.
|
|
||||||
* Improve FreeDOS direct loading support compatibility.
|
|
||||||
* Enable `linux16' on all x86 platforms, not just BIOS.
|
|
||||||
* New TrueCrypt ISO loader.
|
|
||||||
* multiboot2 boot-services EFI specification.
|
|
||||||
* multiboot2 EFI memory map specification.
|
|
||||||
* multiboot2 full-file specfication.
|
|
||||||
|
|
||||||
* New/improved network support:
|
|
||||||
* New variables `net_default_*' containing properties of the default
|
|
||||||
interface.
|
|
||||||
* Autoload `http' and `tftp' modules if necessary.
|
|
||||||
* Improve TFTP robustness.
|
|
||||||
* Parse `nd' disk names in GRUB Legacy configuration files.
|
|
||||||
* Issue separate DNS queries for IPv4 and IPv6.
|
|
||||||
* Support IPv6 Router Advertisement to configure default router.
|
|
||||||
* New variable net_<interface>_next_server containing next server
|
|
||||||
from BOOTP reply.
|
|
||||||
|
|
||||||
* Coreboot improvements:
|
|
||||||
* CBFS support both in on-disk images (loopback) and flash.
|
|
||||||
* Ability to launch another payload from flash or disk
|
|
||||||
* Coreboot framebuffer
|
|
||||||
* CBMEMC support (both logging and inspecting logs)
|
|
||||||
* Command for inspecting coreboot timestamps (`coreboot_boottime').
|
|
||||||
* Command for inspecting coreboot tables (`lscoreboot').
|
|
||||||
* New target default_payload.elf.
|
|
||||||
* Increased maximal core size.
|
|
||||||
* Prefer pmtimer for TSC calibration.
|
|
||||||
|
|
||||||
* New/improved platform support:
|
|
||||||
* New `efifwsetup' and `lsefi' commands on EFI platforms.
|
|
||||||
* New `cmosdump' and `cmosset' commands on platforms with CMOS support.
|
|
||||||
* New command `pcidump' for PCI platforms.
|
|
||||||
* Improve opcode parsing in ACPI halt implementation.
|
|
||||||
* Use the TSC as a possible time source on i386-ieee1275.
|
|
||||||
* Merge PowerPC grub-mkrescue implementation with the common one.
|
|
||||||
* Support grub-mkrescue on i386-ieee1275, sparc64, bootinfo machines such
|
|
||||||
as pSeries, and mips-arc.
|
|
||||||
* Make grub-mkrescue better support Apple Intel Macs on CD.
|
|
||||||
* Enable GRUB Legacy configuration file parsing on EFI.
|
|
||||||
* Support halt for Loongson 2E.
|
|
||||||
* ARM U-Boot and EFI ports.
|
|
||||||
* Reorganise platform-dependent code in utilities to avoid #ifdef mess.
|
|
||||||
* AROS and Haiku support for userspace utilities.
|
|
||||||
* Xen PV port.
|
|
||||||
* Fix EFI stack alignment.
|
|
||||||
* ARM64 EFI port.
|
|
||||||
* On Linux, read partition start offsets from sysfs if possible.
|
|
||||||
* New grub-macbless utility, and better integration with Mac firmware in
|
|
||||||
grub-install.
|
|
||||||
* Support Yeeloong 3A.
|
|
||||||
* Add `cpuid --pae' option to detect Physical Address Extension on x86.
|
|
||||||
* Support for USB debug dongles.
|
|
||||||
* Support for *-emu on all platforms (previously only i386/x86_64 worked).
|
|
||||||
* Support *-emu on Windows.
|
|
||||||
* New platform `none' which builds only user level utilities. This is now
|
|
||||||
default if target CPU is not supported.
|
|
||||||
* Support for booting little-endian Linux kernel on powerpc.
|
|
||||||
* Support network boot with Oracle sun4v vnet devices.
|
|
||||||
* Added SAS disks to the IEEE 1275 Open Firmware device list.
|
|
||||||
* Try multiple methods for TSC (timestamp counter) calibration - PIT, pmtimer,
|
|
||||||
EFI Stall. If everything fails, use hardcoded frequency 800MHz.
|
|
||||||
* Support Hyper-V Gen2 platforms which lack PIT for TSC calibration.
|
|
||||||
* Map UEFI Persistent Memory to E820 persistent memory.
|
|
||||||
* New Xen loader on ARM64.
|
|
||||||
* Respect alignment requirement for block device IO buffers on EFI.
|
|
||||||
|
|
||||||
* Security:
|
|
||||||
* Add optional facility to enforce that all files read by the core image
|
|
||||||
from disk have a valid detached digital signature.
|
|
||||||
|
|
||||||
* Performance:
|
|
||||||
* Avoid costly division operations in many places.
|
|
||||||
* New boot time analysis framework (`./configure --enable-boot-time').
|
|
||||||
* Initialise USB ports in parallel.
|
|
||||||
* New `testspeed' command to test file read speed.
|
|
||||||
* Speed-up gfxterm by storing intermediate results in more compact format.
|
|
||||||
* Lazy LVM/mdraid scan.
|
|
||||||
* Disk hints.
|
|
||||||
|
|
||||||
* Scripting:
|
|
||||||
* New `eval' and `tr' commands.
|
|
||||||
* grub-script-check fails on scripts containing no commands.
|
|
||||||
|
|
||||||
* Installation and other utility improvements:
|
|
||||||
* Add option to compress files on installation or image creation.
|
|
||||||
* Using grub-reboot no longer requires setting `GRUB_DEFAULT=saved'.
|
|
||||||
* Support probing EFI System Partition (requires os-prober >= 1.58).
|
|
||||||
* Fix inconsistent use of `GRUB_CRYPTODISK_ENABLE' and
|
|
||||||
`GRUB_ENABLE_CRYPTODISK'; the latter is now used consistently.
|
|
||||||
* grub-mount handles symbolic links to directories.
|
|
||||||
* Support disabling submenus with `GRUB_DISABLE_SUBMENU' configuration key
|
|
||||||
for grub-mkconfig.
|
|
||||||
* grub-install, grub-mknetdir, grub-mkrescue, and grub-mkstandalone
|
|
||||||
rewritten in C. They should now work in supported non-Unix-like
|
|
||||||
environments.
|
|
||||||
* Native mingw support.
|
|
||||||
* Ability to install on EFI under windows.
|
|
||||||
* Reorganise timeout handling using new `timeout_style' environment
|
|
||||||
variable and `GRUB_TIMEOUT_STYLE' configuration key for grub-mkconfig.
|
|
||||||
Menu hotkeys pressed during a hidden timeout now boot the corresponding
|
|
||||||
menu entry immediately.
|
|
||||||
* New `file' command and grub-file utility to check file types.
|
|
||||||
* New syslinux configuration file parser.
|
|
||||||
* Set menu entry class to primary OS name returned by os-prober to display
|
|
||||||
OS specific icon.
|
|
||||||
* On Linux x86 detect EFI word size in grub-install and automatically select
|
|
||||||
correct platform (x86_64-efi or i386-efi) to install. Requires Linux kernel
|
|
||||||
4.0 or higher.
|
|
||||||
|
|
||||||
* Build system:
|
|
||||||
* Remove all uses of nested functions; GRUB no longer requires an
|
|
||||||
executable stack.
|
|
||||||
* Fix documentation build with Texinfo >= 5.1.
|
|
||||||
* More robust and documented cross-compiling support.
|
|
||||||
* Partial clang support for some platforms (experimental).
|
|
||||||
* Partial mingw64 x86_64-efi compile support (highly experimental).
|
|
||||||
* Partial mingw32 i386-* (other than already present i386-pc)
|
|
||||||
compile support (highly experimental).
|
|
||||||
* Support for grub-mkpasswd on Windows.
|
|
||||||
* Eliminate the use of AutoGen. This allowed some performance
|
|
||||||
improvements to the build system.
|
|
||||||
* Remove variable length arrays.
|
|
||||||
* OpenBSD compile and tools support (NetBSD and FreeBSD were already supported).
|
|
||||||
* Fix build with FreeType >= 2.5.1.
|
|
||||||
* Make gentpl.py compatible with Python 3. It now requires at least
|
|
||||||
Python 2.6.
|
|
||||||
* modinfo.sh contains build information now.
|
|
||||||
* Added many new tests to improve robustness.
|
|
||||||
* Target is built without libgcc now. Necessary builtins are reimplemented
|
|
||||||
directly. This removes requirement for target-specific runtime on build
|
|
||||||
system.
|
|
||||||
* emu libusb support removed (was broken and unmaintained).
|
|
||||||
* powerpc64le compile support.
|
|
||||||
* Use fixed timestamp when generating GRUB image for reproducible builds.
|
|
||||||
* Verify at build time that modules contain only supported relocations and their
|
|
||||||
structure matches what boot-time module loader expects.
|
|
||||||
* Do not require fonts on powerpc-ieee1275.
|
|
||||||
|
|
||||||
* Revision control moved to git.
|
|
||||||
|
|
||||||
New in 2.00:
|
|
||||||
|
|
||||||
* Appearance:
|
|
||||||
* Official theme for gfxmenu (starfield)
|
|
||||||
* Menu is organised with submenus.
|
|
||||||
* Better default video mode selection using EDID.
|
|
||||||
|
|
||||||
* New platforms:
|
|
||||||
* Itanium port.
|
|
||||||
* Fuloong2F support (including GRUB as firmware)
|
|
||||||
* Fuloong2E support (except GRUB as firmware)
|
|
||||||
* ARCS (SGI machines) port.
|
|
||||||
* qemu -M mips port.
|
|
||||||
|
|
||||||
* grub-mount to mount filesystems using GRUB FS drivers and FUSE.
|
|
||||||
|
|
||||||
* Changed security default so entries are locked by default if any superuser is
|
|
||||||
defined.
|
|
||||||
|
|
||||||
* New drivers:
|
|
||||||
* EHCI.
|
|
||||||
* AHCI.
|
|
||||||
* ESCC serial.
|
|
||||||
* IEEE1275 serial.
|
|
||||||
* EFI serial.
|
|
||||||
* Network stack for BIOS, IEEE1275, EMU and EFI, including TFTP, HTTP and DNS.
|
|
||||||
|
|
||||||
* New filesystem, filters and disks formats:
|
|
||||||
* DVH partition map.
|
|
||||||
* Plan9 partition map.
|
|
||||||
* Big-endian mdraid.
|
|
||||||
* Big-endian cpio.
|
|
||||||
* ODC and NEWC cpio.
|
|
||||||
* ExFAT.
|
|
||||||
* Minix3fs.
|
|
||||||
* Big-endian minixfs.
|
|
||||||
* RomFS.
|
|
||||||
* Squash4.
|
|
||||||
* Support non-512B disk blocks.
|
|
||||||
* LUKS and GELI support.
|
|
||||||
* LDM read support (no install yet).
|
|
||||||
* LZOP.
|
|
||||||
|
|
||||||
* Improved filesystem and disks formats support:
|
|
||||||
* HFS+ label support.
|
|
||||||
* Improved reiserfs support.
|
|
||||||
* multidevice, mirrored and raidz(2,3) ZFS support.
|
|
||||||
* RAID LVM (internal RAIDing) support.
|
|
||||||
* ZFS crypto support.
|
|
||||||
* ZLE, LZ4 and GZIP on ZFS support.
|
|
||||||
* Support ZFS up to 33.
|
|
||||||
* HFS string is now treated like mac-roman and not UTF-8
|
|
||||||
* HFS mtime support.
|
|
||||||
* Improved AFFS and SFS support.
|
|
||||||
* LZO-compressed btrfs support.
|
|
||||||
* cpio and tar symlinks support.
|
|
||||||
* Better FS detection to reduce false positives.
|
|
||||||
|
|
||||||
* New boot protocols:
|
|
||||||
* Ability to load another coreboot payload when on coreboot.
|
|
||||||
* Plan9.
|
|
||||||
* Freedos.
|
|
||||||
* Ntldr/bootmgr (to load Windows bootloader).
|
|
||||||
* chainloader --bpb support to patch FAT or NTFS BPB in memory to correct
|
|
||||||
wrong partition offset.
|
|
||||||
* PXE chainloading support.
|
|
||||||
* Darwin 11 (Mac OS X Lion) protocol support.
|
|
||||||
|
|
||||||
* Boot protocol improvements:
|
|
||||||
* Multiple initrd support.
|
|
||||||
* Basic illumos and xnu autoconfig.
|
|
||||||
|
|
||||||
* Testing and debugging:
|
|
||||||
* New grub-fstest commands: cat, zfsinfo, testload xnu_uuid
|
|
||||||
* grub-fstest recursive directory compare for quickly checking that
|
|
||||||
a directory is read correctly.
|
|
||||||
* Backtace on crash (if gdb module is loaded, x86 only)
|
|
||||||
* Disk cache statistics gathering.
|
|
||||||
* GDB stub and GDB support script.
|
|
||||||
* "make check" and "make bootcheck" expanded to almost all platforms
|
|
||||||
(except i386-ieee1275, mips-arc, sparc64-ieee1275, ia64-efi and emu)
|
|
||||||
* New `time' command.
|
|
||||||
|
|
||||||
* Performance:
|
|
||||||
* Lazy scanning to avoid accessing devices which aren't really used.
|
|
||||||
This avoids boot delay due to slow device scanning.
|
|
||||||
* Use CPU cache when accessing video memory.
|
|
||||||
* Search hints to first try the most likely device when searching for a
|
|
||||||
device with given UUID. This avoids slow scanning in most cases.
|
|
||||||
|
|
||||||
* Internationalisation:
|
|
||||||
* Updated to Unicode 6.0.
|
|
||||||
* $"..." syntax for translation in grub scripting language. This allows easy
|
|
||||||
translation of grub.cfg at runtime.
|
|
||||||
* Translations to many languages included in official distribution.
|
|
||||||
|
|
||||||
* Scripting:
|
|
||||||
* $grub_cpu and $grub_platform variables for conditioning grub.cfg on platform
|
|
||||||
at runtime.
|
|
||||||
* $feature_* variables to condition scripts on available features.
|
|
||||||
* Use of ids to identify menu entries.
|
|
||||||
* all_video module which is empty but depends on all video modules thus
|
|
||||||
allowing easy loading of all of them.
|
|
||||||
|
|
||||||
* Installation:
|
|
||||||
* grub-mknetdir script for easy creation of netbootable GRUB directory.
|
|
||||||
* Itanium and mips support in grub-mkrescue.
|
|
||||||
* grub-install support for all platforms except emu.
|
|
||||||
* PreP partition install support.
|
|
||||||
* No files conflict between flavours (except grub-mkrescue for ppc). This
|
|
||||||
allows easy install of GRUB for several platforms.
|
|
||||||
* grub-mkstandalone script for easy creating of image including all modules
|
|
||||||
for platforms with generous limit on image size.
|
|
||||||
* program-transform-name now functions according to usual conventions.
|
|
||||||
Use --grubdir and --bootdir to get old behaviour.
|
|
||||||
|
|
||||||
* ADLER32 and CRC64 support (for XZ and hashsum).
|
|
||||||
|
|
||||||
* ofconsole renamed to console
|
|
||||||
|
|
||||||
* Experimental support for compiling with Apple toolchain.
|
|
||||||
|
|
||||||
* grub-mkdevicemap removed. Now all devices are detected on invocation of
|
|
||||||
any grub utility.
|
|
||||||
|
|
||||||
New in 1.99:
|
|
||||||
|
|
||||||
* Keyboard layouts support.
|
|
||||||
|
|
||||||
* New `lsapm' command (i386-pc only).
|
|
||||||
|
|
||||||
* Parser for GRUB Legacy configuration files.
|
|
||||||
|
|
||||||
* Support RAID on virtio devices.
|
|
||||||
|
|
||||||
* Remove deprecated `root' command.
|
|
||||||
|
|
||||||
* New `euro.pf2' font which supports most European languages.
|
|
||||||
|
|
||||||
* Avoid opening the same device twice on Open Firmware platforms.
|
|
||||||
|
|
||||||
* Extend `vbeinfo' and `vbetest' commands to non-VBE graphics, as
|
|
||||||
`videoinfo' and `videotest'.
|
|
||||||
|
|
||||||
* New `lsefisystab', `lssal', and `lsefimmap' commands on EFI platforms.
|
|
||||||
|
|
||||||
* Support explicit user claim that a device is BIOS-visible. Devices
|
|
||||||
listed in device.map will be assumed to be readable using only BIOS
|
|
||||||
facilities, rather than anything more complex such as LVM or RAID.
|
|
||||||
|
|
||||||
* New bash-completion script for GRUB utilities.
|
|
||||||
|
|
||||||
* Use ACPI to shut down if possible.
|
|
||||||
|
|
||||||
* New `lsacpi' command.
|
|
||||||
|
|
||||||
* Btrfs support.
|
|
||||||
|
|
||||||
* New `--boot-directory' option to `grub-install', `grub-reboot', and
|
|
||||||
`grub-set-default', with clearer semantics than the previous
|
|
||||||
`--root-directory' option.
|
|
||||||
|
|
||||||
* Rename CD-ROM device to "cd" on BIOS platforms.
|
|
||||||
|
|
||||||
* Transparent decompression filters.
|
|
||||||
|
|
||||||
* Simpler PXE image generation. New `grub-mknetdir' utility to generate
|
|
||||||
netboot directory trees.
|
|
||||||
|
|
||||||
* New relocator. Allows for more kernel support and more
|
|
||||||
straightforward loader writing.
|
|
||||||
|
|
||||||
* Handle USB pendrives exposed as floppies.
|
|
||||||
|
|
||||||
* New Automake-based build system.
|
|
||||||
|
|
||||||
* Add `sendkey' command (i386-pc only).
|
|
||||||
|
|
||||||
* ZFS support.
|
|
||||||
|
|
||||||
* Support 1.x versions of mdadm metadata.
|
|
||||||
|
|
||||||
* Fix corruption when reading Reiserfs directory entries.
|
|
||||||
|
|
||||||
* Bidirectional text and diacritics support.
|
|
||||||
|
|
||||||
* Skip LVM snapshots.
|
|
||||||
|
|
||||||
* MIPS Yeeloong firmware port.
|
|
||||||
|
|
||||||
* Change grub-mkdevicemap to emit /dev/disk/by-id/ names where possible
|
|
||||||
on GNU/Linux.
|
|
||||||
|
|
||||||
* Add `grub-mkconfig' support for Xen with Linux.
|
|
||||||
|
|
||||||
* Add `grub-mkconfig' support for initrd images on Fedora 13.
|
|
||||||
|
|
||||||
* Support >3GiB and <16MiB RAM in i386-qemu.
|
|
||||||
|
|
||||||
* Add support for Cirrus 5446 and Bochs video cards.
|
|
||||||
|
|
||||||
* Load more appropriate video drivers automatically in `grub-mkconfig'.
|
|
||||||
|
|
||||||
* USB improvements, including hotplugging/hotunplugging, hub support,
|
|
||||||
and USB serial support.
|
|
||||||
|
|
||||||
* AMD Geode CS5536 support.
|
|
||||||
|
|
||||||
* Extensive updates to the Texinfo documentation.
|
|
||||||
|
|
||||||
* Handle symbolic links under /dev/mapper on GNU/Linux.
|
|
||||||
|
|
||||||
* Handle installation across multiple partition table types.
|
|
||||||
|
|
||||||
* Add `cmostest' command (i386/x86_64 only).
|
|
||||||
|
|
||||||
* Add support for DM-RAID disk devices on GNU/Linux.
|
|
||||||
|
|
||||||
* Remove `grub-mkisofs'. `grub-mkrescue' now uses GNU xorriso to build
|
|
||||||
CD images.
|
|
||||||
|
|
||||||
* `grub-mkrescue' support for EFI, coreboot, and QEMU platforms.
|
|
||||||
|
|
||||||
* Unify `grub-mkimage', `grub-setup', and `grub-install' source code
|
|
||||||
across platforms.
|
|
||||||
|
|
||||||
* Fix VGA (as opposed to VBE) video driver, formerly a terminal driver.
|
|
||||||
|
|
||||||
* Add menu hotkey support.
|
|
||||||
|
|
||||||
* Add support for the nilfs2 filesystem.
|
|
||||||
|
|
||||||
* `grub-probe' and `grub-mkconfig' support for NetBSD.
|
|
||||||
|
|
||||||
* Support setting a background image in `grub-mkconfig'.
|
|
||||||
|
|
||||||
* Support multiple terminals in `grub-mkconfig'.
|
|
||||||
|
|
||||||
* Regexp support.
|
|
||||||
|
|
||||||
* MIPS multiboot2 support.
|
|
||||||
|
|
||||||
* Multiboot2 tag support.
|
|
||||||
|
|
||||||
* sunpc partition table support.
|
|
||||||
|
|
||||||
* Add a number of new language features to GRUB script: `for', `while',
|
|
||||||
`until', `elif', function parameters, `break', `continue', `shift',
|
|
||||||
multi-line quoted strings, positional parameters with `setparams',
|
|
||||||
`return', filename wildcard expansion, and `!'.
|
|
||||||
|
|
||||||
* Support nested partition tables. GRUB now prefers to name partitions
|
|
||||||
in the form `(hd0,msdos1,bsd1)' rather than `(hd0,1,a)'.
|
|
||||||
|
|
||||||
* Speed up consecutive hostdisk operations on the same device.
|
|
||||||
|
|
||||||
* Compile parts of `grub-emu' as modules.
|
|
||||||
|
|
||||||
New in 1.98 - 2010-03-06:
|
|
||||||
|
|
||||||
* Multiboot on EFI support.
|
|
||||||
|
|
||||||
* Graphical menu support.
|
|
||||||
|
|
||||||
* MIPS support.
|
|
||||||
|
|
||||||
* Saved default menu entry support, with new utilities `grub-reboot' and
|
|
||||||
`grub-set-default'.
|
|
||||||
|
|
||||||
* Unit testing framework.
|
|
||||||
|
|
||||||
* Support for multiple terminals.
|
|
||||||
|
|
||||||
* Encrypted password support, with a new utility `grub-mkpasswd-pbkdf2'.
|
|
||||||
|
|
||||||
* `grub-mkfloppy' removed; use `grub-mkrescue' to create floppy images.
|
|
||||||
|
|
||||||
* Add grub-probe support for GNU/Hurd.
|
|
||||||
|
|
||||||
* Add support for gettext.
|
|
||||||
|
|
||||||
New in 1.97:
|
|
||||||
|
|
||||||
* Add support for loading XNU (MacOS X kernel).
|
|
||||||
|
|
||||||
* ACPI override support.
|
|
||||||
|
|
||||||
* Integrated gptsync.
|
|
||||||
|
|
||||||
* Password protection support.
|
|
||||||
|
|
||||||
* Partition manipulation tool.
|
|
||||||
|
|
||||||
* Add `keystatus' command.
|
|
||||||
|
|
||||||
* Unicode fonts are now used by default.
|
|
||||||
|
|
||||||
* Add `hdparm' command.
|
|
||||||
|
|
||||||
* Add support for getting the current date and time from CMOS as variables.
|
|
||||||
|
|
||||||
* Add `drivemap' command.
|
|
||||||
|
|
||||||
* Add support for RAID levels 4,6 and 10.
|
|
||||||
|
|
||||||
* update-grub is replaced by grub-mkconfig.
|
|
||||||
|
|
||||||
* When booting from PXE, PXE can be used to load files.
|
|
||||||
|
|
||||||
* High resolution timer support.
|
|
||||||
|
|
||||||
* Image loaders now support IO buffering.
|
|
||||||
|
|
||||||
* Add `crc' command.
|
|
||||||
|
|
||||||
* Add Cygwin support.
|
|
||||||
|
|
||||||
* Add x86_64 EFI support.
|
|
||||||
|
|
||||||
* Use LZMA compression instead of LZO.
|
|
||||||
|
|
||||||
* Support for saving the environment from and loading the environment
|
|
||||||
from a file.
|
|
||||||
|
|
||||||
* Allow the UUID to be used as device name.
|
|
||||||
|
|
||||||
* The `search' command can use UUIDs now.
|
|
||||||
|
|
||||||
* Add support for IEEE 1275 on i386.
|
|
||||||
|
|
||||||
* Create partmap.lst and use it to automatically load partition map
|
|
||||||
modules.
|
|
||||||
|
|
||||||
* grub-mkconfig supports os-prober to add operating systems to the
|
|
||||||
boot menu.
|
|
||||||
|
|
||||||
* The ATA driver supports devices bigger than 2 TiB.
|
|
||||||
|
|
||||||
* Add support for the UDF, AFS and EXT4 filesystems.
|
|
||||||
|
|
||||||
* The ISO9660 filesystem supports the Joliet extension
|
|
||||||
|
|
||||||
* Add support for loading kernels of FreeBSD, NetBSD and OpenBSD.
|
|
||||||
|
|
||||||
* Add new command `sleep'.
|
|
||||||
|
|
||||||
* Support for direct access to AT keyboards.
|
|
||||||
|
|
||||||
* New utility `grub-fstest'.
|
|
||||||
|
|
||||||
New in 1.96 - 2008-02-03:
|
|
||||||
|
|
||||||
* The license term is changed to GNU General Public License Version 3.
|
|
||||||
|
|
||||||
* grub-emu is made optional. Now you have to use
|
|
||||||
`--enable-grub-emu' to enable it.
|
|
||||||
|
|
||||||
* Add Multiboot2 support.
|
|
||||||
|
|
||||||
* grub-emu can access the host filesystem now.
|
|
||||||
|
|
||||||
* Add support for the NTFS, cpio/tar and Reiserfs filesystems.
|
|
||||||
|
|
||||||
* Add support for ATA/ATAPI.
|
|
||||||
|
|
||||||
* Add update-grub script to generate grub.cfg.
|
|
||||||
|
|
||||||
* Add grub-mkrescue script to generate floppy or ElTorito images
|
|
||||||
(i386-pc only).
|
|
||||||
|
|
||||||
* Add support for background images in gfxterm (background_image command).
|
|
||||||
|
|
||||||
* Add support for detection of 64-bit support in CPU (cpuid command).
|
|
||||||
|
|
||||||
* GPT is now enabled in i386-pc target.
|
|
||||||
|
|
||||||
* Add grub-install for EFI.
|
|
||||||
|
|
||||||
* Ported to the following new platforms: Efika, coreboot (a.k.a. LinuxBIOS),
|
|
||||||
OLPC XO.
|
|
||||||
|
|
||||||
* Add support for colored menu (menu_color_normal and menu_color_highlight
|
|
||||||
variables).
|
|
||||||
|
|
||||||
* Fix support for loading Linux zImages (such as memtest86).
|
|
||||||
|
|
||||||
New in 1.95 - 2006-10-15:
|
|
||||||
|
|
||||||
* Number partitions from 1 instead of 0. For instance, the first
|
|
||||||
partition of "hd0" is now "hd0,1" but not "hd0,0".
|
|
||||||
|
|
||||||
* grub-probefs is renamed to grub-probe, and supports printing a
|
|
||||||
guessed OS device name and a GRUB drive name.
|
|
||||||
|
|
||||||
* RAID and LVM support is added.
|
|
||||||
|
|
||||||
* New command, echo.
|
|
||||||
|
|
||||||
* The disk API is changed to support 64-bit addressing.
|
|
||||||
|
|
||||||
* A TGA loader is added for the video API.
|
|
||||||
|
|
||||||
New in 1.94 - 2006-06-04:
|
|
||||||
|
|
||||||
* Fix several serious bugs in HFS+.
|
|
||||||
|
|
||||||
* Add experimental EFI support. Chainloading and Linux loading are
|
|
||||||
supported at the moment.
|
|
||||||
|
|
||||||
* Add a new command "blocklist" to show a block list.
|
|
||||||
|
|
||||||
* Use --with-platform to specify a boot environment. For now, efi,
|
|
||||||
ieee1275 and pc are supported.
|
|
||||||
|
|
||||||
* Use the filename "kernel.elf" instead of "grubof" on ieee1275.
|
|
||||||
|
|
||||||
* Install GRUB into pkglibdir instead of pkgdatadir.
|
|
||||||
|
|
||||||
* Support environmental variables. You can export variables by the
|
|
||||||
command "export".
|
|
||||||
|
|
||||||
* Remove the commands "default" and "timeout". They are now variables.
|
|
||||||
|
|
||||||
* Add the commands "source" and "." to include a file.
|
|
||||||
|
|
||||||
* Implement experimental Video API and a new terminal "gfxterm" based
|
|
||||||
on the Video API.
|
|
||||||
|
|
||||||
|
|
||||||
New in 1.93 - 2006-03-10:
|
|
||||||
|
|
||||||
* Add support for the HFS+ wrapper.
|
|
||||||
|
|
||||||
* Major improvements to scripting support.
|
|
||||||
|
|
||||||
* Menu entries are now scriptable.
|
|
||||||
|
|
||||||
|
|
||||||
New in 1.92 - 2005-12-25:
|
|
||||||
|
|
||||||
* Add support for GPT partition table format.
|
|
||||||
|
|
||||||
* Add a new command "play" to play an audio file on PC.
|
|
||||||
|
|
||||||
* Add support for Linux/ADFS partition table format.
|
|
||||||
|
|
||||||
* Add support for BASH-like scripting.
|
|
||||||
|
|
||||||
* Add support for Apple HFS+ filesystems.
|
|
||||||
|
|
||||||
|
|
||||||
New in 1.91 - 2005-10-15:
|
|
||||||
|
|
||||||
* Add support for LZO version 2.
|
|
||||||
|
|
||||||
* Support completion in the entry editor.
|
|
||||||
|
|
||||||
* Add VBE support.
|
|
||||||
|
|
||||||
* New commands, "search", "vbetest" and "vbeinfo".
|
|
||||||
|
|
||||||
* The option BOOT_IMAGE is passed to Linux.
|
|
||||||
|
|
||||||
* Add support for automatic decompression for gzip.
|
|
||||||
|
|
||||||
* Add support for terminfo and serial.
|
|
||||||
|
|
||||||
* Add support for x86_64.
|
|
||||||
|
|
||||||
* GRUB itself is a Multiboot-compliant kernel.
|
|
||||||
|
|
||||||
* Add new filesystems: XFS, SFS, and AFFS.
|
|
||||||
|
|
||||||
|
|
||||||
New in 1.90 - 2005-08-07:
|
|
||||||
|
|
||||||
* Rename the project name PUPA to GRUB. Now this version is the
|
|
||||||
developmental version of GRUB officially.
|
|
||||||
|
|
||||||
* The GRUB emulator ``grub-emu'' is added.
|
|
||||||
|
|
||||||
* Add support for newworld Mac. This should work with other
|
|
||||||
PowerPC-based machines as well, if they use IEEE 1275
|
|
||||||
(Open Firmware).
|
|
||||||
|
|
||||||
* Too many changes to describe. Look at ChangeLog for more details.
|
|
||||||
|
|
||||||
|
|
||||||
New in 0.7:
|
|
||||||
|
|
||||||
* Problems in cross-compiling PUPA are fixed.
|
|
||||||
|
|
||||||
* Use -mrtd and -mregparm=3 to reduce the generated code sizes. This
|
|
||||||
means that any missing prototypes could be fatal. Also, you must take
|
|
||||||
care when writing assembly code. See the comments at the beginning of
|
|
||||||
startup.S, for more details.
|
|
||||||
|
|
||||||
* New utility, ``pupa-setup''. This sets up PUPA to make it bootable
|
|
||||||
from a real disk.
|
|
||||||
|
|
||||||
* New commands, "prefix", "insmod", "rmmod" and "lsmod" are added into
|
|
||||||
the rescue mode to manipulate PUPA modules.
|
|
||||||
|
|
||||||
* Linux support is added. Initrd is not support yet.
|
|
||||||
|
|
||||||
* Reduce the size of a core image significantly by compressing a large
|
|
||||||
part of the core image and decompressing itself at boot time. The
|
|
||||||
currently used algorithm is LZO (more precisely, LZO1X-999). So you
|
|
||||||
have to install LZO to build PUPA. See
|
|
||||||
<http://www.oberhumer.com/opensource/lzo/>, for more information.
|
|
||||||
|
|
||||||
|
|
||||||
New in 0.6 - 2002-12-27, Yoshinori K. Okuji:
|
|
||||||
|
|
||||||
* The chainloader and the FAT filesystem are modularized.
|
|
||||||
|
|
||||||
* The structure of the source tree is a bit changed.
|
|
||||||
|
|
||||||
* Support for building loadable modules is added.
|
|
||||||
|
|
||||||
* Some generic parts of pupa-mkimage are segregated.
|
|
||||||
|
|
||||||
* Some documentation files are added, according to the GNU Coding
|
|
||||||
Standards.
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
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.
|
|
||||||
|
|
||||||
See the file NEWS for a description of recent changes to GRUB 2.
|
|
||||||
|
|
||||||
See the file INSTALL for instructions on how to build and install the
|
|
||||||
GRUB 2 data and program files.
|
|
||||||
|
|
||||||
Please visit the official web page of GRUB 2, 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,38 +0,0 @@
|
|||||||
GRUB 2 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:
|
|
||||||
|
|
||||||
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>
|
|
||||||
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.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
Before working on improving GRUB, 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.
|
|
||||||
|
|
||||||
For bug tracking, refer to:
|
|
||||||
|
|
||||||
http://savannah.gnu.org/bugs/?group=grub
|
|
||||||
-477
@@ -1,477 +0,0 @@
|
|||||||
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.
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
*list = 0;
|
|
||||||
return *list;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -S conftest.c]) && test -s conftest.s; then
|
|
||||||
true
|
|
||||||
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
|
|
||||||
grub_cv_asm_uscore=yes
|
|
||||||
else
|
|
||||||
HAVE_ASM_USCORE=0
|
|
||||||
grub_cv_asm_uscore=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f conftest*])
|
|
||||||
|
|
||||||
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_CACHE_VAL(grub_cv_prog_objcopy_absolute,
|
|
||||||
[cat > conftest.c <<\EOF
|
|
||||||
void cmain (void);
|
|
||||||
void
|
|
||||||
cmain (void)
|
|
||||||
{
|
|
||||||
*((int *) 0x1000) = 2;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if AC_TRY_EVAL(ac_compile) && test -s conftest.o; then :
|
|
||||||
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
|
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$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 :
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([${TARGET_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
|
|
||||||
else
|
|
||||||
grub_cv_prog_objcopy_absolute=no
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -f conftest*])
|
|
||||||
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 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
|
|
||||||
else
|
|
||||||
grub_cv_prog_nm_minus_p=no
|
|
||||||
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
|
|
||||||
else
|
|
||||||
grub_cv_prog_nm_minus_p=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"
|
|
||||||
else
|
|
||||||
TARGET_NMFLAGS_MINUS_P=
|
|
||||||
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
|
|
||||||
else
|
|
||||||
grub_cv_prog_nm_defined_only=no
|
|
||||||
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
|
|
||||||
else
|
|
||||||
TARGET_NMFLAGS_DEFINED_ONLY=
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
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],
|
|
||||||
[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])
|
|
||||||
|
|
||||||
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])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check what symbol is defined as an end symbol.
|
|
||||||
dnl Written by Yoshinori K. Okuji.
|
|
||||||
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])
|
|
||||||
|
|
||||||
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])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Check if the C compiler supports `-fstack-protector'.
|
|
||||||
AC_DEFUN([grub_CHECK_STACK_PROTECTOR],[
|
|
||||||
[# Smashing stack 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]
|
|
||||||
])
|
|
||||||
|
|
||||||
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 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]
|
|
||||||
])
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#error NO __PIE__ 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
|
|
||||||
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,-d -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
|
|
||||||
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
|
|
||||||
])
|
|
||||||
@@ -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
|
|
||||||
+9
-81
@@ -1,87 +1,15 @@
|
|||||||
#! /usr/bin/env bash
|
#! /bin/sh
|
||||||
|
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
# Set ${PYTHON} to plain 'python' if not set already
|
gnulib-tool --import gendocs
|
||||||
: ${PYTHON:=python}
|
aclocal
|
||||||
|
autoheader
|
||||||
|
|
||||||
export LC_COLLATE=C
|
# Automake is unhappy without NEWS and README, but we don't have any
|
||||||
unset LC_ALL
|
touch NEWS README
|
||||||
|
automake -a -c -f
|
||||||
|
|
||||||
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' |sort > po/POTFILES.in
|
autoconf
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
echo "Running autoreconf..."
|
|
||||||
autoreconf -vi
|
|
||||||
exit 0
|
exit 0
|
||||||
@@ -1,690 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Output a system dependent set of variables, describing how to set the
|
|
||||||
# run time search path of shared libraries in an executable.
|
|
||||||
#
|
|
||||||
# Copyright 1996-2013 Free Software Foundation, Inc.
|
|
||||||
# Taken from GNU libtool, 2001
|
|
||||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
|
||||||
#
|
|
||||||
# This file is free software; the Free Software Foundation gives
|
|
||||||
# unlimited permission to copy and/or distribute it, with or without
|
|
||||||
# modifications, as long as this notice is preserved.
|
|
||||||
#
|
|
||||||
# The first argument passed to this file is the canonical host specification,
|
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
|
||||||
# or
|
|
||||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
|
||||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
|
||||||
# should be set by the caller.
|
|
||||||
#
|
|
||||||
# The set of defined variables is at the end of this script.
|
|
||||||
|
|
||||||
# Known limitations:
|
|
||||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
|
||||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
|
||||||
# known workaround is to choose shorter directory names for the build
|
|
||||||
# directory and/or the installation directory.
|
|
||||||
|
|
||||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
|
||||||
# which needs '.lib').
|
|
||||||
libext=a
|
|
||||||
shrext=.so
|
|
||||||
|
|
||||||
host="$1"
|
|
||||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
|
||||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
|
||||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
|
||||||
|
|
||||||
for cc_temp in $CC""; do
|
|
||||||
case $cc_temp in
|
|
||||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
|
||||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
|
||||||
\-*) ;;
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
|
||||||
|
|
||||||
wl=
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
wl='-Wl,'
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
aix*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
|
||||||
;;
|
|
||||||
hpux9* | hpux10* | hpux11*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
case $cc_basename in
|
|
||||||
ecc*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
icc* | ifort*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
lf95*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
nagfor*)
|
|
||||||
wl='-Wl,-Wl,,'
|
|
||||||
;;
|
|
||||||
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
ccc*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
xl* | bgxl* | bgf* | mpixl*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
como)
|
|
||||||
wl='-lopt='
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
case `$CC -V 2>&1 | sed 5q` in
|
|
||||||
*Sun\ F* | *Sun*Fortran*)
|
|
||||||
wl=
|
|
||||||
;;
|
|
||||||
*Sun\ C*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
;;
|
|
||||||
osf3* | osf4* | osf5*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
rdos*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
case $cc_basename in
|
|
||||||
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
|
|
||||||
wl='-Qoption ld '
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
wl='-Qoption ld '
|
|
||||||
;;
|
|
||||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
;;
|
|
||||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
unicos*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
|
||||||
|
|
||||||
hardcode_libdir_flag_spec=
|
|
||||||
hardcode_libdir_separator=
|
|
||||||
hardcode_direct=no
|
|
||||||
hardcode_minus_L=no
|
|
||||||
|
|
||||||
case "$host_os" in
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
|
||||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
|
||||||
# When not using gcc, we currently assume that we are using
|
|
||||||
# Microsoft Visual C++.
|
|
||||||
if test "$GCC" != yes; then
|
|
||||||
with_gnu_ld=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
interix*)
|
|
||||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
|
||||||
with_gnu_ld=yes
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
with_gnu_ld=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ld_shlibs=yes
|
|
||||||
if test "$with_gnu_ld" = yes; then
|
|
||||||
# Set some defaults for GNU ld with shared library support. These
|
|
||||||
# are reset later if shared libraries are not supported. Putting them
|
|
||||||
# here allows them to be overridden if necessary.
|
|
||||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
|
||||||
# option of GNU ld is called -rpath, not --rpath.
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
case "$host_os" in
|
|
||||||
aix[3-9]*)
|
|
||||||
# On AIX/PPC, the GNU linker is very broken
|
|
||||||
if test "$host_cpu" != ia64; then
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc)
|
|
||||||
;;
|
|
||||||
m68k)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
beos*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
|
||||||
# no search path for DLLs.
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
haiku*)
|
|
||||||
;;
|
|
||||||
interix[3-9]*)
|
|
||||||
hardcode_direct=no
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
;;
|
|
||||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
|
||||||
ld_shlibs=no
|
|
||||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
|
||||||
case `$LD -v 2>&1` in
|
|
||||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
|
||||||
ld_shlibs=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if test "$ld_shlibs" = no; then
|
|
||||||
hardcode_libdir_flag_spec=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
aix3*)
|
|
||||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
|
||||||
# are no directories specified by -L.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
# Neither direct hardcoding nor static linking is supported with a
|
|
||||||
# broken collect2.
|
|
||||||
hardcode_direct=unsupported
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
aix[4-9]*)
|
|
||||||
if test "$host_cpu" = ia64; then
|
|
||||||
# On IA64, the linker does run time linking by default, so we don't
|
|
||||||
# have to do anything special.
|
|
||||||
aix_use_runtimelinking=no
|
|
||||||
else
|
|
||||||
aix_use_runtimelinking=no
|
|
||||||
# Test if we are trying to use run time linking or normal
|
|
||||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
|
||||||
# need to do runtime linking.
|
|
||||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
|
||||||
for ld_flag in $LDFLAGS; do
|
|
||||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
|
||||||
aix_use_runtimelinking=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_libdir_separator=':'
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
case $host_os in aix4.[012]|aix4.[012].*)
|
|
||||||
collect2name=`${CC} -print-prog-name=collect2`
|
|
||||||
if test -f "$collect2name" && \
|
|
||||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
|
||||||
then
|
|
||||||
# We have reworked collect2
|
|
||||||
:
|
|
||||||
else
|
|
||||||
# We have old collect2
|
|
||||||
hardcode_direct=unsupported
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_libdir_separator=
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
|
||||||
echo 'int main () { return 0; }' > conftest.c
|
|
||||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
|
||||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
|
||||||
}'`
|
|
||||||
if test -z "$aix_libpath"; then
|
|
||||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
|
||||||
}'`
|
|
||||||
fi
|
|
||||||
if test -z "$aix_libpath"; then
|
|
||||||
aix_libpath="/usr/lib:/lib"
|
|
||||||
fi
|
|
||||||
rm -f conftest.c conftest
|
|
||||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
|
||||||
if test "$aix_use_runtimelinking" = yes; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
|
||||||
else
|
|
||||||
if test "$host_cpu" = ia64; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
|
||||||
else
|
|
||||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc)
|
|
||||||
;;
|
|
||||||
m68k)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
bsdi[45]*)
|
|
||||||
;;
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
|
||||||
# When not using gcc, we currently assume that we are using
|
|
||||||
# Microsoft Visual C++.
|
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
|
||||||
# no search path for DLLs.
|
|
||||||
hardcode_libdir_flag_spec=' '
|
|
||||||
libext=lib
|
|
||||||
;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
hardcode_direct=no
|
|
||||||
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
dgux*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
;;
|
|
||||||
freebsd2.2*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
freebsd2*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
freebsd* | dragonfly*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
hpux9*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
hpux10*)
|
|
||||||
if test "$with_gnu_ld" = no; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
hpux11*)
|
|
||||||
if test "$with_gnu_ld" = no; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
case $host_cpu in
|
|
||||||
hppa*64*|ia64*)
|
|
||||||
hardcode_direct=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
if test -f /usr/libexec/ld.so; then
|
|
||||||
hardcode_direct=yes
|
|
||||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
os2*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
osf3*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
osf4* | osf5*)
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
else
|
|
||||||
# Both cc and cxx compiler support -rpath directly
|
|
||||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
|
||||||
fi
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
sysv4)
|
|
||||||
case $host_vendor in
|
|
||||||
sni)
|
|
||||||
hardcode_direct=yes # is this really true???
|
|
||||||
;;
|
|
||||||
siemens)
|
|
||||||
hardcode_direct=no
|
|
||||||
;;
|
|
||||||
motorola)
|
|
||||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sysv4.3*)
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
if test -d /usr/nec; then
|
|
||||||
ld_shlibs=yes
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6*)
|
|
||||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
|
||||||
hardcode_libdir_separator=':'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ld_shlibs=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check dynamic linker characteristics
|
|
||||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
|
||||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
|
||||||
# only about the one the linker finds when passed -lNAME. This is the last
|
|
||||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
|
||||||
# linker has special search rules.
|
|
||||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
|
||||||
libname_spec='lib$name'
|
|
||||||
case "$host_os" in
|
|
||||||
aix3*)
|
|
||||||
library_names_spec='$libname.a'
|
|
||||||
;;
|
|
||||||
aix[4-9]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc*)
|
|
||||||
library_names_spec='$libname$shrext' ;;
|
|
||||||
m68k)
|
|
||||||
library_names_spec='$libname.a' ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
beos*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
bsdi[45]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
cygwin* | mingw* | pw32* | cegcc*)
|
|
||||||
shrext=.dll
|
|
||||||
library_names_spec='$libname.dll.a $libname.lib'
|
|
||||||
;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
shrext=.dylib
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
dgux*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
freebsd* | dragonfly*)
|
|
||||||
case "$host_os" in
|
|
||||||
freebsd[123]*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix' ;;
|
|
||||||
*)
|
|
||||||
library_names_spec='$libname$shrext' ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
gnu*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
haiku*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
hpux9* | hpux10* | hpux11*)
|
|
||||||
case $host_cpu in
|
|
||||||
ia64*)
|
|
||||||
shrext=.so
|
|
||||||
;;
|
|
||||||
hppa*64*)
|
|
||||||
shrext=.sl
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
shrext=.sl
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
interix[3-9]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
case "$host_os" in
|
|
||||||
irix5* | nonstopux*)
|
|
||||||
libsuff= shlibsuff=
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
case $LD in
|
|
||||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
|
||||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
|
||||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
|
||||||
*) libsuff= shlibsuff= ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
linux*oldld* | linux*aout* | linux*coff*)
|
|
||||||
;;
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
knetbsd*-gnu)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix'
|
|
||||||
;;
|
|
||||||
os2*)
|
|
||||||
libname_spec='$name'
|
|
||||||
shrext=.dll
|
|
||||||
library_names_spec='$libname.a'
|
|
||||||
;;
|
|
||||||
osf3* | osf4* | osf5*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
rdos*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix'
|
|
||||||
;;
|
|
||||||
sysv4 | sysv4.3*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
tpf*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
|
||||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
|
||||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
|
|
||||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
|
||||||
|
|
||||||
# How to pass a linker flag through the compiler.
|
|
||||||
wl="$escaped_wl"
|
|
||||||
|
|
||||||
# Static library suffix (normally "a").
|
|
||||||
libext="$libext"
|
|
||||||
|
|
||||||
# Shared library suffix (normally "so").
|
|
||||||
shlibext="$shlibext"
|
|
||||||
|
|
||||||
# Format of library name prefix.
|
|
||||||
libname_spec="$escaped_libname_spec"
|
|
||||||
|
|
||||||
# Library names that the linker finds when passed -lNAME.
|
|
||||||
library_names_spec="$escaped_library_names_spec"
|
|
||||||
|
|
||||||
# Flag to hardcode \$libdir into a binary during linking.
|
|
||||||
# This must work even if \$libdir does not exist.
|
|
||||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
|
||||||
|
|
||||||
# Whether we need a single -rpath flag with a separated argument.
|
|
||||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
|
||||||
|
|
||||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
|
||||||
# resulting binary.
|
|
||||||
hardcode_direct="$hardcode_direct"
|
|
||||||
|
|
||||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
|
||||||
# resulting binary.
|
|
||||||
hardcode_minus_L="$hardcode_minus_L"
|
|
||||||
|
|
||||||
EOF
|
|
||||||
@@ -1,432 +0,0 @@
|
|||||||
eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
|
|
||||||
& eval 'exec perl -wS "$0" $argv:q'
|
|
||||||
if 0;
|
|
||||||
# Convert git log output to ChangeLog format.
|
|
||||||
|
|
||||||
my $VERSION = '2012-07-29 06:11'; # UTC
|
|
||||||
# The definition above must lie within the first 8 lines in order
|
|
||||||
# for the Emacs time-stamp write hook (at end) to update it.
|
|
||||||
# If you change this file with Emacs, please let the write hook
|
|
||||||
# do its job. Otherwise, update this string manually.
|
|
||||||
|
|
||||||
# Copyright (C) 2008-2014 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# Written by Jim Meyering
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Getopt::Long;
|
|
||||||
use POSIX qw(strftime);
|
|
||||||
|
|
||||||
(my $ME = $0) =~ s|.*/||;
|
|
||||||
|
|
||||||
# use File::Coda; # http://meyering.net/code/Coda/
|
|
||||||
END {
|
|
||||||
defined fileno STDOUT or return;
|
|
||||||
close STDOUT and return;
|
|
||||||
warn "$ME: failed to close standard output: $!\n";
|
|
||||||
$? ||= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub usage ($)
|
|
||||||
{
|
|
||||||
my ($exit_code) = @_;
|
|
||||||
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
|
|
||||||
if ($exit_code != 0)
|
|
||||||
{
|
|
||||||
print $STREAM "Try '$ME --help' for more information.\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $STREAM <<EOF;
|
|
||||||
Usage: $ME [OPTIONS] [ARGS]
|
|
||||||
|
|
||||||
Convert git log output to ChangeLog format. If present, any ARGS
|
|
||||||
are passed to "git log". To avoid ARGS being parsed as options to
|
|
||||||
$ME, they may be preceded by '--'.
|
|
||||||
|
|
||||||
OPTIONS:
|
|
||||||
|
|
||||||
--amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that
|
|
||||||
makes a change to SHA1's commit log text or metadata.
|
|
||||||
--append-dot append a dot to the first line of each commit message if
|
|
||||||
there is no other punctuation or blank at the end.
|
|
||||||
--no-cluster never cluster commit messages under the same date/author
|
|
||||||
header; the default is to cluster adjacent commit messages
|
|
||||||
if their headers are the same and neither commit message
|
|
||||||
contains multiple paragraphs.
|
|
||||||
--srcdir=DIR the root of the source tree, from which the .git/
|
|
||||||
directory can be derived.
|
|
||||||
--since=DATE convert only the logs since DATE;
|
|
||||||
the default is to convert all log entries.
|
|
||||||
--format=FMT set format string for commit subject and body;
|
|
||||||
see 'man git-log' for the list of format metacharacters;
|
|
||||||
the default is '%s%n%b%n'
|
|
||||||
--strip-tab remove one additional leading TAB from commit message lines.
|
|
||||||
--strip-cherry-pick remove data inserted by "git cherry-pick";
|
|
||||||
this includes the "cherry picked from commit ..." line,
|
|
||||||
and the possible final "Conflicts:" paragraph.
|
|
||||||
--help display this help and exit
|
|
||||||
--version output version information and exit
|
|
||||||
|
|
||||||
EXAMPLE:
|
|
||||||
|
|
||||||
$ME --since=2008-01-01 > ChangeLog
|
|
||||||
$ME -- -n 5 foo > last-5-commits-to-branch-foo
|
|
||||||
|
|
||||||
SPECIAL SYNTAX:
|
|
||||||
|
|
||||||
The following types of strings are interpreted specially when they appear
|
|
||||||
at the beginning of a log message line. They are not copied to the output.
|
|
||||||
|
|
||||||
Copyright-paperwork-exempt: Yes
|
|
||||||
Append the "(tiny change)" notation to the usual "date name email"
|
|
||||||
ChangeLog header to mark a change that does not require a copyright
|
|
||||||
assignment.
|
|
||||||
Co-authored-by: Joe User <user\@example.com>
|
|
||||||
List the specified name and email address on a second
|
|
||||||
ChangeLog header, denoting a co-author.
|
|
||||||
Signed-off-by: Joe User <user\@example.com>
|
|
||||||
These lines are simply elided.
|
|
||||||
|
|
||||||
In a FILE specified via --amend, comment lines (starting with "#") are ignored.
|
|
||||||
FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
|
|
||||||
a line) referring to a commit in the current project, and CODE refers to one
|
|
||||||
or more consecutive lines of Perl code. Pairs must be separated by one or
|
|
||||||
more blank line.
|
|
||||||
|
|
||||||
Here is sample input for use with --amend=FILE, from coreutils:
|
|
||||||
|
|
||||||
3a169f4c5d9159283548178668d2fae6fced3030
|
|
||||||
# fix typo in title:
|
|
||||||
s/all tile types/all file types/
|
|
||||||
|
|
||||||
1379ed974f1fa39b12e2ffab18b3f7a607082202
|
|
||||||
# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
|
|
||||||
# Change the author to be Paul. Note the escaped "@":
|
|
||||||
s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>,
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
exit $exit_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
# If the string $S is a well-behaved file name, simply return it.
|
|
||||||
# If it contains white space, quotes, etc., quote it, and return the new string.
|
|
||||||
sub shell_quote($)
|
|
||||||
{
|
|
||||||
my ($s) = @_;
|
|
||||||
if ($s =~ m![^\w+/.,-]!)
|
|
||||||
{
|
|
||||||
# Convert each single quote to '\''
|
|
||||||
$s =~ s/\'/\'\\\'\'/g;
|
|
||||||
# Then single quote the string.
|
|
||||||
$s = "'$s'";
|
|
||||||
}
|
|
||||||
return $s;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub quoted_cmd(@)
|
|
||||||
{
|
|
||||||
return join (' ', map {shell_quote $_} @_);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parse file F.
|
|
||||||
# Comment lines (starting with "#") are ignored.
|
|
||||||
# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1
|
|
||||||
# (alone on a line) referring to a commit in the current project, and
|
|
||||||
# CODE refers to one or more consecutive lines of Perl code.
|
|
||||||
# Pairs must be separated by one or more blank line.
|
|
||||||
sub parse_amend_file($)
|
|
||||||
{
|
|
||||||
my ($f) = @_;
|
|
||||||
|
|
||||||
open F, '<', $f
|
|
||||||
or die "$ME: $f: failed to open for reading: $!\n";
|
|
||||||
|
|
||||||
my $fail;
|
|
||||||
my $h = {};
|
|
||||||
my $in_code = 0;
|
|
||||||
my $sha;
|
|
||||||
while (defined (my $line = <F>))
|
|
||||||
{
|
|
||||||
$line =~ /^\#/
|
|
||||||
and next;
|
|
||||||
chomp $line;
|
|
||||||
$line eq ''
|
|
||||||
and $in_code = 0, next;
|
|
||||||
|
|
||||||
if (!$in_code)
|
|
||||||
{
|
|
||||||
$line =~ /^([0-9a-fA-F]{40})$/
|
|
||||||
or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
|
|
||||||
$fail = 1, next;
|
|
||||||
$sha = lc $1;
|
|
||||||
$in_code = 1;
|
|
||||||
exists $h->{$sha}
|
|
||||||
and (warn "$ME: $f:$.: duplicate SHA1\n"),
|
|
||||||
$fail = 1, next;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$h->{$sha} ||= '';
|
|
||||||
$h->{$sha} .= "$line\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close F;
|
|
||||||
|
|
||||||
$fail
|
|
||||||
and exit 1;
|
|
||||||
|
|
||||||
return $h;
|
|
||||||
}
|
|
||||||
|
|
||||||
# git_dir_option $SRCDIR
|
|
||||||
#
|
|
||||||
# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
|
|
||||||
# is undef). Return as a list (0 or 1 element).
|
|
||||||
sub git_dir_option($)
|
|
||||||
{
|
|
||||||
my ($srcdir) = @_;
|
|
||||||
my @res = ();
|
|
||||||
if (defined $srcdir)
|
|
||||||
{
|
|
||||||
my $qdir = shell_quote $srcdir;
|
|
||||||
my $cmd = "cd $qdir && git rev-parse --show-toplevel";
|
|
||||||
my $qcmd = shell_quote $cmd;
|
|
||||||
my $git_dir = qx($cmd);
|
|
||||||
defined $git_dir
|
|
||||||
or die "$ME: cannot run $qcmd: $!\n";
|
|
||||||
$? == 0
|
|
||||||
or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
|
|
||||||
chomp $git_dir;
|
|
||||||
push @res, "--git-dir=$git_dir/.git";
|
|
||||||
}
|
|
||||||
@res;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
my $since_date;
|
|
||||||
my $format_string = '%s%n%b%n';
|
|
||||||
my $amend_file;
|
|
||||||
my $append_dot = 0;
|
|
||||||
my $cluster = 1;
|
|
||||||
my $strip_tab = 0;
|
|
||||||
my $strip_cherry_pick = 0;
|
|
||||||
my $srcdir;
|
|
||||||
GetOptions
|
|
||||||
(
|
|
||||||
help => sub { usage 0 },
|
|
||||||
version => sub { print "$ME version $VERSION\n"; exit },
|
|
||||||
'since=s' => \$since_date,
|
|
||||||
'format=s' => \$format_string,
|
|
||||||
'amend=s' => \$amend_file,
|
|
||||||
'append-dot' => \$append_dot,
|
|
||||||
'cluster!' => \$cluster,
|
|
||||||
'strip-tab' => \$strip_tab,
|
|
||||||
'strip-cherry-pick' => \$strip_cherry_pick,
|
|
||||||
'srcdir=s' => \$srcdir,
|
|
||||||
) or usage 1;
|
|
||||||
|
|
||||||
defined $since_date
|
|
||||||
and unshift @ARGV, "--since=$since_date";
|
|
||||||
|
|
||||||
# This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
|
|
||||||
# that makes a correction in the log or attribution of that commit.
|
|
||||||
my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
|
|
||||||
|
|
||||||
my @cmd = ('git',
|
|
||||||
git_dir_option $srcdir,
|
|
||||||
qw(log --log-size),
|
|
||||||
'--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV);
|
|
||||||
open PIPE, '-|', @cmd
|
|
||||||
or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
|
|
||||||
. "(Is your Git too old? Version 1.5.1 or later is required.)\n");
|
|
||||||
|
|
||||||
my $prev_multi_paragraph;
|
|
||||||
my $prev_date_line = '';
|
|
||||||
my @prev_coauthors = ();
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
defined (my $in = <PIPE>)
|
|
||||||
or last;
|
|
||||||
$in =~ /^log size (\d+)$/
|
|
||||||
or die "$ME:$.: Invalid line (expected log size):\n$in";
|
|
||||||
my $log_nbytes = $1;
|
|
||||||
|
|
||||||
my $log;
|
|
||||||
my $n_read = read PIPE, $log, $log_nbytes;
|
|
||||||
$n_read == $log_nbytes
|
|
||||||
or die "$ME:$.: unexpected EOF\n";
|
|
||||||
|
|
||||||
# Extract leading hash.
|
|
||||||
my ($sha, $rest) = split ':', $log, 2;
|
|
||||||
defined $sha
|
|
||||||
or die "$ME:$.: malformed log entry\n";
|
|
||||||
$sha =~ /^[0-9a-fA-F]{40}$/
|
|
||||||
or die "$ME:$.: invalid SHA1: $sha\n";
|
|
||||||
|
|
||||||
# If this commit's log requires any transformation, do it now.
|
|
||||||
my $code = $amend_code->{$sha};
|
|
||||||
if (defined $code)
|
|
||||||
{
|
|
||||||
eval 'use Safe';
|
|
||||||
my $s = new Safe;
|
|
||||||
# Put the unpreprocessed entry into "$_".
|
|
||||||
$_ = $rest;
|
|
||||||
|
|
||||||
# Let $code operate on it, safely.
|
|
||||||
my $r = $s->reval("$code")
|
|
||||||
or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n";
|
|
||||||
|
|
||||||
# Note that we've used this entry.
|
|
||||||
delete $amend_code->{$sha};
|
|
||||||
|
|
||||||
# Update $rest upon success.
|
|
||||||
$rest = $_;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove lines inserted by "git cherry-pick".
|
|
||||||
if ($strip_cherry_pick)
|
|
||||||
{
|
|
||||||
$rest =~ s/^\s*Conflicts:\n.*//sm;
|
|
||||||
$rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
|
|
||||||
}
|
|
||||||
|
|
||||||
my @line = split "\n", $rest;
|
|
||||||
my $author_line = shift @line;
|
|
||||||
defined $author_line
|
|
||||||
or die "$ME:$.: unexpected EOF\n";
|
|
||||||
$author_line =~ /^(\d+) (.*>)$/
|
|
||||||
or die "$ME:$.: Invalid line "
|
|
||||||
. "(expected date/author/email):\n$author_line\n";
|
|
||||||
|
|
||||||
# Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
|
|
||||||
# `(tiny change)' annotation.
|
|
||||||
my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line)
|
|
||||||
? ' (tiny change)' : '');
|
|
||||||
|
|
||||||
my $date_line = sprintf "%s %s$tiny\n",
|
|
||||||
strftime ("%F", localtime ($1)), $2;
|
|
||||||
|
|
||||||
my @coauthors = grep /^Co-authored-by:.*$/, @line;
|
|
||||||
# Omit meta-data lines we've already interpreted.
|
|
||||||
@line = grep !/^(?:Signed-off-by:[ ].*>$
|
|
||||||
|Co-authored-by:[ ]
|
|
||||||
|Copyright-paperwork-exempt:[ ]
|
|
||||||
)/x, @line;
|
|
||||||
|
|
||||||
# Remove leading and trailing blank lines.
|
|
||||||
if (@line)
|
|
||||||
{
|
|
||||||
while ($line[0] =~ /^\s*$/) { shift @line; }
|
|
||||||
while ($line[$#line] =~ /^\s*$/) { pop @line; }
|
|
||||||
}
|
|
||||||
|
|
||||||
# Record whether there are two or more paragraphs.
|
|
||||||
my $multi_paragraph = grep /^\s*$/, @line;
|
|
||||||
|
|
||||||
# Format 'Co-authored-by: A U Thor <email@example.com>' lines in
|
|
||||||
# standard multi-author ChangeLog format.
|
|
||||||
for (@coauthors)
|
|
||||||
{
|
|
||||||
s/^Co-authored-by:\s*/\t /;
|
|
||||||
s/\s*</ </;
|
|
||||||
|
|
||||||
/<.*?@.*\..*>/
|
|
||||||
or warn "$ME: warning: missing email address for "
|
|
||||||
. substr ($_, 5) . "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# If clustering of commit messages has been disabled, if this header
|
|
||||||
# would be different from the previous date/name/email/coauthors header,
|
|
||||||
# or if this or the previous entry consists of two or more paragraphs,
|
|
||||||
# then print the header.
|
|
||||||
if ( ! $cluster
|
|
||||||
|| $date_line ne $prev_date_line
|
|
||||||
|| "@coauthors" ne "@prev_coauthors"
|
|
||||||
|| $multi_paragraph
|
|
||||||
|| $prev_multi_paragraph)
|
|
||||||
{
|
|
||||||
$prev_date_line eq ''
|
|
||||||
or print "\n";
|
|
||||||
print $date_line;
|
|
||||||
@coauthors
|
|
||||||
and print join ("\n", @coauthors), "\n";
|
|
||||||
}
|
|
||||||
$prev_date_line = $date_line;
|
|
||||||
@prev_coauthors = @coauthors;
|
|
||||||
$prev_multi_paragraph = $multi_paragraph;
|
|
||||||
|
|
||||||
# If there were any lines
|
|
||||||
if (@line == 0)
|
|
||||||
{
|
|
||||||
warn "$ME: warning: empty commit message:\n $date_line\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($append_dot)
|
|
||||||
{
|
|
||||||
# If the first line of the message has enough room, then
|
|
||||||
if (length $line[0] < 72)
|
|
||||||
{
|
|
||||||
# append a dot if there is no other punctuation or blank
|
|
||||||
# at the end.
|
|
||||||
$line[0] =~ /[[:punct:]\s]$/
|
|
||||||
or $line[0] .= '.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove one additional leading TAB from each line.
|
|
||||||
$strip_tab
|
|
||||||
and map { s/^\t// } @line;
|
|
||||||
|
|
||||||
# Prefix each non-empty line with a TAB.
|
|
||||||
@line = map { length $_ ? "\t$_" : '' } @line;
|
|
||||||
|
|
||||||
print "\n", join ("\n", @line), "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
defined ($in = <PIPE>)
|
|
||||||
or last;
|
|
||||||
$in ne "\n"
|
|
||||||
and die "$ME:$.: unexpected line:\n$in";
|
|
||||||
}
|
|
||||||
|
|
||||||
close PIPE
|
|
||||||
or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
|
|
||||||
# FIXME-someday: include $PROCESS_STATUS in the diagnostic
|
|
||||||
|
|
||||||
# Complain about any unused entry in the --amend=F specified file.
|
|
||||||
my $fail = 0;
|
|
||||||
foreach my $sha (keys %$amend_code)
|
|
||||||
{
|
|
||||||
warn "$ME:$amend_file: unused entry: $sha\n";
|
|
||||||
$fail = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
exit $fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: perl
|
|
||||||
# indent-tabs-mode: nil
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "my $VERSION = '"
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
|
|
||||||
# time-stamp-time-zone: "UTC"
|
|
||||||
# time-stamp-end: "'; # UTC"
|
|
||||||
# End:
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#if !defined _Noreturn && __STDC_VERSION__ < 201112
|
|
||||||
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|
|
||||||
|| 0x5110 <= __SUNPRO_C)
|
|
||||||
# define _Noreturn __attribute__ ((__noreturn__))
|
|
||||||
# elif 1200 <= _MSC_VER
|
|
||||||
# define _Noreturn __declspec (noreturn)
|
|
||||||
# else
|
|
||||||
# define _Noreturn
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
/* A C macro for declaring that specific arguments must not be NULL.
|
|
||||||
Copyright (C) 2009-2013 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 <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
|
|
||||||
that the values passed as arguments n, ..., m must be non-NULL pointers.
|
|
||||||
n = 1 stands for the first argument, n = 2 for the second argument etc. */
|
|
||||||
#ifndef _GL_ARG_NONNULL
|
|
||||||
# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
|
|
||||||
# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
|
|
||||||
# else
|
|
||||||
# define _GL_ARG_NONNULL(params)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
@@ -1,271 +0,0 @@
|
|||||||
/* C++ compatible function declaration macros.
|
|
||||||
Copyright (C) 2010-2013 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 <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#ifndef _GL_CXXDEFS_H
|
|
||||||
#define _GL_CXXDEFS_H
|
|
||||||
|
|
||||||
/* The three most frequent use cases of these macros are:
|
|
||||||
|
|
||||||
* For providing a substitute for a function that is missing on some
|
|
||||||
platforms, but is declared and works fine on the platforms on which
|
|
||||||
it exists:
|
|
||||||
|
|
||||||
#if @GNULIB_FOO@
|
|
||||||
# if !@HAVE_FOO@
|
|
||||||
_GL_FUNCDECL_SYS (foo, ...);
|
|
||||||
# endif
|
|
||||||
_GL_CXXALIAS_SYS (foo, ...);
|
|
||||||
_GL_CXXALIASWARN (foo);
|
|
||||||
#elif defined GNULIB_POSIXCHECK
|
|
||||||
...
|
|
||||||
#endif
|
|
||||||
|
|
||||||
* For providing a replacement for a function that exists on all platforms,
|
|
||||||
but is broken/insufficient and needs to be replaced on some platforms:
|
|
||||||
|
|
||||||
#if @GNULIB_FOO@
|
|
||||||
# if @REPLACE_FOO@
|
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
|
||||||
# undef foo
|
|
||||||
# define foo rpl_foo
|
|
||||||
# endif
|
|
||||||
_GL_FUNCDECL_RPL (foo, ...);
|
|
||||||
_GL_CXXALIAS_RPL (foo, ...);
|
|
||||||
# else
|
|
||||||
_GL_CXXALIAS_SYS (foo, ...);
|
|
||||||
# endif
|
|
||||||
_GL_CXXALIASWARN (foo);
|
|
||||||
#elif defined GNULIB_POSIXCHECK
|
|
||||||
...
|
|
||||||
#endif
|
|
||||||
|
|
||||||
* For providing a replacement for a function that exists on some platforms
|
|
||||||
but is broken/insufficient and needs to be replaced on some of them and
|
|
||||||
is additionally either missing or undeclared on some other platforms:
|
|
||||||
|
|
||||||
#if @GNULIB_FOO@
|
|
||||||
# if @REPLACE_FOO@
|
|
||||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
|
||||||
# undef foo
|
|
||||||
# define foo rpl_foo
|
|
||||||
# endif
|
|
||||||
_GL_FUNCDECL_RPL (foo, ...);
|
|
||||||
_GL_CXXALIAS_RPL (foo, ...);
|
|
||||||
# else
|
|
||||||
# if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
|
|
||||||
_GL_FUNCDECL_SYS (foo, ...);
|
|
||||||
# endif
|
|
||||||
_GL_CXXALIAS_SYS (foo, ...);
|
|
||||||
# endif
|
|
||||||
_GL_CXXALIASWARN (foo);
|
|
||||||
#elif defined GNULIB_POSIXCHECK
|
|
||||||
...
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* _GL_EXTERN_C declaration;
|
|
||||||
performs the declaration with C linkage. */
|
|
||||||
#if defined __cplusplus
|
|
||||||
# define _GL_EXTERN_C extern "C"
|
|
||||||
#else
|
|
||||||
# define _GL_EXTERN_C extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
|
|
||||||
declares a replacement function, named rpl_func, with the given prototype,
|
|
||||||
consisting of return type, parameters, and attributes.
|
|
||||||
Example:
|
|
||||||
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
|
|
||||||
_GL_ARG_NONNULL ((1)));
|
|
||||||
*/
|
|
||||||
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
|
|
||||||
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
|
|
||||||
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
|
|
||||||
_GL_EXTERN_C rettype rpl_func parameters_and_attributes
|
|
||||||
|
|
||||||
/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
|
|
||||||
declares the system function, named func, with the given prototype,
|
|
||||||
consisting of return type, parameters, and attributes.
|
|
||||||
Example:
|
|
||||||
_GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
|
|
||||||
_GL_ARG_NONNULL ((1)));
|
|
||||||
*/
|
|
||||||
#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
|
|
||||||
_GL_EXTERN_C rettype func parameters_and_attributes
|
|
||||||
|
|
||||||
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
|
||||||
declares a C++ alias called GNULIB_NAMESPACE::func
|
|
||||||
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
|
|
||||||
Example:
|
|
||||||
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
|
|
||||||
*/
|
|
||||||
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
|
|
||||||
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
|
|
||||||
namespace GNULIB_NAMESPACE \
|
|
||||||
{ \
|
|
||||||
rettype (*const func) parameters = ::rpl_func; \
|
|
||||||
} \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
|
|
||||||
is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
|
|
||||||
except that the C function rpl_func may have a slightly different
|
|
||||||
declaration. A cast is used to silence the "invalid conversion" error
|
|
||||||
that would otherwise occur. */
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
|
|
||||||
namespace GNULIB_NAMESPACE \
|
|
||||||
{ \
|
|
||||||
rettype (*const func) parameters = \
|
|
||||||
reinterpret_cast<rettype(*)parameters>(::rpl_func); \
|
|
||||||
} \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIAS_SYS (func, rettype, parameters);
|
|
||||||
declares a C++ alias called GNULIB_NAMESPACE::func
|
|
||||||
that redirects to the system provided function func, if GNULIB_NAMESPACE
|
|
||||||
is defined.
|
|
||||||
Example:
|
|
||||||
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
|
|
||||||
*/
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
/* If we were to write
|
|
||||||
rettype (*const func) parameters = ::func;
|
|
||||||
like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
|
|
||||||
better (remove an indirection through a 'static' pointer variable),
|
|
||||||
but then the _GL_CXXALIASWARN macro below would cause a warning not only
|
|
||||||
for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
|
|
||||||
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
|
|
||||||
namespace GNULIB_NAMESPACE \
|
|
||||||
{ \
|
|
||||||
static rettype (*func) parameters = ::func; \
|
|
||||||
} \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
|
|
||||||
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
|
|
||||||
except that the C function func may have a slightly different declaration.
|
|
||||||
A cast is used to silence the "invalid conversion" error that would
|
|
||||||
otherwise occur. */
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
|
|
||||||
namespace GNULIB_NAMESPACE \
|
|
||||||
{ \
|
|
||||||
static rettype (*func) parameters = \
|
|
||||||
reinterpret_cast<rettype(*)parameters>(::func); \
|
|
||||||
} \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
|
|
||||||
is like _GL_CXXALIAS_SYS (func, rettype, parameters);
|
|
||||||
except that the C function is picked among a set of overloaded functions,
|
|
||||||
namely the one with rettype2 and parameters2. Two consecutive casts
|
|
||||||
are used to silence the "cannot find a match" and "invalid conversion"
|
|
||||||
errors that would otherwise occur. */
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
/* The outer cast must be a reinterpret_cast.
|
|
||||||
The inner cast: When the function is defined as a set of overloaded
|
|
||||||
functions, it works as a static_cast<>, choosing the designated variant.
|
|
||||||
When the function is defined as a single variant, it works as a
|
|
||||||
reinterpret_cast<>. The parenthesized cast syntax works both ways. */
|
|
||||||
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
|
|
||||||
namespace GNULIB_NAMESPACE \
|
|
||||||
{ \
|
|
||||||
static rettype (*func) parameters = \
|
|
||||||
reinterpret_cast<rettype(*)parameters>( \
|
|
||||||
(rettype2(*)parameters2)(::func)); \
|
|
||||||
} \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIASWARN (func);
|
|
||||||
causes a warning to be emitted when ::func is used but not when
|
|
||||||
GNULIB_NAMESPACE::func is used. func must be defined without overloaded
|
|
||||||
variants. */
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
# define _GL_CXXALIASWARN(func) \
|
|
||||||
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
|
|
||||||
# define _GL_CXXALIASWARN_1(func,namespace) \
|
|
||||||
_GL_CXXALIASWARN_2 (func, namespace)
|
|
||||||
/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
|
|
||||||
we enable the warning only when not optimizing. */
|
|
||||||
# if !__OPTIMIZE__
|
|
||||||
# define _GL_CXXALIASWARN_2(func,namespace) \
|
|
||||||
_GL_WARN_ON_USE (func, \
|
|
||||||
"The symbol ::" #func " refers to the system function. " \
|
|
||||||
"Use " #namespace "::" #func " instead.")
|
|
||||||
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
|
|
||||||
# define _GL_CXXALIASWARN_2(func,namespace) \
|
|
||||||
extern __typeof__ (func) func
|
|
||||||
# else
|
|
||||||
# define _GL_CXXALIASWARN_2(func,namespace) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIASWARN(func) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
|
|
||||||
causes a warning to be emitted when the given overloaded variant of ::func
|
|
||||||
is used but not when GNULIB_NAMESPACE::func is used. */
|
|
||||||
#if defined __cplusplus && defined GNULIB_NAMESPACE
|
|
||||||
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
|
|
||||||
_GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
|
|
||||||
GNULIB_NAMESPACE)
|
|
||||||
# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
|
|
||||||
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
|
|
||||||
/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
|
|
||||||
we enable the warning only when not optimizing. */
|
|
||||||
# if !__OPTIMIZE__
|
|
||||||
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
|
|
||||||
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
|
|
||||||
"The symbol ::" #func " refers to the system function. " \
|
|
||||||
"Use " #namespace "::" #func " instead.")
|
|
||||||
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
|
|
||||||
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
|
|
||||||
extern __typeof__ (func) func
|
|
||||||
# else
|
|
||||||
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
|
|
||||||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _GL_CXXDEFS_H */
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
/* A C macro for emitting warnings if a function is used.
|
|
||||||
Copyright (C) 2010-2013 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 <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
|
|
||||||
for FUNCTION which will then trigger a compiler warning containing
|
|
||||||
the text of "literal string" anywhere that function is called, if
|
|
||||||
supported by the compiler. If the compiler does not support this
|
|
||||||
feature, the macro expands to an unused extern declaration.
|
|
||||||
|
|
||||||
This macro is useful for marking a function as a potential
|
|
||||||
portability trap, with the intent that "literal string" include
|
|
||||||
instructions on the replacement function that should be used
|
|
||||||
instead. However, one of the reasons that a function is a
|
|
||||||
portability trap is if it has the wrong signature. Declaring
|
|
||||||
FUNCTION with a different signature in C is a compilation error, so
|
|
||||||
this macro must use the same type as any existing declaration so
|
|
||||||
that programs that avoid the problematic FUNCTION do not fail to
|
|
||||||
compile merely because they included a header that poisoned the
|
|
||||||
function. But this implies that _GL_WARN_ON_USE is only safe to
|
|
||||||
use if FUNCTION is known to already have a declaration. Use of
|
|
||||||
this macro implies that there must not be any other macro hiding
|
|
||||||
the declaration of FUNCTION; but undefining FUNCTION first is part
|
|
||||||
of the poisoning process anyway (although for symbols that are
|
|
||||||
provided only via a macro, the result is a compilation error rather
|
|
||||||
than a warning containing "literal string"). Also note that in
|
|
||||||
C++, it is only safe to use if FUNCTION has no overloads.
|
|
||||||
|
|
||||||
For an example, it is possible to poison 'getline' by:
|
|
||||||
- adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
|
|
||||||
[getline]) in configure.ac, which potentially defines
|
|
||||||
HAVE_RAW_DECL_GETLINE
|
|
||||||
- adding this code to a header that wraps the system <stdio.h>:
|
|
||||||
#undef getline
|
|
||||||
#if HAVE_RAW_DECL_GETLINE
|
|
||||||
_GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
|
|
||||||
"not universally present; use the gnulib module getline");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
It is not possible to directly poison global variables. But it is
|
|
||||||
possible to write a wrapper accessor function, and poison that
|
|
||||||
(less common usage, like &environ, will cause a compilation error
|
|
||||||
rather than issue the nice warning, but the end result of informing
|
|
||||||
the developer about their portability problem is still achieved):
|
|
||||||
#if HAVE_RAW_DECL_ENVIRON
|
|
||||||
static char ***rpl_environ (void) { return &environ; }
|
|
||||||
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
|
|
||||||
# undef environ
|
|
||||||
# define environ (*rpl_environ ())
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
#ifndef _GL_WARN_ON_USE
|
|
||||||
|
|
||||||
# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
|
|
||||||
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
|
|
||||||
# define _GL_WARN_ON_USE(function, message) \
|
|
||||||
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
|
|
||||||
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
|
|
||||||
/* Verify the existence of the function. */
|
|
||||||
# define _GL_WARN_ON_USE(function, message) \
|
|
||||||
extern __typeof__ (function) function
|
|
||||||
# else /* Unsupported. */
|
|
||||||
# define _GL_WARN_ON_USE(function, message) \
|
|
||||||
_GL_WARN_EXTERN_C int _gl_warn_on_use
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
|
|
||||||
is like _GL_WARN_ON_USE (function, "string"), except that the function is
|
|
||||||
declared with the given prototype, consisting of return type, parameters,
|
|
||||||
and attributes.
|
|
||||||
This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
|
|
||||||
not work in this case. */
|
|
||||||
#ifndef _GL_WARN_ON_USE_CXX
|
|
||||||
# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
|
|
||||||
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
|
|
||||||
extern rettype function parameters_and_attributes \
|
|
||||||
__attribute__ ((__warning__ (msg)))
|
|
||||||
# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
|
|
||||||
/* Verify the existence of the function. */
|
|
||||||
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
|
|
||||||
extern rettype function parameters_and_attributes
|
|
||||||
# else /* Unsupported. */
|
|
||||||
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
|
|
||||||
_GL_WARN_EXTERN_C int _gl_warn_on_use
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _GL_WARN_EXTERN_C declaration;
|
|
||||||
performs the declaration with C linkage. */
|
|
||||||
#ifndef _GL_WARN_EXTERN_C
|
|
||||||
# if defined __cplusplus
|
|
||||||
# define _GL_WARN_EXTERN_C extern "C"
|
|
||||||
# else
|
|
||||||
# define _GL_WARN_EXTERN_C extern
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
@@ -1,136 +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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
|
|
||||||
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
|
|
||||||
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
|
|
||||||
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/gnulib -I$(top_srcdir)/grub-core/gnulib
|
|
||||||
|
|
||||||
CFLAGS_POSIX = -fno-builtin
|
|
||||||
CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
|
|
||||||
|
|
||||||
CFLAGS_GCRY = -Wno-error -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 -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_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)'
|
|
||||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
|
|
||||||
CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
|
|
||||||
$(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
|
|
||||||
$(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST)
|
|
||||||
|
|
||||||
# Define these variables to calm down automake
|
|
||||||
|
|
||||||
IMG_FILES =
|
|
||||||
MOD_FILES =
|
|
||||||
MODULE_FILES =
|
|
||||||
MARKER_FILES =
|
|
||||||
KERNEL_HEADER_FILES =
|
|
||||||
|
|
||||||
man_MANS =
|
|
||||||
noinst_DATA =
|
|
||||||
pkgdata_DATA =
|
|
||||||
bin_SCRIPTS =
|
|
||||||
sbin_SCRIPTS =
|
|
||||||
bin_PROGRAMS =
|
|
||||||
platform_DATA =
|
|
||||||
sbin_PROGRAMS =
|
|
||||||
check_SCRIPTS =
|
|
||||||
dist_grubconf_DATA =
|
|
||||||
check_PROGRAMS =
|
|
||||||
noinst_SCRIPTS =
|
|
||||||
noinst_PROGRAMS =
|
|
||||||
grubconf_SCRIPTS =
|
|
||||||
noinst_LIBRARIES =
|
|
||||||
dist_noinst_DATA =
|
|
||||||
platform_SCRIPTS =
|
|
||||||
platform_PROGRAMS =
|
|
||||||
|
|
||||||
TESTS =
|
|
||||||
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 ./autogen.sh manually." >&2; exit 1; fi
|
|
||||||
python $^ > $@.new || (rm -f $@.new; exit 1)
|
|
||||||
mv $@.new $@
|
|
||||||
@@ -1,140 +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-ld.sc
|
|
||||||
|
|
||||||
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/gnulib-fix-null-deref.diff
|
|
||||||
EXTRA_DIST += grub-core/gnulib-fix-width.diff
|
|
||||||
EXTRA_DIST += grub-core/gnulib-no-abort.diff
|
|
||||||
EXTRA_DIST += grub-core/gnulib-no-gets.diff
|
|
||||||
|
|
||||||
EXTRA_DIST += grub-core/lib/libgcrypt
|
|
||||||
EXTRA_DIST += grub-core/lib/libgcrypt-grub/mpi/generic
|
|
||||||
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/lib/LzmaDec.c
|
|
||||||
|
|
||||||
EXTRA_DIST += grub-core/fs/cpio_common.c
|
|
||||||
|
|
||||||
EXTRA_DIST += BUGS
|
|
||||||
EXTRA_DIST += util/i386/efi/grub-dumpdevtree
|
|
||||||
EXTRA_DIST += util/spkmodem-recv.c
|
|
||||||
EXTRA_DIST += util/import_gcrypth.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 += tests/dfly-mbr-mbexample.mbr.img.gz
|
|
||||||
EXTRA_DIST += tests/dfly-mbr-mbexample.dfly.img.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/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,53 +0,0 @@
|
|||||||
/* Linker script to create grub .img files on Cygwin. */
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
start = . ;
|
|
||||||
_start = . ;
|
|
||||||
__start = . ;
|
|
||||||
*(.text)
|
|
||||||
etext = . ;
|
|
||||||
}
|
|
||||||
.data :
|
|
||||||
{
|
|
||||||
__data_start__ = . ;
|
|
||||||
*(.data)
|
|
||||||
__data_end__ = . ;
|
|
||||||
__rdata_start__ = . ;
|
|
||||||
*(.rdata)
|
|
||||||
__rdata_end__ = . ;
|
|
||||||
*(.pdata)
|
|
||||||
edata = . ;
|
|
||||||
_edata = . ;
|
|
||||||
__edata = . ;
|
|
||||||
}
|
|
||||||
.bss :
|
|
||||||
{
|
|
||||||
__bss_start__ = . ;
|
|
||||||
*(.bss)
|
|
||||||
__common_start__ = . ;
|
|
||||||
*(COMMON)
|
|
||||||
__bss_end__ = . ;
|
|
||||||
}
|
|
||||||
.edata :
|
|
||||||
{
|
|
||||||
*(.edata)
|
|
||||||
end = . ;
|
|
||||||
_end = . ;
|
|
||||||
__end = . ;
|
|
||||||
}
|
|
||||||
.stab :
|
|
||||||
{
|
|
||||||
*(.stab)
|
|
||||||
}
|
|
||||||
.stabstr :
|
|
||||||
{
|
|
||||||
*(.stabstr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT("__rdata_end__"=="edata", ".pdata not empty")
|
|
||||||
ASSERT("__bss_end__" =="end" , ".edata not empty")
|
|
||||||
|
|
||||||
-67
@@ -1,67 +0,0 @@
|
|||||||
#undef _LARGEFILE_SOURCE
|
|
||||||
#undef _FILE_OFFSET_BITS
|
|
||||||
#define _LARGEFILE_SOURCE
|
|
||||||
#define _FILE_OFFSET_BITS 64
|
|
||||||
#if defined(__PPC__) && !defined(__powerpc__)
|
|
||||||
#define __powerpc__ 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GCRYPT_NO_DEPRECATED 1
|
|
||||||
#define HAVE_MEMMOVE 1
|
|
||||||
|
|
||||||
/* Define to 1 to enable disk cache statistics. */
|
|
||||||
#define DISK_CACHE_STATS @DISK_CACHE_STATS@
|
|
||||||
#define BOOT_TIME_STATS @BOOT_TIME_STATS@
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
|
|
||||||
#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
|
|
||||||
#define BUILD_WORDS_BIGENDIAN @BUILD_WORDS_BIGENDIAN@
|
|
||||||
#endif
|
|
||||||
#elif defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
|
|
||||||
#include <config-util.h>
|
|
||||||
#else
|
|
||||||
#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@"
|
|
||||||
|
|
||||||
#define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
|
|
||||||
#define GRUB_PLATFORM "@GRUB_PLATFORM@"
|
|
||||||
|
|
||||||
#define RE_ENABLE_I18N 1
|
|
||||||
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
+34
-2059
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,35 @@
|
|||||||
|
info_TEXINFOS = multiboot.texi
|
||||||
|
EXAMPLES = boot_mips.S kernel.c multiboot2.h
|
||||||
|
multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot2.h.texi
|
||||||
|
SRC2TEXI = src2texi
|
||||||
|
noinst_SCRIPTS = $(SRC2TEXI)
|
||||||
|
EXTRA_PROGRAMS = kernel
|
||||||
|
pkginclude_HEADERS = multiboot2.h
|
||||||
|
|
||||||
|
# The example kernel is built if you specify --enable-example-kernel.
|
||||||
|
if BUILD_EXAMPLE_KERNEL
|
||||||
|
noinst_PROGRAMS = kernel
|
||||||
|
kernel_SOURCES = $(EXAMPLES)
|
||||||
|
kernel_CFLAGS = -fno-builtin -nostdinc -O -g -Wall \
|
||||||
|
-imacros $(top_builddir)/config.h
|
||||||
|
kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,80100000 -Wl,--build-id=none
|
||||||
|
|
||||||
|
boot.o: multiboot2.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) \
|
||||||
|
$(EXAMPLES) $(multiboot_TEXINFOS)
|
||||||
|
CLEANFILES = $(noinst_PROGRAMS)
|
||||||
|
|
||||||
|
# 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) $< $@
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
/* boot.S - bootstrap the kernel */
|
||||||
|
/* Copyright (C) 1999, 2001, 2010 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ASM_FILE 1
|
||||||
|
#include <multiboot2.h>
|
||||||
|
|
||||||
|
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
|
||||||
|
#ifdef HAVE_ASM_USCORE
|
||||||
|
# define EXT_C(sym) _ ## sym
|
||||||
|
#else
|
||||||
|
# define EXT_C(sym) sym
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The size of our stack (16KB). */
|
||||||
|
#define STACK_SIZE 0x4000
|
||||||
|
|
||||||
|
/* The flags for the Multiboot header. */
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define AOUT_KLUDGE 0
|
||||||
|
#else
|
||||||
|
# define AOUT_KLUDGE MULTIBOOT_AOUT_KLUDGE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
.globl start, _start
|
||||||
|
start:
|
||||||
|
_start:
|
||||||
|
jmp multiboot_entry
|
||||||
|
|
||||||
|
/* Align 64 bits boundary. */
|
||||||
|
.align 8
|
||||||
|
|
||||||
|
/* Multiboot header. */
|
||||||
|
multiboot_header:
|
||||||
|
/* magic */
|
||||||
|
.long MULTIBOOT2_HEADER_MAGIC
|
||||||
|
/* ISA: i386 */
|
||||||
|
.long GRUB_MULTIBOOT_ARCHITECTURE_I386
|
||||||
|
/* Header length. */
|
||||||
|
.long multiboot_header_end - multiboot_header
|
||||||
|
/* checksum */
|
||||||
|
.long -(MULTIBOOT2_HEADER_MAGIC + GRUB_MULTIBOOT_ARCHITECTURE_I386 + (multiboot_header_end - multiboot_header))
|
||||||
|
#ifndef __ELF__
|
||||||
|
address_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_ADDRESS
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long address_tag_end - address_tag_start
|
||||||
|
/* header_addr */
|
||||||
|
.long multiboot_header
|
||||||
|
/* load_addr */
|
||||||
|
.long _start
|
||||||
|
/* load_end_addr */
|
||||||
|
.long _edata
|
||||||
|
/* bss_end_addr */
|
||||||
|
.long _end
|
||||||
|
address_tag_end:
|
||||||
|
entry_address_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long entry_address_tag_end - entry_address_tag_start
|
||||||
|
/* entry_addr */
|
||||||
|
.long multiboot_entry
|
||||||
|
entry_address_tag_end:
|
||||||
|
#endif /* __ELF__ */
|
||||||
|
framebuffer_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_FRAMEBUFFER
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long framebuffer_tag_end - framebuffer_tag_start
|
||||||
|
.long 1024
|
||||||
|
.long 768
|
||||||
|
.long 32
|
||||||
|
framebuffer_tag_end:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_END
|
||||||
|
.short 0
|
||||||
|
.long 8
|
||||||
|
multiboot_header_end:
|
||||||
|
multiboot_entry:
|
||||||
|
/* Initialize the stack pointer. */
|
||||||
|
movl $(stack + STACK_SIZE), %esp
|
||||||
|
|
||||||
|
/* Reset EFLAGS. */
|
||||||
|
pushl $0
|
||||||
|
popf
|
||||||
|
|
||||||
|
/* Push the pointer to the Multiboot information structure. */
|
||||||
|
pushl %ebx
|
||||||
|
/* Push the magic value. */
|
||||||
|
pushl %eax
|
||||||
|
|
||||||
|
/* Now enter the C main function... */
|
||||||
|
call EXT_C(cmain)
|
||||||
|
|
||||||
|
/* Halt. */
|
||||||
|
pushl $halt_message
|
||||||
|
call EXT_C(printf)
|
||||||
|
|
||||||
|
loop: hlt
|
||||||
|
jmp loop
|
||||||
|
|
||||||
|
halt_message:
|
||||||
|
.asciz "Halted."
|
||||||
|
|
||||||
|
/* Our stack area. */
|
||||||
|
.comm stack, STACK_SIZE
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
/* boot.S - bootstrap the kernel */
|
||||||
|
/* Copyright (C) 1999, 2001, 2010 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ASM_FILE 1
|
||||||
|
#include <multiboot2.h>
|
||||||
|
|
||||||
|
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
|
||||||
|
#ifdef HAVE_ASM_USCORE
|
||||||
|
# define EXT_C(sym) _ ## sym
|
||||||
|
#else
|
||||||
|
# define EXT_C(sym) sym
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The size of our stack (16KB). */
|
||||||
|
#define STACK_SIZE 0x4000
|
||||||
|
|
||||||
|
/* The flags for the Multiboot header. */
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define AOUT_KLUDGE 0
|
||||||
|
#else
|
||||||
|
# define AOUT_KLUDGE MULTIBOOT_AOUT_KLUDGE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.text
|
||||||
|
.set noreorder
|
||||||
|
.set nomacro
|
||||||
|
|
||||||
|
.globl start, _start
|
||||||
|
start:
|
||||||
|
_start:
|
||||||
|
b multiboot_entry
|
||||||
|
nop
|
||||||
|
|
||||||
|
/* Align 64 bits boundary. */
|
||||||
|
.align 8
|
||||||
|
|
||||||
|
/* Multiboot header. */
|
||||||
|
multiboot_header:
|
||||||
|
/* magic */
|
||||||
|
.long MULTIBOOT2_HEADER_MAGIC
|
||||||
|
/* ISA: mips32 */
|
||||||
|
.long MULTIBOOT_ARCHITECTURE_MIPS32
|
||||||
|
/* Header length. */
|
||||||
|
.long multiboot_header_end - multiboot_header
|
||||||
|
/* checksum */
|
||||||
|
.long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_ARCHITECTURE_MIPS32 + (multiboot_header_end - multiboot_header))
|
||||||
|
#ifndef __ELF__
|
||||||
|
address_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_ADDRESS
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long address_tag_end - address_tag_start
|
||||||
|
/* header_addr */
|
||||||
|
.long multiboot_header
|
||||||
|
/* load_addr */
|
||||||
|
.long _start
|
||||||
|
/* load_end_addr */
|
||||||
|
.long _edata
|
||||||
|
/* bss_end_addr */
|
||||||
|
.long _end
|
||||||
|
address_tag_end:
|
||||||
|
entry_address_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long entry_address_tag_end - entry_address_tag_start
|
||||||
|
/* entry_addr */
|
||||||
|
.long multiboot_entry
|
||||||
|
entry_address_tag_end:
|
||||||
|
#endif /* __ELF__ */
|
||||||
|
framebuffer_tag_start:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_FRAMEBUFFER
|
||||||
|
.short MULTIBOOT_HEADER_TAG_OPTIONAL
|
||||||
|
.long framebuffer_tag_end - framebuffer_tag_start
|
||||||
|
.long 1024
|
||||||
|
.long 768
|
||||||
|
.long 32
|
||||||
|
framebuffer_tag_end:
|
||||||
|
.short MULTIBOOT_HEADER_TAG_END
|
||||||
|
.short 0
|
||||||
|
.long 8
|
||||||
|
multiboot_header_end:
|
||||||
|
multiboot_entry:
|
||||||
|
/* Initialize the stack pointer. */
|
||||||
|
lui $sp, %hi (stack + STACK_SIZE)
|
||||||
|
addiu $sp, $sp, %lo (stack + STACK_SIZE)
|
||||||
|
|
||||||
|
/* Now enter the C main function... */
|
||||||
|
bal EXT_C(cmain)
|
||||||
|
nop
|
||||||
|
|
||||||
|
/* Halt. */
|
||||||
|
lui $a0, %hi (halt_message)
|
||||||
|
addiu $a0, $a0, %lo (halt_message)
|
||||||
|
bal EXT_C(printf)
|
||||||
|
nop
|
||||||
|
|
||||||
|
loop: nop
|
||||||
|
b loop
|
||||||
|
nop
|
||||||
|
|
||||||
|
halt_message:
|
||||||
|
.asciz "Halted."
|
||||||
|
|
||||||
|
.align 8
|
||||||
|
/* Our stack area. */
|
||||||
|
.comm stack, STACK_SIZE
|
||||||
+368
@@ -0,0 +1,368 @@
|
|||||||
|
/* kernel.c - the C part of the kernel */
|
||||||
|
/* Copyright (C) 1999, 2010 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "multiboot2.h"
|
||||||
|
|
||||||
|
/* Macros. */
|
||||||
|
|
||||||
|
/* Some screen stuff. */
|
||||||
|
/* The number of columns. */
|
||||||
|
#define COLUMNS 80
|
||||||
|
/* The number of lines. */
|
||||||
|
#define LINES 24
|
||||||
|
/* The attribute of an character. */
|
||||||
|
#define ATTRIBUTE 7
|
||||||
|
/* The video memory address. */
|
||||||
|
#define VIDEO 0xB8000
|
||||||
|
|
||||||
|
/* Variables. */
|
||||||
|
/* Save the X position. */
|
||||||
|
static int xpos;
|
||||||
|
/* Save the Y position. */
|
||||||
|
static int ypos;
|
||||||
|
/* Point to the video memory. */
|
||||||
|
static volatile unsigned char *video;
|
||||||
|
|
||||||
|
/* Forward declarations. */
|
||||||
|
void cmain (unsigned long magic, unsigned long addr);
|
||||||
|
static void cls (void);
|
||||||
|
static void itoa (char *buf, int base, int d);
|
||||||
|
static void putchar (int c);
|
||||||
|
void printf (const char *format, ...);
|
||||||
|
|
||||||
|
/* Check if MAGIC is valid and print the Multiboot information structure
|
||||||
|
pointed by ADDR. */
|
||||||
|
void
|
||||||
|
cmain (unsigned long magic, unsigned long addr)
|
||||||
|
{
|
||||||
|
struct multiboot_tag *tag;
|
||||||
|
unsigned size;
|
||||||
|
|
||||||
|
/* Clear the screen. */
|
||||||
|
cls ();
|
||||||
|
|
||||||
|
/* Am I booted by a Multiboot-compliant boot loader? */
|
||||||
|
if (magic != MULTIBOOT2_BOOTLOADER_MAGIC)
|
||||||
|
{
|
||||||
|
printf ("Invalid magic number: 0x%x\n", (unsigned) magic);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addr & 7)
|
||||||
|
{
|
||||||
|
printf ("Unaligned mbi: 0x%x\n", addr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
size = *(unsigned *) addr;
|
||||||
|
printf ("Announced mbi size 0x%x\n", size);
|
||||||
|
for (tag = (struct multiboot_tag *) (addr + 8);
|
||||||
|
tag->type != MULTIBOOT_TAG_TYPE_END;
|
||||||
|
tag = (struct multiboot_tag *) ((multiboot_uint8_t *) tag
|
||||||
|
+ ((tag->size + 7) & ~7)))
|
||||||
|
{
|
||||||
|
printf ("Tag 0x%x, Size 0x%x\n", tag->type, tag->size);
|
||||||
|
switch (tag->type)
|
||||||
|
{
|
||||||
|
case MULTIBOOT_TAG_TYPE_CMDLINE:
|
||||||
|
printf ("Command line = %s\n",
|
||||||
|
((struct multiboot_tag_string *) tag)->string);
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME:
|
||||||
|
printf ("Boot loader name = %s\n",
|
||||||
|
((struct multiboot_tag_string *) tag)->string);
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_MODULE:
|
||||||
|
printf ("Module at 0x%x-0x%x. Command line %s\n",
|
||||||
|
((struct multiboot_tag_module *) tag)->mod_start,
|
||||||
|
((struct multiboot_tag_module *) tag)->mod_end,
|
||||||
|
((struct multiboot_tag_module *) tag)->cmdline);
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_BASIC_MEMINFO:
|
||||||
|
printf ("mem_lower = %uKB, mem_upper = %uKB\n",
|
||||||
|
((struct multiboot_tag_basic_meminfo *) tag)->mem_lower,
|
||||||
|
((struct multiboot_tag_basic_meminfo *) tag)->mem_upper);
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_BOOTDEV:
|
||||||
|
printf ("Boot device 0x%x,%u,%u\n",
|
||||||
|
((struct multiboot_tag_bootdev *) tag)->biosdev,
|
||||||
|
((struct multiboot_tag_bootdev *) tag)->slice,
|
||||||
|
((struct multiboot_tag_bootdev *) tag)->part);
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_MMAP:
|
||||||
|
{
|
||||||
|
multiboot_memory_map_t *mmap;
|
||||||
|
|
||||||
|
printf ("mmap\n");
|
||||||
|
|
||||||
|
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;
|
||||||
|
(multiboot_uint8_t *) mmap
|
||||||
|
< (multiboot_uint8_t *) tag + tag->size;
|
||||||
|
mmap = (multiboot_memory_map_t *)
|
||||||
|
((unsigned long) mmap
|
||||||
|
+ ((struct multiboot_tag_mmap *) tag)->entry_size))
|
||||||
|
printf (" base_addr = 0x%x%x,"
|
||||||
|
" length = 0x%x%x, type = 0x%x\n",
|
||||||
|
(unsigned) (mmap->addr >> 32),
|
||||||
|
(unsigned) (mmap->addr & 0xffffffff),
|
||||||
|
(unsigned) (mmap->len >> 32),
|
||||||
|
(unsigned) (mmap->len & 0xffffffff),
|
||||||
|
(unsigned) mmap->type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MULTIBOOT_TAG_TYPE_FRAMEBUFFER:
|
||||||
|
{
|
||||||
|
multiboot_uint32_t color;
|
||||||
|
unsigned i;
|
||||||
|
struct multiboot_tag_framebuffer *tagfb
|
||||||
|
= (struct multiboot_tag_framebuffer *) tag;
|
||||||
|
void *fb = (void *) (unsigned long) tagfb->common.framebuffer_addr;
|
||||||
|
|
||||||
|
switch (tagfb->common.framebuffer_type)
|
||||||
|
{
|
||||||
|
case MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED:
|
||||||
|
{
|
||||||
|
unsigned best_distance, distance;
|
||||||
|
struct multiboot_color *palette;
|
||||||
|
|
||||||
|
palette = tagfb->framebuffer_palette;
|
||||||
|
|
||||||
|
color = 0;
|
||||||
|
best_distance = 4*256*256;
|
||||||
|
|
||||||
|
for (i = 0; i < tagfb->framebuffer_palette_num_colors; i++)
|
||||||
|
{
|
||||||
|
distance = (0xff - palette[i].blue)
|
||||||
|
* (0xff - palette[i].blue)
|
||||||
|
+ palette[i].red * palette[i].red
|
||||||
|
+ palette[i].green * palette[i].green;
|
||||||
|
if (distance < best_distance)
|
||||||
|
{
|
||||||
|
color = i;
|
||||||
|
best_distance = distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MULTIBOOT_FRAMEBUFFER_TYPE_RGB:
|
||||||
|
color = ((1 << tagfb->framebuffer_blue_mask_size) - 1)
|
||||||
|
<< tagfb->framebuffer_blue_field_position;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT:
|
||||||
|
color = '\\' | 0x0100;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
color = 0xffffffff;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < tagfb->common.framebuffer_width
|
||||||
|
&& i < tagfb->common.framebuffer_height; i++)
|
||||||
|
{
|
||||||
|
switch (tagfb->common.framebuffer_bpp)
|
||||||
|
{
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
multiboot_uint8_t *pixel = fb
|
||||||
|
+ tagfb->common.framebuffer_pitch * i + i;
|
||||||
|
*pixel = color;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
case 16:
|
||||||
|
{
|
||||||
|
multiboot_uint16_t *pixel
|
||||||
|
= fb + tagfb->common.framebuffer_pitch * i + 2 * i;
|
||||||
|
*pixel = color;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
{
|
||||||
|
multiboot_uint32_t *pixel
|
||||||
|
= fb + tagfb->common.framebuffer_pitch * i + 3 * i;
|
||||||
|
*pixel = (color & 0xffffff) | (*pixel & 0xff000000);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 32:
|
||||||
|
{
|
||||||
|
multiboot_uint32_t *pixel
|
||||||
|
= fb + tagfb->common.framebuffer_pitch * i + 4 * i;
|
||||||
|
*pixel = color;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tag = (struct multiboot_tag *) ((multiboot_uint8_t *) tag
|
||||||
|
+ ((tag->size + 7) & ~7));
|
||||||
|
printf ("Total mbi size 0x%x\n", (unsigned) tag - addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear the screen and initialize VIDEO, XPOS and YPOS. */
|
||||||
|
static void
|
||||||
|
cls (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
video = (unsigned char *) VIDEO;
|
||||||
|
|
||||||
|
for (i = 0; i < COLUMNS * LINES * 2; i++)
|
||||||
|
*(video + i) = 0;
|
||||||
|
|
||||||
|
xpos = 0;
|
||||||
|
ypos = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Convert the integer D to a string and save the string in BUF. If
|
||||||
|
BASE is equal to 'd', interpret that D is decimal, and if BASE is
|
||||||
|
equal to 'x', interpret that D is hexadecimal. */
|
||||||
|
static void
|
||||||
|
itoa (char *buf, int base, int d)
|
||||||
|
{
|
||||||
|
char *p = buf;
|
||||||
|
char *p1, *p2;
|
||||||
|
unsigned long ud = d;
|
||||||
|
int divisor = 10;
|
||||||
|
|
||||||
|
/* If %d is specified and D is minus, put `-' in the head. */
|
||||||
|
if (base == 'd' && d < 0)
|
||||||
|
{
|
||||||
|
*p++ = '-';
|
||||||
|
buf++;
|
||||||
|
ud = -d;
|
||||||
|
}
|
||||||
|
else if (base == 'x')
|
||||||
|
divisor = 16;
|
||||||
|
|
||||||
|
/* Divide UD by DIVISOR until UD == 0. */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
int remainder = ud % divisor;
|
||||||
|
|
||||||
|
*p++ = (remainder < 10) ? remainder + '0' : remainder + 'a' - 10;
|
||||||
|
}
|
||||||
|
while (ud /= divisor);
|
||||||
|
|
||||||
|
/* Terminate BUF. */
|
||||||
|
*p = 0;
|
||||||
|
|
||||||
|
/* Reverse BUF. */
|
||||||
|
p1 = buf;
|
||||||
|
p2 = p - 1;
|
||||||
|
while (p1 < p2)
|
||||||
|
{
|
||||||
|
char tmp = *p1;
|
||||||
|
*p1 = *p2;
|
||||||
|
*p2 = tmp;
|
||||||
|
p1++;
|
||||||
|
p2--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Put the character C on the screen. */
|
||||||
|
static void
|
||||||
|
putchar (int c)
|
||||||
|
{
|
||||||
|
if (c == '\n' || c == '\r')
|
||||||
|
{
|
||||||
|
newline:
|
||||||
|
xpos = 0;
|
||||||
|
ypos++;
|
||||||
|
if (ypos >= LINES)
|
||||||
|
ypos = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*(video + (xpos + ypos * COLUMNS) * 2) = c & 0xFF;
|
||||||
|
*(video + (xpos + ypos * COLUMNS) * 2 + 1) = ATTRIBUTE;
|
||||||
|
|
||||||
|
xpos++;
|
||||||
|
if (xpos >= COLUMNS)
|
||||||
|
goto newline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Format a string and print it on the screen, just like the libc
|
||||||
|
function printf. */
|
||||||
|
void
|
||||||
|
printf (const char *format, ...)
|
||||||
|
{
|
||||||
|
char **arg = (char **) &format;
|
||||||
|
int c;
|
||||||
|
char buf[20];
|
||||||
|
|
||||||
|
arg++;
|
||||||
|
|
||||||
|
while ((c = *format++) != 0)
|
||||||
|
{
|
||||||
|
if (c != '%')
|
||||||
|
putchar (c);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *p, *p2;
|
||||||
|
int pad0 = 0, pad = 0;
|
||||||
|
|
||||||
|
c = *format++;
|
||||||
|
if (c == '0')
|
||||||
|
{
|
||||||
|
pad0 = 1;
|
||||||
|
c = *format++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c >= '0' && c <= '9')
|
||||||
|
{
|
||||||
|
pad = c - '0';
|
||||||
|
c = *format++;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case 'd':
|
||||||
|
case 'u':
|
||||||
|
case 'x':
|
||||||
|
itoa (buf, c, *((int *) arg++));
|
||||||
|
p = buf;
|
||||||
|
goto string;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
p = *arg++;
|
||||||
|
if (! p)
|
||||||
|
p = "(null)";
|
||||||
|
|
||||||
|
string:
|
||||||
|
for (p2 = p; *p2; p2++);
|
||||||
|
for (; p2 < p + pad; p2++)
|
||||||
|
putchar (pad0 ? '0' : ' ');
|
||||||
|
while (*p)
|
||||||
|
putchar (*p++);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
putchar (*((int *) arg++));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1705
File diff suppressed because it is too large.
Load diff
@@ -72,6 +72,7 @@
|
|||||||
#define MULTIBOOT_HEADER_TAG_FRAMEBUFFER 5
|
#define MULTIBOOT_HEADER_TAG_FRAMEBUFFER 5
|
||||||
#define MULTIBOOT_HEADER_TAG_MODULE_ALIGN 6
|
#define MULTIBOOT_HEADER_TAG_MODULE_ALIGN 6
|
||||||
#define MULTIBOOT_HEADER_TAG_EFI_BS 7
|
#define MULTIBOOT_HEADER_TAG_EFI_BS 7
|
||||||
|
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI32 8
|
||||||
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9
|
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9
|
||||||
#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10
|
#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10
|
||||||
|
|
||||||
@@ -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}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
AUTOMAKE_OPTIONS = subdir-objects
|
|
||||||
|
|
||||||
# AM_MAKEINFOFLAGS = --no-split --no-validate
|
|
||||||
info_TEXINFOS = grub.texi grub-dev.texi
|
|
||||||
grub_TEXINFOS = fdl.texi
|
|
||||||
|
|
||||||
EXTRA_DIST = font_char_metrics.png font_char_metrics.txt
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
|
|
||||||
-452
@@ -1,452 +0,0 @@
|
|||||||
|
|
||||||
@node GNU Free Documentation License
|
|
||||||
@appendixsec GNU Free Documentation License
|
|
||||||
|
|
||||||
@cindex FDL, GNU Free Documentation License
|
|
||||||
@center Version 1.2, November 2002
|
|
||||||
|
|
||||||
@display
|
|
||||||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
|
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
@end display
|
|
||||||
|
|
||||||
@enumerate 0
|
|
||||||
@item
|
|
||||||
PREAMBLE
|
|
||||||
|
|
||||||
The purpose of this License is to make a manual, textbook, or other
|
|
||||||
functional and useful document @dfn{free} in the sense of freedom: to
|
|
||||||
assure everyone the effective freedom to copy and redistribute it,
|
|
||||||
with or without modifying it, either commercially or noncommercially.
|
|
||||||
Secondarily, this License preserves for the author and publisher a way
|
|
||||||
to get credit for their work, while not being considered responsible
|
|
||||||
for modifications made by others.
|
|
||||||
|
|
||||||
This License is a kind of ``copyleft'', which means that derivative
|
|
||||||
works of the document must themselves be free in the same sense. It
|
|
||||||
complements the GNU General Public License, which is a copyleft
|
|
||||||
license designed for free software.
|
|
||||||
|
|
||||||
We have designed this License in order to use it for manuals for free
|
|
||||||
software, because free software needs free documentation: a free
|
|
||||||
program should come with manuals providing the same freedoms that the
|
|
||||||
software does. But this License is not limited to software manuals;
|
|
||||||
it can be used for any textual work, regardless of subject matter or
|
|
||||||
whether it is published as a printed book. We recommend this License
|
|
||||||
principally for works whose purpose is instruction or reference.
|
|
||||||
|
|
||||||
@item
|
|
||||||
APPLICABILITY AND DEFINITIONS
|
|
||||||
|
|
||||||
This License applies to any manual or other work, in any medium, that
|
|
||||||
contains a notice placed by the copyright holder saying it can be
|
|
||||||
distributed under the terms of this License. Such a notice grants a
|
|
||||||
world-wide, royalty-free license, unlimited in duration, to use that
|
|
||||||
work under the conditions stated herein. The ``Document'', below,
|
|
||||||
refers to any such manual or work. Any member of the public is a
|
|
||||||
licensee, and is addressed as ``you''. You accept the license if you
|
|
||||||
copy, modify or distribute the work in a way requiring permission
|
|
||||||
under copyright law.
|
|
||||||
|
|
||||||
A ``Modified Version'' of the Document means any work containing the
|
|
||||||
Document or a portion of it, either copied verbatim, or with
|
|
||||||
modifications and/or translated into another language.
|
|
||||||
|
|
||||||
A ``Secondary Section'' is a named appendix or a front-matter section
|
|
||||||
of the Document that deals exclusively with the relationship of the
|
|
||||||
publishers or authors of the Document to the Document's overall
|
|
||||||
subject (or to related matters) and contains nothing that could fall
|
|
||||||
directly within that overall subject. (Thus, if the Document is in
|
|
||||||
part a textbook of mathematics, a Secondary Section may not explain
|
|
||||||
any mathematics.) The relationship could be a matter of historical
|
|
||||||
connection with the subject or with related matters, or of legal,
|
|
||||||
commercial, philosophical, ethical or political position regarding
|
|
||||||
them.
|
|
||||||
|
|
||||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
|
||||||
are designated, as being those of Invariant Sections, in the notice
|
|
||||||
that says that the Document is released under this License. If a
|
|
||||||
section does not fit the above definition of Secondary then it is not
|
|
||||||
allowed to be designated as Invariant. The Document may contain zero
|
|
||||||
Invariant Sections. If the Document does not identify any Invariant
|
|
||||||
Sections then there are none.
|
|
||||||
|
|
||||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
|
||||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
|
||||||
the Document is released under this License. A Front-Cover Text may
|
|
||||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
|
||||||
|
|
||||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
|
||||||
represented in a format whose specification is available to the
|
|
||||||
general public, that is suitable for revising the document
|
|
||||||
straightforwardly with generic text editors or (for images composed of
|
|
||||||
pixels) generic paint programs or (for drawings) some widely available
|
|
||||||
drawing editor, and that is suitable for input to text formatters or
|
|
||||||
for automatic translation to a variety of formats suitable for input
|
|
||||||
to text formatters. A copy made in an otherwise Transparent file
|
|
||||||
format whose markup, or absence of markup, has been arranged to thwart
|
|
||||||
or discourage subsequent modification by readers is not Transparent.
|
|
||||||
An image format is not Transparent if used for any substantial amount
|
|
||||||
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
|
||||||
|
|
||||||
Examples of suitable formats for Transparent copies include plain
|
|
||||||
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
|
|
||||||
format, @acronym{SGML} or @acronym{XML} using a publicly available
|
|
||||||
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
|
|
||||||
PostScript or @acronym{PDF} designed for human modification. Examples
|
|
||||||
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
|
|
||||||
@acronym{JPG}. Opaque formats include proprietary formats that can be
|
|
||||||
read and edited only by proprietary word processors, @acronym{SGML} or
|
|
||||||
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
|
|
||||||
not generally available, and the machine-generated @acronym{HTML},
|
|
||||||
PostScript or @acronym{PDF} produced by some word processors for
|
|
||||||
output purposes only.
|
|
||||||
|
|
||||||
The ``Title Page'' means, for a printed book, the title page itself,
|
|
||||||
plus such following pages as are needed to hold, legibly, the material
|
|
||||||
this License requires to appear in the title page. For works in
|
|
||||||
formats which do not have any title page as such, ``Title Page'' means
|
|
||||||
the text near the most prominent appearance of the work's title,
|
|
||||||
preceding the beginning of the body of the text.
|
|
||||||
|
|
||||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
|
||||||
title either is precisely XYZ or contains XYZ in parentheses following
|
|
||||||
text that translates XYZ in another language. (Here XYZ stands for a
|
|
||||||
specific section name mentioned below, such as ``Acknowledgements'',
|
|
||||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
|
||||||
of such a section when you modify the Document means that it remains a
|
|
||||||
section ``Entitled XYZ'' according to this definition.
|
|
||||||
|
|
||||||
The Document may include Warranty Disclaimers next to the notice which
|
|
||||||
states that this License applies to the Document. These Warranty
|
|
||||||
Disclaimers are considered to be included by reference in this
|
|
||||||
License, but only as regards disclaiming warranties: any other
|
|
||||||
implication that these Warranty Disclaimers may have is void and has
|
|
||||||
no effect on the meaning of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
VERBATIM COPYING
|
|
||||||
|
|
||||||
You may copy and distribute the Document in any medium, either
|
|
||||||
commercially or noncommercially, provided that this License, the
|
|
||||||
copyright notices, and the license notice saying this License applies
|
|
||||||
to the Document are reproduced in all copies, and that you add no other
|
|
||||||
conditions whatsoever to those of this License. You may not use
|
|
||||||
technical measures to obstruct or control the reading or further
|
|
||||||
copying of the copies you make or distribute. However, you may accept
|
|
||||||
compensation in exchange for copies. If you distribute a large enough
|
|
||||||
number of copies you must also follow the conditions in section 3.
|
|
||||||
|
|
||||||
You may also lend copies, under the same conditions stated above, and
|
|
||||||
you may publicly display copies.
|
|
||||||
|
|
||||||
@item
|
|
||||||
COPYING IN QUANTITY
|
|
||||||
|
|
||||||
If you publish printed copies (or copies in media that commonly have
|
|
||||||
printed covers) of the Document, numbering more than 100, and the
|
|
||||||
Document's license notice requires Cover Texts, you must enclose the
|
|
||||||
copies in covers that carry, clearly and legibly, all these Cover
|
|
||||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
|
||||||
the back cover. Both covers must also clearly and legibly identify
|
|
||||||
you as the publisher of these copies. The front cover must present
|
|
||||||
the full title with all words of the title equally prominent and
|
|
||||||
visible. You may add other material on the covers in addition.
|
|
||||||
Copying with changes limited to the covers, as long as they preserve
|
|
||||||
the title of the Document and satisfy these conditions, can be treated
|
|
||||||
as verbatim copying in other respects.
|
|
||||||
|
|
||||||
If the required texts for either cover are too voluminous to fit
|
|
||||||
legibly, you should put the first ones listed (as many as fit
|
|
||||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
|
||||||
pages.
|
|
||||||
|
|
||||||
If you publish or distribute Opaque copies of the Document numbering
|
|
||||||
more than 100, you must either include a machine-readable Transparent
|
|
||||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
|
||||||
a computer-network location from which the general network-using
|
|
||||||
public has access to download using public-standard network protocols
|
|
||||||
a complete Transparent copy of the Document, free of added material.
|
|
||||||
If you use the latter option, you must take reasonably prudent steps,
|
|
||||||
when you begin distribution of Opaque copies in quantity, to ensure
|
|
||||||
that this Transparent copy will remain thus accessible at the stated
|
|
||||||
location until at least one year after the last time you distribute an
|
|
||||||
Opaque copy (directly or through your agents or retailers) of that
|
|
||||||
edition to the public.
|
|
||||||
|
|
||||||
It is requested, but not required, that you contact the authors of the
|
|
||||||
Document well before redistributing any large number of copies, to give
|
|
||||||
them a chance to provide you with an updated version of the Document.
|
|
||||||
|
|
||||||
@item
|
|
||||||
MODIFICATIONS
|
|
||||||
|
|
||||||
You may copy and distribute a Modified Version of the Document under
|
|
||||||
the conditions of sections 2 and 3 above, provided that you release
|
|
||||||
the Modified Version under precisely this License, with the Modified
|
|
||||||
Version filling the role of the Document, thus licensing distribution
|
|
||||||
and modification of the Modified Version to whoever possesses a copy
|
|
||||||
of it. In addition, you must do these things in the Modified Version:
|
|
||||||
|
|
||||||
@enumerate A
|
|
||||||
@item
|
|
||||||
Use in the Title Page (and on the covers, if any) a title distinct
|
|
||||||
from that of the Document, and from those of previous versions
|
|
||||||
(which should, if there were any, be listed in the History section
|
|
||||||
of the Document). You may use the same title as a previous version
|
|
||||||
if the original publisher of that version gives permission.
|
|
||||||
|
|
||||||
@item
|
|
||||||
List on the Title Page, as authors, one or more persons or entities
|
|
||||||
responsible for authorship of the modifications in the Modified
|
|
||||||
Version, together with at least five of the principal authors of the
|
|
||||||
Document (all of its principal authors, if it has fewer than five),
|
|
||||||
unless they release you from this requirement.
|
|
||||||
|
|
||||||
@item
|
|
||||||
State on the Title page the name of the publisher of the
|
|
||||||
Modified Version, as the publisher.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve all the copyright notices of the Document.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Add an appropriate copyright notice for your modifications
|
|
||||||
adjacent to the other copyright notices.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Include, immediately after the copyright notices, a license notice
|
|
||||||
giving the public permission to use the Modified Version under the
|
|
||||||
terms of this License, in the form shown in the Addendum below.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve in that license notice the full lists of Invariant Sections
|
|
||||||
and required Cover Texts given in the Document's license notice.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Include an unaltered copy of this License.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve the section Entitled ``History'', Preserve its Title, and add
|
|
||||||
to it an item stating at least the title, year, new authors, and
|
|
||||||
publisher of the Modified Version as given on the Title Page. If
|
|
||||||
there is no section Entitled ``History'' in the Document, create one
|
|
||||||
stating the title, year, authors, and publisher of the Document as
|
|
||||||
given on its Title Page, then add an item describing the Modified
|
|
||||||
Version as stated in the previous sentence.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve the network location, if any, given in the Document for
|
|
||||||
public access to a Transparent copy of the Document, and likewise
|
|
||||||
the network locations given in the Document for previous versions
|
|
||||||
it was based on. These may be placed in the ``History'' section.
|
|
||||||
You may omit a network location for a work that was published at
|
|
||||||
least four years before the Document itself, or if the original
|
|
||||||
publisher of the version it refers to gives permission.
|
|
||||||
|
|
||||||
@item
|
|
||||||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
|
||||||
the Title of the section, and preserve in the section all the
|
|
||||||
substance and tone of each of the contributor acknowledgements and/or
|
|
||||||
dedications given therein.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve all the Invariant Sections of the Document,
|
|
||||||
unaltered in their text and in their titles. Section numbers
|
|
||||||
or the equivalent are not considered part of the section titles.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Delete any section Entitled ``Endorsements''. Such a section
|
|
||||||
may not be included in the Modified Version.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
|
||||||
to conflict in title with any Invariant Section.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Preserve any Warranty Disclaimers.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
If the Modified Version includes new front-matter sections or
|
|
||||||
appendices that qualify as Secondary Sections and contain no material
|
|
||||||
copied from the Document, you may at your option designate some or all
|
|
||||||
of these sections as invariant. To do this, add their titles to the
|
|
||||||
list of Invariant Sections in the Modified Version's license notice.
|
|
||||||
These titles must be distinct from any other section titles.
|
|
||||||
|
|
||||||
You may add a section Entitled ``Endorsements'', provided it contains
|
|
||||||
nothing but endorsements of your Modified Version by various
|
|
||||||
parties---for example, statements of peer review or that the text has
|
|
||||||
been approved by an organization as the authoritative definition of a
|
|
||||||
standard.
|
|
||||||
|
|
||||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
|
||||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
|
||||||
of Cover Texts in the Modified Version. Only one passage of
|
|
||||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
|
||||||
through arrangements made by) any one entity. If the Document already
|
|
||||||
includes a cover text for the same cover, previously added by you or
|
|
||||||
by arrangement made by the same entity you are acting on behalf of,
|
|
||||||
you may not add another; but you may replace the old one, on explicit
|
|
||||||
permission from the previous publisher that added the old one.
|
|
||||||
|
|
||||||
The author(s) and publisher(s) of the Document do not by this License
|
|
||||||
give permission to use their names for publicity for or to assert or
|
|
||||||
imply endorsement of any Modified Version.
|
|
||||||
|
|
||||||
@item
|
|
||||||
COMBINING DOCUMENTS
|
|
||||||
|
|
||||||
You may combine the Document with other documents released under this
|
|
||||||
License, under the terms defined in section 4 above for modified
|
|
||||||
versions, provided that you include in the combination all of the
|
|
||||||
Invariant Sections of all of the original documents, unmodified, and
|
|
||||||
list them all as Invariant Sections of your combined work in its
|
|
||||||
license notice, and that you preserve all their Warranty Disclaimers.
|
|
||||||
|
|
||||||
The combined work need only contain one copy of this License, and
|
|
||||||
multiple identical Invariant Sections may be replaced with a single
|
|
||||||
copy. If there are multiple Invariant Sections with the same name but
|
|
||||||
different contents, make the title of each such section unique by
|
|
||||||
adding at the end of it, in parentheses, the name of the original
|
|
||||||
author or publisher of that section if known, or else a unique number.
|
|
||||||
Make the same adjustment to the section titles in the list of
|
|
||||||
Invariant Sections in the license notice of the combined work.
|
|
||||||
|
|
||||||
In the combination, you must combine any sections Entitled ``History''
|
|
||||||
in the various original documents, forming one section Entitled
|
|
||||||
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
|
||||||
and any sections Entitled ``Dedications''. You must delete all
|
|
||||||
sections Entitled ``Endorsements.''
|
|
||||||
|
|
||||||
@item
|
|
||||||
COLLECTIONS OF DOCUMENTS
|
|
||||||
|
|
||||||
You may make a collection consisting of the Document and other documents
|
|
||||||
released under this License, and replace the individual copies of this
|
|
||||||
License in the various documents with a single copy that is included in
|
|
||||||
the collection, provided that you follow the rules of this License for
|
|
||||||
verbatim copying of each of the documents in all other respects.
|
|
||||||
|
|
||||||
You may extract a single document from such a collection, and distribute
|
|
||||||
it individually under this License, provided you insert a copy of this
|
|
||||||
License into the extracted document, and follow this License in all
|
|
||||||
other respects regarding verbatim copying of that document.
|
|
||||||
|
|
||||||
@item
|
|
||||||
AGGREGATION WITH INDEPENDENT WORKS
|
|
||||||
|
|
||||||
A compilation of the Document or its derivatives with other separate
|
|
||||||
and independent documents or works, in or on a volume of a storage or
|
|
||||||
distribution medium, is called an ``aggregate'' if the copyright
|
|
||||||
resulting from the compilation is not used to limit the legal rights
|
|
||||||
of the compilation's users beyond what the individual works permit.
|
|
||||||
When the Document is included in an aggregate, this License does not
|
|
||||||
apply to the other works in the aggregate which are not themselves
|
|
||||||
derivative works of the Document.
|
|
||||||
|
|
||||||
If the Cover Text requirement of section 3 is applicable to these
|
|
||||||
copies of the Document, then if the Document is less than one half of
|
|
||||||
the entire aggregate, the Document's Cover Texts may be placed on
|
|
||||||
covers that bracket the Document within the aggregate, or the
|
|
||||||
electronic equivalent of covers if the Document is in electronic form.
|
|
||||||
Otherwise they must appear on printed covers that bracket the whole
|
|
||||||
aggregate.
|
|
||||||
|
|
||||||
@item
|
|
||||||
TRANSLATION
|
|
||||||
|
|
||||||
Translation is considered a kind of modification, so you may
|
|
||||||
distribute translations of the Document under the terms of section 4.
|
|
||||||
Replacing Invariant Sections with translations requires special
|
|
||||||
permission from their copyright holders, but you may include
|
|
||||||
translations of some or all Invariant Sections in addition to the
|
|
||||||
original versions of these Invariant Sections. You may include a
|
|
||||||
translation of this License, and all the license notices in the
|
|
||||||
Document, and any Warranty Disclaimers, provided that you also include
|
|
||||||
the original English version of this License and the original versions
|
|
||||||
of those notices and disclaimers. In case of a disagreement between
|
|
||||||
the translation and the original version of this License or a notice
|
|
||||||
or disclaimer, the original version will prevail.
|
|
||||||
|
|
||||||
If a section in the Document is Entitled ``Acknowledgements'',
|
|
||||||
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
|
||||||
its Title (section 1) will typically require changing the actual
|
|
||||||
title.
|
|
||||||
|
|
||||||
@item
|
|
||||||
TERMINATION
|
|
||||||
|
|
||||||
You may not copy, modify, sublicense, or distribute the Document except
|
|
||||||
as expressly provided for under this License. Any other attempt to
|
|
||||||
copy, modify, sublicense or distribute the Document 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.
|
|
||||||
|
|
||||||
@item
|
|
||||||
FUTURE REVISIONS OF THIS LICENSE
|
|
||||||
|
|
||||||
The Free Software Foundation may publish new, revised versions
|
|
||||||
of the GNU Free Documentation 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. See
|
|
||||||
@uref{http://www.gnu.org/copyleft/}.
|
|
||||||
|
|
||||||
Each version of the License is given a distinguishing version number.
|
|
||||||
If the Document specifies that a particular numbered version of this
|
|
||||||
License ``or any later version'' applies to it, you have the option of
|
|
||||||
following the terms and conditions either of that specified version or
|
|
||||||
of any later version that has been published (not as a draft) by the
|
|
||||||
Free Software Foundation. If the Document does not specify a version
|
|
||||||
number of this License, you may choose any version ever published (not
|
|
||||||
as a draft) by the Free Software Foundation.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@page
|
|
||||||
@appendixsubsec ADDENDUM: How to use this License for your documents
|
|
||||||
|
|
||||||
To use this License in a document you have written, include a copy of
|
|
||||||
the License in the document and put the following copyright and
|
|
||||||
license notices just after the title page:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@group
|
|
||||||
Copyright (C) @var{year} @var{your name}.
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
|
||||||
under the terms of the GNU Free Documentation License, Version 1.2
|
|
||||||
or any later version published by the Free Software Foundation;
|
|
||||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
|
||||||
Texts. A copy of the license is included in the section entitled ``GNU
|
|
||||||
Free Documentation License''.
|
|
||||||
@end group
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
|
||||||
replace the ``with...Texts.'' line with this:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
@group
|
|
||||||
with the Invariant Sections being @var{list their titles}, with
|
|
||||||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
|
||||||
being @var{list}.
|
|
||||||
@end group
|
|
||||||
@end smallexample
|
|
||||||
|
|
||||||
If you have Invariant Sections without Cover Texts, or some other
|
|
||||||
combination of the three, merge those two alternatives to suit the
|
|
||||||
situation.
|
|
||||||
|
|
||||||
If your document contains nontrivial examples of program code, we
|
|
||||||
recommend releasing these examples in parallel under your choice of
|
|
||||||
free software license, such as the GNU General Public License,
|
|
||||||
to permit their use in free software.
|
|
||||||
|
|
||||||
@c Local Variables:
|
|
||||||
@c ispell-local-pdict: "ispell-dict"
|
|
||||||
@c End:
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1 +0,0 @@
|
|||||||
Please fill this in.
|
|
||||||
-1968
File diff suppressed because it is too large.
Load diff
@@ -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
|
|
||||||
}
|
|
||||||
-6590
File diff suppressed because it is too large.
Load diff
@@ -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,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:
|
|
||||||
@@ -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
|
|
||||||
-8959
File diff suppressed because it is too large.
Load diff
-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,903 +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",
|
|
||||||
"mips_loongson", "sparc64_ieee1275",
|
|
||||||
"powerpc_ieee1275", "mips_arc", "ia64_efi",
|
|
||||||
"mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_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" ]
|
|
||||||
GROUPS["arm64"] = [ "arm64_efi" ]
|
|
||||||
|
|
||||||
# Groups based on firmware
|
|
||||||
GROUPS["efi"] = [ "i386_efi", "x86_64_efi", "ia64_efi", "arm_efi", "arm64_efi" ]
|
|
||||||
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
|
|
||||||
GROUPS["uboot"] = [ "arm_uboot" ]
|
|
||||||
GROUPS["xen"] = [ "i386_xen", "x86_64_xen" ]
|
|
||||||
|
|
||||||
# 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"]
|
|
||||||
|
|
||||||
# If gfxterm is main output console integrate it into kernel
|
|
||||||
GROUPS["videoinkernel"] = ["mips_loongson", "i386_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" ] + 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" ]
|
|
||||||
|
|
||||||
# Needs software helpers for division
|
|
||||||
# Must match GRUB_DIVISION_IN_SOFTWARE in misc.h
|
|
||||||
GROUPS["softdiv"] = GROUPS["arm"] + ["ia64_efi"]
|
|
||||||
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))
|
|
||||||
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 platform_sources(defn, p): return 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 [ "", "_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")
|
|
||||||
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 > $@; 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 .ARM.exidx $< $@; \
|
|
||||||
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", name)
|
|
||||||
gvar_add("TESTS", 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", name)
|
|
||||||
gvar_add ("TESTS", 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,447 +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/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/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/term.h
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.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_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/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_srcdir)/include/grub/i386/tsc.h
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/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_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_srcdir)/include/grub/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
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_xen
|
|
||||||
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_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/terminfo.h
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.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_efi
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/efi/loader.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/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_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
|
|
||||||
if COND_GRUB_EMU_SDL
|
|
||||||
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 | /bin/sh $(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 "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
|
|
||||||
-e "/COMMAND_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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
|
|
||||||
cat kernel_syms.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
|
|
||||||
|
|
||||||
$(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,93 +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;
|
|
||||||
}
|
|
||||||
|
|
||||||
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,542 +0,0 @@
|
|||||||
/* -*-Asm-*- */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 1999,2000,2001,2002,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 <grub/symbol.h>
|
|
||||||
#include <grub/machine/boot.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* defines for the code go here
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Print message string */
|
|
||||||
#define MSG(x) movw $x, %si; call LOCAL(message)
|
|
||||||
#define ERR(x) movw $x, %si; jmp LOCAL(error_message)
|
|
||||||
|
|
||||||
.macro floppy
|
|
||||||
part_start:
|
|
||||||
|
|
||||||
LOCAL(probe_values):
|
|
||||||
.byte 36, 18, 15, 9, 0
|
|
||||||
|
|
||||||
LOCAL(floppy_probe):
|
|
||||||
pushw %dx
|
|
||||||
/*
|
|
||||||
* Perform floppy probe.
|
|
||||||
*/
|
|
||||||
#ifdef __APPLE__
|
|
||||||
LOCAL(probe_values_minus_one) = LOCAL(probe_values) - 1
|
|
||||||
movw MACRO_DOLLAR(LOCAL(probe_values_minus_one)), %si
|
|
||||||
#else
|
|
||||||
movw MACRO_DOLLAR(LOCAL(probe_values)) - 1, %si
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LOCAL(probe_loop):
|
|
||||||
/* reset floppy controller INT 13h AH=0 */
|
|
||||||
xorw %ax, %ax
|
|
||||||
int MACRO_DOLLAR(0x13)
|
|
||||||
|
|
||||||
incw %si
|
|
||||||
movb (%si), %cl
|
|
||||||
|
|
||||||
/* if number of sectors is 0, display error and die */
|
|
||||||
testb %cl, %cl
|
|
||||||
jnz 1f
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Floppy disk probe failure.
|
|
||||||
*/
|
|
||||||
MSG(fd_probe_error_string)
|
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/* "Floppy" */
|
|
||||||
fd_probe_error_string: .asciz "Floppy"
|
|
||||||
|
|
||||||
1:
|
|
||||||
/* perform read */
|
|
||||||
movw MACRO_DOLLAR(GRUB_BOOT_MACHINE_BUFFER_SEG), %bx
|
|
||||||
movw %bx, %es
|
|
||||||
xorw %bx, %bx
|
|
||||||
movw MACRO_DOLLAR(0x201), %ax
|
|
||||||
movb MACRO_DOLLAR(0), %ch
|
|
||||||
movb MACRO_DOLLAR(0), %dh
|
|
||||||
int MACRO_DOLLAR(0x13)
|
|
||||||
|
|
||||||
/* if error, jump to "LOCAL(probe_loop)" */
|
|
||||||
jc LOCAL(probe_loop)
|
|
||||||
|
|
||||||
/* %cl is already the correct value! */
|
|
||||||
movb MACRO_DOLLAR(1), %dh
|
|
||||||
movb MACRO_DOLLAR(79), %ch
|
|
||||||
|
|
||||||
jmp LOCAL(final_init)
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro scratch
|
|
||||||
|
|
||||||
/* scratch space */
|
|
||||||
mode:
|
|
||||||
.byte 0
|
|
||||||
disk_address_packet:
|
|
||||||
sectors:
|
|
||||||
.long 0
|
|
||||||
heads:
|
|
||||||
.long 0
|
|
||||||
cylinders:
|
|
||||||
.word 0
|
|
||||||
sector_start:
|
|
||||||
.byte 0
|
|
||||||
head_start:
|
|
||||||
.byte 0
|
|
||||||
cylinder_start:
|
|
||||||
.word 0
|
|
||||||
/* more space... */
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.file "boot.S"
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
/* Tell GAS to generate 16-bit instructions so that this code works
|
|
||||||
in real mode. */
|
|
||||||
.code16
|
|
||||||
|
|
||||||
.globl _start, start;
|
|
||||||
_start:
|
|
||||||
start:
|
|
||||||
/*
|
|
||||||
* _start is loaded at 0x7c00 and is jumped to with CS:IP 0:0x7c00
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Beginning of the sector is compatible with the FAT/HPFS BIOS
|
|
||||||
* parameter block.
|
|
||||||
*/
|
|
||||||
|
|
||||||
jmp LOCAL(after_BPB)
|
|
||||||
nop /* do I care about this ??? */
|
|
||||||
|
|
||||||
#ifdef HYBRID_BOOT
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
|
|
||||||
nop
|
|
||||||
nop
|
|
||||||
jmp LOCAL(after_BPB)
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
* This space is for the BIOS parameter block!!!! Don't change
|
|
||||||
* the first jump, nor start the code anywhere but right after
|
|
||||||
* this area.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.org GRUB_BOOT_MACHINE_BPB_START
|
|
||||||
.org 4
|
|
||||||
#endif
|
|
||||||
#ifdef HYBRID_BOOT
|
|
||||||
floppy
|
|
||||||
#else
|
|
||||||
scratch
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.org GRUB_BOOT_MACHINE_BPB_END
|
|
||||||
/*
|
|
||||||
* End of BIOS parameter block.
|
|
||||||
*/
|
|
||||||
|
|
||||||
LOCAL(kernel_address):
|
|
||||||
.word GRUB_BOOT_MACHINE_KERNEL_ADDR
|
|
||||||
|
|
||||||
#ifndef HYBRID_BOOT
|
|
||||||
.org GRUB_BOOT_MACHINE_KERNEL_SECTOR
|
|
||||||
LOCAL(kernel_sector):
|
|
||||||
.long 1
|
|
||||||
LOCAL(kernel_sector_high):
|
|
||||||
.long 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.org GRUB_BOOT_MACHINE_BOOT_DRIVE
|
|
||||||
boot_drive:
|
|
||||||
.byte 0xff /* the disk to load kernel from */
|
|
||||||
/* 0xff means use the boot drive */
|
|
||||||
|
|
||||||
LOCAL(after_BPB):
|
|
||||||
|
|
||||||
/* general setup */
|
|
||||||
cli /* we're not safe here! */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is a workaround for buggy BIOSes which don't pass boot
|
|
||||||
* drive correctly. If GRUB is installed into a HDD, check if
|
|
||||||
* DL is masked correctly. If not, assume that the BIOS passed
|
|
||||||
* a bogus value and set DL to 0x80, since this is the only
|
|
||||||
* possible boot drive. If GRUB is installed into a floppy,
|
|
||||||
* this does nothing (only jump).
|
|
||||||
*/
|
|
||||||
.org GRUB_BOOT_MACHINE_DRIVE_CHECK
|
|
||||||
boot_drive_check:
|
|
||||||
jmp 3f /* grub-setup may overwrite this jump */
|
|
||||||
testb $0x80, %dl
|
|
||||||
jz 2f
|
|
||||||
3:
|
|
||||||
/* Ignore %dl different from 0-0x0f and 0x80-0x8f. */
|
|
||||||
testb $0x70, %dl
|
|
||||||
jz 1f
|
|
||||||
2:
|
|
||||||
movb $0x80, %dl
|
|
||||||
1:
|
|
||||||
/*
|
|
||||||
* ljmp to the next instruction because some bogus BIOSes
|
|
||||||
* jump to 07C0:0000 instead of 0000:7C00.
|
|
||||||
*/
|
|
||||||
ljmp $0, $real_start
|
|
||||||
|
|
||||||
real_start:
|
|
||||||
|
|
||||||
/* set up %ds and %ss as offset from 0 */
|
|
||||||
xorw %ax, %ax
|
|
||||||
movw %ax, %ds
|
|
||||||
movw %ax, %ss
|
|
||||||
|
|
||||||
/* set up the REAL stack */
|
|
||||||
movw $GRUB_BOOT_MACHINE_STACK_SEG, %sp
|
|
||||||
|
|
||||||
sti /* we're safe again */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if we have a forced disk reference here
|
|
||||||
*/
|
|
||||||
movb boot_drive, %al
|
|
||||||
cmpb $0xff, %al
|
|
||||||
je 1f
|
|
||||||
movb %al, %dl
|
|
||||||
1:
|
|
||||||
/* save drive reference first thing! */
|
|
||||||
pushw %dx
|
|
||||||
|
|
||||||
/* print a notification message on the screen */
|
|
||||||
MSG(notification_string)
|
|
||||||
|
|
||||||
/* set %si to the disk address packet */
|
|
||||||
movw $disk_address_packet, %si
|
|
||||||
|
|
||||||
/* check if LBA is supported */
|
|
||||||
movb $0x41, %ah
|
|
||||||
movw $0x55aa, %bx
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
/*
|
|
||||||
* %dl may have been clobbered by INT 13, AH=41H.
|
|
||||||
* This happens, for example, with AST BIOS 1.04.
|
|
||||||
*/
|
|
||||||
popw %dx
|
|
||||||
pushw %dx
|
|
||||||
|
|
||||||
/* use CHS if fails */
|
|
||||||
jc LOCAL(chs_mode)
|
|
||||||
cmpw $0xaa55, %bx
|
|
||||||
jne LOCAL(chs_mode)
|
|
||||||
|
|
||||||
andw $1, %cx
|
|
||||||
jz LOCAL(chs_mode)
|
|
||||||
|
|
||||||
LOCAL(lba_mode):
|
|
||||||
xorw %ax, %ax
|
|
||||||
movw %ax, 4(%si)
|
|
||||||
|
|
||||||
incw %ax
|
|
||||||
/* set the mode to non-zero */
|
|
||||||
movb %al, -1(%si)
|
|
||||||
|
|
||||||
/* the blocks */
|
|
||||||
movw %ax, 2(%si)
|
|
||||||
|
|
||||||
/* the size and the reserved byte */
|
|
||||||
movw $0x0010, (%si)
|
|
||||||
|
|
||||||
/* the absolute address */
|
|
||||||
movl LOCAL(kernel_sector), %ebx
|
|
||||||
movl %ebx, 8(%si)
|
|
||||||
movl LOCAL(kernel_sector_high), %ebx
|
|
||||||
movl %ebx, 12(%si)
|
|
||||||
|
|
||||||
/* the segment of buffer address */
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory
|
|
||||||
* Call with %ah = 0x42
|
|
||||||
* %dl = drive number
|
|
||||||
* %ds:%si = segment:offset of disk address packet
|
|
||||||
* Return:
|
|
||||||
* %al = 0x0 on success; err code on failure
|
|
||||||
*/
|
|
||||||
|
|
||||||
movb $0x42, %ah
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
/* LBA read is not supported, so fallback to CHS. */
|
|
||||||
jc LOCAL(chs_mode)
|
|
||||||
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
|
|
||||||
jmp LOCAL(copy_buffer)
|
|
||||||
|
|
||||||
LOCAL(chs_mode):
|
|
||||||
/*
|
|
||||||
* Determine the hard disk geometry from the BIOS!
|
|
||||||
* We do this first, so that LS-120 IDE floppies work correctly.
|
|
||||||
*/
|
|
||||||
movb $8, %ah
|
|
||||||
int $0x13
|
|
||||||
jnc LOCAL(final_init)
|
|
||||||
|
|
||||||
popw %dx
|
|
||||||
/*
|
|
||||||
* The call failed, so maybe use the floppy probe instead.
|
|
||||||
*/
|
|
||||||
testb %dl, %dl
|
|
||||||
jnb LOCAL(floppy_probe)
|
|
||||||
|
|
||||||
/* Nope, we definitely have a hard disk, and we're screwed. */
|
|
||||||
ERR(hd_probe_error_string)
|
|
||||||
|
|
||||||
LOCAL(final_init):
|
|
||||||
/* set the mode to zero */
|
|
||||||
movzbl %dh, %eax
|
|
||||||
movb %ah, -1(%si)
|
|
||||||
|
|
||||||
/* save number of heads */
|
|
||||||
incw %ax
|
|
||||||
movl %eax, 4(%si)
|
|
||||||
|
|
||||||
movzbw %cl, %dx
|
|
||||||
shlw $2, %dx
|
|
||||||
movb %ch, %al
|
|
||||||
movb %dh, %ah
|
|
||||||
|
|
||||||
/* save number of cylinders */
|
|
||||||
incw %ax
|
|
||||||
movw %ax, 8(%si)
|
|
||||||
|
|
||||||
movzbw %dl, %ax
|
|
||||||
shrb $2, %al
|
|
||||||
|
|
||||||
/* save number of sectors */
|
|
||||||
movl %eax, (%si)
|
|
||||||
|
|
||||||
setup_sectors:
|
|
||||||
/* load logical sector start (top half) */
|
|
||||||
movl LOCAL(kernel_sector_high), %eax
|
|
||||||
|
|
||||||
orl %eax, %eax
|
|
||||||
jnz LOCAL(geometry_error)
|
|
||||||
|
|
||||||
/* load logical sector start (bottom half) */
|
|
||||||
movl LOCAL(kernel_sector), %eax
|
|
||||||
|
|
||||||
/* zero %edx */
|
|
||||||
xorl %edx, %edx
|
|
||||||
|
|
||||||
/* divide by number of sectors */
|
|
||||||
divl (%si)
|
|
||||||
|
|
||||||
/* save sector start */
|
|
||||||
movb %dl, %cl
|
|
||||||
|
|
||||||
xorw %dx, %dx /* zero %edx */
|
|
||||||
divl 4(%si) /* divide by number of heads */
|
|
||||||
|
|
||||||
/* do we need too many cylinders? */
|
|
||||||
cmpw 8(%si), %ax
|
|
||||||
jge LOCAL(geometry_error)
|
|
||||||
|
|
||||||
/* normalize sector start (1-based) */
|
|
||||||
incb %cl
|
|
||||||
|
|
||||||
/* low bits of cylinder start */
|
|
||||||
movb %al, %ch
|
|
||||||
|
|
||||||
/* high bits of cylinder start */
|
|
||||||
xorb %al, %al
|
|
||||||
shrw $2, %ax
|
|
||||||
orb %al, %cl
|
|
||||||
|
|
||||||
/* save head start */
|
|
||||||
movb %dl, %al
|
|
||||||
|
|
||||||
/* restore %dl */
|
|
||||||
popw %dx
|
|
||||||
|
|
||||||
/* head start */
|
|
||||||
movb %al, %dh
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
|
|
||||||
* Call with %ah = 0x2
|
|
||||||
* %al = number of sectors
|
|
||||||
* %ch = cylinder
|
|
||||||
* %cl = sector (bits 6-7 are high bits of "cylinder")
|
|
||||||
* %dh = head
|
|
||||||
* %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
|
|
||||||
* %es:%bx = segment:offset of buffer
|
|
||||||
* Return:
|
|
||||||
* %al = 0x0 on success; err code on failure
|
|
||||||
*/
|
|
||||||
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
|
|
||||||
movw %bx, %es /* load %es segment with disk buffer */
|
|
||||||
|
|
||||||
xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
|
|
||||||
movw $0x0201, %ax /* function 2 */
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
jc LOCAL(read_error)
|
|
||||||
|
|
||||||
movw %es, %bx
|
|
||||||
|
|
||||||
LOCAL(copy_buffer):
|
|
||||||
/*
|
|
||||||
* We need to save %cx and %si because the startup code in
|
|
||||||
* kernel uses them without initializing them.
|
|
||||||
*/
|
|
||||||
pusha
|
|
||||||
pushw %ds
|
|
||||||
|
|
||||||
movw $0x100, %cx
|
|
||||||
movw %bx, %ds
|
|
||||||
xorw %si, %si
|
|
||||||
movw $GRUB_BOOT_MACHINE_KERNEL_ADDR, %di
|
|
||||||
movw %si, %es
|
|
||||||
|
|
||||||
cld
|
|
||||||
|
|
||||||
rep
|
|
||||||
movsw
|
|
||||||
|
|
||||||
popw %ds
|
|
||||||
popa
|
|
||||||
|
|
||||||
/* boot kernel */
|
|
||||||
jmp *(LOCAL(kernel_address))
|
|
||||||
|
|
||||||
/* END OF MAIN LOOP */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS Geometry translation error (past the end of the disk geometry!).
|
|
||||||
*/
|
|
||||||
LOCAL(geometry_error):
|
|
||||||
ERR(geometry_error_string)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read error on the disk.
|
|
||||||
*/
|
|
||||||
LOCAL(read_error):
|
|
||||||
movw $read_error_string, %si
|
|
||||||
LOCAL(error_message):
|
|
||||||
call LOCAL(message)
|
|
||||||
LOCAL(general_error):
|
|
||||||
MSG(general_error_string)
|
|
||||||
|
|
||||||
/* go here when you need to stop the machine hard after an error condition */
|
|
||||||
/* tell the BIOS a boot failure, which may result in no effect */
|
|
||||||
int $0x18
|
|
||||||
LOCAL(stop):
|
|
||||||
jmp LOCAL(stop)
|
|
||||||
|
|
||||||
notification_string: .asciz "GRUB "
|
|
||||||
geometry_error_string: .asciz "Geom"
|
|
||||||
hd_probe_error_string: .asciz "Hard Disk"
|
|
||||||
read_error_string: .asciz "Read"
|
|
||||||
general_error_string: .asciz " Error\r\n"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* message: write the string pointed to by %si
|
|
||||||
*
|
|
||||||
* WARNING: trashes %si, %ax, and %bx
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Use BIOS "int 10H Function 0Eh" to write character in teletype mode
|
|
||||||
* %ah = 0xe %al = character
|
|
||||||
* %bh = page %bl = foreground color (graphics modes)
|
|
||||||
*/
|
|
||||||
1:
|
|
||||||
movw $0x0001, %bx
|
|
||||||
movb $0xe, %ah
|
|
||||||
int $0x10 /* display a byte */
|
|
||||||
LOCAL(message):
|
|
||||||
lodsb
|
|
||||||
cmpb $0, %al
|
|
||||||
jne 1b /* if not end of string, jmp to display */
|
|
||||||
ret
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Windows NT breaks compatibility by embedding a magic
|
|
||||||
* number here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HYBRID_BOOT
|
|
||||||
.org 0x1b0
|
|
||||||
LOCAL(kernel_sector):
|
|
||||||
.long 1
|
|
||||||
LOCAL(kernel_sector_high):
|
|
||||||
.long 0
|
|
||||||
#endif
|
|
||||||
.org GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
|
|
||||||
nt_magic:
|
|
||||||
.long 0
|
|
||||||
.word 0
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is where an MBR would go if on a hard disk. The code
|
|
||||||
* here isn't even referenced unless we're on a floppy. Kinda
|
|
||||||
* sneaky, huh?
|
|
||||||
*/
|
|
||||||
|
|
||||||
.org GRUB_BOOT_MACHINE_PART_START
|
|
||||||
|
|
||||||
#ifndef HYBRID_BOOT
|
|
||||||
floppy
|
|
||||||
#else
|
|
||||||
scratch
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.org GRUB_BOOT_MACHINE_PART_END
|
|
||||||
|
|
||||||
/* the last 2 bytes in the sector 0 contain the signature */
|
|
||||||
.word GRUB_BOOT_MACHINE_SIGNATURE
|
|
||||||
@@ -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,378 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 1999,2000,2001,2002,2006,2007,2009,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/symbol.h>
|
|
||||||
#include <grub/machine/boot.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* defines for the code go here
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MSG(x) movw $x, %si; call LOCAL(message)
|
|
||||||
|
|
||||||
.file "diskboot.S"
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
/* Tell GAS to generate 16-bit instructions so that this code works
|
|
||||||
in real mode. */
|
|
||||||
.code16
|
|
||||||
|
|
||||||
.globl start, _start
|
|
||||||
start:
|
|
||||||
_start:
|
|
||||||
/*
|
|
||||||
* _start is loaded at 0x2000 and is jumped to with
|
|
||||||
* CS:IP 0:0x2000 in kernel.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* we continue to use the stack for boot.img and assume that
|
|
||||||
* some registers are set to correct values. See boot.S
|
|
||||||
* for more information.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* save drive reference first thing! */
|
|
||||||
pushw %dx
|
|
||||||
|
|
||||||
/* print a notification message on the screen */
|
|
||||||
pushw %si
|
|
||||||
MSG(notification_string)
|
|
||||||
popw %si
|
|
||||||
|
|
||||||
/* this sets up for the first run through "bootloop" */
|
|
||||||
movw $LOCAL(firstlist), %di
|
|
||||||
|
|
||||||
/* save the sector number of the second sector in %ebp */
|
|
||||||
movl (%di), %ebp
|
|
||||||
|
|
||||||
/* this is the loop for reading the rest of the kernel in */
|
|
||||||
LOCAL(bootloop):
|
|
||||||
|
|
||||||
/* check the number of sectors to read */
|
|
||||||
cmpw $0, 8(%di)
|
|
||||||
|
|
||||||
/* if zero, go to the start function */
|
|
||||||
je LOCAL(bootit)
|
|
||||||
|
|
||||||
LOCAL(setup_sectors):
|
|
||||||
/* check if we use LBA or CHS */
|
|
||||||
cmpb $0, -1(%si)
|
|
||||||
|
|
||||||
/* use CHS if zero, LBA otherwise */
|
|
||||||
je LOCAL(chs_mode)
|
|
||||||
|
|
||||||
/* load logical sector start */
|
|
||||||
movl (%di), %ebx
|
|
||||||
movl 4(%di), %ecx
|
|
||||||
|
|
||||||
/* the maximum is limited to 0x7f because of Phoenix EDD */
|
|
||||||
xorl %eax, %eax
|
|
||||||
movb $0x7f, %al
|
|
||||||
|
|
||||||
/* how many do we really want to read? */
|
|
||||||
cmpw %ax, 8(%di) /* compare against total number of sectors */
|
|
||||||
|
|
||||||
/* which is greater? */
|
|
||||||
jg 1f
|
|
||||||
|
|
||||||
/* if less than, set to total */
|
|
||||||
movw 8(%di), %ax
|
|
||||||
|
|
||||||
1:
|
|
||||||
/* subtract from total */
|
|
||||||
subw %ax, 8(%di)
|
|
||||||
|
|
||||||
/* add into logical sector start */
|
|
||||||
addl %eax, (%di)
|
|
||||||
adcl $0, 4(%di)
|
|
||||||
|
|
||||||
/* set up disk address packet */
|
|
||||||
|
|
||||||
/* the size and the reserved byte */
|
|
||||||
movw $0x0010, (%si)
|
|
||||||
|
|
||||||
/* the number of sectors */
|
|
||||||
movw %ax, 2(%si)
|
|
||||||
|
|
||||||
/* the absolute address */
|
|
||||||
movl %ebx, 8(%si)
|
|
||||||
movl %ecx, 12(%si)
|
|
||||||
|
|
||||||
/* the segment of buffer address */
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
|
|
||||||
|
|
||||||
/* save %ax from destruction! */
|
|
||||||
pushw %ax
|
|
||||||
|
|
||||||
/* the offset of buffer address */
|
|
||||||
movw $0, 4(%si)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory
|
|
||||||
* Call with %ah = 0x42
|
|
||||||
* %dl = drive number
|
|
||||||
* %ds:%si = segment:offset of disk address packet
|
|
||||||
* Return:
|
|
||||||
* %al = 0x0 on success; err code on failure
|
|
||||||
*/
|
|
||||||
|
|
||||||
movb $0x42, %ah
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
jc LOCAL(read_error)
|
|
||||||
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
|
|
||||||
jmp LOCAL(copy_buffer)
|
|
||||||
|
|
||||||
LOCAL(chs_mode):
|
|
||||||
/* load logical sector start (top half) */
|
|
||||||
movl 4(%di), %eax
|
|
||||||
orl %eax, %eax
|
|
||||||
jnz LOCAL(geometry_error)
|
|
||||||
|
|
||||||
/* load logical sector start (bottom half) */
|
|
||||||
movl (%di), %eax
|
|
||||||
|
|
||||||
/* zero %edx */
|
|
||||||
xorl %edx, %edx
|
|
||||||
|
|
||||||
/* divide by number of sectors */
|
|
||||||
divl (%si)
|
|
||||||
|
|
||||||
/* save sector start */
|
|
||||||
movb %dl, 10(%si)
|
|
||||||
|
|
||||||
xorl %edx, %edx /* zero %edx */
|
|
||||||
divl 4(%si) /* divide by number of heads */
|
|
||||||
|
|
||||||
/* save head start */
|
|
||||||
movb %dl, 11(%si)
|
|
||||||
|
|
||||||
/* save cylinder start */
|
|
||||||
movw %ax, 12(%si)
|
|
||||||
|
|
||||||
/* do we need too many cylinders? */
|
|
||||||
cmpw 8(%si), %ax
|
|
||||||
jge LOCAL(geometry_error)
|
|
||||||
|
|
||||||
/* determine the maximum sector length of this read */
|
|
||||||
movw (%si), %ax /* get number of sectors per track/head */
|
|
||||||
|
|
||||||
/* subtract sector start */
|
|
||||||
subb 10(%si), %al
|
|
||||||
|
|
||||||
/* how many do we really want to read? */
|
|
||||||
cmpw %ax, 8(%di) /* compare against total number of sectors */
|
|
||||||
|
|
||||||
|
|
||||||
/* which is greater? */
|
|
||||||
jg 2f
|
|
||||||
|
|
||||||
/* if less than, set to total */
|
|
||||||
movw 8(%di), %ax
|
|
||||||
|
|
||||||
2:
|
|
||||||
/* subtract from total */
|
|
||||||
subw %ax, 8(%di)
|
|
||||||
|
|
||||||
/* add into logical sector start */
|
|
||||||
addl %eax, (%di)
|
|
||||||
adcl $0, 4(%di)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the loop for taking care of BIOS geometry translation (ugh!)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* get high bits of cylinder */
|
|
||||||
movb 13(%si), %dl
|
|
||||||
|
|
||||||
shlb $6, %dl /* shift left by 6 bits */
|
|
||||||
movb 10(%si), %cl /* get sector */
|
|
||||||
|
|
||||||
incb %cl /* normalize sector (sectors go
|
|
||||||
from 1-N, not 0-(N-1) ) */
|
|
||||||
orb %dl, %cl /* composite together */
|
|
||||||
movb 12(%si), %ch /* sector+hcyl in cl, cylinder in ch */
|
|
||||||
|
|
||||||
/* restore %dx */
|
|
||||||
popw %dx
|
|
||||||
pushw %dx
|
|
||||||
|
|
||||||
/* head number */
|
|
||||||
movb 11(%si), %dh
|
|
||||||
|
|
||||||
pushw %ax /* save %ax from destruction! */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS call "INT 0x13 Function 0x2" to read sectors from disk into memory
|
|
||||||
* Call with %ah = 0x2
|
|
||||||
* %al = number of sectors
|
|
||||||
* %ch = cylinder
|
|
||||||
* %cl = sector (bits 6-7 are high bits of "cylinder")
|
|
||||||
* %dh = head
|
|
||||||
* %dl = drive (0x80 for hard disk, 0x0 for floppy disk)
|
|
||||||
* %es:%bx = segment:offset of buffer
|
|
||||||
* Return:
|
|
||||||
* %al = 0x0 on success; err code on failure
|
|
||||||
*/
|
|
||||||
|
|
||||||
movw $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
|
|
||||||
movw %bx, %es /* load %es segment with disk buffer */
|
|
||||||
|
|
||||||
xorw %bx, %bx /* %bx = 0, put it at 0 in the segment */
|
|
||||||
movb $0x2, %ah /* function 2 */
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
jc LOCAL(read_error)
|
|
||||||
|
|
||||||
/* save source segment */
|
|
||||||
movw %es, %bx
|
|
||||||
|
|
||||||
LOCAL(copy_buffer):
|
|
||||||
|
|
||||||
/* load addresses for copy from disk buffer to destination */
|
|
||||||
movw 10(%di), %es /* load destination segment */
|
|
||||||
|
|
||||||
/* restore %ax */
|
|
||||||
popw %ax
|
|
||||||
|
|
||||||
/* determine the next possible destination address (presuming
|
|
||||||
512 byte sectors!) */
|
|
||||||
shlw $5, %ax /* shift %ax five bits to the left */
|
|
||||||
addw %ax, 10(%di) /* add the corrected value to the destination
|
|
||||||
address for next time */
|
|
||||||
|
|
||||||
/* save addressing regs */
|
|
||||||
pusha
|
|
||||||
pushw %ds
|
|
||||||
|
|
||||||
/* get the copy length */
|
|
||||||
shlw $3, %ax
|
|
||||||
movw %ax, %cx
|
|
||||||
|
|
||||||
xorw %di, %di /* zero offset of destination addresses */
|
|
||||||
xorw %si, %si /* zero offset of source addresses */
|
|
||||||
movw %bx, %ds /* restore the source segment */
|
|
||||||
|
|
||||||
cld /* sets the copy direction to forward */
|
|
||||||
|
|
||||||
/* perform copy */
|
|
||||||
rep /* sets a repeat */
|
|
||||||
movsw /* this runs the actual copy */
|
|
||||||
|
|
||||||
/* restore addressing regs and print a dot with correct DS
|
|
||||||
(MSG modifies SI, which is saved, and unused AX and BX) */
|
|
||||||
popw %ds
|
|
||||||
MSG(notification_step)
|
|
||||||
popa
|
|
||||||
|
|
||||||
/* check if finished with this dataset */
|
|
||||||
cmpw $0, 8(%di)
|
|
||||||
jne LOCAL(setup_sectors)
|
|
||||||
|
|
||||||
/* update position to load from */
|
|
||||||
subw $GRUB_BOOT_MACHINE_LIST_SIZE, %di
|
|
||||||
|
|
||||||
/* jump to bootloop */
|
|
||||||
jmp LOCAL(bootloop)
|
|
||||||
|
|
||||||
/* END OF MAIN LOOP */
|
|
||||||
|
|
||||||
LOCAL(bootit):
|
|
||||||
/* print a newline */
|
|
||||||
MSG(notification_done)
|
|
||||||
popw %dx /* this makes sure %dl is our "boot" drive */
|
|
||||||
ljmp $0, $(GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200)
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BIOS Geometry translation error (past the end of the disk geometry!).
|
|
||||||
*/
|
|
||||||
LOCAL(geometry_error):
|
|
||||||
MSG(geometry_error_string)
|
|
||||||
jmp LOCAL(general_error)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read error on the disk.
|
|
||||||
*/
|
|
||||||
LOCAL(read_error):
|
|
||||||
MSG(read_error_string)
|
|
||||||
|
|
||||||
LOCAL(general_error):
|
|
||||||
MSG(general_error_string)
|
|
||||||
|
|
||||||
/* go here when you need to stop the machine hard after an error condition */
|
|
||||||
LOCAL(stop): jmp LOCAL(stop)
|
|
||||||
|
|
||||||
notification_string: .asciz "loading"
|
|
||||||
|
|
||||||
notification_step: .asciz "."
|
|
||||||
notification_done: .asciz "\r\n"
|
|
||||||
|
|
||||||
geometry_error_string: .asciz "Geom"
|
|
||||||
read_error_string: .asciz "Read"
|
|
||||||
general_error_string: .asciz " Error"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* message: write the string pointed to by %si
|
|
||||||
*
|
|
||||||
* WARNING: trashes %si, %ax, and %bx
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Use BIOS "int 10H Function 0Eh" to write character in teletype mode
|
|
||||||
* %ah = 0xe %al = character
|
|
||||||
* %bh = page %bl = foreground color (graphics modes)
|
|
||||||
*/
|
|
||||||
1:
|
|
||||||
movw $0x0001, %bx
|
|
||||||
movb $0xe, %ah
|
|
||||||
int $0x10 /* display a byte */
|
|
||||||
|
|
||||||
incw %si
|
|
||||||
LOCAL(message):
|
|
||||||
movb (%si), %al
|
|
||||||
cmpb $0, %al
|
|
||||||
jne 1b /* if not end of string, jmp to display */
|
|
||||||
ret
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This area is an empty space between the main body of code below which
|
|
||||||
* grows up (fixed after compilation, but between releases it may change
|
|
||||||
* in size easily), and the lists of sectors to read, which grows down
|
|
||||||
* from a fixed top location.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
|
|
||||||
.org 0x200 - GRUB_BOOT_MACHINE_LIST_SIZE
|
|
||||||
LOCAL(firstlist): /* this label has to be before the first list entry!!! */
|
|
||||||
/* fill the first data listing with the default */
|
|
||||||
blocklist_default_start:
|
|
||||||
/* this is the sector start parameter, in logical sectors from
|
|
||||||
the start of the disk, sector 0 */
|
|
||||||
.long 2, 0
|
|
||||||
blocklist_default_len:
|
|
||||||
/* this is the number of sectors to read. grub-mkimage
|
|
||||||
will fill this up */
|
|
||||||
.word 0
|
|
||||||
blocklist_default_seg:
|
|
||||||
/* this is the segment of the starting address to load the data into */
|
|
||||||
.word (GRUB_BOOT_MACHINE_KERNEL_SEG + 0x20)
|
|
||||||
@@ -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,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2000,2005,2007,2008,2009,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/machine/boot.h>
|
|
||||||
|
|
||||||
.file "pxeboot.S"
|
|
||||||
.text
|
|
||||||
|
|
||||||
/* Start with the prehistoric environment... */
|
|
||||||
.code16
|
|
||||||
|
|
||||||
/* Let's go */
|
|
||||||
.globl start, _start;
|
|
||||||
_start:
|
|
||||||
start:
|
|
||||||
|
|
||||||
/* Use drive number 0x7F for PXE */
|
|
||||||
movb $GRUB_BOOT_MACHINE_PXE_DL, %dl
|
|
||||||
|
|
||||||
/* Jump to the real world */
|
|
||||||
ljmp $0, $0x8200
|
|
||||||
|
|
||||||
/* This region is a junk. Do you say that this is wasteful?
|
|
||||||
But I like that the memory layout of the body is consistent
|
|
||||||
among different kernels rather than scamping just for 1.5KB. */
|
|
||||||
.org 0x8200 - 0x7C00 - 0x200 - 1
|
|
||||||
.byte 0
|
|
||||||
@@ -1,360 +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"
|
|
||||||
|
|
||||||
#include <rs_decoder.h>
|
|
||||||
|
|
||||||
.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
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#define FULOONG2F 1
|
|
||||||
#include "fwstart.S"
|
|
||||||
@@ -1,756 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009,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/mips/loongson/serial.h>
|
|
||||||
#include <grub/mips/loongson/pci.h>
|
|
||||||
#include <grub/mips/loongson.h>
|
|
||||||
#include <grub/pci.h>
|
|
||||||
#include <grub/machine/serial.h>
|
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
#include <grub/ns8250.h>
|
|
||||||
#include <grub/cs5536.h>
|
|
||||||
#include <grub/smbus.h>
|
|
||||||
|
|
||||||
#ifndef FULOONG2F
|
|
||||||
#include <grub/vgaregs.h>
|
|
||||||
#define GRUB_SM712_REG_BASE 0x700000
|
|
||||||
#define GRUB_SM712_PCIID 0x0712126f
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
#define GRUB_MACHINE_SERIAL_PORT GRUB_MACHINE_SERIAL_PORT2
|
|
||||||
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200
|
|
||||||
#else
|
|
||||||
#define GRUB_MACHINE_SERIAL_PORT GRUB_MACHINE_SERIAL_PORT0
|
|
||||||
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.set noreorder
|
|
||||||
.set noat
|
|
||||||
.set nomacro
|
|
||||||
.set mips3
|
|
||||||
|
|
||||||
.global start,_start,__start
|
|
||||||
start:
|
|
||||||
_start:
|
|
||||||
__start:
|
|
||||||
/* Put serial init as soon as possible. But on Fuloong2f serial is past
|
|
||||||
Geode, so on Fuloong2f we need Geode first.
|
|
||||||
*/
|
|
||||||
#ifndef FULOONG2F
|
|
||||||
bal serial_hw_init
|
|
||||||
nop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Find CS5536 controller. */
|
|
||||||
/* $t4 chooses device in priority encoding. */
|
|
||||||
/* Resulting value is kept in GRUB_MACHINE_PCI_CONF_CTRL_REG.
|
|
||||||
This way we don't need to sacrifice a register for it. */
|
|
||||||
retry_cs5536:
|
|
||||||
/* We have only one bus (0). Function is 0. */
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR_2F)
|
|
||||||
lui $t1, %hi(GRUB_MACHINE_PCI_CONFSPACE_2F)
|
|
||||||
lui $t3, %hi(GRUB_CS5536_PCIID)
|
|
||||||
addiu $t3, $t3, %lo(GRUB_CS5536_PCIID)
|
|
||||||
ori $t4, $zero, 1
|
|
||||||
1:
|
|
||||||
andi $t4, $t4, ((1 << GRUB_PCI_NUM_DEVICES_2F) - 1)
|
|
||||||
/* In case of failure try again. CS5536 may be slow to come up. */
|
|
||||||
beql $t4, $zero, retry_cs5536
|
|
||||||
nop
|
|
||||||
sw $t4, %lo(GRUB_MACHINE_PCI_CONF_CTRL_REG_ADDR_2F) ($t0)
|
|
||||||
lw $t2, (%lo(GRUB_MACHINE_PCI_CONFSPACE_2F) + GRUB_PCI_REG_PCI_ID) ($t1)
|
|
||||||
bnel $t2, $t3, 1b
|
|
||||||
sll $t4, $t4, 1
|
|
||||||
|
|
||||||
#ifndef FULOONG2F
|
|
||||||
lui $a0, %hi(cs5536_found)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(cs5536_found)
|
|
||||||
bal printhex
|
|
||||||
move $a0, $t4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_CONFSPACE_2F)
|
|
||||||
li $t1, GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED
|
|
||||||
sw $t1, (%lo(GRUB_MACHINE_PCI_CONFSPACE_2F) + GRUB_CS5536_MSR_MAILBOX_CONFIG) ($t0)
|
|
||||||
|
|
||||||
/* Set GPIO LBAR. */
|
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_GPIO_BAR)
|
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_GPIO_BAR)
|
|
||||||
ori $a1, $zero, GRUB_CS5536_LBAR_GPIO
|
|
||||||
/* Set mask to 0xf and enabled bit to 1. */
|
|
||||||
bal wrmsr
|
|
||||||
ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
|
|
||||||
| GRUB_CS5536_LBAR_ENABLE) >> 32)
|
|
||||||
|
|
||||||
bal gpio_init
|
|
||||||
nop
|
|
||||||
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
bal serial_hw_init
|
|
||||||
nop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialise SMBus controller. */
|
|
||||||
/* Set SMBUS LBAR. */
|
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_SMB_BAR)
|
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_SMB_BAR)
|
|
||||||
ori $a1, $zero, GRUB_CS5536_LBAR_SMBUS
|
|
||||||
/* Set mask to 0xf and enabled bit to 1. */
|
|
||||||
bal wrmsr
|
|
||||||
ori $a2, $zero, ((GRUB_CS5536_LBAR_MASK_MASK \
|
|
||||||
| GRUB_CS5536_LBAR_ENABLE) >> 32)
|
|
||||||
|
|
||||||
lui $a0, %hi(smbus_enabled)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(smbus_enabled)
|
|
||||||
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS)
|
|
||||||
|
|
||||||
/* Disable SMB. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
|
||||||
|
|
||||||
/* Disable interrupts. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1) ($t0)
|
|
||||||
|
|
||||||
/* Set as master. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_ADDR) ($t0)
|
|
||||||
|
|
||||||
/* Launch SMBus controller at slowest speed possible. */
|
|
||||||
ori $t1, $zero, 0xff
|
|
||||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
|
|
||||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
|
||||||
|
|
||||||
/* Yeeloong and Fuloong2f have only one memory slot. */
|
|
||||||
/* Output first byte on serial for debugging. */
|
|
||||||
ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
|
|
||||||
bal read_spd
|
|
||||||
move $a0, $zero
|
|
||||||
bal printhex
|
|
||||||
move $a0, $v0
|
|
||||||
|
|
||||||
bal read_spd
|
|
||||||
ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_ADDR
|
|
||||||
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_TYPE_DDR2
|
|
||||||
lui $a0, %hi(unimplemented_memory_type)
|
|
||||||
bne $t0, $v0, fatal
|
|
||||||
addiu $a0, $a0, %lo(unimplemented_memory_type)
|
|
||||||
|
|
||||||
/* And here is our goal: DDR2 controller initialisation. */
|
|
||||||
lui $t0, %hi(GRUB_CPU_LOONGSON_CORECFG)
|
|
||||||
ld $t1, %lo(GRUB_CPU_LOONGSON_CORECFG) ($t0)
|
|
||||||
/* Use addiu for sign-extension. */
|
|
||||||
addiu $t2, $zero, ~(GRUB_CPU_LOONGSON_CORECFG_DISABLE_DDR2_SPACE|GRUB_CPU_LOONGSON_CORECFG_BUFFER_CPU)
|
|
||||||
and $t1, $t1, $t2
|
|
||||||
sd $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
|
|
||||||
|
|
||||||
b continue
|
|
||||||
|
|
||||||
.org GRUB_CPU_LOONGSON_FLASH_TLB_REFILL - GRUB_CPU_LOONGSON_FLASH_START
|
|
||||||
tlb_refill:
|
|
||||||
mfc0 $s1, GRUB_CPU_LOONGSON_COP0_EPC
|
|
||||||
mfc0 $s2, GRUB_CPU_LOONGSON_COP0_BADVADDR
|
|
||||||
move $s3, $ra
|
|
||||||
lui $a0, %hi(epc)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(epc)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s1
|
|
||||||
|
|
||||||
lui $a0, %hi(badvaddr)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(badvaddr)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s2
|
|
||||||
|
|
||||||
lui $a0, %hi(return_msg)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(return_msg)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s3
|
|
||||||
|
|
||||||
lui $a0, %hi(newline)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(newline)
|
|
||||||
|
|
||||||
lui $a0, %hi(unhandled_tlb_refill)
|
|
||||||
b fatal
|
|
||||||
addiu $a0, $a0, %lo(unhandled_tlb_refill)
|
|
||||||
|
|
||||||
.org GRUB_CPU_LOONGSON_FLASH_CACHE_ERROR - GRUB_CPU_LOONGSON_FLASH_START
|
|
||||||
cache_error:
|
|
||||||
lui $a0, %hi(unhandled_cache_error)
|
|
||||||
b fatal
|
|
||||||
addiu $a0, $a0, %lo(unhandled_cache_error)
|
|
||||||
|
|
||||||
.org GRUB_CPU_LOONGSON_FLASH_OTHER_EXCEPTION - GRUB_CPU_LOONGSON_FLASH_START
|
|
||||||
other_exception:
|
|
||||||
mfc0 $s0, GRUB_CPU_LOONGSON_COP0_CAUSE
|
|
||||||
mfc0 $s1, GRUB_CPU_LOONGSON_COP0_EPC
|
|
||||||
mfc0 $s2, GRUB_CPU_LOONGSON_COP0_BADVADDR
|
|
||||||
lui $a0, %hi(cause)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(cause)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s0
|
|
||||||
|
|
||||||
lui $a0, %hi(epc)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(epc)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s1
|
|
||||||
|
|
||||||
lui $a0, %hi(badvaddr)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(badvaddr)
|
|
||||||
|
|
||||||
bal printhex
|
|
||||||
move $a0, $s2
|
|
||||||
|
|
||||||
lui $a0, %hi(newline)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(newline)
|
|
||||||
|
|
||||||
lui $a0, %hi(unhandled_exception)
|
|
||||||
b fatal
|
|
||||||
addiu $a0, $a0, %lo(unhandled_exception)
|
|
||||||
|
|
||||||
gpio_init:
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_GPIO)
|
|
||||||
addiu $t0, $t0, %lo(GRUB_MACHINE_PCI_IO_BASE_2F + GRUB_CS5536_LBAR_GPIO)
|
|
||||||
lui $t1, %hi (gpio_dump)
|
|
||||||
addiu $t1, $t1, %lo (gpio_dump)
|
|
||||||
|
|
||||||
1:
|
|
||||||
lw $t2, 0($t1)
|
|
||||||
sw $t2, 0($t0)
|
|
||||||
addiu $t0, $t0, 4
|
|
||||||
addiu $t1, $t1, 4
|
|
||||||
lui $t2, %hi (gpio_dump_end)
|
|
||||||
addiu $t2, $t2, %lo (gpio_dump_end)
|
|
||||||
bne $t1, $t2, 1b
|
|
||||||
nop
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* Same as similarly named C function but in asm since
|
|
||||||
we need it early. */
|
|
||||||
/* In: none. Out: none. Clobbered: $t0, $t1, $t2, $a0, $a1, $a2. */
|
|
||||||
serial_hw_init:
|
|
||||||
move $t2, $ra
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
|
||||||
lui $a1, %hi (GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3 \
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP \
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86 \
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1)
|
|
||||||
ori $a1, $a1, (GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0 \
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1)
|
|
||||||
bal wrmsr
|
|
||||||
move $a2, $zero
|
|
||||||
|
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_UART1_CONF)
|
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_UART1_CONF)
|
|
||||||
li $a1, 2
|
|
||||||
bal wrmsr
|
|
||||||
move $a2, $zero
|
|
||||||
|
|
||||||
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_UART2_CONF)
|
|
||||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_UART2_CONF)
|
|
||||||
li $a1, 2
|
|
||||||
bal wrmsr
|
|
||||||
move $a2, $zero
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
|
|
||||||
|
|
||||||
/* Turn off the interrupt. */
|
|
||||||
sb $zero, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_IER)($t0)
|
|
||||||
|
|
||||||
/* Set DLAB. */
|
|
||||||
ori $t1, $zero, UART_DLAB
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LCR)($t0)
|
|
||||||
|
|
||||||
/* Set the baud rate 115200. */
|
|
||||||
ori $t1, $zero, GRUB_MACHINE_SERIAL_DIVISOR_115200
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_DLL)($t0)
|
|
||||||
sb $zero, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_DLH)($t0)
|
|
||||||
|
|
||||||
/* Set the line status. */
|
|
||||||
ori $t1, $zero, (UART_NO_PARITY | UART_8BITS_WORD | UART_1_STOP_BIT)
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LCR)($t0)
|
|
||||||
|
|
||||||
/* Enable the FIFO. */
|
|
||||||
ori $t1, $zero, UART_ENABLE_FIFO_TRIGGER1
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_FCR)($t0)
|
|
||||||
|
|
||||||
/* Turn on DTR and RTS. */
|
|
||||||
ori $t1, $zero, UART_ENABLE_DTRRTS
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_MCR)($t0)
|
|
||||||
|
|
||||||
/* Let message return to original caller. */
|
|
||||||
lui $a0, %hi(notification_string)
|
|
||||||
addiu $a0, $a0, %lo(notification_string)
|
|
||||||
move $ra, $t2
|
|
||||||
|
|
||||||
/* Print message on serial console. */
|
|
||||||
/* In: $a0 = asciiz message. Out: none. Clobbered: $t0, $t1, $a0. */
|
|
||||||
message:
|
|
||||||
lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
|
|
||||||
1:
|
|
||||||
lb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LSR)($t0)
|
|
||||||
andi $t1, $t1, UART_EMPTY_TRANSMITTER
|
|
||||||
beq $t1, $zero, 1b
|
|
||||||
nop
|
|
||||||
lb $t1, 0($a0)
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_TX)($t0)
|
|
||||||
bne $t1, $zero, 1b
|
|
||||||
addiu $a0, $a0, 1
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* Print 32-bit hexadecimal on serial.
|
|
||||||
In: $a0. Out: None. Clobbered: $a0, $t0, $t1, $t2
|
|
||||||
*/
|
|
||||||
printhex:
|
|
||||||
lui $t0, %hi (GRUB_MACHINE_SERIAL_PORT)
|
|
||||||
ori $t2, $zero, 8
|
|
||||||
1:
|
|
||||||
lb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_LSR)($t0)
|
|
||||||
andi $t1, $t1, UART_EMPTY_TRANSMITTER
|
|
||||||
beq $t1, $zero, 1b
|
|
||||||
nop
|
|
||||||
srl $t1, $a0, 28
|
|
||||||
addiu $t1, $t1, -10
|
|
||||||
bltz $t1, 2f
|
|
||||||
sll $a0, $a0, 4
|
|
||||||
addiu $t1, $t1, 'A'-10-'0'
|
|
||||||
2: addiu $t1, $t1, '0'+10
|
|
||||||
sb $t1, (%lo (GRUB_MACHINE_SERIAL_PORT) + UART_TX)($t0)
|
|
||||||
addiu $t2, $t2, -1
|
|
||||||
bne $t2, $zero, 1b
|
|
||||||
nop
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
|
|
||||||
fatal:
|
|
||||||
bal message
|
|
||||||
nop
|
|
||||||
self:
|
|
||||||
b self
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* Write CS5536 MSR.
|
|
||||||
In: $a0 address, $a1 lower word, $a2 upper word.
|
|
||||||
Out: None
|
|
||||||
Clobbered: $t0
|
|
||||||
*/
|
|
||||||
wrmsr:
|
|
||||||
lui $t0, %hi(GRUB_MACHINE_PCI_CONFSPACE_2F)
|
|
||||||
sw $a0, (%lo(GRUB_MACHINE_PCI_CONFSPACE_2F) + GRUB_CS5536_MSR_MAILBOX_ADDR) ($t0)
|
|
||||||
sw $a1, (%lo(GRUB_MACHINE_PCI_CONFSPACE_2F) + GRUB_CS5536_MSR_MAILBOX_DATA0) ($t0)
|
|
||||||
jr $ra
|
|
||||||
sw $a2, (%lo(GRUB_MACHINE_PCI_CONFSPACE_2F) + GRUB_CS5536_MSR_MAILBOX_DATA1) ($t0)
|
|
||||||
|
|
||||||
/* Wait for SMBus data or empty transmitter. */
|
|
||||||
/* In: $a0 = exception handler. Out: none. Clobbered: $t0, $t1 */
|
|
||||||
smbus_wait:
|
|
||||||
1:
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_STATUS + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $t0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_STATUS + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
andi $t1, $t0, GRUB_CS5536_SMB_REG_STATUS_SDAST
|
|
||||||
bne $t1, $zero, return
|
|
||||||
nop
|
|
||||||
andi $t1, $t0, (GRUB_CS5536_SMB_REG_STATUS_BER | GRUB_CS5536_SMB_REG_STATUS_NACK)
|
|
||||||
beq $t1, $zero, 1b
|
|
||||||
nop
|
|
||||||
jr $a0
|
|
||||||
nop
|
|
||||||
return:
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* Read SPD byte. In: $a0 byte, $a1 device. Out: $v0 read byte (0x100 on failure).
|
|
||||||
Clobbered: $t0, $t1, $t2, $t3, $a0. */
|
|
||||||
read_spd:
|
|
||||||
move $t2, $a0
|
|
||||||
move $t3, $ra
|
|
||||||
lui $a0, %hi(read_spd_fail)
|
|
||||||
addiu $a0, $a0, %lo(read_spd_fail)
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_START
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
sll $t1, $a1, 1
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send ACK. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_ACK
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send byte address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t2, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_START
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
sll $t1, $a1, 1
|
|
||||||
ori $t1, $t1, 1
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
/* Send STOP. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
ori $t1, $t1, GRUB_CS5536_SMB_REG_CTRL1_STOP
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F)
|
|
||||||
lb $v0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE_2F) ($t0)
|
|
||||||
jr $t3
|
|
||||||
andi $v0, $v0, 0xff
|
|
||||||
read_spd_fail:
|
|
||||||
jr $t3
|
|
||||||
ori $v0, $v0, 0x100
|
|
||||||
|
|
||||||
notification_string: .asciz "GRUB "
|
|
||||||
cs5536_found: .asciz "CS5536 at "
|
|
||||||
sm_failed: .asciz "SM transaction failed.\n\r"
|
|
||||||
unhandled_tlb_refill: .asciz "Unhandled TLB refill.\n\r"
|
|
||||||
unhandled_cache_error: .asciz "Unhandled cache error.\n\r"
|
|
||||||
unhandled_exception: .asciz "Unhandled exception.\n\r"
|
|
||||||
smbus_enabled: .asciz "SMBus controller enabled.\n\r"
|
|
||||||
unimplemented_memory_type: .asciz "non-DDR2 memory isn't supported.\n\r"
|
|
||||||
no_cas_latency: .asciz "Couldn't determine CAS latency.\n\r"
|
|
||||||
cause: .asciz "Cause: "
|
|
||||||
epc: .asciz "\n\rEPC: "
|
|
||||||
badvaddr: .asciz "\n\rBadVaddr: "
|
|
||||||
newline: .asciz "\n\r"
|
|
||||||
return_msg: .asciz "\n\rReturn address: "
|
|
||||||
caches_enabled: .asciz "Caches enabled\n\r"
|
|
||||||
|
|
||||||
.p2align 3
|
|
||||||
|
|
||||||
regdump:
|
|
||||||
.quad 0x0100010000000101 /* 0 */
|
|
||||||
.quad 0x0100010100000000 /* 2 */
|
|
||||||
.quad 0x0101000001000000 /* 3 */
|
|
||||||
.quad 0x0100020200010101 /* 4 */
|
|
||||||
.quad 0x0a04030603050203 /* 6 */
|
|
||||||
.quad 0x0f0e040000010a0b /* 7 */
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
.quad 0x0000000100000001 /* 8 */
|
|
||||||
#else
|
|
||||||
.quad 0x0000010200000102 /* 8 */
|
|
||||||
#endif
|
|
||||||
.quad 0x0000060c00000000 /* 9 */
|
|
||||||
.quad 0x2323233f3f1f0200 /* a */
|
|
||||||
.quad 0x5f7f232323232323 /* b */
|
|
||||||
.quad 0x002a3c0615000000 /* c */
|
|
||||||
.quad 0x002a002a002a002a /* d */
|
|
||||||
.quad 0x002a002a002a002a /* e */
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
.quad 0x00b40020005b0004 /* f */
|
|
||||||
#else
|
|
||||||
.quad 0x00b40020006d0004 /* f */
|
|
||||||
#endif
|
|
||||||
.quad 0x070007ff00000087 /* 10 */
|
|
||||||
.quad 0x000000000016101f /* 11 */
|
|
||||||
.quad 0x001c000000000000 /* 12 */
|
|
||||||
.quad 0x28e1000200c8006b /* 13 */
|
|
||||||
.quad 0x0000204200c8002f /* 14 */
|
|
||||||
.quad 0x0000000000030d40 /* 15 */
|
|
||||||
.quad 0 /* 16 */
|
|
||||||
.quad 0 /* 17 */
|
|
||||||
.quad 0 /* 18 */
|
|
||||||
.quad 0 /* 19 */
|
|
||||||
.quad 0 /* 1a */
|
|
||||||
.quad 0 /* 1b */
|
|
||||||
.quad 0 /* 1c */
|
|
||||||
|
|
||||||
/* Dump of GPIO connections. FIXME: Remove useless and macroify. */
|
|
||||||
gpio_dump:
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
.long 0xffff0000, 0x2eefd110, 0xffff0000, 0xffff0000
|
|
||||||
.long 0x2eefd110, 0xffff0000, 0x1000efff, 0xefff1000
|
|
||||||
.long 0x3df3c20c, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0x7df3820c, 0x3df3c20c, 0xffff0000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0x3de3c21c, 0x3d83c27c
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000
|
|
||||||
.long 0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0xefff1000, 0xefff1000, 0xffff0000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0xefff1000, 0xefff1000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
#else
|
|
||||||
.long 0xffff0000, 0x2ffdd002, 0xffff0000, 0xffff0000
|
|
||||||
.long 0x2fffd000, 0xffff0000, 0x1000efff, 0xefff1000
|
|
||||||
.long 0x3ffbc004, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0x3ffbc004, 0x3ffbc004, 0xffff0000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0x3ffbc004, 0x3f9bc064
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0x0000ffff, 0xffff0000
|
|
||||||
.long 0xefff1000, 0xffff0000, 0xffff0000, 0xffff0000
|
|
||||||
.long 0xefff1000, 0xefff1000, 0xffff0000, 0x00000000
|
|
||||||
.long 0xffff0000, 0xffff0000, 0xefff1000, 0xffff0000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.long 0x00000000, 0x50000000, 0x00000000, 0x00000000
|
|
||||||
#endif
|
|
||||||
gpio_dump_end:
|
|
||||||
|
|
||||||
.p2align 3
|
|
||||||
|
|
||||||
write_dumpreg:
|
|
||||||
ld $t2, 0($t6)
|
|
||||||
sd $t2, 0($t4)
|
|
||||||
addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
|
|
||||||
jr $ra
|
|
||||||
addiu $t6, $t6, GRUB_CPU_LOONGSON_DDR2_REG_SIZE
|
|
||||||
|
|
||||||
continue:
|
|
||||||
lui $t4, %hi(GRUB_CPU_LOONGSON_DDR2_BASE)
|
|
||||||
addiu $t4, $t4, %lo(GRUB_CPU_LOONGSON_DDR2_BASE)
|
|
||||||
lui $t6, %hi(regdump)
|
|
||||||
|
|
||||||
/* 0 */
|
|
||||||
bal write_dumpreg
|
|
||||||
addiu $t6, $t6, %lo(regdump)
|
|
||||||
|
|
||||||
/* 1 */
|
|
||||||
ori $a1, $a1, GRUB_SMB_RAM_START_ADDR
|
|
||||||
move $t8, $zero
|
|
||||||
lui $t5, 0x0001
|
|
||||||
bal read_spd
|
|
||||||
ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_BANKS_ADDR
|
|
||||||
ori $t7, $zero, 8
|
|
||||||
bne $v0, $t7, 1f
|
|
||||||
ori $t5, $t5, 0x0001
|
|
||||||
ori $t8, $t8, GRUB_CPU_LOONGSON_DDR2_REG1_HI_8BANKS
|
|
||||||
1:
|
|
||||||
dsll $t8, $t8, 32
|
|
||||||
or $t5, $t5, $t8
|
|
||||||
sd $t5, 0 ($t4)
|
|
||||||
addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
|
|
||||||
|
|
||||||
/* 2 */
|
|
||||||
bal write_dumpreg
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* 3 */
|
|
||||||
bal write_dumpreg
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* 4 */
|
|
||||||
bal write_dumpreg
|
|
||||||
nop
|
|
||||||
|
|
||||||
/* 5 */
|
|
||||||
/* FIXME: figure termination resistance. */
|
|
||||||
ori $t5, $zero, 0x2
|
|
||||||
bal read_spd
|
|
||||||
ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_ROWS_ADDR
|
|
||||||
/* $v0 = 15 - $v0. */
|
|
||||||
xori $v0, $v0, 0xf
|
|
||||||
andi $v0, $v0, 0x7
|
|
||||||
sll $v0, $v0, 8
|
|
||||||
or $t5, $t5, $v0
|
|
||||||
|
|
||||||
/* Find the fastest supported CAS latency. */
|
|
||||||
bal read_spd
|
|
||||||
ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_ADDR
|
|
||||||
ori $t0, $zero, GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_MIN_VALUE
|
|
||||||
ori $t1, $zero, (1 << GRUB_SMBUS_SPD_MEMORY_CAS_LATENCY_MIN_VALUE)
|
|
||||||
2:
|
|
||||||
and $t2, $t1, $v0
|
|
||||||
bne $t2, $zero, 1f
|
|
||||||
ori $t3, $zero, 8
|
|
||||||
lui $a0, %hi(no_cas_latency)
|
|
||||||
beq $t0, $t3, fatal
|
|
||||||
addiu $a0, $a0, %lo(no_cas_latency)
|
|
||||||
addiu $t0, $t0, 1
|
|
||||||
b 2b
|
|
||||||
sll $t1, $t1, 1
|
|
||||||
1:
|
|
||||||
sll $t0, $t0, 16
|
|
||||||
or $t5, $t5, $t0
|
|
||||||
|
|
||||||
bal read_spd
|
|
||||||
ori $a0, $zero, GRUB_SMBUS_SPD_MEMORY_NUM_COLUMNS_ADDR
|
|
||||||
/* $v0 = 15 - ($v0 + 1) = 14 - $v0. */
|
|
||||||
addiu $v0, $v0, 1
|
|
||||||
xori $v0, $v0, 0xf
|
|
||||||
andi $v0, $v0, 0x7
|
|
||||||
sll $v0, 24
|
|
||||||
or $t5, $t5, $v0
|
|
||||||
sd $t5, 0 ($t4)
|
|
||||||
|
|
||||||
addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
|
|
||||||
|
|
||||||
ori $t7, $zero, 0x16
|
|
||||||
|
|
||||||
1:
|
|
||||||
ld $t2, 0($t6)
|
|
||||||
sd $t2, 0($t4)
|
|
||||||
addiu $t4, $t4, GRUB_CPU_LOONGSON_DDR2_REG_STEP
|
|
||||||
addiu $t7, $t7, -1
|
|
||||||
bne $t7, $zero, 1b
|
|
||||||
addiu $t6, $t6, GRUB_CPU_LOONGSON_DDR2_REG_SIZE
|
|
||||||
|
|
||||||
lui $t4, %hi(GRUB_CPU_LOONGSON_DDR2_BASE)
|
|
||||||
ld $t5, (%lo(GRUB_CPU_LOONGSON_DDR2_BASE) + 0x30) ($t4)
|
|
||||||
ori $t0, $zero, 1
|
|
||||||
dsll $t0, $t0, 40
|
|
||||||
or $t5, $t5, $t0
|
|
||||||
sd $t5, (%lo(GRUB_CPU_LOONGSON_DDR2_BASE) + 0x30) ($t4)
|
|
||||||
|
|
||||||
/* Desactivate DDR2 registers. */
|
|
||||||
lui $t0, %hi (GRUB_CPU_LOONGSON_CORECFG)
|
|
||||||
ld $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
|
|
||||||
ori $t1, $t1, GRUB_CPU_LOONGSON_CORECFG_DISABLE_DDR2_SPACE
|
|
||||||
sd $t1, %lo (GRUB_CPU_LOONGSON_CORECFG) ($t0)
|
|
||||||
|
|
||||||
/* Enable cache. */
|
|
||||||
mfc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
|
|
||||||
addiu $t1, $zero, ~GRUB_CPU_LOONGSON_CACHE_TYPE_MASK
|
|
||||||
and $t0, $t1, $t1
|
|
||||||
/* Set line size to 32 bytes and disabled cache. */
|
|
||||||
ori $t0, $t0, (GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_ILINESIZE \
|
|
||||||
| GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG_DLINESIZE \
|
|
||||||
| GRUB_CPU_LOONGSON_CACHE_ACCELERATED)
|
|
||||||
mtc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
|
|
||||||
|
|
||||||
/* Invalidate all I-cache entries. */
|
|
||||||
srl $t1, $t0, GRUB_CPU_LOONGSON_COP0_CACHE_ISIZE_SHIFT
|
|
||||||
andi $t1, $t1, GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_MASK
|
|
||||||
ori $t2, $zero, (1 << (GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_OFFSET \
|
|
||||||
- GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
|
|
||||||
- GRUB_CPU_LOONGSON_I_CACHE_LOG_WAYS))
|
|
||||||
sll $t1, $t2, $t1
|
|
||||||
lui $t2, 0x8000
|
|
||||||
|
|
||||||
1:
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_I_INDEX_INVALIDATE, 0($t2)
|
|
||||||
addiu $t1, $t1, -1
|
|
||||||
bne $t1, $zero, 1b
|
|
||||||
addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_I_INDEX_BIT_OFFSET)
|
|
||||||
|
|
||||||
/* Invalidate all D-cache entries. */
|
|
||||||
srl $t1, $t0, GRUB_CPU_LOONGSON_COP0_CACHE_DSIZE_SHIFT
|
|
||||||
andi $t1, $t1, GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_MASK
|
|
||||||
ori $t2, $zero, (1 << (GRUB_CPU_LOONGSON_COP0_CACHE_SIZE_OFFSET \
|
|
||||||
- GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
|
|
||||||
- GRUB_CPU_LOONGSON_D_CACHE_LOG_WAYS))
|
|
||||||
sll $t1, $t2, $t1
|
|
||||||
lui $t2, 0x8000
|
|
||||||
mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO
|
|
||||||
mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI
|
|
||||||
1:
|
|
||||||
/* All four ways. */
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 0($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 1($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 2($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_D_INDEX_TAG_STORE, 3($t2)
|
|
||||||
addiu $t1, $t1, -1
|
|
||||||
bne $t1, $zero, 1b
|
|
||||||
addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_D_INDEX_BIT_OFFSET)
|
|
||||||
|
|
||||||
/* Invalidate all S-cache entries. */
|
|
||||||
ori $t1, $zero, (1 << (GRUB_CPU_LOONGSON_SECONDARY_CACHE_LOG_SIZE \
|
|
||||||
- GRUB_CPU_LOONGSON_CACHE_LINE_SIZE_LOG_BIG \
|
|
||||||
- GRUB_CPU_LOONGSON_S_CACHE_LOG_WAYS))
|
|
||||||
lui $t2, 0x8000
|
|
||||||
mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO
|
|
||||||
mtc0 $zero, GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI
|
|
||||||
1:
|
|
||||||
/* All four ways. */
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 0($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 1($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 2($t2)
|
|
||||||
cache GRUB_CPU_LOONGSON_COP0_S_INDEX_TAG_STORE, 3($t2)
|
|
||||||
addiu $t1, $t1, -1
|
|
||||||
bne $t1, $zero, 1b
|
|
||||||
addiu $t2, $t2, (1 << GRUB_CPU_LOONGSON_COP0_D_INDEX_BIT_OFFSET)
|
|
||||||
|
|
||||||
/* Finally enable cache. */
|
|
||||||
mfc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
|
|
||||||
addiu $t1, $zero, ~GRUB_CPU_LOONGSON_CACHE_TYPE_MASK
|
|
||||||
and $t0, $t1, $t1
|
|
||||||
ori $t0, $t0, GRUB_CPU_LOONGSON_CACHE_CACHED
|
|
||||||
mtc0 $t0, GRUB_CPU_LOONGSON_COP0_CACHE_CONFIG
|
|
||||||
|
|
||||||
lui $a0, %hi(caches_enabled)
|
|
||||||
bal message
|
|
||||||
addiu $a0, $a0, %lo(caches_enabled)
|
|
||||||
|
|
||||||
/* Set ROM delay cycles to 1. */
|
|
||||||
lui $t0, %hi(GRUB_CPU_LOONGSON_LIOCFG)
|
|
||||||
lw $t1, %lo(GRUB_CPU_LOONGSON_LIOCFG) ($t0)
|
|
||||||
addiu $t2, $zero, ~(GRUB_CPU_LOONGSON_ROM_DELAY_MASK \
|
|
||||||
<< GRUB_CPU_LOONGSON_ROM_DELAY_OFFSET)
|
|
||||||
and $t1, $t1, $t2
|
|
||||||
ori $t1, $t1, (1 << GRUB_CPU_LOONGSON_ROM_DELAY_OFFSET)
|
|
||||||
sw $t1, %lo(GRUB_CPU_LOONGSON_LIOCFG) ($t0)
|
|
||||||
|
|
||||||
addiu $a0, $zero, -1
|
|
||||||
addiu $a1, $zero, -1
|
|
||||||
|
|
||||||
/* Take advantage of cache. */
|
|
||||||
lui $t0, %hi(cached_continue - 0x20000000)
|
|
||||||
addiu $t0, $t0, %lo(cached_continue - 0x20000000)
|
|
||||||
jr $t0
|
|
||||||
#ifdef FULOONG2F
|
|
||||||
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_FULOONG2F)
|
|
||||||
#else
|
|
||||||
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_YEELOONG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cached_continue:
|
|
||||||
@@ -1,300 +0,0 @@
|
|||||||
/* startup.S - Startup code for the MIPS. */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 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/offsets.h>
|
|
||||||
#include <grub/machine/memory.h>
|
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
#include <grub/offsets.h>
|
|
||||||
#include <grub/mips/asm.h>
|
|
||||||
|
|
||||||
#define BASE_ADDR 8
|
|
||||||
|
|
||||||
.extern __bss_start
|
|
||||||
.extern _end
|
|
||||||
.extern _edata
|
|
||||||
|
|
||||||
.globl __start, _start, start
|
|
||||||
.set noreorder
|
|
||||||
.set nomacro
|
|
||||||
__start:
|
|
||||||
_start:
|
|
||||||
start:
|
|
||||||
|
|
||||||
bal codestart
|
|
||||||
nop
|
|
||||||
base:
|
|
||||||
.org GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE
|
|
||||||
compressed_size:
|
|
||||||
.long 0
|
|
||||||
.org GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_SIZE
|
|
||||||
uncompressed_size:
|
|
||||||
.long 0
|
|
||||||
.org GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_ADDR
|
|
||||||
uncompressed_addr:
|
|
||||||
.long 0
|
|
||||||
codestart:
|
|
||||||
/* Save our base. */
|
|
||||||
move $s0, $ra
|
|
||||||
|
|
||||||
/* Parse arguments. Has to be done before relocation.
|
|
||||||
So need to do it in asm. */
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_QEMU_MIPS
|
|
||||||
lui $t0, %hi (((16 << 20) - 264 + 4) | 0x80000000)
|
|
||||||
lw $t1, %lo (((16 << 20) - 264 + 4) | 0x80000000) ($t0)
|
|
||||||
|
|
||||||
lui $t2, 0x1234
|
|
||||||
ori $t2, 0x5678
|
|
||||||
|
|
||||||
bne $t1, $t2, 1f
|
|
||||||
nop
|
|
||||||
|
|
||||||
lui $t0, %hi (((16 << 20) - 264) | 0x80000000)
|
|
||||||
b 2f
|
|
||||||
lw $s4, %lo (((16 << 20) - 264) | 0x80000000) ($t0)
|
|
||||||
|
|
||||||
1:
|
|
||||||
li $s4, 0
|
|
||||||
2:
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
|
||||||
move $s2, $zero
|
|
||||||
move $s3, $zero
|
|
||||||
move $s4, $zero
|
|
||||||
move $s5, $zero
|
|
||||||
move $s7, $zero
|
|
||||||
|
|
||||||
/* $a2 has the environment. */
|
|
||||||
addiu $t0, $zero, -0x10
|
|
||||||
and $t1, $a2, $t0
|
|
||||||
beq $t0, $t1, argfw
|
|
||||||
nop
|
|
||||||
move $t0, $a2
|
|
||||||
argcont:
|
|
||||||
lw $t1, 0($t0)
|
|
||||||
beq $t1, $zero, argdone
|
|
||||||
nop
|
|
||||||
#define DO_PARSE(str, reg) \
|
|
||||||
addiu $t2, $s0, (str-base);\
|
|
||||||
bal parsestr;\
|
|
||||||
nop ;\
|
|
||||||
beq $v0, $zero, 1f;\
|
|
||||||
nop ;\
|
|
||||||
b 2f;\
|
|
||||||
move reg, $v0; \
|
|
||||||
1:
|
|
||||||
#define DO_CHECKT1(str, val) \
|
|
||||||
move $t6, $t1 ;\
|
|
||||||
addiu $t7, $s0, (str - base);\
|
|
||||||
bal do_check ;\
|
|
||||||
li $t2, val
|
|
||||||
|
|
||||||
DO_PARSE (busclockstr, $s2)
|
|
||||||
DO_PARSE (cpuclockstr, $s3)
|
|
||||||
DO_PARSE (memsizestr, $s4)
|
|
||||||
DO_PARSE (highmemsizestr, $s5)
|
|
||||||
DO_CHECKT1 (pmon_yeeloong_verstr, GRUB_ARCH_MACHINE_YEELOONG)
|
|
||||||
DO_CHECKT1 (pmon_fuloong2f_verstr, GRUB_ARCH_MACHINE_FULOONG2F)
|
|
||||||
2:
|
|
||||||
b argcont
|
|
||||||
addiu $t0, $t0, 4
|
|
||||||
parsestr:
|
|
||||||
move $v0, $zero
|
|
||||||
move $t3, $t1
|
|
||||||
3:
|
|
||||||
lb GRUB_ASM_T4, 0($t2)
|
|
||||||
lb GRUB_ASM_T5, 0($t3)
|
|
||||||
addiu $t2, $t2, 1
|
|
||||||
addiu $t3, $t3, 1
|
|
||||||
beq GRUB_ASM_T5, $zero, 1f
|
|
||||||
nop
|
|
||||||
beq GRUB_ASM_T5, GRUB_ASM_T4, 3b
|
|
||||||
nop
|
|
||||||
bne GRUB_ASM_T4, $zero, 1f
|
|
||||||
nop
|
|
||||||
|
|
||||||
addiu $t3, $t3, 0xffff
|
|
||||||
digcont:
|
|
||||||
lb GRUB_ASM_T5, 0($t3)
|
|
||||||
/* Substract '0' from digit. */
|
|
||||||
addiu GRUB_ASM_T5, GRUB_ASM_T5, 0xffd0
|
|
||||||
bltz GRUB_ASM_T5, 1f
|
|
||||||
nop
|
|
||||||
addiu GRUB_ASM_T4, GRUB_ASM_T5, 0xfff7
|
|
||||||
bgtz GRUB_ASM_T4, 1f
|
|
||||||
nop
|
|
||||||
/* Multiply $v0 by 10 with bitshifts. */
|
|
||||||
sll $v0, $v0, 1
|
|
||||||
sll GRUB_ASM_T4, $v0, 2
|
|
||||||
addu $v0, $v0, GRUB_ASM_T4
|
|
||||||
addu $v0, $v0, GRUB_ASM_T5
|
|
||||||
addiu $t3, $t3, 1
|
|
||||||
b digcont
|
|
||||||
nop
|
|
||||||
1:
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
busclockstr: .asciz "busclock="
|
|
||||||
cpuclockstr: .asciz "cpuclock="
|
|
||||||
memsizestr: .asciz "memsize="
|
|
||||||
highmemsizestr: .asciz "highmemsize="
|
|
||||||
machtype_yeeloong_str1: .asciz "machtype=8.9"
|
|
||||||
machtype_yeeloong_str2: .asciz "machtype=lemote-yeeloong-"
|
|
||||||
machtype_fuloong2f_str: .asciz "machtype=lemote-fuloong-2f"
|
|
||||||
machtype_fuloong2e_str: .asciz "machtype=lemote-fuloong-2e"
|
|
||||||
pmon_yeeloong_str: .asciz "PMON_VER=LM8"
|
|
||||||
pmon_fuloong2f_str: .asciz "PMON_VER=LM6"
|
|
||||||
pmon_yeeloong_verstr: .asciz "Version=LM8"
|
|
||||||
pmon_fuloong2f_verstr: .asciz "Version=LM6"
|
|
||||||
.p2align 2
|
|
||||||
|
|
||||||
argdone:
|
|
||||||
beq $a0, $zero, cmdlinedone
|
|
||||||
nop
|
|
||||||
#define DO_CHECKA1(str, val) \
|
|
||||||
lw $t6, 0($a1) ;\
|
|
||||||
addiu $t7, $s0, (str - base);\
|
|
||||||
bal do_check ;\
|
|
||||||
li $t2, val
|
|
||||||
DO_CHECKA1 (machtype_yeeloong_str1, GRUB_ARCH_MACHINE_YEELOONG)
|
|
||||||
DO_CHECKA1 (machtype_yeeloong_str2, GRUB_ARCH_MACHINE_YEELOONG)
|
|
||||||
DO_CHECKA1 (pmon_yeeloong_str, GRUB_ARCH_MACHINE_YEELOONG)
|
|
||||||
DO_CHECKA1 (machtype_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
|
||||||
DO_CHECKA1 (machtype_fuloong2e_str, GRUB_ARCH_MACHINE_FULOONG2E)
|
|
||||||
DO_CHECKA1 (pmon_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
|
||||||
addiu $a0, $a0, -1
|
|
||||||
b argdone
|
|
||||||
addiu $a1, $a1, 4
|
|
||||||
do_check:
|
|
||||||
lb GRUB_ASM_T4, 0($t7)
|
|
||||||
beq GRUB_ASM_T4, $zero, 1f
|
|
||||||
lb $t3, 0($t6)
|
|
||||||
bne $t3, GRUB_ASM_T4, 2f
|
|
||||||
addiu $t6, $t6, 1
|
|
||||||
b do_check
|
|
||||||
addiu $t7, $t7, 1
|
|
||||||
1:
|
|
||||||
move $s7, $t2
|
|
||||||
2:
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
argfw:
|
|
||||||
not $s7, $a2
|
|
||||||
cmdlinedone:
|
|
||||||
#endif
|
|
||||||
#ifdef GRUB_MACHINE_ARC
|
|
||||||
lui $t0, %hi(_start - 256)
|
|
||||||
addiu $t0, $t0, %lo(_start - 256)
|
|
||||||
addiu $t3, $t0, 255
|
|
||||||
lw $t1, 0($a1)
|
|
||||||
1:
|
|
||||||
bne $t0, $t3, 2f
|
|
||||||
lb $t2, 0($t1)
|
|
||||||
move $t2, $zero
|
|
||||||
2:
|
|
||||||
sb $t2, 0($t0)
|
|
||||||
addiu $t0, $t0, 1
|
|
||||||
bnez $t2, 1b
|
|
||||||
addiu $t1, $t1, 1
|
|
||||||
#endif
|
|
||||||
/* Copy the decompressor. */
|
|
||||||
lui $t1, %hi(base)
|
|
||||||
addiu $t1, $t1, %lo(base)
|
|
||||||
lui $t3, %hi(__bss_start)
|
|
||||||
addiu $t3, $t3, %lo(__bss_start)
|
|
||||||
move $t2, $s0
|
|
||||||
|
|
||||||
1:
|
|
||||||
beq $t1, $t3, 2f
|
|
||||||
lb GRUB_ASM_T4, 0($t2)
|
|
||||||
sb GRUB_ASM_T4, 0($t1)
|
|
||||||
addiu $t1, $t1, 1
|
|
||||||
b 1b
|
|
||||||
addiu $t2, $t2, 1
|
|
||||||
2:
|
|
||||||
/* Clean out its BSS. */
|
|
||||||
lui $t1, %hi(__bss_start)
|
|
||||||
addiu $t1, $t1, %lo(__bss_start)
|
|
||||||
lui $t2, %hi(_end)
|
|
||||||
addiu $t2, $t2, %lo(_end)
|
|
||||||
1:
|
|
||||||
beq $t1, $t2, 2f
|
|
||||||
nop
|
|
||||||
sb $zero, 0($t1)
|
|
||||||
b 1b
|
|
||||||
addiu $t1, $t1, 1
|
|
||||||
2:
|
|
||||||
lui $a0, %hi(base)
|
|
||||||
addiu $a0, $a0, %lo(base)
|
|
||||||
lui $a1, %hi(_end)
|
|
||||||
addiu $a1, %lo(_end)
|
|
||||||
subu $a1,$a1,$a0
|
|
||||||
|
|
||||||
#include "../../kern/mips/cache_flush.S"
|
|
||||||
|
|
||||||
/* Decompress the payload. */
|
|
||||||
lui $a0, %hi(_edata)
|
|
||||||
addiu $a0, $a0, %lo(_edata)
|
|
||||||
|
|
||||||
lui $t0, %hi(base)
|
|
||||||
addiu $t0, $t0, %lo(base)
|
|
||||||
subu $a0, $a0, $t0
|
|
||||||
addu $a0, $a0, $s0
|
|
||||||
|
|
||||||
lw $a1, (GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_ADDR - BASE_ADDR)($s0)
|
|
||||||
lw $a2, (GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE - BASE_ADDR)($s0)
|
|
||||||
lw $a3, (GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_SIZE - BASE_ADDR)($s0)
|
|
||||||
move $s1, $a1
|
|
||||||
|
|
||||||
/* $a0 contains source compressed address, $a1 is destination,
|
|
||||||
$a2 is compressed size, $a3 is uncompressed size.
|
|
||||||
*/
|
|
||||||
move $s6, $a3
|
|
||||||
|
|
||||||
lui $t9, %hi(EXT_C(grub_decompress_core))
|
|
||||||
addiu $t9, $t9, %lo(EXT_C(grub_decompress_core))
|
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_ARC
|
|
||||||
lui $sp, %hi(_start - 512)
|
|
||||||
jalr $t9
|
|
||||||
addiu $sp, $sp, %lo(_start - 512)
|
|
||||||
#else
|
|
||||||
lui $sp, %hi(_start - 256)
|
|
||||||
jalr $t9
|
|
||||||
addiu $sp, $sp, %lo(_start - 256)
|
|
||||||
#endif
|
|
||||||
move $a0, $s1
|
|
||||||
move $a1, $s6
|
|
||||||
|
|
||||||
#include "../../kern/mips/cache_flush.S"
|
|
||||||
|
|
||||||
lui $t1, %hi(GRUB_MACHINE_LINK_ADDR)
|
|
||||||
addiu $t1, %lo(GRUB_MACHINE_LINK_ADDR)
|
|
||||||
|
|
||||||
jr $t1
|
|
||||||
nop
|
|
||||||
/* Ensure that .data section is created. In code we suppose that _edata
|
|
||||||
is first location not in decompressor image. Strictly speaking it's
|
|
||||||
_edata only when .data is present and _etext otherwise. But checking
|
|
||||||
for .data presence would cost more in code than it is to ensure that
|
|
||||||
.data is created.
|
|
||||||
*/
|
|
||||||
.data
|
|
||||||
.long 0
|
|
||||||
Loaded 100 of 1947 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user