mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
Compare commits
804
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
125f436763 | ||
|
|
3af093a503 | ||
|
|
9a43953b56 | ||
|
|
8dbf5c8999 | ||
|
|
e8b13ced38 | ||
|
|
f557cee7dc | ||
|
|
53f9ac3175 | ||
|
|
89e617e847 | ||
|
|
bf0c591485 | ||
|
|
ea8f03e60c | ||
|
|
193d1e43d9 | ||
|
|
508a5c4f33 | ||
|
|
6cd4433d3e | ||
|
|
fe11b298f6 | ||
|
|
bce46bf7f1 | ||
|
|
22cd659922 | ||
|
|
1d99c80935 | ||
|
|
c819ffee91 | ||
|
|
79a9f283de | ||
|
|
2ba51692ac | ||
|
|
005098fb1b | ||
|
|
bde9a318fb | ||
|
|
5ac9679fb0 | ||
|
|
7a1b51024a | ||
|
|
b8aa16f505 | ||
|
|
8e68069b48 | ||
|
|
4fe8c0ccf6 | ||
|
|
4ace38464e | ||
|
|
8a4848921a | ||
|
|
8932e40756 | ||
|
|
6d8ace6ee5 | ||
|
|
07741fe577 | ||
|
|
1499969120 | ||
|
|
2b55611a79 | ||
|
|
1262b6e7ef | ||
|
|
6884fee4be | ||
|
|
2b7a7354d9 | ||
|
|
f307cbf7c6 | ||
|
|
257fff664f | ||
|
|
041e243877 | ||
|
|
fb908db4ad | ||
|
|
660e9c195f | ||
|
|
ac1ef04cde | ||
|
|
eb5d4d6776 | ||
|
|
cce5686ea2 | ||
|
|
4022b1bcb5 | ||
|
|
8243a69201 | ||
|
|
577b70d724 | ||
|
|
16ca69f719 | ||
|
|
255d37589f | ||
|
|
31831d933f | ||
|
|
e92d461e1c | ||
|
|
b929761836 | ||
|
|
01eb2cd1f4 | ||
|
|
b84bec9188 | ||
|
|
5b5f6dc772 | ||
|
|
e15e075464 | ||
|
|
5b00a4c20d | ||
|
|
4d4f67b1af | ||
|
|
e86d8458da | ||
|
|
3a65add281 | ||
|
|
e43909c66d | ||
|
|
31def8459d | ||
|
|
12ce4272ee | ||
|
|
dc8bf1d248 | ||
|
|
7b676b85ea | ||
|
|
6355ac9d94 | ||
|
|
3fa2fbb8bd | ||
|
|
84fbf16f40 | ||
|
|
50396703ad | ||
|
|
6525b81507 | ||
|
|
11902433a2 | ||
|
|
fcac0d870d | ||
|
|
3316fed9db | ||
|
|
b9d0cc9dcf | ||
|
|
5d759a9d09 | ||
|
|
caa7c3508b | ||
|
|
de89ab8289 | ||
|
|
4e69adb6ab | ||
|
|
0accb2cab8 | ||
|
|
065f6e0a20 | ||
|
|
4f29a8af45 | ||
|
|
a1d48b992f | ||
|
|
7b43bbe40e | ||
|
|
b42b9b7e22 | ||
|
|
9b1392428c | ||
|
|
8f31d2ff88 | ||
|
|
54566a13ae | ||
|
|
36caa9beb0 | ||
|
|
2524288202 | ||
|
|
dcf4389bde | ||
|
|
469abceb70 | ||
|
|
7b7b9a3f1b | ||
|
|
a756a4a485 | ||
|
|
19f1b8c40b | ||
|
|
d58ebbc94c | ||
|
|
2269fa15f8 | ||
|
|
36ccd040ac | ||
|
|
6e7a81f3aa | ||
|
|
d1d9022b1f | ||
|
|
3b2816320b | ||
|
|
49597fd5cb | ||
|
|
7899a91337 | ||
|
|
e8911332da | ||
|
|
4db8e630b4 | ||
|
|
e4dc4ce8a5 | ||
|
|
3c9fc981a2 | ||
|
|
2e08dad5a8 | ||
|
|
cc1da3b822 | ||
|
|
0c05e9955d | ||
|
|
bbed85e657 | ||
|
|
25fee2345c | ||
|
|
fc2a2dc3d7 | ||
|
|
7c7f8f73ea | ||
|
|
6194afc326 | ||
|
|
4e64061a42 | ||
|
|
00cdabfa51 | ||
|
|
61b109a5ca | ||
|
|
d8544dae43 | ||
|
|
7dd44efcfa | ||
|
|
90537aaed7 | ||
|
|
5eebfaf282 | ||
|
|
0151ef5e78 | ||
|
|
703e8d6852 | ||
|
|
cf4f0a7199 | ||
|
|
df002327f6 | ||
|
|
cd23d85031 | ||
|
|
da7278fc6d | ||
|
|
3e41ca492a | ||
|
|
756934392a | ||
|
|
47bd75581e | ||
|
|
f91040a45f | ||
|
|
e60b85f661 | ||
|
|
53673d9532 | ||
|
|
7c1993fc4c | ||
|
|
6ced081a2d | ||
|
|
ee9202997b | ||
|
|
f8111d3b54 | ||
|
|
631d47d206 | ||
|
|
b27b4d206d | ||
|
|
3ca7f4621f | ||
|
|
3217288404 | ||
|
|
ad2df4cd66 | ||
|
|
772e28b8c2 | ||
|
|
c18257ea65 | ||
|
|
58b292f419 | ||
|
|
0a57f3c3fd | ||
|
|
3201624b93 | ||
|
|
3ff3b071ea | ||
|
|
bf88d91883 | ||
|
|
f5bc93e4de | ||
|
|
a44e6361bc | ||
|
|
6ebab1bf0b | ||
|
|
76deb4cec4 | ||
|
|
ca305dc1b1 | ||
|
|
2c48c7472d | ||
|
|
f891c6f7e4 | ||
|
|
cba84c4d9c | ||
|
|
36ae96d649 | ||
|
|
c97b7d2098 | ||
|
|
7c16231fec | ||
|
|
e184c99216 | ||
|
|
d932c071e9 | ||
|
|
51955d52d8 | ||
|
|
f8b4503f1b | ||
|
|
80d0f93b30 | ||
|
|
1548282786 | ||
|
|
4fcd549f56 | ||
|
|
321b3d6a1d | ||
|
|
1e42fdd201 | ||
|
|
05202f5eb0 | ||
|
|
d53e46f0a9 | ||
|
|
f711a2453a | ||
|
|
fada891e5c | ||
|
|
52c5e2e399 | ||
|
|
e2a3acbed0 | ||
|
|
c628bca2ae | ||
|
|
86dbc3fcbc | ||
|
|
24bd9d82c1 | ||
|
|
eaf934e523 | ||
|
|
2369202e83 | ||
|
|
9ab2360b15 | ||
|
|
afbae72a33 | ||
|
|
970554010c | ||
|
|
db6d85e1ff | ||
|
|
c65ae440c8 | ||
|
|
4339b22d7a | ||
|
|
58a5878421 | ||
|
|
fe3f7e4580 | ||
|
|
b225b42f05 | ||
|
|
f90c3eaf90 | ||
|
|
58703b663c | ||
|
|
2364cf3673 | ||
|
|
1ed089ed1a | ||
|
|
522de743e8 | ||
|
|
20ac296c28 | ||
|
|
73d5c0f09c | ||
|
|
6d4bf545d3 | ||
|
|
bd9abb21c5 | ||
|
|
cc7647f7d5 | ||
|
|
b687a97ef2 | ||
|
|
e6e09deced | ||
|
|
204a870ff7 | ||
|
|
d6f4c1c620 | ||
|
|
86d5582ec2 | ||
|
|
cfce0b1fae | ||
|
|
4c73310092 | ||
|
|
a5ef4c14d6 | ||
|
|
0c8552cfae | ||
|
|
b7f9f38e29 | ||
|
|
dde92f1985 | ||
|
|
30ec0405c4 | ||
|
|
3c5148ff24 | ||
|
|
dfccfe6d92 | ||
|
|
a751da838c | ||
|
|
c34bb04818 | ||
|
|
479bc51947 | ||
|
|
b0c95fd0d4 | ||
|
|
9f4689e21d | ||
|
|
93718b5a41 | ||
|
|
2a06ebce5c | ||
|
|
bff4f998b4 | ||
|
|
30817e1ce8 | ||
|
|
205b46d5bc | ||
|
|
68ef83eeae | ||
|
|
f6d0d914e3 | ||
|
|
60ea787e84 | ||
|
|
7cb0e801d5 | ||
|
|
2fa19ba691 | ||
|
|
f66b84f480 | ||
|
|
278681dc7b | ||
|
|
4388810ef9 | ||
|
|
8d74a9f3f3 | ||
|
|
3190c1f483 | ||
|
|
ca6e068bb9 | ||
|
|
f7eda1235f | ||
|
|
70b173af35 | ||
|
|
a4dea0d17f | ||
|
|
5ca9541403 | ||
|
|
4ea83d7811 | ||
|
|
843ddd9712 | ||
|
|
686f75d678 | ||
|
|
41e19993b5 | ||
|
|
a0c6c8b9af | ||
|
|
973e6f4129 | ||
|
|
daa965eccc | ||
|
|
6e8c6154fb | ||
|
|
59d735d43f | ||
|
|
4cd09c4b6a | ||
|
|
79ae0cd9e8 | ||
|
|
aaccdfc4ba | ||
|
|
f70e5d2409 | ||
|
|
6ff5668ee4 | ||
|
|
728d26ca30 | ||
|
|
f9e7ef1b41 | ||
|
|
3c17445bfd | ||
|
|
f51d8ce561 | ||
|
|
4232395f9f | ||
|
|
502a79c799 | ||
|
|
3a150c2b37 | ||
|
|
1ea7f95da6 | ||
|
|
d05b7706ed | ||
|
|
d619861976 | ||
|
|
36fd6bd0fa | ||
|
|
e5fd53e574 | ||
|
|
902ee9ccaf | ||
|
|
3785f597a0 | ||
|
|
61928d1323 | ||
|
|
a8ac7eb3f9 | ||
|
|
3793b1777b | ||
|
|
62e7ed8b60 | ||
|
|
49312f5981 | ||
|
|
eca369e8d0 | ||
|
|
e9d94149ef | ||
|
|
044d8501b5 | ||
|
|
9e195f47c2 | ||
|
|
cd403b1f05 | ||
|
|
074b0023e7 | ||
|
|
cfbf950f5d | ||
|
|
40c293d41e | ||
|
|
d6fa625300 | ||
|
|
62cba90d65 | ||
|
|
cd93e2f5f9 | ||
|
|
f2ca2f3ea2 | ||
|
|
60415d246c | ||
|
|
fa820ff30d | ||
|
|
b7e8ad7e6d | ||
|
|
49230cb103 | ||
|
|
2f97c78528 | ||
|
|
030d695853 | ||
|
|
00a436ee38 | ||
|
|
123b813394 | ||
|
|
247a4c4a73 | ||
|
|
a5694fb1e4 | ||
|
|
fc528f1b0d | ||
|
|
8e5f64e0d3 | ||
|
|
5efd8753fb | ||
|
|
c7159c3bdb | ||
|
|
e86ba8bd19 | ||
|
|
2edd28f97b | ||
|
|
19477b0574 | ||
|
|
7c0ea24c90 | ||
|
|
68c2bd1e7b | ||
|
|
9e3e10d2c1 | ||
|
|
c610524eb0 | ||
|
|
c2e925be16 | ||
|
|
61fb567304 | ||
|
|
dfee6ac3ec | ||
|
|
348785cfbc | ||
|
|
4b1637c671 | ||
|
|
1372bfd60a | ||
|
|
e85272f436 | ||
|
|
3a598264dc | ||
|
|
f633d9e9c8 | ||
|
|
2601d0686b | ||
|
|
d20f9609ce | ||
|
|
cf58c5c2a9 | ||
|
|
13aaba9380 | ||
|
|
dc1c0a6ccf | ||
|
|
00865a8027 | ||
|
|
9417ebb550 | ||
|
|
7b3aef444e | ||
|
|
fb4f1e3253 | ||
|
|
f30b5c9ca2 | ||
|
|
006737bcc6 | ||
|
|
c325ead317 | ||
|
|
cccfe78a6a | ||
|
|
acc6543257 | ||
|
|
7519621c59 | ||
|
|
1b97631a73 | ||
|
|
ca6efbe093 | ||
|
|
3c8e99279f | ||
|
|
71840f80e9 | ||
|
|
00deed40cc | ||
|
|
d24002df4f | ||
|
|
2f0dff243a | ||
|
|
207a82b176 | ||
|
|
47148b669b | ||
|
|
9f4cb39873 | ||
|
|
fb01925bdf | ||
|
|
b1cdb09358 | ||
|
|
f8e4561c47 | ||
|
|
29aa359512 | ||
|
|
8593e88271 | ||
|
|
8fe3b6de83 | ||
|
|
8eff936f97 | ||
|
|
110ade1398 | ||
|
|
da863ed2de | ||
|
|
5c6112a372 | ||
|
|
65d6a086d0 | ||
|
|
455795862c | ||
|
|
002f8f7c21 | ||
|
|
e3daf570b2 | ||
|
|
d917526690 | ||
|
|
dac1ed52b8 | ||
|
|
ad50fc1180 | ||
|
|
76b7a59d9b | ||
|
|
2d772c5c9a | ||
|
|
9e3eca6950 | ||
|
|
582e55cdc4 | ||
|
|
5ac0d65e2e | ||
|
|
b810c311d0 | ||
|
|
8dd10ab852 | ||
|
|
b16aca65b6 | ||
|
|
33c3b18d40 | ||
|
|
e7a1ff1759 | ||
|
|
81ec37db03 | ||
|
|
ce0052dca8 | ||
|
|
7561bde29d | ||
|
|
728e74eef6 | ||
|
|
4928cfdad2 | ||
|
|
06adfc82ff | ||
|
|
f5588d2f41 | ||
|
|
1f2d29244a | ||
|
|
13a32db008 | ||
|
|
6664288bbc | ||
|
|
579f60a4e5 | ||
|
|
9790818856 | ||
|
|
a2622ee1cc | ||
|
|
2315cb466c | ||
|
|
19a2446669 | ||
|
|
092f32f05b | ||
|
|
11236082ea | ||
|
|
636299cc50 | ||
|
|
84cd6e2879 | ||
|
|
0f8fdcc8b2 | ||
|
|
f6a7cd3d17 | ||
|
|
2a5ae102fe | ||
|
|
9bbcd45d64 | ||
|
|
009bf82dbc | ||
|
|
1301164d4c | ||
|
|
14b7a703a9 | ||
|
|
aa7121490f | ||
|
|
261bf12dcf | ||
|
|
324e93a919 | ||
|
|
5b956a8ac8 | ||
|
|
98be6a00af | ||
|
|
62eafe888b | ||
|
|
504e540242 | ||
|
|
225b464978 | ||
|
|
69e36bc547 | ||
|
|
b3ccacd20f | ||
|
|
11f52a0d70 | ||
|
|
c6c180757e | ||
|
|
0bcf40674e | ||
|
|
bda2eea18d | ||
|
|
b5381c0919 | ||
|
|
4a1f0661d6 | ||
|
|
a9509cdf9a | ||
|
|
aa4e796168 | ||
|
|
af670e41f3 | ||
|
|
5fb0adb667 | ||
|
|
6ee3c49cc8 | ||
|
|
1b38e4d0cf | ||
|
|
abca3d8f72 | ||
|
|
35662478d7 | ||
|
|
36854134df | ||
|
|
9015cd0364 | ||
|
|
6728379880 | ||
|
|
fa8456816f | ||
|
|
7f6d84c46f | ||
|
|
454e26626c | ||
|
|
e8e3b99925 | ||
|
|
a1fafbfb0e | ||
|
|
563b471fc7 | ||
|
|
e705c4bdf8 | ||
|
|
f1c162c0c6 | ||
|
|
16cbb2b422 | ||
|
|
3c5fa0cfe3 | ||
|
|
d91146efac | ||
|
|
2455b65f2e | ||
|
|
7d54a86a52 | ||
|
|
211c9922c4 | ||
|
|
4e0e3cc8af | ||
|
|
443bdcb325 | ||
|
|
fbd0ada4bb | ||
|
|
9f8d97188c | ||
|
|
8b4dd784f7 | ||
|
|
7ab4e9c240 | ||
|
|
028049bbd4 | ||
|
|
bef3d7d863 | ||
|
|
b6092dd0ea | ||
|
|
520ec8572d | ||
|
|
558f2f176e | ||
|
|
8d3a5e79b9 | ||
|
|
77219c6e56 | ||
|
|
952982deb9 | ||
|
|
ca924e1180 | ||
|
|
1e402724c6 | ||
|
|
eef046d8a5 | ||
|
|
436fb5ce95 | ||
|
|
529a2dc5e0 | ||
|
|
c786d8603e | ||
|
|
a4a19300f1 | ||
|
|
e01f0b9514 | ||
|
|
72ca6286fb | ||
|
|
1b9e348ef6 | ||
|
|
fa003769c5 | ||
|
|
05581f3233 | ||
|
|
c13d2ca24e | ||
|
|
063d1c64f3 | ||
|
|
bc61b4d21f | ||
|
|
4056902921 | ||
|
|
f0ae3c922f | ||
|
|
9a41c6b1d4 | ||
|
|
21236a8556 | ||
|
|
5ad5c7796a | ||
|
|
7d6453ac9c | ||
|
|
c67be0dccd | ||
|
|
ada4cc670d | ||
|
|
edb9c0d7b0 | ||
|
|
3899310dca | ||
|
|
1a651ece2c | ||
|
|
9b91c55408 | ||
|
|
cbda4d4b31 | ||
|
|
3c0de98670 | ||
|
|
0eb234f7be | ||
|
|
e92b021096 | ||
|
|
505fa5c440 | ||
|
|
bc0e0af007 | ||
|
|
e4f6307b46 | ||
|
|
e326ae2ea3 | ||
|
|
55b7e8a890 | ||
|
|
72bae78465 | ||
|
|
06663a489d | ||
|
|
d17cbe8f8f | ||
|
|
07f1a2818d | ||
|
|
bec90507d7 | ||
|
|
c7b6b37e1d | ||
|
|
0651145eca | ||
|
|
1675300153 | ||
|
|
bbc286b007 | ||
|
|
7ca6bf9d91 | ||
|
|
83038ffbbc | ||
|
|
f85b90abd2 | ||
|
|
8ba5340fb8 | ||
|
|
f6e3c77ef1 | ||
|
|
3c5b1b14d9 | ||
|
|
a87a341417 | ||
|
|
2d191cc4fb | ||
|
|
fc73dcd7ac | ||
|
|
2a5087243f | ||
|
|
81850d7016 | ||
|
|
84f224a0d7 | ||
|
|
5aef9e78a5 | ||
|
|
d08bfbd094 | ||
|
|
2b8c514095 | ||
|
|
310b41da89 | ||
|
|
ce7c6fd0a9 | ||
|
|
5ff25f9b8f | ||
|
|
26fef18cb8 | ||
|
|
98ca2ba846 | ||
|
|
92fca67cf5 | ||
|
|
215f9012d5 | ||
|
|
9337ad1a47 | ||
|
|
1974a490d8 | ||
|
|
31f1004b74 | ||
|
|
32f9590f2a | ||
|
|
3792b0a01e | ||
|
|
cf37f79b94 | ||
|
|
0a1cbcf442 | ||
|
|
456c1219ee | ||
|
|
4d452e493f | ||
|
|
ba86939fcb | ||
|
|
9cc70dceb4 | ||
|
|
eb321e77f7 | ||
|
|
fa8457769b | ||
|
|
4e418f40bc | ||
|
|
b56d735993 | ||
|
|
562b652532 | ||
|
|
547c203a98 | ||
|
|
098d98d047 | ||
|
|
ab6cc80541 | ||
|
|
b9ff0c2f81 | ||
|
|
a936d03921 | ||
|
|
c62dcb6fa0 | ||
|
|
b0574dee64 | ||
|
|
07996ed613 | ||
|
|
85c66cb4c8 | ||
|
|
7c4acb2539 | ||
|
|
687f54b6b8 | ||
|
|
bfbcbe125e | ||
|
|
b9104596eb | ||
|
|
f328ddf8bb | ||
|
|
899a275d55 | ||
|
|
1bb94397a5 | ||
|
|
844cb6f07d | ||
|
|
d140ed69d8 | ||
|
|
ef1679fa92 | ||
|
|
9fe0449a36 | ||
|
|
a2018f29ff | ||
|
|
80d4c36c2e | ||
|
|
a92313f507 | ||
|
|
b92f3d57e2 | ||
|
|
041bbcac27 | ||
|
|
18c2360755 | ||
|
|
7692b3eab6 | ||
|
|
a033c6beb3 | ||
|
|
68b1a3d231 | ||
|
|
adcd2008e1 | ||
|
|
4ca2160923 | ||
|
|
817ae7fd92 | ||
|
|
13d0ca1bd4 | ||
|
|
372831bc72 | ||
|
|
161b9f4dde | ||
|
|
2745c43fd4 | ||
|
|
1a1f49c966 | ||
|
|
5343bda835 | ||
|
|
9f3e0b8ec5 | ||
|
|
1f9a7e6efc | ||
|
|
ca0ad141b6 | ||
|
|
a6d7cb06db | ||
|
|
a40c3176c2 | ||
|
|
9f88649c8c | ||
|
|
8bc82ce256 | ||
|
|
c95941d65d | ||
|
|
a3d2f9bee9 | ||
|
|
ee4e0d44b3 | ||
|
|
f273c77790 | ||
|
|
61a9fc4684 | ||
|
|
8ab768e9d4 | ||
|
|
7b326e1351 | ||
|
|
c6ec01220b | ||
|
|
8fb66b3a69 | ||
|
|
0612bf14c0 | ||
|
|
d7c7eb7897 | ||
|
|
d0f94a1f1c | ||
|
|
3195af515d | ||
|
|
482c5a1631 | ||
|
|
9d7344365c | ||
|
|
c17c927969 | ||
|
|
821c05373e | ||
|
|
7c1baa7ada | ||
|
|
8ae7fd5f6f | ||
|
|
4b1ec86348 | ||
|
|
24b486cfc3 | ||
|
|
1f6d422a9a | ||
|
|
f4c8bacd5a | ||
|
|
c14ac03919 | ||
|
|
42afef19eb | ||
|
|
460515b963 | ||
|
|
08ba682d78 | ||
|
|
19c9df87bc | ||
|
|
28f2016a13 | ||
|
|
e865376cd5 | ||
|
|
0f2f1a5cc4 | ||
|
|
ded4da6a6e | ||
|
|
fa2dd120e4 | ||
|
|
2e5bb743c7 | ||
|
|
ec2469fa84 | ||
|
|
0263e922f1 | ||
|
|
f0932cbf46 | ||
|
|
8f83254679 | ||
|
|
4e769ee998 | ||
|
|
191c0eea0a | ||
|
|
8d19545f6b | ||
|
|
41df320a22 | ||
|
|
45ec04e62e | ||
|
|
3764236446 | ||
|
|
bd47df86dc | ||
|
|
c16ba0eb9d | ||
|
|
5f9112c4a8 | ||
|
|
1e67cbf7d0 | ||
|
|
5a0b14429c | ||
|
|
1a8f41bc4c | ||
|
|
ce8fc4e5a0 | ||
|
|
07b947e669 | ||
|
|
c7b7ecb074 | ||
|
|
d66e649b3f | ||
|
|
18637363ba | ||
|
|
adadc62ff3 | ||
|
|
43921a97ca | ||
|
|
3ccfc3bed1 | ||
|
|
55d36b7e2b | ||
|
|
9bfb72e5d8 | ||
|
|
50016e0e32 | ||
|
|
88efa06787 | ||
|
|
ba8c5e1f8c | ||
|
|
073695fe81 | ||
|
|
133581fe5c | ||
|
|
dc73edd77c | ||
|
|
dc267a70d2 | ||
|
|
c58d9a073e | ||
|
|
84bf7c7d5d | ||
|
|
d6279335bb | ||
|
|
dfe653fc49 | ||
|
|
4ea54f2d0a | ||
|
|
e8d6ef494e | ||
|
|
47ba3d654e | ||
|
|
be514997d2 | ||
|
|
694616c180 | ||
|
|
7aca93df60 | ||
|
|
8d969f6798 | ||
|
|
5ef3bd9c37 | ||
|
|
e7e309350c | ||
|
|
3c77f34cc1 | ||
|
|
95a60f61ce | ||
|
|
99c588976f | ||
|
|
82889257ad | ||
|
|
f2151e4b57 | ||
|
|
6ec8139b75 | ||
|
|
2430aa08f4 | ||
|
|
f0ef2907eb | ||
|
|
cb145227ae | ||
|
|
6fdc01aaf8 | ||
|
|
3b34bb5343 | ||
|
|
6608e1b9e2 | ||
|
|
20d2c3d284 | ||
|
|
e079197cd6 | ||
|
|
04ed0a2bf7 | ||
|
|
c085904fd1 | ||
|
|
9bf749438c | ||
|
|
d409155dc8 | ||
|
|
69be37a233 | ||
|
|
83b3d5eee0 | ||
|
|
434d8607cc | ||
|
|
29286d8365 | ||
|
|
25de0c4bba | ||
|
|
7e9a0794d0 | ||
|
|
0f4f88a9d9 | ||
|
|
d52edd8638 | ||
|
|
4d1186c003 | ||
|
|
10436796ef | ||
|
|
afd18d4fa3 | ||
|
|
ce03b57275 | ||
|
|
0623b3f394 | ||
|
|
89b82dcc84 | ||
|
|
50fa325cd0 | ||
|
|
70ba31d512 | ||
|
|
c19c1a588f | ||
|
|
1d4df6991d | ||
|
|
cec4786ec2 | ||
|
|
cb6a267f1e | ||
|
|
5cbce8e5a6 | ||
|
|
edec404c96 | ||
|
|
a7575f806c | ||
|
|
9fac49f209 | ||
|
|
5b7c93c156 | ||
|
|
95dfefd185 | ||
|
|
cb7e6d5e4e | ||
|
|
d66583f802 | ||
|
|
f6fb25a807 | ||
|
|
fc6fa9d5e2 | ||
|
|
6336679de2 | ||
|
|
bdd07e3f83 | ||
|
|
225bd167d7 | ||
|
|
f5611449b1 | ||
|
|
ec20f58cbc | ||
|
|
f4d54f710a | ||
|
|
efbf4469d4 | ||
|
|
2465e9eb0b | ||
|
|
1c5533a18f | ||
|
|
9350d46a2a | ||
|
|
bd6d015f8e | ||
|
|
9819c1d771 | ||
|
|
31ce1aae5f | ||
|
|
a0ca5d0c06 | ||
|
|
45d89b3d1a | ||
|
|
d3b0391801 | ||
|
|
a75a6efb40 | ||
|
|
01997403fe | ||
|
|
d2b9bc0db8 | ||
|
|
0d6c15713b | ||
|
|
5f44ad81f0 | ||
|
|
447e862f7e | ||
|
|
cc1aa59379 | ||
|
|
8b55b165f2 | ||
|
|
b1c1211adb | ||
|
|
cfd87522af | ||
|
|
b06ee733ef | ||
|
|
adbb228ab7 | ||
|
|
dbcd1c22b7 | ||
|
|
16d25afeb3 | ||
|
|
7e5417927c | ||
|
|
9ad024eb56 | ||
|
|
765c4a7662 | ||
|
|
bef8f221fd | ||
|
|
421dbceb11 | ||
|
|
05b7b72e3c | ||
|
|
d60914e5b6 | ||
|
|
22c4b56b59 | ||
|
|
d654cfa0fd | ||
|
|
0efa52337e | ||
|
|
05930f0511 | ||
|
|
be705674e1 | ||
|
|
8c2e2a840c | ||
|
|
7920c7861f | ||
|
|
074ac263be | ||
|
|
0daef3e856 | ||
|
|
08ca05f500 | ||
|
|
8a1b524d47 | ||
|
|
d61ce9f2a4 | ||
|
|
4cf606a18e | ||
|
|
eea6c34440 | ||
|
|
3688d873d4 | ||
|
|
db34e7d7f1 | ||
|
|
e269083de6 | ||
|
|
ab6e2839e5 | ||
|
|
b0016b886e | ||
|
|
b296e6bad2 | ||
|
|
651a5cbd66 | ||
|
|
3f99b1e9c0 | ||
|
|
d34ac5a182 | ||
|
|
8d793b9a7e | ||
|
|
90ed71c809 | ||
|
|
8fa9d1fb3a | ||
|
|
5223272174 | ||
|
|
17b6dcd892 | ||
|
|
5cb4326ac5 | ||
|
|
48b4b138ff | ||
|
|
4b55a25ce8 | ||
|
|
791601f51d | ||
|
|
5cf05b32d2 | ||
|
|
8b2e640b8c | ||
|
|
553fec6022 | ||
|
|
6b874486ce | ||
|
|
b117211d4a | ||
|
|
6239c1ac50 | ||
|
|
ae8a5f8069 | ||
|
|
23e6ed1deb | ||
|
|
acd07871bc | ||
|
|
4080247fe9 | ||
|
|
6f9468d1b7 | ||
|
|
6658d7314d | ||
|
|
d72f916818 | ||
|
|
ae07073cec | ||
|
|
30aa899004 | ||
|
|
ad4a9bed29 | ||
|
|
79d769da3f | ||
|
|
e1a55a7b85 | ||
|
|
7f437f37f3 | ||
|
|
9a77866af3 | ||
|
|
9e5921e84c | ||
|
|
b5cfb73063 | ||
|
|
cb5190119e | ||
|
|
d30c778c28 | ||
|
|
9a37393599 | ||
|
|
b7c560f837 | ||
|
|
1ce29ae611 | ||
|
|
dabb354821 | ||
|
|
38e0cfc823 | ||
|
|
228a5751f2 | ||
|
|
d2dee25f8c | ||
|
|
f397c4797c |
No files matched your search
@@ -0,0 +1,9 @@
|
|||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
autom4te.cache
|
||||||
|
config.cache
|
||||||
|
config.h
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
stamp-h
|
||||||
|
stamp-h1
|
||||||
-224
@@ -1,224 +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_env.mk
|
|
||||||
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
|
|
||||||
*.elf
|
|
||||||
example_grub_script_test
|
|
||||||
example_scripted_test
|
|
||||||
example_unit_test
|
|
||||||
*.exec
|
|
||||||
fddboot_test
|
|
||||||
genkernsyms.sh
|
|
||||||
gensymlist.sh
|
|
||||||
gentrigtables
|
|
||||||
gettext_strings_test
|
|
||||||
grub-bin2h
|
|
||||||
grub-bios-setup
|
|
||||||
grub_cmd_date
|
|
||||||
grub_cmd_echo
|
|
||||||
grub_cmd_regexp
|
|
||||||
grub_cmd_set_date
|
|
||||||
grub_cmd_sleep
|
|
||||||
grub-editenv
|
|
||||||
grub-emu
|
|
||||||
grub-emu-lite
|
|
||||||
grub_emu_init.c
|
|
||||||
grub_emu_init.h
|
|
||||||
grub-fstest
|
|
||||||
grub_fstest_init.c
|
|
||||||
grub_fstest_init.h
|
|
||||||
grub_func_test
|
|
||||||
grub-install
|
|
||||||
grub-kbdcomp
|
|
||||||
grub-macho2img
|
|
||||||
grub-menulst2cfg
|
|
||||||
/grub-mk*
|
|
||||||
grub-mount
|
|
||||||
grub-ofpathname
|
|
||||||
grub-pe2elf
|
|
||||||
grub-probe
|
|
||||||
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_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
|
|
||||||
grub_setup_init.c
|
|
||||||
grub_setup_init.h
|
|
||||||
grub-shell
|
|
||||||
grub-shell-tester
|
|
||||||
grub-sparc64-setup
|
|
||||||
gzcompress_test
|
|
||||||
hddboot_test
|
|
||||||
help_test
|
|
||||||
*.img
|
|
||||||
*.image
|
|
||||||
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/*.pp
|
|
||||||
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.S
|
|
||||||
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-core/gnulib/locale.h
|
|
||||||
grub-core/gnulib/unitypes.h
|
|
||||||
grub-core/gnulib/uniwidth.h
|
|
||||||
build-aux/test-driver
|
|
||||||
@@ -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,54 @@
|
|||||||
|
VaX#n8 (real name unknown) wrote shared_src/fsys_ext2fs.c.
|
||||||
|
|
||||||
|
Heiko Schroeder rewrote shared_src/stage1.S to be more readable.
|
||||||
|
|
||||||
The following authors assigned copyright on their work to the Free
|
The following authors assigned copyright on their work to the Free
|
||||||
Software Foundation:
|
Software Foundation:
|
||||||
|
|
||||||
Yoshinori K. Okuji designed and implemented the initial version.
|
Erich Stefan Boleyn originally designed and implemented GRUB.
|
||||||
|
|
||||||
Jeroen Dekkers added initrd support, Multiboot support, and fixed bugs
|
Gordon Matzigkeit adopted GRUB into the GNU Project. He fixed several
|
||||||
in ext2fs.
|
bugs, added symbolic link support to shared_src/fsys_ext2fs.c, and
|
||||||
|
began the implementation of /sbin/grub. He was an official maintainer.
|
||||||
|
|
||||||
Marco Gerards added ext2fs support, grub-emu, a new command-line
|
Yoshinori K. Okuji contributed many bugfixes and new features, such as
|
||||||
engine, and fixed many bugs.
|
working LBA support, /sbin/grub support for configuration files, the
|
||||||
|
script /sbin/grub-install, the utility /bin/mbchk, the new engine for
|
||||||
|
builtin commands, disk swapping support, keyboard configuration support,
|
||||||
|
network support, online help support, command-line history support,
|
||||||
|
hidden menu support, the new Linux loader, serial terminal support,
|
||||||
|
single-line editing support, the utility /sbin/grub-md5-crypt, the new
|
||||||
|
GRUB manual, and several new commands. He is the current official
|
||||||
|
maintainer.
|
||||||
|
|
||||||
Omniflux added terminfo and serial support.
|
Peter Astrand added support for a color menu.
|
||||||
|
|
||||||
Vincent Pelletier added Sparc64 support.
|
Pavel Roskin contributed many bugfixes and new features, such as FreeBSD
|
||||||
|
support for the grub shell, and configure process cleanups.
|
||||||
|
|
||||||
Hollis Blanchard implemented many parts of PowerPC support.
|
Klaus Reichl wrote stage2/fsys_minix.c.
|
||||||
|
|
||||||
Tomas Ebenlendr added the command chainloader into the normal mode,
|
Per Lundberg added graphics support to the Multiboot Specification.
|
||||||
fixed some bugs.
|
|
||||||
|
|
||||||
Guillem Jover merged architecture-independent ELF support code.
|
Jochen Hoenicke rewrote stage2/fsys_fat.c and wrote
|
||||||
|
stage2/fsys_reiserfs.c and stage2/md5.c.
|
||||||
|
|
||||||
Vesa Jaaskelainen added VBE support.
|
Christoph Plattner added support for Net Boot Image Proposal.
|
||||||
|
|
||||||
|
Frank Mehnert added support for hercules console.
|
||||||
|
|
||||||
|
Kristoffer Branemyr added VSTa filesystem support.
|
||||||
|
|
||||||
|
Serguei Tzukanov added JFS and XFS support.
|
||||||
|
|
||||||
|
Jason Thomas added Linux DAC960 support and support for hiding/unhiding
|
||||||
|
logical partitions, and did a significant bugfix for the terminal stuff.
|
||||||
|
|
||||||
|
Tilmann Bubeck added support for vt100-incompatible terminals.
|
||||||
|
|
||||||
|
KB Sriram added a better detection of FAT filesystem and fixed a
|
||||||
|
network device completion.
|
||||||
|
|
||||||
|
Eric Kvaalen fixed a lot of problems in the GRUB manual.
|
||||||
|
|
||||||
|
Leonid Lisovskiy added El Torito support.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
GRUB team is aware of following problems:
|
See the Bug Tracking System for GNU GRUB on Savannah. The URL is:
|
||||||
- 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
|
http://savannah.gnu.org/bugs/?group_id=68 (without SSL)
|
||||||
seriously. So it was decided for 1.99 that they aren't fixed.
|
|
||||||
|
or
|
||||||
|
|
||||||
|
https://savannah.gnu.org/bugs/?group_id=68 (with SSL)
|
||||||
@@ -1,625 +1,284 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
The licenses for most software are designed to take away your
|
||||||
software and other kinds of works.
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
The licenses for most software and other practical works are designed
|
software--to make sure the software is free for all its users. This
|
||||||
to take away your freedom to share and change the works. By contrast,
|
General Public License applies to most of the Free Software
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
Foundation's software and to any other program whose authors commit to
|
||||||
share and change all versions of a program--to make sure it remains free
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
have the freedom to distribute copies of free software (and charge for
|
have the freedom to distribute copies of free software (and charge for
|
||||||
them if you wish), that you receive source code or can get it if you
|
this service if you wish), that you receive source code or can get it
|
||||||
want it, that you can change the software or use pieces of it in new
|
if you want it, that you can change the software or use pieces of it
|
||||||
free programs, and that you know you can do these things.
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
To protect your rights, we need to make restrictions that forbid
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
These restrictions translate to certain responsibilities for you if you
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
For example, if you distribute copies of such a program, whether
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
you have. You must make sure that they, too, receive or can get the
|
||||||
or can get the source code. And you must show them these terms so they
|
source code. And you must show them these terms so they know their
|
||||||
know their rights.
|
rights.
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
distribute and/or modify the software.
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
Also, for each author's protection and ours, we want to make certain
|
||||||
that there is no warranty for this free software. For both users' and
|
that everyone understands that there is no warranty for this free
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
software. If the software is modified by someone else and passed on, we
|
||||||
changed, so that their problems will not be attributed erroneously to
|
want its recipients to know that what they have is not the original, so
|
||||||
authors of previous versions.
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
Finally, any free program is threatened constantly by software
|
||||||
modified versions of the software inside them, although the manufacturer
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
program will individually obtain patent licenses, in effect making the
|
||||||
protecting users' freedom to change the software. The systematic
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
0. Definitions.
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
refers to any such program or work, and a "work based on the Program"
|
||||||
works, such as semiconductor masks.
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
either verbatim or with modifications and/or translated into another
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
language. (Hereinafter, translation is included without limitation in
|
||||||
"recipients" may be individuals or organizations.
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
Activities other than copying, distribution and modification are not
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
covered by this License; they are outside its scope. The act of
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
running the Program is not restricted, and the output from the Program
|
||||||
earlier work or a work "based on" the earlier work.
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
A "covered work" means either the unmodified Program or a work based
|
Whether that is true depends on what the Program does.
|
||||||
on the Program.
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
To "propagate" a work means to do anything with it that, without
|
source code as you receive it, in any medium, provided that you
|
||||||
permission, would make you directly or secondarily liable for
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
infringement under applicable copyright law, except executing it on a
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
notices that refer to this License and to the absence of any warranty;
|
||||||
distribution (with or without modification), making available to the
|
and give any other recipients of the Program a copy of this License
|
||||||
public, and in some countries other activities as well.
|
along with the Program.
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
of it, thus forming a work based on the Program, and copy and
|
||||||
to the extent that it includes a convenient and prominently visible
|
distribute such modifications or work under the terms of Section 1
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
above, provided that you also meet all of these conditions:
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
a) You must cause the modified files to carry prominent notices
|
||||||
work under this License, and how to view a copy of this License. If
|
stating that you changed the files and the date of any change.
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
1. Source Code.
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
c) If the modified program normally reads commands interactively
|
||||||
form of a work.
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
A "Standard Interface" means an interface that either is an official
|
announcement including an appropriate copyright notice and a
|
||||||
standard defined by a recognized standards body, or, in the case of
|
notice that there is no warranty (or else, saying that you provide
|
||||||
interfaces specified for a particular programming language, one that
|
a warranty) and that users may redistribute the program under
|
||||||
is widely used among developers working in that language.
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
The "System Libraries" of an executable work include anything, other
|
does not normally print such an announcement, your work based on
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
the Program is not required to print an announcement.)
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
These requirements apply to the modified work as a whole. If
|
||||||
Major Component, or to implement a Standard Interface for which an
|
identifiable sections of that work are not derived from the Program,
|
||||||
implementation is available to the public in source code form. A
|
and can be reasonably considered independent and separate works in
|
||||||
"Major Component", in this context, means a major essential component
|
themselves, then this License, and its terms, do not apply to those
|
||||||
(kernel, window system, and so on) of the specific operating system
|
sections when you distribute them as separate works. But when you
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
distribute the same sections as part of a whole which is a work based
|
||||||
produce the work, or an object code interpreter used to run it.
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
The "Corresponding Source" for a work in object code form means all
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
control those activities. However, it does not include the work's
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
System Libraries, or general-purpose tools or generally available free
|
exercise the right to control the distribution of derivative or
|
||||||
programs which are used unmodified in performing those activities but
|
collective works based on the Program.
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
In addition, mere aggregation of another work not based on the Program
|
||||||
the work, and the source code for shared libraries and dynamically
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
linked subprograms that the work is specifically designed to require,
|
a storage or distribution medium does not bring the other work under
|
||||||
such as by intimate data communication or control flow between those
|
the scope of this License.
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
The Corresponding Source need not include anything that users
|
under Section 2) in object code or executable form under the terms of
|
||||||
can regenerate automatically from other parts of the Corresponding
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
Source.
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
The Corresponding Source for a work in source code form is that
|
source code, which must be distributed under the terms of Sections
|
||||||
same work.
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
2. Basic Permissions.
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
All rights granted under this License are granted for the term of
|
cost of physically performing source distribution, a complete
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
machine-readable copy of the corresponding source code, to be
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
permission to run the unmodified Program. The output from running a
|
customarily used for software interchange; or,
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
c) Accompany it with the information you received as to the offer
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
You may make, run and propagate covered works that you do not
|
received the program in object code or executable form with such
|
||||||
convey, without conditions so long as your license otherwise remains
|
an offer, in accord with Subsection b above.)
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
The source code for a work means the preferred form of the work for
|
||||||
with facilities for running those works, provided that you comply with
|
making modifications to it. For an executable work, complete source
|
||||||
the terms of this License in conveying all material for which you do
|
code means all the source code for all modules it contains, plus any
|
||||||
not control copyright. Those thus making or running the covered works
|
associated interface definition files, plus the scripts used to
|
||||||
for you must do so exclusively on your behalf, under your direction
|
control compilation and installation of the executable. However, as a
|
||||||
and control, on terms that prohibit them from making any copies of
|
special exception, the source code distributed need not include
|
||||||
your copyrighted material outside their relationship with you.
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
Conveying under any other circumstances is permitted solely under
|
operating system on which the executable runs, unless that component
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
itself accompanies the executable.
|
||||||
makes it unnecessary.
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
No covered work shall be deemed part of an effective technological
|
distribution of the source code, even though third parties are not
|
||||||
measure under any applicable law fulfilling obligations under article
|
compelled to copy the source along with the object code.
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
measures.
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
void, and will automatically terminate your rights under this License.
|
||||||
circumvention of technological measures to the extent such circumvention
|
However, parties who have received copies, or rights, from you under
|
||||||
is effected by exercising rights under this License with respect to
|
this License will not have their licenses terminated so long as such
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
parties remain in full compliance.
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
5. You are not required to accept this License, since you have not
|
||||||
technological measures.
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
4. Conveying Verbatim Copies.
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
You may convey verbatim copies of the Program's source code as you
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
receive it, in any medium, provided that you conspicuously and
|
all its terms and conditions for copying, distributing or modifying
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
the Program or works based on it.
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
Program), the recipient automatically receives a license from the
|
||||||
recipients a copy of this License along with the Program.
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
You may charge any price or no price for each copy that you convey,
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
and you may offer support or warranty protection for a fee.
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
patent license under the contributor's essential patent claims, to
|
infringement or for any other reason (not limited to patent issues),
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
excuse you from the conditions of this License. If you cannot
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
License and any other pertinent obligations, then as a consequence you
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
may not distribute the Program at all. For example, if a patent
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
license would not permit royalty-free redistribution of the Program by
|
||||||
the Program, the only way you could satisfy both those terms and this
|
all those who receive copies directly or indirectly through you, then
|
||||||
License would be to refrain entirely from conveying the Program.
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
It is not the purpose of this section to induce you to infringe any
|
||||||
permission to link or combine any covered work with a work licensed
|
patents or other property right claims or to contest validity of any
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
such claims; this section has the sole purpose of protecting the
|
||||||
combined work, and to convey the resulting work. The terms of this
|
integrity of the free software distribution system, which is
|
||||||
License will continue to apply to the part which is the covered work,
|
implemented by public license practices. Many people have made
|
||||||
but the special requirements of the GNU Affero General Public License,
|
generous contributions to the wide range of software distributed
|
||||||
section 13, concerning interaction through a network will apply to the
|
through that system in reliance on consistent application of that
|
||||||
combination as such.
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
the GNU General Public License from time to time. Such new versions will
|
of the General Public License from time to time. Such new versions will
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
Each version is given a distinguishing version number. If the Program
|
||||||
Program specifies that a certain numbered version of the GNU General
|
specifies a version number of this License which applies to it and "any
|
||||||
Public License "or any later version" applies to it, you have the
|
later version", you have the option of following the terms and conditions
|
||||||
option of following the terms and conditions either of that numbered
|
either of that version or of any later version published by the Free
|
||||||
version or of any later version published by the Free Software
|
Software Foundation. If the Program does not specify a version number of
|
||||||
Foundation. If the Program does not specify a version number of the
|
this License, you may choose any version ever published by the Free Software
|
||||||
GNU General Public License, you may choose any version ever published
|
Foundation.
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
programs whose distribution conditions are different, write to the author
|
||||||
public statement of acceptance of a version permanently authorizes you
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
to choose that version for the Program.
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
NO WARRANTY
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
@@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
|
|||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
To do so, attach the following notices to the program. It is safest
|
||||||
to attach them to the start of each source file to most effectively
|
to attach them to the start of each source file to most effectively
|
||||||
state the exclusion of warranty; and each file should have at least
|
convey the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) <year> <name of author>
|
Copyright (C) 19yy <name of author>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
@@ -645,30 +304,37 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
If the program is interactive, make it output a short notice like this
|
||||||
notice like this when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
parts of the General Public License. Of course, your program's commands
|
parts of the General Public License. Of course, the commands you use may
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or your
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
necessary. Here is a sample; alter the names:
|
||||||
<http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
<signature of Ty Coon>, 1 April 1989
|
||||||
Public License instead of this License. But first, please read
|
Ty Coon, President of Vice
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
@@ -1,286 +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
|
|
||||||
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 3.3 or later works for arm64
|
|
||||||
earlier versions have no arm64 support
|
|
||||||
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 has no support for generating 64-bit sparc code and hence you
|
|
||||||
can't compile GRUB for sparc64 with clang
|
|
||||||
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
|
|
||||||
|
|
||||||
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'.
|
|
||||||
|
|
||||||
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 developpers 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 omited):
|
|
||||||
|
|
||||||
./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_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. CFLAGS= for C options for host.
|
|
||||||
4. CPPFLAGS= for C preprocessor options for host.
|
|
||||||
5. 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 stadard linker directories (-lSDL) (optional)
|
|
||||||
2. libpciaccess is looked for in stadard linker directories (-lpciaccess) (optional)
|
|
||||||
3. libusb is looked for in stadard 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.
|
|
||||||
+60
@@ -0,0 +1,60 @@
|
|||||||
|
-*- text -*-
|
||||||
|
|
||||||
|
This is a list of random notes for GRUB maintainers. If you are not a
|
||||||
|
maintainer, you need to ask maintainers to do these instead of doing
|
||||||
|
these yourself.
|
||||||
|
|
||||||
|
How to update the online manual: (FIXME: this is obsoelete)
|
||||||
|
1. Copy docs/*.texi (excluding "multiboot.texi") to fencepost.gnu.org.
|
||||||
|
2. Make a symbolic link from ~mohit/gnudoc/gnudoc_template to the
|
||||||
|
directory under which *.texi were copied, if the link isn't present.
|
||||||
|
3. Run ``~mohit/gnudoc/gendocs.sh grub "GNU GRUB Manual"''.
|
||||||
|
4. Copy the contents of the directory ``manual'' to
|
||||||
|
gnudist.gnu.org:~ftp/gnu/Manuals/grub-VERSION (VERSION is, for
|
||||||
|
example, 1.0).
|
||||||
|
5. Run ``ln -sf grub-VERSION grub'' in gnudist.gnu.org:~ftp/gnu/Manuals.
|
||||||
|
6. Run ``cd grub; ln -s grub.html index.html''.
|
||||||
|
7. Verify the new online manual with a WWW browser.
|
||||||
|
8. Update manual.html by hand.
|
||||||
|
|
||||||
|
How to release a version:
|
||||||
|
1. Check out the source tree from the CVS from scratch.
|
||||||
|
2. Check if ``make distcheck'' succeeds.
|
||||||
|
3. Run ``util/grub-image''.
|
||||||
|
4. Check the resulted images, for example, using bochs.
|
||||||
|
5. Copy grub-VERSION.tar.gz, grub-VERSION-i386-pc.tar.gz and
|
||||||
|
grub-VERSION-i386-pc.ext2fs to fencepost.gnu.org:~ftp/gnu/grub.
|
||||||
|
6. Move older files in that directory above to the directory ``old'',
|
||||||
|
if you think they are eyesores.
|
||||||
|
7. Post an announcement to bug-grub@gnu.org. It would be a good idea to
|
||||||
|
send a carbon copy to bug-hurd@gnu.org and
|
||||||
|
debian-hurd@lists.debian.org. If the announcement is for a stable
|
||||||
|
version, you can inform info-gnu@gnu.org as well.
|
||||||
|
8. Optionally, post an announcement to Freshmeat.net.
|
||||||
|
|
||||||
|
Legal issues:
|
||||||
|
1. If a patch is not significant (in size), you don't have to care about
|
||||||
|
the copyright.
|
||||||
|
2. If a patch is significant, you shouldn't apply the patch to the CVS.
|
||||||
|
Before doing that, you must ask the contributor to assign or disclaim
|
||||||
|
the copyright. Send ``/gd/gnuorg/request-assign.changes'' or
|
||||||
|
``/gd/gnuorg/request-assign.future'' to the contributor, and wait
|
||||||
|
until the FSF finishes the legal work.
|
||||||
|
3. You can check if a contributor has already assigned his/her copyright
|
||||||
|
to the FSF by looking at ``/gd/gnuorg/copyright.list''.
|
||||||
|
|
||||||
|
What you should have in your mind:
|
||||||
|
1. Don't add features unnecessarily! You may think it is a Good Thing to
|
||||||
|
have more features, but you must be prepared for more burdens.
|
||||||
|
DO THAT ONLY IF YOU BELIEVE THAT THE FEATURE IS ESSENTIAL.
|
||||||
|
2. Don't break backward-compatibility! Don't apply any patch which could
|
||||||
|
break existing features. Otherwise you would receive a lot of
|
||||||
|
complaints. DO THAT ONLY IF YOU BELIEVE THAT THE INCOMPATIBILITY IS
|
||||||
|
INEVITABLE.
|
||||||
|
3. Write good code. Be not satisfied with ad hoc workarounds or quick
|
||||||
|
hacks. NEVER WRITE BAD CODE.
|
||||||
|
|
||||||
|
Resources:
|
||||||
|
* http://www.gnu.org/prep/maintain_toc.html
|
||||||
|
* http://www.gnu.org/prep/standards_toc.html
|
||||||
|
* http://www.gnu.org/server/fsf-html-style-sheet.html
|
||||||
+4
-429
@@ -1,429 +1,4 @@
|
|||||||
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 = netboot stage2 stage1 lib grub util docs
|
||||||
SUBDIRS = grub-core/gnulib . grub-core po docs util/bash-completion.d
|
EXTRA_DIST = BUGS MAINTENANCE
|
||||||
|
|
||||||
include $(top_srcdir)/conf/Makefile.common
|
|
||||||
include $(top_srcdir)/conf/Makefile.extra-dist
|
|
||||||
|
|
||||||
AM_CFLAGS = $(HOST_CFLAGS)
|
|
||||||
AM_LDFLAGS = $(HOST_LDFLAGS)
|
|
||||||
AM_CPPFLAGS = $(HOST_CPPFLAGS) $(CPPFLAGS_DEFAULT)
|
|
||||||
AM_CCASFLAGS = $(HOST_CCASFLAGS) $(CCASFLAGS_DEFAULT)
|
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
|
||||||
|
|
||||||
CFLAGS_PROGRAM += $(CFLAGS_GNULIB)
|
|
||||||
LDFLAGS_PROGRAM += $(LDFLAGS_GNULIB)
|
|
||||||
CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB)
|
|
||||||
CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB)
|
|
||||||
|
|
||||||
include $(srcdir)/Makefile.util.am
|
|
||||||
|
|
||||||
# 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: 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) -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
|
|
||||||
|
|
||||||
garbage-gen: util/garbage-gen.c
|
|
||||||
$(BUILD_CC) -o $@ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $^
|
|
||||||
CLEANFILES += garbage-gen
|
|
||||||
EXTRA_DIST += util/garbage-gen.c
|
|
||||||
|
|
||||||
build-grub-gen-asciih: util/grub-gen-asciih.c
|
|
||||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(build_freetype_cflags) $(build_freetype_libs) -Wall -Werror
|
|
||||||
CLEANFILES += build-grub-gen-asciih
|
|
||||||
|
|
||||||
build-grub-gen-widthspec: util/grub-gen-widthspec.c
|
|
||||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(build_freetype_cflags) $(build_freetype_libs) -Wall -Werror
|
|
||||||
CLEANFILES += build-grub-gen-widthspec
|
|
||||||
|
|
||||||
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-grub-mkfont -s 10 -o $@ $(DJVU_FONT_SOURCE)
|
|
||||||
dejavu_12.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont
|
|
||||||
./build-grub-mkfont -s 12 -o $@ $(DJVU_FONT_SOURCE)
|
|
||||||
dejavu_14.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont
|
|
||||||
./build-grub-mkfont -s 14 -o $@ $(DJVU_FONT_SOURCE)
|
|
||||||
dejavu_bold_14.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont
|
|
||||||
./build-grub-mkfont -b -s 14 -o $@ $(DJVU_FONT_SOURCE)
|
|
||||||
dejavu_16.pf2: $(DJVU_FONT_SOURCE) build-grub-mkfont
|
|
||||||
./build-grub-mkfont -s 16 -o $@ $(DJVU_FONT_SOURCE)
|
|
||||||
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-grub-mkfont -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-grub-mkfont -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-grub-mkfont -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-grub-gen-asciih $(FONT_SOURCE) $@ || (rm -f $@; exit 1)
|
|
||||||
CLEANFILES += ascii.h
|
|
||||||
|
|
||||||
widthspec.h: $(FONT_SOURCE) build-grub-gen-widthspec
|
|
||||||
./build-grub-gen-widthspec $(FONT_SOURCE) $@ || (rm -f $@; exit 1)
|
|
||||||
CLEANFILES += widthspec.h
|
|
||||||
|
|
||||||
# Install config.h into platformdir
|
|
||||||
platform_HEADERS = config.h
|
|
||||||
|
|
||||||
pkgdata_DATA += grub-mkconfig_lib
|
|
||||||
|
|
||||||
|
|
||||||
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 $@ $< -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 $@ $< -m32 -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
||||||
|
|
||||||
linux.init.mips: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
|
||||||
$(TARGET_CC) -o $@ $< -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
||||||
|
|
||||||
linux.init.ppc: $(srcdir)/grub-core/tests/boot/linux.init-ppc.S
|
|
||||||
$(TARGET_CC) -o $@ $< -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
||||||
|
|
||||||
linux.init.mipsel: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
|
||||||
$(TARGET_CC) -o $@ $< -nostdlib -nostdinc -DSUCCESSFUL_BOOT_STRING=\"$(SUCCESSFUL_BOOT_STRING)\"
|
|
||||||
|
|
||||||
linux.init.loongson: $(srcdir)/grub-core/tests/boot/linux.init-mips.S
|
|
||||||
$(TARGET_CC) -o $@ $< -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)\" -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)\" -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 $< $@ -R .note.gnu.build-id -R .note.gnu.gold-version
|
|
||||||
|
|
||||||
pc-chainloader.elf: $(srcdir)/grub-core/tests/boot/kernel-8086.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
|
||||||
$(TARGET_CC) -o $@ $< -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)\" -ffreestanding -nostdlib -nostdinc -Wl,--build-id=none -Wl,-N -Wl,-Ttext,0 -m32
|
|
||||||
|
|
||||||
ntldr.bin: ntldr.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 $< $@;
|
|
||||||
|
|
||||||
multiboot2.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)\" -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 -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 -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 -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 -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 -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 -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 --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 --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 --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 --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 --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 --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 | 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
|
|
||||||
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_x86_64_efi
|
|
||||||
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_multiboot
|
|
||||||
# FreeBSD requires ACPI
|
|
||||||
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
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_coreboot
|
|
||||||
# Freebsd requires ACPI
|
|
||||||
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
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_qemu
|
|
||||||
# FreeBSD requires ACPI
|
|
||||||
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
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_pc
|
|
||||||
#pc chainloader by definition is only for i386-pc
|
|
||||||
#ntldr and bootmgr require BIOS.
|
|
||||||
#legacy protocol makes early BIOS calls.
|
|
||||||
# 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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
.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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
pkgdatadir=. ./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o $@ --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs 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' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=$(srcdir)/coreboot.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
windowszip=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows.zip
|
|
||||||
windowszip: windowsdir
|
|
||||||
test -f $(windowszip) && rm $(windowszip) || true
|
|
||||||
zip -r $(windowszip) $(windowsdir)
|
|
||||||
|
|
||||||
EXTRA_DIST += linguas.sh
|
|
||||||
-1256
File diff suppressed because it is too large.
Load diff
@@ -1,22 +1,23 @@
|
|||||||
This is GRUB 2, the second version of the GRand Unified Bootloader.
|
This is GNU GRUB, the GRand Unified Bootloader. GRUB is intended to
|
||||||
GRUB 2 is rewritten from scratch to make GNU GRUB cleaner, safer, more
|
provide important bootloader features that are missing from typical
|
||||||
robust, more powerful, and more portable.
|
personal computer BIOSes:
|
||||||
|
|
||||||
See the file NEWS for a description of recent changes to GRUB 2.
|
- provides fully-featured command line and graphical interfaces
|
||||||
|
- recognizes fdisk partitions and BSD disklabels
|
||||||
|
- can dynamically read Linux ext2fs, ReiserFS, JFS and XFS, BSD ufs,
|
||||||
|
MS-DOS FAT16 and FAT32, Minix fs, and VSTa fs filesystems, plus
|
||||||
|
hardcoded blocklists
|
||||||
|
- can boot Multiboot-compliant kernels (such as GNU Mach), as well
|
||||||
|
as standard Linux and *BSD kernels
|
||||||
|
|
||||||
|
See the file NEWS for a description of recent changes to GRUB.
|
||||||
|
|
||||||
|
If you are interested in the network support, see the file
|
||||||
|
README.netboot under the directory netboot.
|
||||||
|
|
||||||
See the file INSTALL for instructions on how to build and install the
|
See the file INSTALL for instructions on how to build and install the
|
||||||
GRUB 2 data and program files.
|
GRUB data and program files. See the GRUB manual for details about
|
||||||
|
using GRUB as your boot loader. Type "info grub" in the shell prompt.
|
||||||
|
|
||||||
Please visit the official web page of GRUB 2, for more information.
|
Please visit the official web page of GNU GRUB, for more information.
|
||||||
The URL is <http://www.gnu.org/software/grub/grub.html>.
|
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.
|
|
||||||
Please look at the GRUB Wiki <http://grub.enbug.org> for testing
|
|
||||||
procedures.
|
|
||||||
|
|
||||||
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 +1,124 @@
|
|||||||
GRUB 2 would not be what it is today without the invaluable help of
|
GRUB would not be what it is today without the invaluable help of
|
||||||
everybody who was kind enough to spend time testing it and reporting
|
everybody who was kind enough to spend time testing it and reporting
|
||||||
bugs.
|
bugs.
|
||||||
|
|
||||||
The following people made especially gracious contributions of their
|
The following people made especially gracious contributions of their
|
||||||
time and energy in helping to track down bugs, add new features, and
|
time and energy in helping to track down bugs, add new features, and
|
||||||
generally assist in the GRUB 2 maintainership process:
|
generally assist in the GRUB maintainership process:
|
||||||
|
|
||||||
Andrey Shuvikov <mr_hyro@yahoo.com>
|
Adam Lackorzynski <adam@os.inf.tu-dresden.de>
|
||||||
Bibo Mao <bibo.mao@intel.com>
|
Adrian Phillips <a.phillips@dnmi.no>
|
||||||
David Miller <davem@davemloft.net>
|
Alban Crequy <alban.crequy@apinc.org>
|
||||||
Guillem Jover <guillem@hadrons.org>
|
Alessandro Rubini <rubini@gnu.org>
|
||||||
Harley D. Eades III <hde@foobar-qux.org>
|
Alexander K. Hudek <alexhudek@home.com>
|
||||||
Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>
|
Alexander Langer <alex@big.endian.de>
|
||||||
Hollis Blanchard <hollis@penguinppc.org>
|
Alfred M. Szmidt <ams@kemisten.nu>
|
||||||
Jeroen Dekkers <jeroen@dekkers.cx>
|
Andrew Clausen <clausen@gnu.org>
|
||||||
Johan Rydberg <jrydberg@gnu.org>
|
Andrew Walrond <andrew@walrond.org>
|
||||||
Marco Gerards <marco@gnu.org>
|
Ben Liblit <liblit@eecs.berkeley.edu>
|
||||||
Michael Guntsche <mike@it-loops.com>
|
Bernhard Treutwein <Bernhard.Treutwein@Verwaltung.Uni-Muenchen.DE>
|
||||||
NIIBE Yutaka <gniibe@m17n.org>
|
Bodo Rueskamp <br@itchigo.com>.
|
||||||
Omniflux <omniflux@omniflux.com>
|
Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
|
||||||
Robert Bihlmeyer <robbe@orcus.priv.at>
|
Bradford Hovinen <hovinen@redrose.net>
|
||||||
Roger Leigh <rleigh@whinlatter.ukfsn.org>
|
Brian Brunswick <brian@skarpsey.demon.co.uk>
|
||||||
Ruslan Nikolaev <nruslan@mail.com>
|
Bryan Ford <baford@cs.utah.edu>
|
||||||
|
Cedric Ware <ware@com.enst.fr>
|
||||||
|
Chip Salzenberg <chip@valinux.com>
|
||||||
|
Christian Jones <chjones@aleph0.com>
|
||||||
|
Christoph Plattner <Christoph.Plattner@dot.at>
|
||||||
|
Damian Ivereigh <damian@cisco.com>
|
||||||
|
David Weinehall <tao@debian.org>
|
||||||
|
Dan J. Walters <djw@cs.utexas.edu>
|
||||||
|
Daniel Farrell <s2108287@student.rmit.edu.au>
|
||||||
|
Daniel Pittman <daniel@rimspace.net>
|
||||||
|
Daniel Wagner <wagi@gmx.ch>
|
||||||
|
Danilo Godec <danci@agenda.si>
|
||||||
|
Dennis Kitzman <dennis-kitzman@uiowa.edu>
|
||||||
|
Derrik Pates <dpates@dsdk12.net>
|
||||||
|
Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
|
||||||
|
Eduard Guzovsky <eguzovsk@enterasys.com>
|
||||||
|
Edward Killips <ekillips@triton.net>
|
||||||
|
Egmont Koblinger <egmont@uhulinux.hu>
|
||||||
|
Eric Hanchrow <erich@microsoft.com>
|
||||||
|
Erik Schoenfelder <schoenfr@gaertner.de>
|
||||||
|
Eugene Doudine <dudin@np.nk.nornik.ru>
|
||||||
|
Florian Hatat <mininet@wanadoo.fr>
|
||||||
|
Frank Mehnert <fm3@os.inf.tu-dresden.de>
|
||||||
|
Gary Poppitz <gpoppitz@tachyon.net>
|
||||||
|
Goran Koruga <goran.koruga@hermes.si>
|
||||||
|
Hal Snyder <hal@vailsys.com>
|
||||||
|
HASEGAWA Tomoki <thasegawa@mta.biglobe.ne.jp>
|
||||||
|
Heikki Vatiainen <hessu@cs.tut.fi>
|
||||||
|
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
|
||||||
|
Henrik Nordstrom <hno@marasystems.com>
|
||||||
|
Herbert Nachtnebel <nachtneb@iaee.tuwien.ac.at>
|
||||||
|
Hidetoshi Nishimaki <nishimaki@mxs.nes.nec.co.jp>
|
||||||
|
Hisazumi Kenji <nel@soraneko.com>
|
||||||
|
HORIKAWA Kazunori <kaz-hori@tkd.att.ne.jp>
|
||||||
|
Ilguiz Latypov <ilatypov@superbt.com>
|
||||||
|
Jan Fricke <fricke@uni-greifswald.de>
|
||||||
|
Jan Zerebecki <jan.list@elite-pferde.de>
|
||||||
|
Jason Thomas <jason@topic.com.au>
|
||||||
|
Jean-Jacques Michel <jjmichel@linbox.com>
|
||||||
|
Jeremy Katz <katzj@redhat.com>
|
||||||
|
Jochen Hoenicke <jochen@gnu.org>
|
||||||
|
Johannes Kroeger <hanne@squirrel.owl.de>
|
||||||
|
John Goerzen <jgoerzen@complete.org>
|
||||||
|
John Tobey <spam@john-edwin-tobey.org>
|
||||||
|
Josip Rodin <joy@cibalia.gkvk.hr>
|
||||||
|
Julien Bordet <julien.bordet@int-evry.fr>
|
||||||
|
Julien Perrot <julien.perrot@iie.cnam.fr>
|
||||||
|
Kalle Olavi Niemitalo <tosi@ees2.oulu.fi>
|
||||||
|
Karsten Scheibler <karsten.scheibler@student.uni-halle.de>
|
||||||
|
KB Sriram <mail_kb@yahoo.com>
|
||||||
|
Khimenko Victor <grub@khim.sch57.msk.ru>
|
||||||
|
Klaus Reichl <klaus.reichl@alcatel.at>
|
||||||
|
Kristoffer Branemyr <ztion@swipnet.se>
|
||||||
|
Kunihiro Ishiguro <kunihiro@zebra.org>
|
||||||
|
Leendert Meyer <leen.meyer@home.nl>
|
||||||
|
Leonid Lisovskiy <lly@pisem.net>
|
||||||
|
M. Meiarashi <mes@st.rim.or.jp>
|
||||||
|
Mark Kettenis <kettenis@chello.nl>
|
||||||
|
Mark Lundeberg <aa026@pgfn.bc.ca>
|
||||||
|
Matt Perry <matt@primefactor.com>
|
||||||
|
Matt Yourst <yourst@mit.edu>
|
||||||
|
Matthias Granberry <matthias@slurpee.org>
|
||||||
|
Matthias Kretschmer <m.kretschmer@bsdger.org>
|
||||||
|
Michael Hohmuth <hohmuth@innocent.com>
|
||||||
|
Michael Sullivan <mike@trdlnk.com>
|
||||||
|
Mike Meyer <mwm@mired.org>
|
||||||
|
Miles Bader <miles@gnu.org>
|
||||||
|
NATORI Shin <natori@adm.s.u-tokyo.ac.jp>
|
||||||
|
Neal H Walfield <neal@walfield.org>
|
||||||
|
Neelkanth Natu <neelnatu@yahoo.com>
|
||||||
|
OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
Pavel Roskin <proski@gnu.org>
|
||||||
|
Per Lundberg <plundis@byggdok.se>
|
||||||
|
Peter Astrand <altic@lysator.liu.se>
|
||||||
|
Ralf Medow <ralf.medow@t-online.de>
|
||||||
|
Ramon van Handel <vhandel@chem.vu.nl>
|
||||||
|
Robert Millan <robertmh@gnu.org>
|
||||||
|
Roderich Schupp <rsch@ExperTeam.de>
|
||||||
|
Rogelio M. Serrano Jr. <rogelio@victorio.com>
|
||||||
|
Sergey Matveychuk <sem@ciam.ru>
|
||||||
|
Serguei Tzukanov <tzukanov@narod.ru>
|
||||||
|
Stefan Ondrejicka <ondrej@idata.sk>
|
||||||
|
Stephen Early <steve@greenend.org.uk>
|
||||||
|
Steven Dick <ssd.gnu@mmae.ucf.edu>
|
||||||
|
Sven Wegener <swegener@gentoo.org>
|
||||||
|
Takehiro Suzuki <takehiro@coral.ocn.ne.jp>
|
||||||
|
Taketo Kabe <kabe@sra-tohoku.co.jp>
|
||||||
|
Thierry DELHAISE <thierry.delhaise@delhaise.com>
|
||||||
|
Thierry Laronde <thierry.laronde@polynum.com>
|
||||||
|
Thomas Schweikle <tschweikle@fiducia.de>
|
||||||
|
Thomas Schwinge <kischde@gmx.net>
|
||||||
|
Tilmann Bubeck <t.bubeck@reinform.de>
|
||||||
Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
|
Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
|
||||||
Tomas Ebenlendr <ebik@ucw.cz>
|
Torsten Duwe <duwe@caldera.de>
|
||||||
Tristan Gingold <tristan.gingold@bull.net>
|
Uwe Dannowski <ud3@ira.uka.de>
|
||||||
Tsuneyoshi Yasuo <tuneyoshi@naic.co.jp>
|
VaX#n8 <vax@linkdead.paranoia.com>
|
||||||
Vesa Jaaskelainen <chaac@nic.fi>
|
Vesa Jaaskelainen <jaaskela@tietomyrsky.fi>
|
||||||
Vincent Guffens <guffens@inma.ucl.ac.be>
|
Yedidyah Bar-David <didi@post.tau.ac.il>
|
||||||
Vincent Pelletier <subdino2004@yahoo.fr>
|
Yury V. Umanets <umka@namesys.com>
|
||||||
Vladimir Serbinenko <phcoder@gmail.com>
|
Yuri Zaporogets <yuriz@ukr.net>
|
||||||
|
Vitaly Fertman <vitaly@namesys.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,13 +1,102 @@
|
|||||||
|
-*- Mode: Outline -*-
|
||||||
|
|
||||||
Before working on improving GRUB, it's very important that you
|
Before working on anything in this file, it's very important that you
|
||||||
make contact with the core GRUB developers. Things herein might be
|
make contact with the core GRUB developers. Things herein might be
|
||||||
slightly out of date or otherwise not easy to understand at first
|
slightly out of date or otherwise not easy to understand at first
|
||||||
glance. So write to <grub-devel@gnu.org> first.
|
glance. So write to <bug-grub@gnu.org> first.
|
||||||
|
|
||||||
For bug tracking, refer to:
|
Priorities:
|
||||||
|
Reported bugs generally have top priority.
|
||||||
|
Non-reported and non-encountered bugs (things we know don't work,
|
||||||
|
but don't really impede things) have lower priority.
|
||||||
|
Things in this file are ranked with one to three !; the more, the
|
||||||
|
higher priority.
|
||||||
|
|
||||||
http://savannah.gnu.org/bugs/?group=grub
|
|
||||||
|
|
||||||
Our wiki also lists some areas that need work:
|
Things that should be done before 1.0:
|
||||||
|
|
||||||
http://grub.enbug.org/
|
* Finish the Multiboot Speicification 0.7. !!!
|
||||||
|
|
||||||
|
* Add more --disable-FOO options to configure, so that you can create a
|
||||||
|
minimum GRUB image. This is useful for boot floppies because of the size
|
||||||
|
restriction. !
|
||||||
|
|
||||||
|
* Implement a new version of track_int13, using Virtual 8086 Mode. !!!
|
||||||
|
|
||||||
|
* Add missing features of graphics support. !!
|
||||||
|
|
||||||
|
Things that should _not_ be done before 1.0:
|
||||||
|
|
||||||
|
* Add configuration inclusion support by adding a command "include". !
|
||||||
|
|
||||||
|
* Add automatic configuration support.
|
||||||
|
|
||||||
|
* Add bunzip2 support.
|
||||||
|
|
||||||
|
* Define the module system.
|
||||||
|
|
||||||
|
* Add BSD syntax support, using results of ioprobe to map drives. !
|
||||||
|
(0x1f0-0x1f7 = primary IDE, 0x170-0x176 = secondary,
|
||||||
|
0x1e8-0x1ef = tertiary, 0x168-0x16f = quaternary).
|
||||||
|
|
||||||
|
* Add a real scripting language, possibly retaining backward
|
||||||
|
compatibility so that old config files can be used.
|
||||||
|
|
||||||
|
* Add internationalization support, emulating gettext as much as is
|
||||||
|
feasible.
|
||||||
|
|
||||||
|
* Support other architectures than i386-pc.
|
||||||
|
|
||||||
|
* Add real memory management.
|
||||||
|
|
||||||
|
|
||||||
|
Things that may be done anytime:
|
||||||
|
|
||||||
|
* Port the script ``grub-install'' to OpenBSD. At least you will have to
|
||||||
|
modify the function `convert' so that it can translate a native device
|
||||||
|
name into the corresponding GRUB drive representation. !
|
||||||
|
|
||||||
|
* Add a command to run a GRUB script file. !!
|
||||||
|
|
||||||
|
* Add commands to manipulate the menu from the command-line interface. !
|
||||||
|
|
||||||
|
* Make symbolic links work for BSD FFS.
|
||||||
|
|
||||||
|
* Add indirect block support to the BSD FFS filesystem code, so files
|
||||||
|
larger than 16MB can be read.
|
||||||
|
|
||||||
|
* Fix-up FreeBSD, NetBSD (and OpenBSD ?) command-line boot
|
||||||
|
parameters.
|
||||||
|
|
||||||
|
* Support embedding a Stage 1.5 in the "bootloader" area of a FFS
|
||||||
|
partition. (We already have the code, but need an approval by an
|
||||||
|
expert before turning on the support. Any volunteers?)
|
||||||
|
|
||||||
|
* Support embedding a Stage 1.5 in the EXT2_BOOT_LOADER_INO of an ext2fs
|
||||||
|
partition, so that it won't be accidentally erased or modified by
|
||||||
|
the kernel.
|
||||||
|
|
||||||
|
* Add ISA PnP support.
|
||||||
|
|
||||||
|
* Add more filesystems support (NTFS, etc.)
|
||||||
|
|
||||||
|
* Add more remote console support (parallel and net).
|
||||||
|
|
||||||
|
* Add (real) RAID support.
|
||||||
|
|
||||||
|
? Add a partition naming syntax that means ``the first partition of
|
||||||
|
this type''. We need this for clean Hurd install floppies.
|
||||||
|
Nope. Improving the `find' command would solve this problem.
|
||||||
|
|
||||||
|
* Add CDROM-chainloading support. It would be enough to support only
|
||||||
|
BIOSes which have bootable-CDROM support (so you may use the "Bootable
|
||||||
|
CDROM" BIOS calls). It is not trivial to support BIOSes without the
|
||||||
|
capability to boot CDROM.
|
||||||
|
|
||||||
|
? Divide pxegrub into two parts, so the initial image doesn't exceed
|
||||||
|
the 32KB limit. I'm not sure if this is really necessary, because the
|
||||||
|
PXE standard just says that it is _recommended_ to improve the
|
||||||
|
modularity of a boot image. Obviously, this reason doesn't apply to
|
||||||
|
GRUB, as pxegrub is merely a secondary boot loader. So whether this
|
||||||
|
task should be done depends on if existing PXE ROMs support >32KB
|
||||||
|
images or not, after all.
|
||||||
+219
-329
@@ -1,48 +1,12 @@
|
|||||||
dnl Redefine AC_LANG_PROGRAM with a "-Wstrict-prototypes -Werror"-friendly
|
|
||||||
dnl version. Patch submitted to bug-autoconf in 2009-09-16.
|
|
||||||
m4_define([AC_LANG_PROGRAM(C)],
|
|
||||||
[$1
|
|
||||||
int
|
|
||||||
main (void)
|
|
||||||
{
|
|
||||||
dnl Do *not* indent the following line: there may be CPP directives.
|
|
||||||
dnl Don't move the `;' right after for the same reason.
|
|
||||||
$2
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Check whether target compiler is working
|
|
||||||
AC_DEFUN([grub_PROG_TARGET_CC],
|
|
||||||
[AC_MSG_CHECKING([whether target compiler is working])
|
|
||||||
AC_CACHE_VAL(grub_cv_prog_target_cc,
|
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
asm (".globl start; start:");
|
|
||||||
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 grub_ASM_USCORE checks if C symbols get an underscore after
|
||||||
dnl compiling to assembler.
|
dnl compiling to assembler.
|
||||||
dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
|
dnl Written by Pavel Roskin. Based on grub_ASM_EXT_C written by
|
||||||
dnl Erich Boleyn and modified by Yoshinori K. Okuji.
|
dnl Erich Boleyn and modified by OKUJI Yoshinori
|
||||||
AC_DEFUN([grub_ASM_USCORE],
|
AC_DEFUN([grub_ASM_USCORE],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_REQUIRE([AC_PROG_EGREP])
|
|
||||||
AC_MSG_CHECKING([if C symbols get an underscore after compilation])
|
AC_MSG_CHECKING([if C symbols get an underscore after compilation])
|
||||||
AC_CACHE_VAL(grub_cv_asm_uscore,
|
AC_CACHE_VAL(grub_cv_asm_uscore,
|
||||||
[cat > conftest.c <<\EOF
|
[cat > conftest.c <<\EOF
|
||||||
int func (int *);
|
|
||||||
int
|
int
|
||||||
func (int *list)
|
func (int *list)
|
||||||
{
|
{
|
||||||
@@ -57,16 +21,19 @@ else
|
|||||||
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
|
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $EGREP '(^|[^_[:alnum]])_func' conftest.s >/dev/null 2>&1; then
|
if grep _func conftest.s >/dev/null 2>&1; then
|
||||||
HAVE_ASM_USCORE=1
|
|
||||||
grub_cv_asm_uscore=yes
|
grub_cv_asm_uscore=yes
|
||||||
else
|
else
|
||||||
HAVE_ASM_USCORE=0
|
|
||||||
grub_cv_asm_uscore=no
|
grub_cv_asm_uscore=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f conftest*])
|
rm -f conftest*])
|
||||||
|
|
||||||
|
if test "x$grub_cv_asm_uscore" = xyes; then
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_ASM_USCORE], $grub_cv_asm_uscore,
|
||||||
|
[Define if C symbols get an underscore after compilation])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_RESULT([$grub_cv_asm_uscore])
|
AC_MSG_RESULT([$grub_cv_asm_uscore])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -74,10 +41,9 @@ AC_MSG_RESULT([$grub_cv_asm_uscore])
|
|||||||
dnl Some versions of `objcopy -O binary' vary their output depending
|
dnl Some versions of `objcopy -O binary' vary their output depending
|
||||||
dnl on the link address.
|
dnl on the link address.
|
||||||
AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
|
AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
|
||||||
[AC_MSG_CHECKING([whether ${TARGET_OBJCOPY} works for absolute addresses])
|
[AC_MSG_CHECKING([whether ${OBJCOPY} works for absolute addresses])
|
||||||
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
|
AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
|
||||||
[cat > conftest.c <<\EOF
|
[cat > conftest.c <<\EOF
|
||||||
void cmain (void);
|
|
||||||
void
|
void
|
||||||
cmain (void)
|
cmain (void)
|
||||||
{
|
{
|
||||||
@@ -90,14 +56,14 @@ else
|
|||||||
AC_MSG_ERROR([${CC-cc} cannot compile C source code])
|
AC_MSG_ERROR([${CC-cc} cannot compile C source code])
|
||||||
fi
|
fi
|
||||||
grub_cv_prog_objcopy_absolute=yes
|
grub_cv_prog_objcopy_absolute=yes
|
||||||
for link_addr in 0x2000 0x8000 0x7C00; do
|
for link_addr in 2000 8000 7C00; do
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$link_addr conftest.o -o conftest.exec]); then :
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
|
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
|
||||||
fi
|
fi
|
||||||
if AC_TRY_COMMAND([${TARGET_OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then :
|
if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([${TARGET_OBJCOPY-objcopy} cannot create binary files])
|
AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
|
||||||
fi
|
fi
|
||||||
if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then
|
if test ! -f conftest.old || AC_TRY_COMMAND([cmp -s conftest.old conftest]); then
|
||||||
mv -f conftest conftest.old
|
mv -f conftest conftest.old
|
||||||
@@ -107,106 +73,7 @@ for link_addr in 0x2000 0x8000 0x7C00; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f conftest*])
|
rm -f conftest*])
|
||||||
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])
|
AC_MSG_RESULT([$grub_cv_prog_objcopy_absolute])])
|
||||||
|
|
||||||
if test "x$grub_cv_prog_objcopy_absolute" = xno; then
|
|
||||||
AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
dnl 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 Mass confusion!
|
dnl Mass confusion!
|
||||||
dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
|
dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
|
||||||
@@ -220,55 +87,56 @@ dnl them.
|
|||||||
dnl
|
dnl
|
||||||
dnl We only support the newer versions, because the old versions cause
|
dnl We only support the newer versions, because the old versions cause
|
||||||
dnl major pain, by requiring manual assembly to get 16-bit instructions into
|
dnl major pain, by requiring manual assembly to get 16-bit instructions into
|
||||||
dnl asm files.
|
dnl stage1/stage1.S.
|
||||||
AC_DEFUN([grub_I386_ASM_ADDR32],
|
AC_DEFUN([grub_ASM_ADDR32],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_REQUIRE([grub_I386_ASM_PREFIX_REQUIREMENT])
|
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
|
||||||
AC_MSG_CHECKING([for .code16 addr32 assembler support])
|
AC_MSG_CHECKING([for .code16 addr32 assembler support])
|
||||||
AC_CACHE_VAL(grub_cv_i386_asm_addr32,
|
AC_CACHE_VAL(grub_cv_asm_addr32,
|
||||||
[cat > conftest.s.in <<\EOF
|
[cat > conftest.s.in <<\EOF
|
||||||
.code16
|
.code16
|
||||||
l1: @ADDR32@ movb %al, l1
|
l1: @ADDR32@ movb %al, l1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
|
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
|
||||||
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
|
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
|
||||||
else
|
else
|
||||||
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
|
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||||
grub_cv_i386_asm_addr32=yes
|
grub_cv_asm_addr32=yes
|
||||||
else
|
else
|
||||||
grub_cv_i386_asm_addr32=no
|
grub_cv_asm_addr32=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f conftest*])
|
rm -f conftest*])
|
||||||
|
|
||||||
AC_MSG_RESULT([$grub_cv_i386_asm_addr32])])
|
AC_MSG_RESULT([$grub_cv_asm_addr32])])
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl Later versions of GAS requires that addr32 and data32 prefixes
|
dnl Later versions of GAS requires that addr32 and data32 prefixes
|
||||||
dnl appear in the same lines as the instructions they modify, while
|
dnl appear in the same lines as the instructions they modify, while
|
||||||
dnl earlier versions requires that they appear in separate lines.
|
dnl earlier versions requires that they appear in separate lines.
|
||||||
AC_DEFUN([grub_I386_ASM_PREFIX_REQUIREMENT],
|
AC_DEFUN([grub_ASM_PREFIX_REQUIREMENT],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_MSG_CHECKING(dnl
|
AC_MSG_CHECKING(dnl
|
||||||
[whether addr32 must be in the same line as the instruction])
|
[whether addr32 must be in the same line as the instruction])
|
||||||
AC_CACHE_VAL(grub_cv_i386_asm_prefix_requirement,
|
AC_CACHE_VAL(grub_cv_asm_prefix_requirement,
|
||||||
[cat > conftest.s <<\EOF
|
[cat > conftest.s <<\EOF
|
||||||
.code16
|
.code16
|
||||||
l1: addr32 movb %al, l1
|
l1: addr32 movb %al, l1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||||
grub_cv_i386_asm_prefix_requirement=yes
|
grub_cv_asm_prefix_requirement=yes
|
||||||
else
|
else
|
||||||
grub_cv_i386_asm_prefix_requirement=no
|
grub_cv_asm_prefix_requirement=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f conftest*])
|
rm -f conftest*])
|
||||||
|
|
||||||
if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
|
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
|
||||||
grub_tmp_addr32="addr32"
|
grub_tmp_addr32="addr32"
|
||||||
grub_tmp_data32="data32"
|
grub_tmp_data32="data32"
|
||||||
else
|
else
|
||||||
@@ -276,201 +144,223 @@ else
|
|||||||
grub_tmp_data32="data32;"
|
grub_tmp_data32="data32;"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ADDR32=$grub_tmp_addr32
|
AC_DEFINE_UNQUOTED([ADDR32], $grub_tmp_addr32,
|
||||||
DATA32=$grub_tmp_data32
|
[Define it to \"addr32\" or \"addr32;\" to make GAS happy])
|
||||||
|
AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32,
|
||||||
|
[Define it to \"data32\" or \"data32;\" to make GAS happy])
|
||||||
|
|
||||||
AC_MSG_RESULT([$grub_cv_i386_asm_prefix_requirement])])
|
AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Older versions of GAS require that absolute indirect calls/jumps are
|
||||||
|
dnl not prefixed with `*', while later versions warn if not prefixed.
|
||||||
|
AC_DEFUN([grub_ASM_ABSOLUTE_WITHOUT_ASTERISK],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_MSG_CHECKING(dnl
|
||||||
|
[whether an absolute indirect call/jump must not be prefixed with an asterisk])
|
||||||
|
AC_CACHE_VAL(grub_cv_asm_absolute_without_asterisk,
|
||||||
|
[cat > conftest.s <<\EOF
|
||||||
|
lcall *(offset)
|
||||||
|
offset:
|
||||||
|
.long 0
|
||||||
|
.word 0
|
||||||
|
EOF
|
||||||
|
|
||||||
dnl Check what symbol is defined as a bss start symbol.
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
|
||||||
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
|
grub_cv_asm_absolute_without_asterisk=no
|
||||||
AC_DEFUN([grub_CHECK_BSS_START_SYMBOL],
|
else
|
||||||
|
grub_cv_asm_absolute_without_asterisk=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f conftest*])
|
||||||
|
|
||||||
|
if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then
|
||||||
|
AC_DEFINE(ABSOLUTE_WITHOUT_ASTERISK, 1, [Define if an absolute indirect call/jump must NOT be prefixed with `*'])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_asm_absolute_without_asterisk])])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl grub_CHECK_START_SYMBOL checks if start is automatically defined by
|
||||||
|
dnl the compiler.
|
||||||
|
dnl Written by OKUJI Yoshinori
|
||||||
|
AC_DEFUN([grub_CHECK_START_SYMBOL],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_MSG_CHECKING([if start is defined by the compiler])
|
||||||
|
AC_CACHE_VAL(grub_cv_check_start_symbol,
|
||||||
|
[AC_TRY_LINK([], [asm ("incl start")],
|
||||||
|
grub_cv_check_start_symbol=yes,
|
||||||
|
grub_cv_check_start_symbol=no)])
|
||||||
|
|
||||||
|
if test "x$grub_cv_check_start_symbol" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_START_SYMBOL, 1, [Define if start is defined])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_start_symbol])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl grub_CHECK_USCORE_START_SYMBOL checks if _start is automatically
|
||||||
|
dnl defined by the compiler.
|
||||||
|
dnl Written by OKUJI Yoshinori
|
||||||
|
AC_DEFUN([grub_CHECK_USCORE_START_SYMBOL],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_MSG_CHECKING([if _start is defined by the compiler])
|
||||||
|
AC_CACHE_VAL(grub_cv_check_uscore_start_symbol,
|
||||||
|
[AC_TRY_LINK([], [asm ("incl _start")],
|
||||||
|
grub_cv_check_uscore_start_symbol=yes,
|
||||||
|
grub_cv_check_uscore_start_symbol=no)])
|
||||||
|
|
||||||
|
if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_USCORE_START_SYMBOL, 1, [Define if _start is defined])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL checks if __bss_start is
|
||||||
|
dnl automatically defined by the compiler.
|
||||||
|
dnl Written by Michael Hohmoth.
|
||||||
|
AC_DEFUN([grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_MSG_CHECKING([if __bss_start is defined by the compiler])
|
AC_MSG_CHECKING([if __bss_start is defined by the compiler])
|
||||||
AC_CACHE_VAL(grub_cv_check_uscore_uscore_bss_start_symbol,
|
AC_CACHE_VAL(grub_cv_check_uscore_uscore_bss_start_symbol,
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
[AC_TRY_LINK([], [asm ("incl __bss_start")],
|
||||||
[[asm ("incl __bss_start")]])],
|
grub_cv_check_uscore_uscore_bss_start_symbol=yes,
|
||||||
[grub_cv_check_uscore_uscore_bss_start_symbol=yes],
|
grub_cv_check_uscore_uscore_bss_start_symbol=no)])
|
||||||
[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 ("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 ("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
|
if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
|
||||||
BSS_START_SYMBOL=__bss_start
|
AC_DEFINE(HAVE_USCORE_USCORE_BSS_START_SYMBOL, 1, [Define if __bss_start is defined])
|
||||||
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
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_uscore_uscore_bss_start_symbol])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Check what symbol is defined as an end symbol.
|
dnl
|
||||||
dnl Written by Yoshinori K. Okuji.
|
dnl grub_CHECK_EDATA_SYMBOL checks if edata is automatically defined by the
|
||||||
|
dnl compiler.
|
||||||
|
dnl Written by Michael Hohmuth.
|
||||||
|
AC_DEFUN([grub_CHECK_EDATA_SYMBOL],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_MSG_CHECKING([if edata is defined by the compiler])
|
||||||
|
AC_CACHE_VAL(grub_cv_check_edata_symbol,
|
||||||
|
[AC_TRY_LINK([], [asm ("incl edata")],
|
||||||
|
grub_cv_check_edata_symbol=yes,
|
||||||
|
grub_cv_check_edata_symbol=no)])
|
||||||
|
|
||||||
|
if test "x$grub_cv_check_edata_symbol" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_EDATA_SYMBOL, 1, [Define if edata is defined])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_edata_symbol])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl grub_CHECK_USCORE_EDATA_SYMBOL checks if _edata is automatically
|
||||||
|
dnl defined by the compiler.
|
||||||
|
dnl Written by Michael Hohmuth.
|
||||||
|
AC_DEFUN([grub_CHECK_USCORE_EDATA_SYMBOL],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_MSG_CHECKING([if _edata is defined by the compiler])
|
||||||
|
AC_CACHE_VAL(grub_cv_check_uscore_edata_symbol,
|
||||||
|
[AC_TRY_LINK([], [asm ("incl _edata")],
|
||||||
|
grub_cv_check_uscore_edata_symbol=yes,
|
||||||
|
grub_cv_check_uscore_edata_symbol=no)])
|
||||||
|
|
||||||
|
if test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_USCORE_EDATA_SYMBOL, 1, [Define if _edata is defined])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_uscore_edata_symbol])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl grub_CHECK_END_SYMBOL checks if end is automatically defined by the
|
||||||
|
dnl compiler.
|
||||||
|
dnl Written by OKUJI Yoshinori
|
||||||
AC_DEFUN([grub_CHECK_END_SYMBOL],
|
AC_DEFUN([grub_CHECK_END_SYMBOL],
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
AC_MSG_CHECKING([if end is defined by the compiler])
|
AC_MSG_CHECKING([if end is defined by the compiler])
|
||||||
AC_CACHE_VAL(grub_cv_check_end_symbol,
|
AC_CACHE_VAL(grub_cv_check_end_symbol,
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
[AC_TRY_LINK([], [asm ("incl end")],
|
||||||
[[asm ("incl end")]])],
|
grub_cv_check_end_symbol=yes,
|
||||||
[grub_cv_check_end_symbol=yes],
|
grub_cv_check_end_symbol=no)])
|
||||||
[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 ("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
|
if test "x$grub_cv_check_end_symbol" = xyes; then
|
||||||
END_SYMBOL=end
|
AC_DEFINE(HAVE_END_SYMBOL, 1, [Define if end is defined])
|
||||||
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
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$grub_cv_check_end_symbol])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
dnl Check if the C compiler supports `-fstack-protector'.
|
dnl grub_CHECK_USCORE_END_SYMBOL checks if _end is automatically defined
|
||||||
AC_DEFUN([grub_CHECK_STACK_PROTECTOR],[
|
dnl by the compiler.
|
||||||
[# Smashing stack protector.
|
dnl Written by OKUJI Yoshinori
|
||||||
ssp_possible=yes]
|
AC_DEFUN([grub_CHECK_USCORE_END_SYMBOL],
|
||||||
AC_MSG_CHECKING([whether `$CC' accepts `-fstack-protector'])
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
# Is this a reliable test case?
|
AC_MSG_CHECKING([if _end is defined by the compiler])
|
||||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
AC_CACHE_VAL(grub_cv_check_uscore_end_symbol,
|
||||||
void foo (void) { volatile char a[8]; a[3]; }
|
[AC_TRY_LINK([], [asm ("incl _end")],
|
||||||
]])])
|
grub_cv_check_uscore_end_symbol=yes,
|
||||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
grub_cv_check_uscore_end_symbol=no)])
|
||||||
# `ac_compile' like this correct, after all?
|
|
||||||
if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then]
|
if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_DEFINE(HAVE_USCORE_END_SYMBOL, 1, [Define if end is defined])
|
||||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
fi
|
||||||
rm -f conftest.s
|
|
||||||
else
|
AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])
|
||||||
ssp_possible=no]
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
[fi]
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Check if the C compiler supports `-mstack-arg-probe' (Cygwin).
|
dnl grub_DEFINE_FILE(MACRO_NAME, FILE_NAME, DESCRIPTION)
|
||||||
AC_DEFUN([grub_CHECK_STACK_ARG_PROBE],[
|
dnl grub_DEFINE_FILE defines a macro as the contents of a file safely.
|
||||||
[# Smashing stack arg probe.
|
dnl Replace some escape sequences, because autoconf doesn't handle them
|
||||||
sap_possible=yes]
|
dnl gracefully.
|
||||||
AC_MSG_CHECKING([whether `$CC' accepts `-mstack-arg-probe'])
|
dnl Written by OKUJI Yoshinori.
|
||||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
AC_DEFUN([grub_DEFINE_FILE],
|
||||||
void foo (void) { volatile char a[8]; a[3]; }
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
]])])
|
# Because early versions of GNU sed 3.x are too buggy, use a C program
|
||||||
[if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then]
|
# instead of shell commands. *sigh*
|
||||||
AC_MSG_RESULT([yes])
|
cat >conftest.c <<\EOF
|
||||||
[# Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
|
#include <stdio.h>
|
||||||
rm -f conftest.s
|
|
||||||
else
|
|
||||||
sap_possible=no]
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
[fi]
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check if ln can handle directories properly (mingw).
|
int
|
||||||
AC_DEFUN([grub_CHECK_LINK_DIR],[
|
main (void)
|
||||||
AC_MSG_CHECKING([whether ln can handle directories properly])
|
{
|
||||||
[mkdir testdir 2>/dev/null
|
int c;
|
||||||
case $srcdir in
|
|
||||||
[\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
|
while ((c = getchar ()) != EOF)
|
||||||
*) reldir=../$srcdir/include/grub/util ;;
|
{
|
||||||
esac
|
switch (c)
|
||||||
if ln -s $reldir testdir/util 2>/dev/null ; then]
|
{
|
||||||
AC_MSG_RESULT([yes])
|
case '\n':
|
||||||
[link_dir=yes
|
fputs ("\\n", stdout);
|
||||||
else
|
break;
|
||||||
link_dir=no]
|
case '\r':
|
||||||
AC_MSG_RESULT([no])
|
fputs ("\\r", stdout);
|
||||||
[fi
|
break;
|
||||||
rm -rf testdir]
|
case '\\':
|
||||||
])
|
fputs ("\\\\", stdout);
|
||||||
|
break;
|
||||||
|
case '"':
|
||||||
|
fputs ("\\\"", stdout);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
putchar (c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dnl Check if the C compiler supports `-fPIE'.
|
|
||||||
AC_DEFUN([grub_CHECK_PIE],[
|
|
||||||
[# Position independent executable.
|
|
||||||
pie_possible=yes]
|
|
||||||
AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default])
|
|
||||||
# Is this a reliable test case?
|
|
||||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
|
|
||||||
#ifdef __PIE__
|
|
||||||
int main() {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
EOF
|
||||||
#error NO __PIE__ DEFINED
|
|
||||||
#endif
|
|
||||||
]])])
|
|
||||||
|
|
||||||
[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling
|
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} conftest.c -o conftest]) && test -s conftest; then
|
||||||
# `ac_compile' like this correct, after all?
|
grub_tmp_value=`./conftest < "[$2]"`
|
||||||
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
|
else
|
||||||
pie_possible=no]
|
AC_MSG_ERROR([${CC-cc} failed to produce an executable file])
|
||||||
AC_MSG_RESULT([no])
|
fi
|
||||||
[fi]
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check if the C compiler supports `-fPIC'.
|
AC_DEFINE_UNQUOTED([$1], "$grub_tmp_value", [$3])
|
||||||
AC_DEFUN([grub_CHECK_PIC],[
|
rm -f conftest*
|
||||||
[# 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
|
|
||||||
])
|
])
|
||||||
+6
-81
@@ -1,84 +1,9 @@
|
|||||||
#! /usr/bin/env bash
|
#!/bin/sh
|
||||||
|
set -ex
|
||||||
|
|
||||||
set -e
|
aclocal
|
||||||
|
autoconf
|
||||||
|
autoheader
|
||||||
|
automake -a -c -f
|
||||||
|
|
||||||
export LC_COLLATE=C
|
|
||||||
unset LC_ALL
|
|
||||||
|
|
||||||
find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
|
|
||||||
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
|
|
||||||
|
|
||||||
echo "Importing unicode..."
|
|
||||||
python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
|
|
||||||
|
|
||||||
echo "Importing libgcrypt..."
|
|
||||||
python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
|
|
||||||
sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
|
|
||||||
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
|
|
||||||
ln -s ../../../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
|
|
||||||
ln -s 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,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
|
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2004-10-12.08
|
||||||
|
|
||||||
|
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand `-c -o'.
|
||||||
|
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file `INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
eat=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||||
|
# So we strip `-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no `-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# `.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-end: "$"
|
||||||
|
# End:
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
# -*- makefile -*-
|
|
||||||
|
|
||||||
CFLAGS_PLATFORM=
|
|
||||||
|
|
||||||
export LC_COLLATE := C
|
|
||||||
unexport LC_ALL
|
|
||||||
|
|
||||||
# Platform specific options
|
|
||||||
if COND_sparc64_ieee1275
|
|
||||||
CFLAGS_PLATFORM += -mno-app-regs
|
|
||||||
LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax
|
|
||||||
endif
|
|
||||||
if COND_arm
|
|
||||||
CFLAGS_PLATFORM += -mthumb-interwork
|
|
||||||
CCASFLAGS_PLATFORM = -mthumb-interwork
|
|
||||||
LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
|
|
||||||
endif
|
|
||||||
if COND_arm64
|
|
||||||
CFLAGS_PLATFORM += -mcmodel=large
|
|
||||||
endif
|
|
||||||
|
|
||||||
#FIXME: discover and check XEN headers
|
|
||||||
CPPFLAGS_XEN = -I/usr/include
|
|
||||||
|
|
||||||
# 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/include
|
|
||||||
CPPFLAGS_DEFAULT += -I$(top_srcdir)/grub-core/lib/libgcrypt-grub/src/
|
|
||||||
CCASFLAGS_DEFAULT = $(CPPFLAGS_DEFAULT) -DASM_FILE=1
|
|
||||||
BUILD_CPPFLAGS += $(CPPFLAGS_DEFAULT)
|
|
||||||
|
|
||||||
LDADD_KERNEL = $(TARGET_LIBGCC)
|
|
||||||
|
|
||||||
CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
|
||||||
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) $(TARGET_LDFLAGS_STATIC_LIBGCC)
|
|
||||||
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
|
|
||||||
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
|
||||||
if COND_CYGWIN
|
|
||||||
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version
|
|
||||||
else
|
|
||||||
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .note.gnu.gold-version
|
|
||||||
endif
|
|
||||||
|
|
||||||
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
|
||||||
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
|
|
||||||
CPPFLAGS_MODULE = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
|
||||||
CCASFLAGS_MODULE = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
|
||||||
|
|
||||||
CFLAGS_IMAGE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -fno-builtin
|
|
||||||
LDFLAGS_IMAGE = $(LDFLAGS_CPU) $(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,112 +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 += 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-pc-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 += $(shell find $(top_srcdir)/grub-core/gnulib -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-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
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
/* Linker script to create grub .img files on Cygwin. */
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
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 = . ;
|
|
||||||
}
|
|
||||||
.stab :
|
|
||||||
{
|
|
||||||
*(.stab)
|
|
||||||
}
|
|
||||||
.stabstr :
|
|
||||||
{
|
|
||||||
*(.stabstr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT("__rdata_end__"=="edata", ".pdata not empty")
|
|
||||||
ASSERT("__bss_end__" =="end" , ".edata not empty")
|
|
||||||
|
|
||||||
+98
-60
@@ -1,68 +1,106 @@
|
|||||||
#undef _LARGEFILE_SOURCE
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
#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 if an absolute indirect call/jump must NOT be prefixed with `*' */
|
||||||
|
#undef ABSOLUTE_WITHOUT_ASTERISK
|
||||||
|
|
||||||
/* Define to 1 to enable disk cache statistics. */
|
/* Define it to \"addr32\" or \"addr32;\" to make GAS happy */
|
||||||
#define DISK_CACHE_STATS @DISK_CACHE_STATS@
|
#undef ADDR32
|
||||||
#define BOOT_TIME_STATS @BOOT_TIME_STATS@
|
|
||||||
|
/* Define if you don't want to pass the mem= option to Linux */
|
||||||
|
#undef AUTO_LINUX_MEM_OPT
|
||||||
|
|
||||||
|
/* Define it to \"data32\" or \"data32;\" to make GAS happy */
|
||||||
|
#undef DATA32
|
||||||
|
|
||||||
|
/* Define if C symbols get an underscore after compilation */
|
||||||
|
#undef HAVE_ASM_USCORE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <curses.h> header file. */
|
||||||
|
#undef HAVE_CURSES_H
|
||||||
|
|
||||||
|
/* Define if edata is defined */
|
||||||
|
#undef HAVE_EDATA_SYMBOL
|
||||||
|
|
||||||
|
/* Define if end is defined */
|
||||||
|
#undef HAVE_END_SYMBOL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define if you have a curses library */
|
||||||
|
#undef HAVE_LIBCURSES
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ncurses/curses.h> header file. */
|
||||||
|
#undef HAVE_NCURSES_CURSES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||||
|
#undef HAVE_NCURSES_H
|
||||||
|
|
||||||
|
/* Define if opendisk() in -lutil can be used */
|
||||||
|
#undef HAVE_OPENDISK
|
||||||
|
|
||||||
|
/* Define if start is defined */
|
||||||
|
#undef HAVE_START_SYMBOL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define if _edata is defined */
|
||||||
|
#undef HAVE_USCORE_EDATA_SYMBOL
|
||||||
|
|
||||||
|
/* Define if end is defined */
|
||||||
|
#undef HAVE_USCORE_END_SYMBOL
|
||||||
|
|
||||||
|
/* Define if _start is defined */
|
||||||
|
#undef HAVE_USCORE_START_SYMBOL
|
||||||
|
|
||||||
|
/* Define if __bss_start is defined */
|
||||||
|
#undef HAVE_USCORE_USCORE_BSS_START_SYMBOL
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#undef PACKAGE
|
||||||
|
|
||||||
#if defined (GRUB_BUILD)
|
|
||||||
#undef ENABLE_NLS
|
|
||||||
#define BUILD_SIZEOF_LONG @BUILD_SIZEOF_LONG@
|
|
||||||
#define BUILD_SIZEOF_VOID_P @BUILD_SIZEOF_VOID_P@
|
|
||||||
#if defined __APPLE__
|
|
||||||
# if defined __BIG_ENDIAN__
|
|
||||||
# define BUILD_WORDS_BIGENDIAN 1
|
|
||||||
# else
|
|
||||||
# define BUILD_WORDS_BIGENDIAN 0
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
#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 \"addr32\" or \"addr32;\" to make GAS happy. */
|
|
||||||
#define ADDR32 @ADDR32@
|
|
||||||
/* Define it to \"data32\" or \"data32;\" to make GAS happy. */
|
|
||||||
#define DATA32 @DATA32@
|
|
||||||
/* 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 to the address where bug reports for this package should be sent. */
|
||||||
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
#undef PACKAGE_BUGREPORT
|
||||||
/* Default boot directory name" */
|
|
||||||
#define GRUB_BOOT_DIR_NAME "@bootdirname@"
|
|
||||||
/* Default grub directory name */
|
|
||||||
#define GRUB_DIR_NAME "@grubdirname@"
|
|
||||||
/* Define to 1 if GCC generates calls to __register_frame_info(). */
|
|
||||||
#define NEED_REGISTER_FRAME_INFO @NEED_REGISTER_FRAME_INFO@
|
|
||||||
|
|
||||||
#define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
|
/* Define to the full name of this package. */
|
||||||
#define GRUB_PLATFORM "@GRUB_PLATFORM@"
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
#define RE_ENABLE_I18N 1
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
#define _GNU_SOURCE 1
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
#endif
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define if there is user specified preset menu string */
|
||||||
|
#undef PRESET_MENU_STRING
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Version number of package */
|
||||||
|
#undef VERSION
|
||||||
+604
-1663
File diff suppressed because it is too large.
Load diff
@@ -1,3 +0,0 @@
|
|||||||
if test -f (cbfsdisk)/etc/grub.cfg; then
|
|
||||||
source (cbfsdisk)/etc/grub.cfg
|
|
||||||
fi
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
*.info*
|
||||||
+41
-5
@@ -1,9 +1,45 @@
|
|||||||
AUTOMAKE_OPTIONS = subdir-objects
|
info_TEXINFOS = grub.texi
|
||||||
|
grub_TEXINFOS = internals.texi fdl.texi
|
||||||
|
man_MANS = grub.8 grub-install.8 grub-md5-crypt.8 grub-terminfo.8
|
||||||
|
HELP2MAN = help2man
|
||||||
|
SRC2TEXI = src2texi
|
||||||
|
noinst_SCRIPTS = $(HELP2MAN) $(SRC2TEXI)
|
||||||
|
|
||||||
# AM_MAKEINFOFLAGS = --no-split --no-validate
|
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS)
|
||||||
info_TEXINFOS = grub.texi grub-dev.texi
|
CLEANFILES = $(noinst_PROGRAMS)
|
||||||
grub_TEXINFOS = fdl.texi
|
|
||||||
|
|
||||||
EXTRA_DIST = font_char_metrics.png font_char_metrics.txt
|
# Cancel the rule %.texi -> %. This rule may confuse make to determine
|
||||||
|
# the dependecies.
|
||||||
|
.texi:
|
||||||
|
|
||||||
|
%.c.texi: %.c $(srcdir)/$(SRC2TEXI)
|
||||||
|
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||||
|
|
||||||
|
%.h.texi: %.h $(srcdir)/$(SRC2TEXI)
|
||||||
|
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||||
|
|
||||||
|
%.S.texi: %.S $(srcdir)/$(SRC2TEXI)
|
||||||
|
$(SHELL) $(srcdir)/$(SRC2TEXI) $(srcdir) $< $@
|
||||||
|
|
||||||
|
if MAINTAINER_MODE
|
||||||
|
$(srcdir)/grub.8: ../grub/grub $(srcdir)/$(HELP2MAN)
|
||||||
|
$(PERL) $(srcdir)/$(HELP2MAN) --name="the grub shell" \
|
||||||
|
--section=8 --output=$@ $<
|
||||||
|
|
||||||
|
$(srcdir)/grub-install.8: ../util/grub-install $(srcdir)/$(HELP2MAN)
|
||||||
|
chmod 755 $<
|
||||||
|
$(PERL) $(srcdir)/$(HELP2MAN) --name="install GRUB on your drive" \
|
||||||
|
--section=8 --output=$@ $<
|
||||||
|
|
||||||
|
$(srcdir)/grub-md5-crypt.8: ../util/grub-md5-crypt $(srcdir)/$(HELP2MAN)
|
||||||
|
chmod 755 $<
|
||||||
|
$(PERL) $(srcdir)/$(HELP2MAN) \
|
||||||
|
--name="Encrypt a password in MD5 format" \
|
||||||
|
--section=8 --output=$@ $<
|
||||||
|
|
||||||
|
$(srcdir)/grub-terminfo.8: ../util/grub-terminfo $(srcdir)/$(HELP2MAN)
|
||||||
|
chmod 755 $<
|
||||||
|
$(PERL) $(srcdir)/$(HELP2MAN) \
|
||||||
|
--name="Generate a terminfo command from a terminfo name" \
|
||||||
|
--section=8 --output=$@ $<
|
||||||
|
endif
|
||||||
@@ -1,244 +0,0 @@
|
|||||||
# Sample GRUB script to autodetect operating systems
|
|
||||||
#
|
|
||||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# GRUB is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# GRUB is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
function pathname { regexp -s 2:"$2" '^(\(.*\))?(/.*)$' "$1"; }
|
|
||||||
function devname { regexp -s "$2" '^(\(.*\)).*$' "$1"; }
|
|
||||||
|
|
||||||
function loopback_iso_entry {
|
|
||||||
realdev="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
if test -f /boot/grub/loopback.cfg; then
|
|
||||||
cfgpath=/boot/grub/loopback.cfg
|
|
||||||
elif test -f /grub/loopback.cfg; then
|
|
||||||
cfgpath=/grub/loopback.cfg
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo loopback.cfg $isopath: yes
|
|
||||||
menuentry "Boot GRUB Loopback Config from ${realdev}${isopath}" "$realdev" "$isopath" "$cfgpath" {
|
|
||||||
set device="$2"
|
|
||||||
set iso_path="$3"
|
|
||||||
set cfg_path="$4"
|
|
||||||
|
|
||||||
export iso_path
|
|
||||||
loopback loopdev_cfg "${device}${iso_path}"
|
|
||||||
set root=(loopdev_cfg)
|
|
||||||
configfile $cfg_path
|
|
||||||
loopback -d loopdev_cfg
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function grml_iso_entry {
|
|
||||||
realdev="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
result=1
|
|
||||||
for dir in /boot/grml /boot/grmlsmall /boot/grmlmedium; do
|
|
||||||
if ! test -f ${dir}/linux26 -a -f ${dir}/initrd.gz; then continue; fi
|
|
||||||
|
|
||||||
echo grml $isopath: yes
|
|
||||||
result=0
|
|
||||||
menuentry "GRML Linux from ${realdev}${isopath}" \
|
|
||||||
"$realdev" "$isopath" "$dir" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
set grmldir="$4"
|
|
||||||
|
|
||||||
loopback loopdev_grml "${device}${isopath}"
|
|
||||||
set root=(loopdev_grml)
|
|
||||||
linux $grmldir/linux26 findiso="$isopath" apm=power-off quiet \
|
|
||||||
boot=live nomce
|
|
||||||
initrd $grmldir/initrd.gz
|
|
||||||
loopback -d loopdev_grml
|
|
||||||
}
|
|
||||||
done
|
|
||||||
return $result
|
|
||||||
}
|
|
||||||
|
|
||||||
function pmagic_iso_entry {
|
|
||||||
realdev="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
if ! test -f /pmagic/bzImage -a -f /pmagic/initramfs; then return 1; fi
|
|
||||||
|
|
||||||
echo pmagic $isopath: yes
|
|
||||||
menuentry "Parted Magic from ${realdev}${isopath}" "$realdev" "$isopath" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
|
|
||||||
loopback loopdev_pmagic "${device}${isopath}"
|
|
||||||
set root=(loopdev_pmagic)
|
|
||||||
linux /pmagic/bzImage iso_filename="$isopath" edd=off noapic \
|
|
||||||
load_ramdisk=1 prompt_ramdisk=0 rw sleep=10 loglevel=0 \
|
|
||||||
keymap=$langcode
|
|
||||||
initrd /pmagic/initramfs
|
|
||||||
loopback -d loopdev_pmagic
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function sidux_iso_entry {
|
|
||||||
realdev="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
result=1
|
|
||||||
for kernel in /boot/vmlinuz-*-sidux-*; do
|
|
||||||
if ! test -f "$kernel"; then continue; fi
|
|
||||||
regexp -s 1:v1 -s 2:v2 '/boot/vmlinuz-(.*)-sidux-(.*)' "$kernel"
|
|
||||||
|
|
||||||
initrd="/boot/initrd.img-$v1-sidux-$v2"
|
|
||||||
if ! test -f "$initrd"; then continue; fi
|
|
||||||
|
|
||||||
result=0
|
|
||||||
echo sidux $isopath: yes
|
|
||||||
menuentry "Sidux vmlinux-$v1-sidux-$v2 from ${realdev}${isopath}" "$realdev" "$isopath" "$kernel" "$initrd" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
set kernel="$4"
|
|
||||||
set initrd="$5"
|
|
||||||
|
|
||||||
loopback loopdev_sidux "${device}${isopath}"
|
|
||||||
set root=(loopdev_sidux)
|
|
||||||
linux $kernel fromiso=$isopath boot=fll quiet
|
|
||||||
initrd $initrd
|
|
||||||
loopback -d loopdev_sidux
|
|
||||||
}
|
|
||||||
done
|
|
||||||
return $result
|
|
||||||
}
|
|
||||||
|
|
||||||
function slax_iso_entry {
|
|
||||||
realdev="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
if ! test -f /boot/vmlinuz -a -f /boot/initrd.gz; then return 1; fi
|
|
||||||
|
|
||||||
echo slax $isopath: yes
|
|
||||||
menuentry "Slax Linux from ${realdev}${isopath}" "$realdev" "$isopath" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
|
|
||||||
loopback loopdev_slax "${device}${isopath}"
|
|
||||||
set root=(loopdev_slax)
|
|
||||||
linux /boot/vmlinuz from=$isopath ramdisk_size=6666 root=/dev/ram0 rw
|
|
||||||
initrd /boot/initrd.gz
|
|
||||||
loopback -d loopdev_slax
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function tinycore_iso_entry {
|
|
||||||
realpath="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
if ! test -f /boot/bzImage -a -f /boot/tinycore.gz; then return 1; fi
|
|
||||||
|
|
||||||
echo tinycore $isopath: yes
|
|
||||||
menuentry "Tinycore Linux from ${realdev}${isopath}" "$realdev" "$isopath" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
|
|
||||||
loopback loopdev_tiny "${device}${isopath}"
|
|
||||||
set root=(loopdev_tiny)
|
|
||||||
linux /boot/bzImage
|
|
||||||
initrd /boot/tinycore.gz
|
|
||||||
loopback -d loopdev_tiny
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function casper_iso_entry {
|
|
||||||
realpath="$1"
|
|
||||||
isopath="$2"
|
|
||||||
loopdev="$3"
|
|
||||||
|
|
||||||
if ! test -f /casper/vmlinuz; then return 1; fi
|
|
||||||
initrd=
|
|
||||||
for f in /casper/initrd.*z; do
|
|
||||||
if ! test -f "$f"; then continue; fi
|
|
||||||
pathname "$f" initrd
|
|
||||||
done
|
|
||||||
if test -z "$initrd"; then return 1; fi
|
|
||||||
|
|
||||||
echo casper $isopath: yes
|
|
||||||
menuentry "Casper based Linux from ${realdev}${isopath}" "$realdev" "$isopath" "$initrd" {
|
|
||||||
set device="$2"
|
|
||||||
set isopath="$3"
|
|
||||||
set initrd="$4"
|
|
||||||
|
|
||||||
loopback loopdev_casper "${device}${isopath}"
|
|
||||||
set root=(loopdev_casper)
|
|
||||||
linux /casper/vmlinuz boot=casper iso-scan/filename="$isopath" quiet splash noprompt keyb="$langcode" \
|
|
||||||
debian-installer/language="$langcode" console-setup/layoutcode?="$langcode" --
|
|
||||||
initrd $initrd
|
|
||||||
loopback -d loopdev_casper
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
function scan_isos {
|
|
||||||
isodirs="$1"
|
|
||||||
|
|
||||||
for dev in (*); do
|
|
||||||
for dir in $isodirs; do
|
|
||||||
for file in ${dev}${dir}/*.iso ${dev}${dir}/*.ISO; do
|
|
||||||
if ! test -f "$file"; then continue; fi
|
|
||||||
|
|
||||||
pathname $file isopath
|
|
||||||
if test -z "$dev" -o -z "$isopath"; then continue; fi
|
|
||||||
|
|
||||||
if ! loopback loopdev_scan "$file"; then continue; fi
|
|
||||||
saved_root=$root
|
|
||||||
set root=(loopdev_scan)
|
|
||||||
|
|
||||||
if loopback_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif grml_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif pmagic_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif sidux_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif slax_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif tinycore_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
elif casper_iso_entry $dev $isopath (loopdev_scan); then true;
|
|
||||||
else true; fi
|
|
||||||
|
|
||||||
set root=$saved_root
|
|
||||||
loopback -d loopdev_scan
|
|
||||||
done
|
|
||||||
done
|
|
||||||
done
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# XXX Remove later
|
|
||||||
insmod serial
|
|
||||||
serial
|
|
||||||
terminal_output --append serial
|
|
||||||
# terminal_input --append serial
|
|
||||||
|
|
||||||
langcode="$lang"
|
|
||||||
|
|
||||||
insmod regexp
|
|
||||||
scan_isos /iso /boot/iso
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@@ -1 +0,0 @@
|
|||||||
Please fill this in.
|
|
||||||
-1968
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,52 @@
|
|||||||
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||||
|
.TH GRUB-INSTALL "8" "June 2006" "grub-install (GNU GRUB 0.97)" FSF
|
||||||
|
.SH NAME
|
||||||
|
grub-install \- install GRUB on your drive
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B grub-install
|
||||||
|
[\fIOPTION\fR] \fIinstall_device\fR
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Install GRUB on your drive.
|
||||||
|
.TP
|
||||||
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
|
print this message and exit
|
||||||
|
.TP
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
|
print the version information and exit
|
||||||
|
.TP
|
||||||
|
\fB\-\-root\-directory\fR=\fIDIR\fR
|
||||||
|
install GRUB images under the directory DIR
|
||||||
|
instead of the root directory
|
||||||
|
.TP
|
||||||
|
\fB\-\-grub\-shell\fR=\fIFILE\fR
|
||||||
|
use FILE as the grub shell
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-floppy\fR
|
||||||
|
do not probe any floppy drive
|
||||||
|
.TP
|
||||||
|
\fB\-\-force\-lba\fR
|
||||||
|
force GRUB to use LBA mode even for a buggy
|
||||||
|
BIOS
|
||||||
|
.TP
|
||||||
|
\fB\-\-recheck\fR
|
||||||
|
probe a device map even if it already exists
|
||||||
|
.PP
|
||||||
|
INSTALL_DEVICE can be a GRUB device name or a system device filename.
|
||||||
|
.PP
|
||||||
|
grub-install copies GRUB images into the DIR/boot directory specfied by
|
||||||
|
\fB\-\-root\-directory\fR, and uses the grub shell to install grub into the boot
|
||||||
|
sector.
|
||||||
|
.SH "REPORTING BUGS"
|
||||||
|
Report bugs to <bug-grub@gnu.org>.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
The full documentation for
|
||||||
|
.B grub-install
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B grub-install
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info grub-install
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||||
|
.TH GRUB-MD5-CRYPT "8" "June 2006" "grub-md5-crypt (GNU GRUB )" FSF
|
||||||
|
.SH NAME
|
||||||
|
grub-md5-crypt \- Encrypt a password in MD5 format
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B grub-md5-crypt
|
||||||
|
[\fIOPTION\fR]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Encrypt a password in MD5 format.
|
||||||
|
.TP
|
||||||
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
|
print this message and exit
|
||||||
|
.TP
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
|
print the version information and exit
|
||||||
|
.TP
|
||||||
|
\fB\-\-grub\-shell\fR=\fIFILE\fR
|
||||||
|
use FILE as the grub shell
|
||||||
|
.SH "REPORTING BUGS"
|
||||||
|
Report bugs to <bug-grub@gnu.org>.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
The full documentation for
|
||||||
|
.B grub-md5-crypt
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B grub-md5-crypt
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info grub-md5-crypt
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||||
|
.TH GRUB-TERMINFO "8" "June 2006" "grub-terminfo (GNU GRUB 0.97)" FSF
|
||||||
|
.SH NAME
|
||||||
|
grub-terminfo \- Generate a terminfo command from a terminfo name
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B grub-terminfo
|
||||||
|
\fITERMNAME\fR
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Generate a terminfo command from a terminfo name.
|
||||||
|
.TP
|
||||||
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
|
print this message and exit
|
||||||
|
.TP
|
||||||
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
|
print the version information and exit
|
||||||
|
.SH "REPORTING BUGS"
|
||||||
|
Report bugs to <bug-grub@gnu.org>.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
The full documentation for
|
||||||
|
.B grub-terminfo
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B grub-terminfo
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info grub-terminfo
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
|
||||||
|
.TH GRUB "8" "June 2006" "grub (GNU GRUB 0.97)" FSF
|
||||||
|
.SH NAME
|
||||||
|
grub \- the grub shell
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B grub
|
||||||
|
[\fIOPTION\fR]...
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Enter the GRand Unified Bootloader command shell.
|
||||||
|
.TP
|
||||||
|
\fB\-\-batch\fR
|
||||||
|
turn on batch mode for non-interactive use
|
||||||
|
.TP
|
||||||
|
\fB\-\-boot\-drive\fR=\fIDRIVE\fR
|
||||||
|
specify stage2 boot_drive [default=0x0]
|
||||||
|
.TP
|
||||||
|
\fB\-\-config\-file\fR=\fIFILE\fR
|
||||||
|
specify stage2 config_file [default=/boot/grub/menu.lst]
|
||||||
|
.TP
|
||||||
|
\fB\-\-device\-map\fR=\fIFILE\fR
|
||||||
|
use the device map file FILE
|
||||||
|
.TP
|
||||||
|
\fB\-\-help\fR
|
||||||
|
display this message and exit
|
||||||
|
.TP
|
||||||
|
\fB\-\-hold\fR
|
||||||
|
wait until a debugger will attach
|
||||||
|
.TP
|
||||||
|
\fB\-\-install\-partition\fR=\fIPAR\fR
|
||||||
|
specify stage2 install_partition [default=0x20000]
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-config\-file\fR
|
||||||
|
do not use the config file
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-curses\fR
|
||||||
|
do not use curses
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-floppy\fR
|
||||||
|
do not probe any floppy drive
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-pager\fR
|
||||||
|
do not use internal pager
|
||||||
|
.TP
|
||||||
|
\fB\-\-preset\-menu\fR
|
||||||
|
use the preset menu
|
||||||
|
.TP
|
||||||
|
\fB\-\-probe\-second\-floppy\fR
|
||||||
|
probe the second floppy drive
|
||||||
|
.TP
|
||||||
|
\fB\-\-read\-only\fR
|
||||||
|
do not write anything to devices
|
||||||
|
.TP
|
||||||
|
\fB\-\-verbose\fR
|
||||||
|
print verbose messages
|
||||||
|
.TP
|
||||||
|
\fB\-\-version\fR
|
||||||
|
print version information and exit
|
||||||
|
.SH "REPORTING BUGS"
|
||||||
|
Report bugs to <bug-grub@gnu.org>.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
The full documentation for
|
||||||
|
.B grub
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B grub
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info grub
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
#
|
|
||||||
# Sample GRUB configuration file
|
|
||||||
#
|
|
||||||
|
|
||||||
# Boot automatically after 30 secs.
|
|
||||||
set timeout=30
|
|
||||||
|
|
||||||
# By default, boot the GNU/Linux
|
|
||||||
set default=gnulinux
|
|
||||||
|
|
||||||
# Fallback to GNU/Hurd.
|
|
||||||
set fallback=gnuhurd
|
|
||||||
|
|
||||||
# For booting GNU/Linux
|
|
||||||
menuentry "GNU/Linux" --id gnulinux {
|
|
||||||
set root=(hd0,msdos1)
|
|
||||||
linux /vmlinuz root=/dev/sda1
|
|
||||||
initrd /initrd.img
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting GNU/Hurd
|
|
||||||
menuentry "GNU (aka GNU/Hurd)" --id gnuhurd {
|
|
||||||
set root=(hd0,msdos1)
|
|
||||||
multiboot /boot/gnumach.gz root=device:hd0s1
|
|
||||||
module /hurd/ext2fs.static ext2fs --readonly \
|
|
||||||
--multiboot-command-line='${kernel-command-line}' \
|
|
||||||
--host-priv-port='${host-port}' \
|
|
||||||
--device-master-port='${device-port}' \
|
|
||||||
--exec-server-task='${exec-task}' -T typed '${root}' \
|
|
||||||
'$(task-create)' '$(task-resume)'
|
|
||||||
module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting FreeBSD
|
|
||||||
menuentry "FreeBSD (or GNU/kFreeBSD), direct boot" {
|
|
||||||
set root=(hd0,msdos1,bsd1)
|
|
||||||
kfreebsd /boot/kernel/kernel
|
|
||||||
kfreebsd_loadenv /boot/device.hints
|
|
||||||
kfreebsd_module /boot/splash.bmp type=splash_image_data
|
|
||||||
set kFreeBSD.vfs.root.mountfrom=ufs:ad0s1a
|
|
||||||
}
|
|
||||||
|
|
||||||
menuentry "FreeBSD (or GNU/kFreeBSD), via /boot/loader" {
|
|
||||||
set root=(hd0,msdos1,bsd1)
|
|
||||||
kfreebsd /boot/loader
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting NetBSD
|
|
||||||
menuentry "NetBSD" {
|
|
||||||
set root=(hd0,netbsd1)
|
|
||||||
knetbsd /netbsd
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting OpenBSD
|
|
||||||
menuentry "OpenBSD" {
|
|
||||||
set root=(hd0,openbsd1)
|
|
||||||
kopenbsd /bsd
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting Microsoft Windows
|
|
||||||
menuentry "Microsoft Windows" {
|
|
||||||
set root=(hd0,msdos1)
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
|
|
||||||
# For booting Memtest86+
|
|
||||||
menuentry "Memtest86+" {
|
|
||||||
set root=(hd0,1)
|
|
||||||
linux16 /memtest86+.bin
|
|
||||||
}
|
|
||||||
|
|
||||||
# Change the colors.
|
|
||||||
menuentry "Change the colors" {
|
|
||||||
set menu_color_normal=light-green/brown
|
|
||||||
set menu_color_highlight=red/blue
|
|
||||||
}
|
|
||||||
+2424
-4952
File diff suppressed because it is too large.
Load diff
+517
@@ -0,0 +1,517 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# Generate a short man page from --help and --version output.
|
||||||
|
# Copyright © 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
# Written by Brendan O'Dea <bod@compusol.com.au>
|
||||||
|
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||||
|
|
||||||
|
use 5.004;
|
||||||
|
use strict;
|
||||||
|
use Getopt::Long;
|
||||||
|
use Text::Tabs qw(expand);
|
||||||
|
use POSIX qw(strftime setlocale LC_TIME);
|
||||||
|
|
||||||
|
my $this_program = 'help2man';
|
||||||
|
my $this_version = '1.23';
|
||||||
|
my $version_info = <<EOT;
|
||||||
|
GNU $this_program $this_version
|
||||||
|
|
||||||
|
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
This is free software; see the source for copying conditions. There is NO
|
||||||
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
Written by Brendan O'Dea <bod\@compusol.com.au>
|
||||||
|
EOT
|
||||||
|
|
||||||
|
my $help_info = <<EOT;
|
||||||
|
`$this_program' generates a man page out of `--help' and `--version' output.
|
||||||
|
|
||||||
|
Usage: $this_program [OPTION]... EXECUTABLE
|
||||||
|
|
||||||
|
-n, --name=STRING use `STRING' as the description for the NAME paragraph
|
||||||
|
-s, --section=SECTION use `SECTION' as the section for the man page
|
||||||
|
-i, --include=FILE include material from `FILE'
|
||||||
|
-I, --opt-include=FILE include material from `FILE' if it exists
|
||||||
|
-o, --output=FILE send output to `FILE'
|
||||||
|
-N, --no-info suppress pointer to Texinfo manual
|
||||||
|
--help print this help, then exit
|
||||||
|
--version print version number, then exit
|
||||||
|
|
||||||
|
EXECUTABLE should accept `--help' and `--version' options.
|
||||||
|
|
||||||
|
Report bugs to <bug-help2man\@gnu.org>.
|
||||||
|
EOT
|
||||||
|
|
||||||
|
my $section = 1;
|
||||||
|
my ($opt_name, @opt_include, $opt_output, $opt_no_info);
|
||||||
|
|
||||||
|
# Parse options.
|
||||||
|
Getopt::Long::config('bundling');
|
||||||
|
GetOptions (
|
||||||
|
'n|name=s' => \$opt_name,
|
||||||
|
's|section=s' => \$section,
|
||||||
|
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
|
||||||
|
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
|
||||||
|
'o|output=s' => \$opt_output,
|
||||||
|
'N|no-info' => \$opt_no_info,
|
||||||
|
help => sub { print $help_info; exit },
|
||||||
|
version => sub { print $version_info; exit },
|
||||||
|
) or die $help_info;
|
||||||
|
|
||||||
|
die $help_info unless @ARGV == 1;
|
||||||
|
|
||||||
|
my %include = ();
|
||||||
|
my %append = ();
|
||||||
|
my @include = (); # retain order given in include file
|
||||||
|
|
||||||
|
# Provide replacement `quote-regex' operator for pre-5.005.
|
||||||
|
BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 }
|
||||||
|
|
||||||
|
# Process include file (if given). Format is:
|
||||||
|
#
|
||||||
|
# [section name]
|
||||||
|
# verbatim text
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /pattern/
|
||||||
|
# verbatim text
|
||||||
|
#
|
||||||
|
|
||||||
|
for (@opt_include)
|
||||||
|
{
|
||||||
|
my ($inc, $required) = @$_;
|
||||||
|
|
||||||
|
next unless -f $inc or $required;
|
||||||
|
die "$this_program: can't open `$inc' ($!)\n"
|
||||||
|
unless open INC, $inc;
|
||||||
|
|
||||||
|
my $key;
|
||||||
|
my $hash = \%include;
|
||||||
|
|
||||||
|
while (<INC>)
|
||||||
|
{
|
||||||
|
# [section]
|
||||||
|
if (/^\[([^]]+)\]/)
|
||||||
|
{
|
||||||
|
$key = uc $1;
|
||||||
|
$key =~ s/^\s+//;
|
||||||
|
$key =~ s/\s+$//;
|
||||||
|
$hash = \%include;
|
||||||
|
push @include, $key unless $include{$key};
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# /pattern/
|
||||||
|
if (m!^/(.*)/([ims]*)!)
|
||||||
|
{
|
||||||
|
my $pat = $2 ? "(?$2)$1" : $1;
|
||||||
|
|
||||||
|
# Check pattern.
|
||||||
|
eval { $key = qr($pat) };
|
||||||
|
if ($@)
|
||||||
|
{
|
||||||
|
$@ =~ s/ at .*? line \d.*//;
|
||||||
|
die "$inc:$.:$@";
|
||||||
|
}
|
||||||
|
|
||||||
|
$hash = \%append;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Silently ignore anything before the first
|
||||||
|
# section--allows for comments and revision info.
|
||||||
|
next unless $key;
|
||||||
|
|
||||||
|
$hash->{$key} ||= '';
|
||||||
|
$hash->{$key} .= $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
close INC;
|
||||||
|
|
||||||
|
die "$this_program: no valid information found in `$inc'\n"
|
||||||
|
unless $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compress trailing blank lines.
|
||||||
|
for my $hash (\(%include, %append))
|
||||||
|
{
|
||||||
|
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Turn off localisation of executable's ouput.
|
||||||
|
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||||
|
|
||||||
|
# Turn off localisation of date (for strftime).
|
||||||
|
setlocale LC_TIME, 'C';
|
||||||
|
|
||||||
|
# Grab help and version info from executable.
|
||||||
|
my ($help_text, $version_text) = map {
|
||||||
|
join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null`
|
||||||
|
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||||
|
} qw(help version);
|
||||||
|
|
||||||
|
my $date = strftime "%B %Y", localtime;
|
||||||
|
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||||
|
my $package = $program;
|
||||||
|
my $version;
|
||||||
|
|
||||||
|
if ($opt_output)
|
||||||
|
{
|
||||||
|
unlink $opt_output
|
||||||
|
or die "$this_program: can't unlink $opt_output ($!)\n"
|
||||||
|
if -e $opt_output;
|
||||||
|
|
||||||
|
open STDOUT, ">$opt_output"
|
||||||
|
or die "$this_program: can't create $opt_output ($!)\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# The first line of the --version information is assumed to be in one
|
||||||
|
# of the following formats:
|
||||||
|
#
|
||||||
|
# <version>
|
||||||
|
# <program> <version>
|
||||||
|
# {GNU,Free} <program> <version>
|
||||||
|
# <program> ({GNU,Free} <package>) <version>
|
||||||
|
# <program> - {GNU,Free} <package> <version>
|
||||||
|
#
|
||||||
|
# and seperated from any copyright/author details by a blank line.
|
||||||
|
|
||||||
|
($_, $version_text) = split /\n+/, $version_text, 2;
|
||||||
|
|
||||||
|
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
|
||||||
|
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
|
||||||
|
{
|
||||||
|
$program = $1;
|
||||||
|
$package = $2;
|
||||||
|
$version = $3;
|
||||||
|
}
|
||||||
|
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
|
||||||
|
{
|
||||||
|
$program = $2;
|
||||||
|
$package = $1 ? "$1$2" : $2;
|
||||||
|
$version = $3;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$version = $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
$program =~ s!.*/!!;
|
||||||
|
|
||||||
|
# No info for `info' itself.
|
||||||
|
$opt_no_info = 1 if $program eq 'info';
|
||||||
|
|
||||||
|
# --name overrides --include contents.
|
||||||
|
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
|
||||||
|
|
||||||
|
# Default (useless) NAME paragraph.
|
||||||
|
$include{NAME} ||= "$program \\- manual page for $program $version\n";
|
||||||
|
|
||||||
|
# Man pages traditionally have the page title in caps.
|
||||||
|
my $PROGRAM = uc $program;
|
||||||
|
|
||||||
|
# Extract usage clause(s) [if any] for SYNOPSIS.
|
||||||
|
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
|
||||||
|
{
|
||||||
|
my @syn = $2 . $3;
|
||||||
|
|
||||||
|
if ($_ = $4)
|
||||||
|
{
|
||||||
|
s/^\n//;
|
||||||
|
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
|
||||||
|
}
|
||||||
|
|
||||||
|
my $synopsis = '';
|
||||||
|
for (@syn)
|
||||||
|
{
|
||||||
|
$synopsis .= ".br\n" if $synopsis;
|
||||||
|
s!^\S*/!!;
|
||||||
|
s/^(\S+) *//;
|
||||||
|
$synopsis .= ".B $1\n";
|
||||||
|
s/\s+$//;
|
||||||
|
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||||
|
s/^/\\fI/ unless s/^\\fR//;
|
||||||
|
$_ .= '\fR';
|
||||||
|
s/(\\fI)( *)/$2$1/g;
|
||||||
|
s/\\fI\\fR//g;
|
||||||
|
s/^\\fR//;
|
||||||
|
s/\\fI$//;
|
||||||
|
s/^\./\\&./;
|
||||||
|
|
||||||
|
$synopsis .= "$_\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$include{SYNOPSIS} ||= $synopsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process text, initial section is DESCRIPTION.
|
||||||
|
my $sect = 'DESCRIPTION';
|
||||||
|
$_ = "$help_text\n\n$version_text";
|
||||||
|
|
||||||
|
# Normalise paragraph breaks.
|
||||||
|
s/^\n+//;
|
||||||
|
s/\n*$/\n/;
|
||||||
|
s/\n\n+/\n\n/g;
|
||||||
|
|
||||||
|
# Temporarily exchange leading dots, apostrophes and backslashes for
|
||||||
|
# tokens.
|
||||||
|
s/^\./\x80/mg;
|
||||||
|
s/^'/\x81/mg;
|
||||||
|
s/\\/\x82/g;
|
||||||
|
|
||||||
|
# Start a new paragraph (if required) for these.
|
||||||
|
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
|
||||||
|
|
||||||
|
sub convert_option;
|
||||||
|
|
||||||
|
while (length)
|
||||||
|
{
|
||||||
|
# Convert some standard paragraph names.
|
||||||
|
if (s/^(Options|Examples): *\n//)
|
||||||
|
{
|
||||||
|
$sect = uc $1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copyright section
|
||||||
|
if (/^Copyright +[(\xa9]/)
|
||||||
|
{
|
||||||
|
$sect = 'COPYRIGHT';
|
||||||
|
$include{$sect} ||= '';
|
||||||
|
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||||
|
|
||||||
|
my $copy;
|
||||||
|
($copy, $_) = split /\n\n/, $_, 2;
|
||||||
|
|
||||||
|
for ($copy)
|
||||||
|
{
|
||||||
|
# Add back newline
|
||||||
|
s/\n*$/\n/;
|
||||||
|
|
||||||
|
# Convert iso9959-1 copyright symbol or (c) to nroff
|
||||||
|
# character.
|
||||||
|
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
|
||||||
|
|
||||||
|
# Insert line breaks before additional copyright messages
|
||||||
|
# and the disclaimer.
|
||||||
|
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
|
||||||
|
|
||||||
|
# Join hyphenated lines.
|
||||||
|
s/([A-Za-z])-\n */$1/g;
|
||||||
|
}
|
||||||
|
|
||||||
|
$include{$sect} .= $copy;
|
||||||
|
$_ ||= '';
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Catch bug report text.
|
||||||
|
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||||
|
{
|
||||||
|
$sect = 'REPORTING BUGS';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Author section.
|
||||||
|
elsif (/^Written +by/)
|
||||||
|
{
|
||||||
|
$sect = 'AUTHOR';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Examples, indicated by an indented leading $, % or > are
|
||||||
|
# rendered in a constant width font.
|
||||||
|
if (/^( +)([\$\%>] )\S/)
|
||||||
|
{
|
||||||
|
my $indent = $1;
|
||||||
|
my $prefix = $2;
|
||||||
|
my $break = '.IP';
|
||||||
|
$include{$sect} ||= '';
|
||||||
|
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
|
||||||
|
{
|
||||||
|
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
|
||||||
|
$break = '.br';
|
||||||
|
}
|
||||||
|
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $matched = '';
|
||||||
|
$include{$sect} ||= '';
|
||||||
|
|
||||||
|
# Sub-sections have a trailing colon and the second line indented.
|
||||||
|
if (s/^(\S.*:) *\n / /)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$include{$sect} .= qq(.SS "$1"\n);
|
||||||
|
}
|
||||||
|
|
||||||
|
my $indent = 0;
|
||||||
|
my $content = '';
|
||||||
|
|
||||||
|
# Option with description.
|
||||||
|
if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$indent = length ($4 || "$1$3");
|
||||||
|
$content = ".TP\n\x83$2\n\x83$5\n";
|
||||||
|
unless ($4)
|
||||||
|
{
|
||||||
|
# Indent may be different on second line.
|
||||||
|
$indent = length $& if /^ {20,}/;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Option without description.
|
||||||
|
elsif (s/^ {1,10}([+-]\S.*)\n//)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$content = ".HP\n\x83$1\n";
|
||||||
|
$indent = 80; # not continued
|
||||||
|
}
|
||||||
|
|
||||||
|
# Indented paragraph with tag.
|
||||||
|
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$indent = length $1;
|
||||||
|
$content = ".TP\n\x83$2\n\x83$3\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Indented paragraph.
|
||||||
|
elsif (s/^( +)(\S.*)\n//)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$indent = length $1;
|
||||||
|
$content = ".IP\n\x83$2\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Left justified paragraph.
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s/(.*)\n//;
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$content = ".PP\n" if $include{$sect};
|
||||||
|
$content .= "$1\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Append continuations.
|
||||||
|
while (s/^ {$indent}(\S.*)\n//)
|
||||||
|
{
|
||||||
|
$matched .= $& if %append;
|
||||||
|
$content .= "\x83$1\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Move to next paragraph.
|
||||||
|
s/^\n+//;
|
||||||
|
|
||||||
|
for ($content)
|
||||||
|
{
|
||||||
|
# Leading dot and apostrophe protection.
|
||||||
|
s/\x83\./\x80/g;
|
||||||
|
s/\x83'/\x81/g;
|
||||||
|
s/\x83//g;
|
||||||
|
|
||||||
|
# Convert options.
|
||||||
|
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if matched paragraph contains /pat/.
|
||||||
|
if (%append)
|
||||||
|
{
|
||||||
|
for my $pat (keys %append)
|
||||||
|
{
|
||||||
|
if ($matched =~ $pat)
|
||||||
|
{
|
||||||
|
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
|
||||||
|
$content .= $append{$pat};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$include{$sect} .= $content;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Refer to the real documentation.
|
||||||
|
unless ($opt_no_info)
|
||||||
|
{
|
||||||
|
$sect = 'SEE ALSO';
|
||||||
|
$include{$sect} ||= '';
|
||||||
|
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||||
|
$include{$sect} .= <<EOT;
|
||||||
|
The full documentation for
|
||||||
|
.B $program
|
||||||
|
is maintained as a Texinfo manual. If the
|
||||||
|
.B info
|
||||||
|
and
|
||||||
|
.B $program
|
||||||
|
programs are properly installed at your site, the command
|
||||||
|
.IP
|
||||||
|
.B info $program
|
||||||
|
.PP
|
||||||
|
should give you access to the complete manual.
|
||||||
|
EOT
|
||||||
|
}
|
||||||
|
|
||||||
|
# Output header.
|
||||||
|
print <<EOT;
|
||||||
|
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||||
|
.TH $PROGRAM "$section" "$date" "$package $version" FSF
|
||||||
|
EOT
|
||||||
|
|
||||||
|
# Section ordering.
|
||||||
|
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
|
||||||
|
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||||
|
my $filter = join '|', @pre, @post;
|
||||||
|
|
||||||
|
# Output content.
|
||||||
|
for (@pre, (grep ! /^($filter)$/o, @include), @post)
|
||||||
|
{
|
||||||
|
if ($include{$_})
|
||||||
|
{
|
||||||
|
my $quote = /\W/ ? '"' : '';
|
||||||
|
print ".SH $quote$_$quote\n";
|
||||||
|
|
||||||
|
for ($include{$_})
|
||||||
|
{
|
||||||
|
# Replace leading dot, apostrophe and backslash tokens.
|
||||||
|
s/\x80/\\&./g;
|
||||||
|
s/\x81/\\&'/g;
|
||||||
|
s/\x82/\\e/g;
|
||||||
|
print;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit;
|
||||||
|
|
||||||
|
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
||||||
|
# embolden. Option arguments get italicised.
|
||||||
|
sub convert_option
|
||||||
|
{
|
||||||
|
local $_ = '\fB' . shift;
|
||||||
|
|
||||||
|
s/-/\\-/g;
|
||||||
|
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||||
|
{
|
||||||
|
s/=(.)/\\fR=\\fI$1/;
|
||||||
|
s/ (.)/ \\fI$1/;
|
||||||
|
$_ .= '\fR';
|
||||||
|
}
|
||||||
|
|
||||||
|
$_;
|
||||||
|
}
|
||||||
@@ -0,0 +1,427 @@
|
|||||||
|
@node Internals
|
||||||
|
@appendix Hacking GRUB
|
||||||
|
|
||||||
|
This chapter documents the user-invisible aspect of GRUB.
|
||||||
|
|
||||||
|
As a general rule of software development, it is impossible to keep the
|
||||||
|
descriptions of the internals up-to-date, and it is quite hard to
|
||||||
|
document everything. So refer to the source code, whenever you are not
|
||||||
|
satisfied with this documentation. Please assume that this gives just
|
||||||
|
hints to you.
|
||||||
|
|
||||||
|
@menu
|
||||||
|
* Memory map:: The memory map of various components
|
||||||
|
* Embedded data:: Embedded variables in GRUB
|
||||||
|
* Filesystem interface:: The generic interface for filesystems
|
||||||
|
* Command interface:: The generic interface for built-ins
|
||||||
|
* Bootstrap tricks:: The bootstrap mechanism used in GRUB
|
||||||
|
* I/O ports detection:: How to probe I/O ports used by INT 13H
|
||||||
|
* Memory detection:: How to detect all installed RAM
|
||||||
|
* Low-level disk I/O:: INT 13H disk I/O interrupts
|
||||||
|
* MBR:: The structure of Master Boot Record
|
||||||
|
* Partition table:: The format of partition tables
|
||||||
|
* Submitting patches:: Where and how you should send patches
|
||||||
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
|
@node Memory map
|
||||||
|
@section The memory map of various components
|
||||||
|
|
||||||
|
GRUB consists of two distinct components, called @dfn{stages}, which are
|
||||||
|
loaded at different times in the boot process. Because they run
|
||||||
|
mutual-exclusively, sometimes a memory area overlaps with another
|
||||||
|
memory area. And, even in one stage, a single memory area can be used
|
||||||
|
for various purposes, because their usages are mutually exclusive.
|
||||||
|
|
||||||
|
Here is the memory map of the various components:
|
||||||
|
|
||||||
|
@table @asis
|
||||||
|
@item 0 to 4K-1
|
||||||
|
BIOS and real mode interrupts
|
||||||
|
|
||||||
|
@item 0x07BE to 0x07FF
|
||||||
|
Partition table passed to another boot loader
|
||||||
|
|
||||||
|
@item down from 8K-1
|
||||||
|
Real mode stack
|
||||||
|
|
||||||
|
@item 0x2000 to ?
|
||||||
|
The optional Stage 1.5 is loaded here
|
||||||
|
|
||||||
|
@item 0x2000 to 0x7FFF
|
||||||
|
Command-line buffer for Multiboot kernels and modules
|
||||||
|
|
||||||
|
@item 0x7C00 to 0x7DFF
|
||||||
|
Stage 1 is loaded here by BIOS or another boot loader
|
||||||
|
|
||||||
|
@item 0x7F00 to 0x7F42
|
||||||
|
LBA drive parameters
|
||||||
|
|
||||||
|
@item 0x8000 to ?
|
||||||
|
Stage2 is loaded here
|
||||||
|
|
||||||
|
@item The end of Stage 2 to 416K-1
|
||||||
|
Heap, in particular used for the menu
|
||||||
|
|
||||||
|
@item down from 416K-1
|
||||||
|
Protected mode stack
|
||||||
|
|
||||||
|
@item 416K to 448K-1
|
||||||
|
Filesystem buffer
|
||||||
|
|
||||||
|
@item 448K to 479.5K-1
|
||||||
|
Raw device buffer
|
||||||
|
|
||||||
|
@item 479.5K to 480K-1
|
||||||
|
512-byte scratch area
|
||||||
|
|
||||||
|
@item 480K to 512K-1
|
||||||
|
Buffers for various functions, such as password, command-line, cut and
|
||||||
|
paste, and completion.
|
||||||
|
|
||||||
|
@item The last 1K of lower memory
|
||||||
|
Disk swapping code and data
|
||||||
|
@end table
|
||||||
|
|
||||||
|
See the file @file{stage2/shared.h}, for more information.
|
||||||
|
|
||||||
|
|
||||||
|
@node Embedded data
|
||||||
|
@section Embedded variables in GRUB
|
||||||
|
|
||||||
|
Stage 1 and Stage 2 have embedded variables whose locations are
|
||||||
|
well-defined, so that the installation can patch the binary file
|
||||||
|
directly without recompilation of the stages.
|
||||||
|
|
||||||
|
In Stage 1, these are defined:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item 0x3E
|
||||||
|
The version number (not GRUB's, but the installation mechanism's).
|
||||||
|
|
||||||
|
@item 0x40
|
||||||
|
The boot drive. If it is 0xFF, use a drive passed by BIOS.
|
||||||
|
|
||||||
|
@item 0x41
|
||||||
|
The flag for if forcing LBA.
|
||||||
|
|
||||||
|
@item 0x42
|
||||||
|
The starting address of Stage 2.
|
||||||
|
|
||||||
|
@item 0x44
|
||||||
|
The first sector of Stage 2.
|
||||||
|
|
||||||
|
@item 0x48
|
||||||
|
The starting segment of Stage 2.
|
||||||
|
|
||||||
|
@item 0x1FE
|
||||||
|
The signature (@code{0xAA55}).
|
||||||
|
@end table
|
||||||
|
|
||||||
|
See the file @file{stage1/stage1.S}, for more information.
|
||||||
|
|
||||||
|
In the first sector of Stage 1.5 and Stage 2, the blocklists are
|
||||||
|
recorded between @code{firstlist} and @code{lastlist}. The address of
|
||||||
|
@code{lastlist} is determined when assembling the file
|
||||||
|
@file{stage2/start.S}.
|
||||||
|
|
||||||
|
The trick here is that it is actually read backward, and the first
|
||||||
|
8-byte blocklist is not read here, but after the pointer is decremented
|
||||||
|
8 bytes, then after reading it, it decrements again, reads, and so on,
|
||||||
|
until it is finished. The terminating condition is when the number of
|
||||||
|
sectors to be read in the next blocklist is zero.
|
||||||
|
|
||||||
|
The format of a blocklist can be seen from the example in the code just
|
||||||
|
before the @code{firstlist} label. Note that it is always from the
|
||||||
|
beginning of the disk, but @emph{not} relative to the partition
|
||||||
|
boundaries.
|
||||||
|
|
||||||
|
In the second sector of Stage 1.5 and Stage 2, these are defined:
|
||||||
|
|
||||||
|
@table @asis
|
||||||
|
@item @code{0x6}
|
||||||
|
The version number (likewise, the installation mechanism's).
|
||||||
|
|
||||||
|
@item @code{0x8}
|
||||||
|
The installed partition.
|
||||||
|
|
||||||
|
@item @code{0xC}
|
||||||
|
The saved entry number.
|
||||||
|
|
||||||
|
@item @code{0x10}
|
||||||
|
The identifier.
|
||||||
|
|
||||||
|
@item @code{0x11}
|
||||||
|
The flag for if forcing LBA.
|
||||||
|
|
||||||
|
@item @code{0x12}
|
||||||
|
The version string (GRUB's).
|
||||||
|
|
||||||
|
@item @code{0x12} + @dfn{the length of the version string}
|
||||||
|
The name of a configuration file.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
See the file @file{stage2/asm.S}, for more information.
|
||||||
|
|
||||||
|
|
||||||
|
@node Filesystem interface
|
||||||
|
@section The generic interface for filesystems
|
||||||
|
|
||||||
|
For any particular partition, it is presumed that only one of the
|
||||||
|
@dfn{normal} filesystems such as FAT, FFS, or ext2fs can be used, so
|
||||||
|
there is a switch table managed by the functions in
|
||||||
|
@file{disk_io.c}. The notation is that you can only @dfn{mount} one at a
|
||||||
|
time.
|
||||||
|
|
||||||
|
The blocklist filesystem has a special place in the system. In addition
|
||||||
|
to the @dfn{normal} filesystem (or even without one mounted), you can
|
||||||
|
access disk blocks directly (in the indicated partition) via the block
|
||||||
|
list notation. Using the blocklist filesystem doesn't effect any other
|
||||||
|
filesystem mounts.
|
||||||
|
|
||||||
|
The variables which can be read by the filesystem backend are:
|
||||||
|
|
||||||
|
@vtable @code
|
||||||
|
@item current_drive
|
||||||
|
The current BIOS drive number (numbered from 0, if a floppy, and
|
||||||
|
numbered from 0x80, if a hard disk).
|
||||||
|
|
||||||
|
@item current_partition
|
||||||
|
The current partition number.
|
||||||
|
|
||||||
|
@item current_slice
|
||||||
|
The current partition type.
|
||||||
|
|
||||||
|
@item saved_drive
|
||||||
|
The @dfn{drive} part of the root device.
|
||||||
|
|
||||||
|
@item saved_partition
|
||||||
|
The @dfn{partition} part of the root device.
|
||||||
|
|
||||||
|
@item part_start
|
||||||
|
The current partition starting address, in sectors.
|
||||||
|
|
||||||
|
@item part_length
|
||||||
|
The current partition length, in sectors.
|
||||||
|
|
||||||
|
@item print_possibilities
|
||||||
|
True when the @code{dir} function should print the possible completions
|
||||||
|
of a file, and false when it should try to actually open a file of that
|
||||||
|
name.
|
||||||
|
|
||||||
|
@item FSYS_BUF
|
||||||
|
Filesystem buffer which is 32K in size, to use in any way which the
|
||||||
|
filesystem backend desires.
|
||||||
|
@end vtable
|
||||||
|
|
||||||
|
The variables which need to be written by a filesystem backend are:
|
||||||
|
|
||||||
|
@vtable @code
|
||||||
|
@item filepos
|
||||||
|
The current position in the file, in sectors.
|
||||||
|
|
||||||
|
@strong{Caution:} the value of @var{filepos} can be changed out from
|
||||||
|
under the filesystem code in the current implementation. Don't depend on
|
||||||
|
it being the same for later calls into the backend code!
|
||||||
|
|
||||||
|
@item filemax
|
||||||
|
The length of the file.
|
||||||
|
|
||||||
|
@item disk_read_func
|
||||||
|
The value of @var{disk_read_hook} @emph{only} during reading of data
|
||||||
|
for the file, not any other fs data, inodes, FAT tables, whatever, then
|
||||||
|
set to @code{NULL} at all other times (it will be @code{NULL} by
|
||||||
|
default). If this isn't done correctly, then the @command{testload} and
|
||||||
|
@command{install} commands won't work correctly.
|
||||||
|
@end vtable
|
||||||
|
|
||||||
|
The functions expected to be used by the filesystem backend are:
|
||||||
|
|
||||||
|
@ftable @code
|
||||||
|
@item devread
|
||||||
|
Only read sectors from within a partition. Sector 0 is the first sector
|
||||||
|
in the partition.
|
||||||
|
|
||||||
|
@item grub_read
|
||||||
|
If the backend uses the blocklist code, then @code{grub_read} can be
|
||||||
|
used, after setting @var{block_file} to 1.
|
||||||
|
|
||||||
|
@item print_a_completion
|
||||||
|
If @var{print_possibilities} is true, call @code{print_a_completion} for
|
||||||
|
each possible file name. Otherwise, the file name completion won't work.
|
||||||
|
@end ftable
|
||||||
|
|
||||||
|
The functions expected to be defined by the filesystem backend are
|
||||||
|
described at least moderately in the file @file{filesys.h}. Their usage
|
||||||
|
is fairly evident from their use in the functions in @file{disk_io.c},
|
||||||
|
look for the use of the @var{fsys_table} array.
|
||||||
|
|
||||||
|
@strong{Caution:} The semantics are such that then @samp{mount}ing the
|
||||||
|
filesystem, presume the filesystem buffer @code{FSYS_BUF} is corrupted,
|
||||||
|
and (re-)load all important contents. When opening and reading a file,
|
||||||
|
presume that the data from the @samp{mount} is available, and doesn't
|
||||||
|
get corrupted by the open/read (i.e. multiple opens and/or reads will be
|
||||||
|
done with only one mount if in the same filesystem).
|
||||||
|
|
||||||
|
|
||||||
|
@node Command interface
|
||||||
|
@section The generic interface for built-ins
|
||||||
|
|
||||||
|
GRUB built-in commands are defined in a uniform interface, whether
|
||||||
|
they are menu-specific or can be used anywhere. The definition of a
|
||||||
|
built-in command consists of two parts: the code itself and the table of
|
||||||
|
the information.
|
||||||
|
|
||||||
|
The code must be a function which takes two arguments, a command-line
|
||||||
|
string and flags, and returns an @samp{int} value. The @dfn{flags}
|
||||||
|
argument specifies how the function is called, using a bit mask. The
|
||||||
|
return value must be zero if successful, otherwise non-zero. So it is
|
||||||
|
normally enough to return @var{errnum}.
|
||||||
|
|
||||||
|
The table of the information is represented by the structure
|
||||||
|
@code{struct builtin}, which contains the name of the command, a pointer
|
||||||
|
to the function, flags, a short description of the command and a long
|
||||||
|
description of the command. Since the descriptions are used only for
|
||||||
|
help messages interactively, you don't have to define them, if the
|
||||||
|
command may not be called interactively (such as @command{title}).
|
||||||
|
|
||||||
|
The table is finally registered in the table @var{builtin_table}, so
|
||||||
|
that @code{run_script} and @code{enter_cmdline} can find the
|
||||||
|
command. See the files @file{cmdline.c} and @file{builtins.c}, for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
|
||||||
|
@node Bootstrap tricks
|
||||||
|
@section The bootstrap mechanism used in GRUB
|
||||||
|
|
||||||
|
The disk space can be used in a boot loader is very restricted because
|
||||||
|
a MBR (@pxref{MBR}) is only 512 bytes but it also contains a partition
|
||||||
|
table (@pxref{Partition table}) and a BPB. So the question is how to
|
||||||
|
make a boot loader code enough small to be fit in a MBR.
|
||||||
|
|
||||||
|
However, GRUB is a very large program, so we break GRUB into 2 (or 3)
|
||||||
|
distinct components, @dfn{Stage 1} and @dfn{Stage 2} (and optionally
|
||||||
|
@dfn{Stage 1.5}). @xref{Memory map}, for more information.
|
||||||
|
|
||||||
|
We embed Stage 1 in a MBR or in the boot sector of a partition, and
|
||||||
|
place Stage 2 in a filesystem. The optional Stage 1.5 can be installed
|
||||||
|
in a filesystem, in the @dfn{boot loader} area in a FFS or a ReiserFS,
|
||||||
|
and in the sectors right after a MBR, because Stage 1.5 is enough small
|
||||||
|
and the sectors right after a MBR is normally an unused region. The size
|
||||||
|
of this region is the number of sectors per head minus 1.
|
||||||
|
|
||||||
|
Thus, all Stage1 must do is just load Stage2 or Stage1.5. But even if
|
||||||
|
Stage 1 needs not to support the user interface or the filesystem
|
||||||
|
interface, it is impossible to make Stage 1 less than 400 bytes, because
|
||||||
|
GRUB should support both the CHS mode and the LBA mode (@pxref{Low-level
|
||||||
|
disk I/O}).
|
||||||
|
|
||||||
|
The solution used by GRUB is that Stage 1 loads only the first sector of
|
||||||
|
Stage 2 (or Stage 1.5) and Stage 2 itself loads the rest. The flow of
|
||||||
|
Stage 1 is:
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
@item
|
||||||
|
Initialize the system briefly.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Detect the geometry and the accessing mode of the @dfn{loading drive}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Load the first sector of Stage 2.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Jump to the starting address of the Stage 2.
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
The flow of Stage 2 (and Stage 1.5) is:
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
@item
|
||||||
|
Load the rest of itself to the real starting address, that is, the
|
||||||
|
starting address plus 512 bytes. The blocklists are stored in the last
|
||||||
|
part of the first sector.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Long jump to the real starting address.
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
Note that Stage 2 (or Stage 1.5) does not probe the geometry
|
||||||
|
or the accessing mode of the @dfn{loading drive}, since Stage 1 has
|
||||||
|
already probed them.
|
||||||
|
|
||||||
|
|
||||||
|
@node I/O ports detection
|
||||||
|
@section How to probe I/O ports used by INT 13H
|
||||||
|
|
||||||
|
FIXME: I will write this chapter after implementing the new technique.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@node Memory detection
|
||||||
|
@section How to detect all installed RAM
|
||||||
|
|
||||||
|
FIXME: I doubt if Erich didn't write this chapter only himself wholly,
|
||||||
|
so I will rewrite this chapter.
|
||||||
|
|
||||||
|
|
||||||
|
@node Low-level disk I/O
|
||||||
|
@section INT 13H disk I/O interrupts
|
||||||
|
|
||||||
|
FIXME: I'm not sure where some part of the original chapter is derived,
|
||||||
|
so I will rewrite this chapter.
|
||||||
|
|
||||||
|
|
||||||
|
@node MBR
|
||||||
|
@section The structure of Master Boot Record
|
||||||
|
|
||||||
|
FIXME: Likewise.
|
||||||
|
|
||||||
|
|
||||||
|
@node Partition table
|
||||||
|
@section The format of partition tables
|
||||||
|
|
||||||
|
FIXME: Probably the original chapter is derived from "How It Works", so
|
||||||
|
I will rewrite this chapter.
|
||||||
|
|
||||||
|
|
||||||
|
@node Submitting patches
|
||||||
|
@section Where and how you should send patches
|
||||||
|
|
||||||
|
When you write patches for GRUB, please send them to the mailing list
|
||||||
|
@email{bug-grub@@gnu.org}. Here is the list of items of which you
|
||||||
|
should take care:
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
@item
|
||||||
|
Please make your patch as small as possible. Generally, it is not a good
|
||||||
|
thing to make one big patch which changes many things. Instead,
|
||||||
|
segregate features and produce many patches.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Use as late code as possible, for the original code. The CVS repository
|
||||||
|
always has the current version (@pxref{Obtaining and Building GRUB}).
|
||||||
|
|
||||||
|
@item
|
||||||
|
Write ChangeLog entries. @xref{Change Logs, , Change Logs, standards,
|
||||||
|
GNU Coding Standards}, if you don't know how to write ChangeLog.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Make patches in unified diff format. @samp{diff -urN} is appropriate in
|
||||||
|
most cases.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Don't make patches reversely. Reverse patches are difficult to read and
|
||||||
|
use.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Be careful enough of the license term and the copyright. Because GRUB
|
||||||
|
is under GNU General Public License, you may not steal code from
|
||||||
|
software whose license is incompatible against GPL. And, if you copy
|
||||||
|
code written by others, you must not ignore their copyrights. Feel free
|
||||||
|
to ask GRUB maintainers, whenever you are not sure what you should do.
|
||||||
|
|
||||||
|
@item
|
||||||
|
If your patch is too large to send in e-mail, put it at somewhere we can
|
||||||
|
see. Usually, you shouldn't send e-mail over 20K.
|
||||||
|
@end itemize
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[NAME]
|
|
||||||
grub-bios-setup \- set up a device to boot using GRUB
|
|
||||||
[SEE ALSO]
|
|
||||||
.BR grub-install (8),
|
|
||||||
.BR grub-mkimage (1),
|
|
||||||
.BR grub-mkrescue (1)
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[NAME]
|
|
||||||
grub-editenv \- edit GRUB environment block
|
|
||||||
[SEE ALSO]
|
|
||||||
.BR grub-reboot (8),
|
|
||||||
.BR grub-set-default (8)
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[NAME]
|
|
||||||
grub-emu \- GRUB emulator
|
|
||||||
[SEE ALSO]
|
|
||||||
If you are trying to install GRUB, then you should use
|
|
||||||
.BR grub-install (8)
|
|
||||||
rather than this program.
|
|
||||||
@@ -1,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-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)
|
|
||||||
-205
@@ -1,205 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Get modification time of a file or directory and pretty-print it.
|
|
||||||
|
|
||||||
scriptversion=2007-03-30.02
|
|
||||||
|
|
||||||
# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
|
|
||||||
# Foundation, Inc.
|
|
||||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 3, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: mdate-sh [--help] [--version] FILE
|
|
||||||
|
|
||||||
Pretty-print the modification time of FILE.
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "mdate-sh $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Prevent date giving response in another language.
|
|
||||||
LANG=C
|
|
||||||
export LANG
|
|
||||||
LC_ALL=C
|
|
||||||
export LC_ALL
|
|
||||||
LC_TIME=C
|
|
||||||
export LC_TIME
|
|
||||||
|
|
||||||
# GNU ls changes its time format in response to the TIME_STYLE
|
|
||||||
# variable. Since we cannot assume `unset' works, revert this
|
|
||||||
# variable to its documented default.
|
|
||||||
if test "${TIME_STYLE+set}" = set; then
|
|
||||||
TIME_STYLE=posix-long-iso
|
|
||||||
export TIME_STYLE
|
|
||||||
fi
|
|
||||||
|
|
||||||
save_arg1=$1
|
|
||||||
|
|
||||||
# Find out how to get the extended ls output of a file or directory.
|
|
||||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
|
||||||
ls_command='ls -L -l -d'
|
|
||||||
else
|
|
||||||
ls_command='ls -l -d'
|
|
||||||
fi
|
|
||||||
# Avoid user/group names that might have spaces, when possible.
|
|
||||||
if ls -n /dev/null 1>/dev/null 2>&1; then
|
|
||||||
ls_command="$ls_command -n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# A `ls -l' line looks as follows on OS/2.
|
|
||||||
# drwxrwx--- 0 Aug 11 2001 foo
|
|
||||||
# This differs from Unix, which adds ownership information.
|
|
||||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
|
||||||
#
|
|
||||||
# To find the date, we split the line on spaces and iterate on words
|
|
||||||
# until we find a month. This cannot work with files whose owner is a
|
|
||||||
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
|
|
||||||
# will be owned by a user whose name is a month. So we first look at
|
|
||||||
# the extended ls output of the root directory to decide how many
|
|
||||||
# words should be skipped to get the date.
|
|
||||||
|
|
||||||
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
|
||||||
set x`$ls_command /`
|
|
||||||
|
|
||||||
# Find which argument is the month.
|
|
||||||
month=
|
|
||||||
command=
|
|
||||||
until test $month
|
|
||||||
do
|
|
||||||
shift
|
|
||||||
# Add another shift to the command.
|
|
||||||
command="$command shift;"
|
|
||||||
case $1 in
|
|
||||||
Jan) month=January; nummonth=1;;
|
|
||||||
Feb) month=February; nummonth=2;;
|
|
||||||
Mar) month=March; nummonth=3;;
|
|
||||||
Apr) month=April; nummonth=4;;
|
|
||||||
May) month=May; nummonth=5;;
|
|
||||||
Jun) month=June; nummonth=6;;
|
|
||||||
Jul) month=July; nummonth=7;;
|
|
||||||
Aug) month=August; nummonth=8;;
|
|
||||||
Sep) month=September; nummonth=9;;
|
|
||||||
Oct) month=October; nummonth=10;;
|
|
||||||
Nov) month=November; nummonth=11;;
|
|
||||||
Dec) month=December; nummonth=12;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# Get the extended ls output of the file or directory.
|
|
||||||
set dummy x`eval "$ls_command \"\$save_arg1\""`
|
|
||||||
|
|
||||||
# Remove all preceding arguments
|
|
||||||
eval $command
|
|
||||||
|
|
||||||
# Because of the dummy argument above, month is in $2.
|
|
||||||
#
|
|
||||||
# On a POSIX system, we should have
|
|
||||||
#
|
|
||||||
# $# = 5
|
|
||||||
# $1 = file size
|
|
||||||
# $2 = month
|
|
||||||
# $3 = day
|
|
||||||
# $4 = year or time
|
|
||||||
# $5 = filename
|
|
||||||
#
|
|
||||||
# On Darwin 7.7.0 and 7.6.0, we have
|
|
||||||
#
|
|
||||||
# $# = 4
|
|
||||||
# $1 = day
|
|
||||||
# $2 = month
|
|
||||||
# $3 = year or time
|
|
||||||
# $4 = filename
|
|
||||||
|
|
||||||
# Get the month.
|
|
||||||
case $2 in
|
|
||||||
Jan) month=January; nummonth=1;;
|
|
||||||
Feb) month=February; nummonth=2;;
|
|
||||||
Mar) month=March; nummonth=3;;
|
|
||||||
Apr) month=April; nummonth=4;;
|
|
||||||
May) month=May; nummonth=5;;
|
|
||||||
Jun) month=June; nummonth=6;;
|
|
||||||
Jul) month=July; nummonth=7;;
|
|
||||||
Aug) month=August; nummonth=8;;
|
|
||||||
Sep) month=September; nummonth=9;;
|
|
||||||
Oct) month=October; nummonth=10;;
|
|
||||||
Nov) month=November; nummonth=11;;
|
|
||||||
Dec) month=December; nummonth=12;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $3 in
|
|
||||||
???*) day=$1;;
|
|
||||||
*) day=$3; shift;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Here we have to deal with the problem that the ls output gives either
|
|
||||||
# the time of day or the year.
|
|
||||||
case $3 in
|
|
||||||
*:*) set `date`; eval year=\$$#
|
|
||||||
case $2 in
|
|
||||||
Jan) nummonthtod=1;;
|
|
||||||
Feb) nummonthtod=2;;
|
|
||||||
Mar) nummonthtod=3;;
|
|
||||||
Apr) nummonthtod=4;;
|
|
||||||
May) nummonthtod=5;;
|
|
||||||
Jun) nummonthtod=6;;
|
|
||||||
Jul) nummonthtod=7;;
|
|
||||||
Aug) nummonthtod=8;;
|
|
||||||
Sep) nummonthtod=9;;
|
|
||||||
Oct) nummonthtod=10;;
|
|
||||||
Nov) nummonthtod=11;;
|
|
||||||
Dec) nummonthtod=12;;
|
|
||||||
esac
|
|
||||||
# For the first six month of the year the time notation can also
|
|
||||||
# be used for files modified in the last year.
|
|
||||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
|
||||||
then
|
|
||||||
year=`expr $year - 1`
|
|
||||||
fi;;
|
|
||||||
*) year=$3;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# The result.
|
|
||||||
echo $day $month $year
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-end: "$"
|
|
||||||
# End:
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#
|
||||||
|
# Sample boot menu configuration file
|
||||||
|
#
|
||||||
|
|
||||||
|
# Boot automatically after 30 secs.
|
||||||
|
timeout 30
|
||||||
|
|
||||||
|
# By default, boot the first entry.
|
||||||
|
default 0
|
||||||
|
|
||||||
|
# Fallback to the second entry.
|
||||||
|
fallback 1
|
||||||
|
|
||||||
|
# For booting GNU/Hurd
|
||||||
|
title GNU/Hurd
|
||||||
|
root (hd0,0)
|
||||||
|
kernel /boot/gnumach.gz root=hd0s1
|
||||||
|
module /boot/serverboot.gz
|
||||||
|
|
||||||
|
# For booting GNU/Linux
|
||||||
|
title GNU/Linux
|
||||||
|
root (hd1,0)
|
||||||
|
kernel /vmlinuz root=/dev/hdb1
|
||||||
|
#initrd /initrd.img
|
||||||
|
|
||||||
|
# For booting GNU/kFreeBSD
|
||||||
|
title GNU/kFreeBSD
|
||||||
|
root (hd0,2,a)
|
||||||
|
kernel /boot/loader.gz
|
||||||
|
|
||||||
|
# For booting GNU/kNetBSD
|
||||||
|
title GNU/kNetBSD
|
||||||
|
root (hd0,2,a)
|
||||||
|
kernel --type=netbsd /boot/knetbsd.gz
|
||||||
|
|
||||||
|
# For booting Mach (getting kernel from floppy)
|
||||||
|
title Utah Mach4 multiboot
|
||||||
|
root (hd0,2)
|
||||||
|
pause Insert the diskette now!!
|
||||||
|
kernel (fd0)/boot/kernel root=hd0s3
|
||||||
|
module (fd0)/boot/bootstrap
|
||||||
|
|
||||||
|
# For booting FreeBSD
|
||||||
|
title FreeBSD
|
||||||
|
root (hd0,2,a)
|
||||||
|
kernel /boot/loader
|
||||||
|
|
||||||
|
# For booting NetBSD
|
||||||
|
title NetBSD
|
||||||
|
root (hd0,2,a)
|
||||||
|
kernel --type=netbsd /netbsd
|
||||||
|
|
||||||
|
# For booting OpenBSD
|
||||||
|
title OpenBSD
|
||||||
|
root (hd0,2,a)
|
||||||
|
kernel --type=netbsd /bsd
|
||||||
|
|
||||||
|
# For booting OS/2
|
||||||
|
title OS/2
|
||||||
|
root (hd0,1)
|
||||||
|
makeactive
|
||||||
|
# chainload OS/2 bootloader from the first sector
|
||||||
|
chainloader +1
|
||||||
|
# This is similar to "chainload", but loads a specific file
|
||||||
|
#chainloader /boot/chain.os2
|
||||||
|
|
||||||
|
# For booting Windows NT or Windows95
|
||||||
|
title Windows NT / Windows 95 boot menu
|
||||||
|
rootnoverify (hd0,0)
|
||||||
|
makeactive
|
||||||
|
chainloader +1
|
||||||
|
# For loading DOS if Windows NT is installed
|
||||||
|
# chainload /bootsect.dos
|
||||||
|
|
||||||
|
# For installing GRUB into the hard disk
|
||||||
|
title Install GRUB into the hard disk
|
||||||
|
root (hd0,0)
|
||||||
|
setup (hd0)
|
||||||
|
|
||||||
|
# Change the colors.
|
||||||
|
title Change the colors
|
||||||
|
color light-green/brown blink-red/blue
|
||||||
@@ -1,325 +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)/bootmgr -a -f ($device)/boot/bcd; then
|
|
||||||
menuentry "Windows Vista bootmgr (on $device)" $device {
|
|
||||||
set root=$2
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
elif test -f ($device)/ntldr -a \
|
|
||||||
-e ($device)/ntdetect.com -a -f ($device)/boot.ini; then
|
|
||||||
menuentry "Windows NT/2000/XP loader (on $device)" $device {
|
|
||||||
set root=$2
|
|
||||||
regexp -s devnum 'hd([0-9]+)' $root
|
|
||||||
if test "$devnum" != "0"; then
|
|
||||||
drivemap -s hd0 $root
|
|
||||||
fi
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
elif test -f ($device)/windows/win.com; then
|
|
||||||
menuentry "Windows 98/ME (on $device)" $device {
|
|
||||||
set root=$2
|
|
||||||
regexp -s devnum 'hd([0-9]+)' $root
|
|
||||||
if test "$devnum" != "0"; then
|
|
||||||
drivemap -s hd0 $root
|
|
||||||
fi
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
elif test -f ($device)/io.sys -a -f ($device)/command.com; then
|
|
||||||
menuentry "MS-DOS (on $device)" $device {
|
|
||||||
set root=$2
|
|
||||||
regexp -s devnum 'hd([0-9]+)' $root
|
|
||||||
if test "$devnum" != "0"; then
|
|
||||||
drivemap -s hd0 $root
|
|
||||||
fi
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
elif test -f ($device)/kernel.sys; then
|
|
||||||
menuentry "FreeDOS (on $device)" $device {
|
|
||||||
set root=$2
|
|
||||||
regexp -s type '([fh])d[0-9]+' $root
|
|
||||||
regexp -s devnum '[fh]d([0-9]+)' $root
|
|
||||||
if test $type = 'h' -a "$devnum" != "0"; then
|
|
||||||
drivemap -s hd0 $root
|
|
||||||
fi
|
|
||||||
chainloader +1
|
|
||||||
}
|
|
||||||
elif test "$fstype" = ufs1 -o "$fstype" = ufs2 -a \
|
|
||||||
-e ($device)/boot/kernel/kernel -a \
|
|
||||||
-e ($device)/boot/device.hints; then
|
|
||||||
|
|
||||||
freebsd_ufs_variants $device $fstype $uuid
|
|
||||||
|
|
||||||
elif test "$fstype" = zfs -a \
|
|
||||||
-e ($device)/@/boot/kernel/kernel -a \
|
|
||||||
-e ($device)/@/boot/device.hints; then
|
|
||||||
|
|
||||||
freebsd_zfs_variants $device
|
|
||||||
|
|
||||||
elif test "$fstype" = hfsplus -a -f ($device)/mach_kernel; then
|
|
||||||
menuentry "Mac OS X/Darwin" $device $uuid {
|
|
||||||
set root=$2
|
|
||||||
set uuid=$3
|
|
||||||
|
|
||||||
insmod vbe
|
|
||||||
do_resume=0
|
|
||||||
if [ /var/vm/sleepimage -nt10 / ]; then
|
|
||||||
if xnu_resume /var/vm/sleepimage; then
|
|
||||||
do_resume=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ $do_resume = 1 ]; then
|
|
||||||
xnu_uuid $uuid uuid
|
|
||||||
if [ -f /Extra/DSDT.aml ]; then
|
|
||||||
acpi -e /Extra/DSDT.aml
|
|
||||||
fi
|
|
||||||
xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
|
|
||||||
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
|
|
||||||
xnu_mkext /System/Library/Extensions.mkext
|
|
||||||
else
|
|
||||||
xnu_mkext /System/Library/Extensions
|
|
||||||
fi
|
|
||||||
if [ -f /Extra/Extensions.mkext ]; then
|
|
||||||
xnu_mkext /Extra/Extensions.mkext
|
|
||||||
fi
|
|
||||||
if [ -d /Extra/Extensions ]; then
|
|
||||||
xnu_kextdir /Extra/Extensions
|
|
||||||
fi
|
|
||||||
if [ -f /Extra/devtree.txt ]; then
|
|
||||||
xnu_devtree /Extra/devtree.txt
|
|
||||||
fi
|
|
||||||
if [ -f /Extra/splash.jpg ]; then
|
|
||||||
insmod jpeg
|
|
||||||
xnu_splash /Extra/splash.jpg
|
|
||||||
fi
|
|
||||||
if [ -f /Extra/splash.png ]; then
|
|
||||||
insmod png
|
|
||||||
xnu_splash /Extra/splash.png
|
|
||||||
fi
|
|
||||||
if [ -f /Extra/splash.tga ]; then
|
|
||||||
insmod tga
|
|
||||||
xnu_splash /Extra/splash.tga
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
else
|
|
||||||
set root=$device
|
|
||||||
for file in /boot/vmlinuz-* /boot/linux-*; do
|
|
||||||
if test -f $file; then
|
|
||||||
regexp -s version '/boot/vmlinuz-(.*)' $file
|
|
||||||
regexp -s version '/boot/linux-(.*)' $file
|
|
||||||
|
|
||||||
menuentry "Linux $file" $device $uuid $file $version {
|
|
||||||
set root=$2
|
|
||||||
set uuid=$3
|
|
||||||
set kernel=$4
|
|
||||||
set version=$5
|
|
||||||
|
|
||||||
linux $kernel root=UUID=$uuid ro
|
|
||||||
if test -f /boot/initrd-$version.img; then
|
|
||||||
initrd /boot/initrd-$version.img
|
|
||||||
elif test -f /boot/initrd.img-$version; then
|
|
||||||
initrd /boot/initrd.img-$version
|
|
||||||
elif test -f /boot/initrd-$version; then
|
|
||||||
initrd /boot/initrd-$version
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
menuentry "Linux $file (single)" $device $uuid $file $version {
|
|
||||||
set root=$2
|
|
||||||
set uuid=$3
|
|
||||||
set kernel=$4
|
|
||||||
set version=$5
|
|
||||||
|
|
||||||
linux $kernel root=UUID=$uuid ro single
|
|
||||||
if test -f /boot/initrd-$version.img; then
|
|
||||||
initrd /boot/initrd-$version.img
|
|
||||||
elif test -f /boot/initrd.img-$version; then
|
|
||||||
initrd /boot/initrd.img-$version
|
|
||||||
elif test -f /boot/initrd-$version; then
|
|
||||||
initrd /boot/initrd-$version
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
set root=$saved_root
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Convert a source file to a TeXinfo file. Stolen from glibc.
|
||||||
|
#
|
||||||
|
# Usage: src2texi SRCDIR SRC TEXI
|
||||||
|
|
||||||
|
dir=$1
|
||||||
|
src=`basename $2`
|
||||||
|
texi=`basename $3`
|
||||||
|
|
||||||
|
sed -e 's,[{}],@&,g' \
|
||||||
|
-e 's,/\*\(@.*\)\*/,\1,g' \
|
||||||
|
-e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \
|
||||||
|
-e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g' \
|
||||||
|
${dir}/${src} | expand > ${texi}.new
|
||||||
|
mv -f ${texi}.new ${dir}/${texi}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
@set UPDATED 8 May 2005
|
||||||
|
@set UPDATED-MONTH May 2005
|
||||||
|
@set EDITION 0.97
|
||||||
|
@set VERSION 0.97
|
||||||
-8959
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,4 @@
|
|||||||
|
@set UPDATED 8 May 2005
|
||||||
|
@set UPDATED-MONTH May 2005
|
||||||
|
@set EDITION 0.97
|
||||||
|
@set VERSION 0.97
|
||||||
-69
@@ -1,69 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This gensymlist.sh is free software; the author
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
# PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
/* This file is automatically generated by geninit.sh. DO NOT EDIT! */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* GRUB is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <grub/emu/misc.h>
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
for mod in "$@"; do
|
|
||||||
echo "extern void grub_${mod}_init (void);"
|
|
||||||
echo "extern void grub_${mod}_fini (void);"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
void
|
|
||||||
grub_init_all (void)
|
|
||||||
{
|
|
||||||
EOF
|
|
||||||
|
|
||||||
for mod in "$@"; do
|
|
||||||
echo "grub_${mod}_init ();"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
void
|
|
||||||
grub_fini_all (void)
|
|
||||||
{
|
|
||||||
EOF
|
|
||||||
|
|
||||||
for mod in "$@"; do
|
|
||||||
echo "grub_${mod}_fini ();"
|
|
||||||
done
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
@@ -1,877 +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" ]
|
|
||||||
|
|
||||||
# Miscelaneous groups schedulded 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_USB;
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
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 \
|
|
||||||
cp $< $@.bin; $(TARGET_OBJ2ELF) $@.bin && cp $@.bin $@ || (rm -f $@.bin; 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 $@; \
|
|
||||||
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 .reginfo -R .rel.dyn -R .note.gnu.gold-version $< $@; \
|
|
||||||
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 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)
|
|
||||||
|
|
||||||
write_output(section='decl')
|
|
||||||
write_output()
|
|
||||||
@@ -1,432 +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-pe2elf: $(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) -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-pe2elf\" $^
|
|
||||||
|
|
||||||
# gentrigtables
|
|
||||||
gentrigtables: gentrigtables.c
|
|
||||||
$(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< $(BUILD_LIBM)
|
|
||||||
CLEANFILES += gentrigtables
|
|
||||||
|
|
||||||
# trigtables.c
|
|
||||||
trigtables.c: gentrigtables gentrigtables.c $(top_srcdir)/configure.ac
|
|
||||||
./gentrigtables > $@
|
|
||||||
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
|
|
||||||
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
|
|
||||||
if !COND_clang
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
|
|
||||||
endif
|
|
||||||
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/pci.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_builddir)/include/grub/i386/pc/int.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
|
|
||||||
endif
|
|
||||||
|
|
||||||
if COND_i386_multiboot
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
|
||||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/i386/pc/int.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
|
|
||||||
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
|
|
||||||
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_builddir)/include/grub/cpu/cache.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_builddir)/include/grub/cpu/cache.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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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_USB
|
|
||||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libusb.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 $(MOD_FILES)
|
|
||||||
rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@
|
|
||||||
CLEANFILES += grub_emu_init.h
|
|
||||||
|
|
||||||
grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
|
|
||||||
rm -f $@; echo $(MOD_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)
|
|
||||||
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,102 +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 *
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
int memcmp (const void *s1, const void *s2, grub_size_t n)
|
|
||||||
__attribute__ ((alias ("grub_memcmp")));
|
|
||||||
|
|
||||||
void *memmove (void *dest, const void *src, grub_size_t n)
|
|
||||||
__attribute__ ((alias ("grub_memmove")));
|
|
||||||
|
|
||||||
void *memcpy (void *dest, const void *src, grub_size_t n)
|
|
||||||
__attribute__ ((alias ("grub_memmove")));
|
|
||||||
|
|
||||||
void *grub_decompressor_scratch;
|
|
||||||
|
|
||||||
void
|
|
||||||
find_scratch (void *src, void *dst, unsigned long srcsize,
|
|
||||||
unsigned long dstsize)
|
|
||||||
{
|
|
||||||
#ifdef _mips
|
|
||||||
/* Decoding from ROM. */
|
|
||||||
if (((grub_addr_t) src & 0x10000000))
|
|
||||||
{
|
|
||||||
grub_decompressor_scratch = (void *) ALIGN_UP((grub_addr_t) dst + dstsize,
|
|
||||||
256);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if ((char *) src + srcsize > (char *) dst + dstsize)
|
|
||||||
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) src + srcsize,
|
|
||||||
256);
|
|
||||||
else
|
|
||||||
grub_decompressor_scratch = (void *) ALIGN_UP ((grub_addr_t) dst + dstsize,
|
|
||||||
256);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* GRUB is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <grub/decompressor.h>
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_decompress_core (void *src, void *dest, unsigned long n,
|
|
||||||
unsigned long dstsize __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
char *d = (char *) dest;
|
|
||||||
const char *s = (const char *) src;
|
|
||||||
|
|
||||||
if (d == s)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (d < s)
|
|
||||||
while (n--)
|
|
||||||
*d++ = *s++;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
d += n;
|
|
||||||
s += n;
|
|
||||||
|
|
||||||
while (n--)
|
|
||||||
*--d = *--s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* GRUB is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <grub/types.h>
|
|
||||||
#include <grub/misc.h>
|
|
||||||
#include <grub/decompressor.h>
|
|
||||||
|
|
||||||
#include "xz.h"
|
|
||||||
#include "xz_stream.h"
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_decompress_core (void *src, void *dst, unsigned long srcsize,
|
|
||||||
unsigned long dstsize)
|
|
||||||
{
|
|
||||||
struct xz_dec *dec;
|
|
||||||
struct xz_buf buf;
|
|
||||||
|
|
||||||
find_scratch (src, dst, srcsize, dstsize);
|
|
||||||
|
|
||||||
dec = xz_dec_init (GRUB_DECOMPRESSOR_DICT_SIZE);
|
|
||||||
|
|
||||||
buf.in = src;
|
|
||||||
buf.in_pos = 0;
|
|
||||||
buf.in_size = srcsize;
|
|
||||||
buf.out = dst;
|
|
||||||
buf.out_pos = 0;
|
|
||||||
buf.out_size = dstsize;
|
|
||||||
|
|
||||||
while (buf.in_pos != buf.in_size)
|
|
||||||
{
|
|
||||||
enum xz_ret xzret;
|
|
||||||
xzret = xz_dec_run (dec, &buf);
|
|
||||||
switch (xzret)
|
|
||||||
{
|
|
||||||
case XZ_MEMLIMIT_ERROR:
|
|
||||||
case XZ_FORMAT_ERROR:
|
|
||||||
case XZ_OPTIONS_ERROR:
|
|
||||||
case XZ_DATA_ERROR:
|
|
||||||
case XZ_BUF_ERROR:
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
/* -*-Asm-*- */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* GRUB is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <grub/symbol.h>
|
|
||||||
#include <grub/machine/boot.h>
|
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
#include <multiboot.h>
|
|
||||||
|
|
||||||
.file "cdboot.S"
|
|
||||||
|
|
||||||
#define CODE_ADDR 0x6000
|
|
||||||
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
|
||||||
|
|
||||||
#define CDSEC_SHIFT 11
|
|
||||||
#define CDBLK_LENG 16
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
.code16
|
|
||||||
|
|
||||||
.globl start, _start
|
|
||||||
|
|
||||||
start:
|
|
||||||
_start:
|
|
||||||
call LOCAL(next)
|
|
||||||
|
|
||||||
LOCAL(next):
|
|
||||||
jmp 1f
|
|
||||||
|
|
||||||
. = start + 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"
|
|
||||||
|
|
||||||
. = start + 0x7FF
|
|
||||||
|
|
||||||
.byte 0
|
|
||||||
@@ -1,295 +0,0 @@
|
|||||||
/* -*-Asm-*- */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* GRUB is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
#include <grub/symbol.h>
|
|
||||||
#include <grub/machine/boot.h>
|
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
#include <multiboot.h>
|
|
||||||
|
|
||||||
.file "lnxboot.S"
|
|
||||||
|
|
||||||
#define CODE_ADDR 0x6000
|
|
||||||
#define CODE_SECTORS 1
|
|
||||||
#define DATA_ADDR ((GRUB_BOOT_MACHINE_KERNEL_ADDR) + 0x200)
|
|
||||||
|
|
||||||
#define BLCK_LENG 0x4000
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
.code16
|
|
||||||
|
|
||||||
.globl start, _start
|
|
||||||
|
|
||||||
data_start:
|
|
||||||
xorl %ebp, %ebp
|
|
||||||
jmp LOCAL(linux_next)
|
|
||||||
|
|
||||||
. = data_start + 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"
|
|
||||||
|
|
||||||
. = _start + CODE_SECTORS * 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,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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
. = _start + GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE
|
|
||||||
LOCAL(compressed_size):
|
|
||||||
.long 0
|
|
||||||
. = _start + GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_SIZE
|
|
||||||
LOCAL(uncompressed_size):
|
|
||||||
.long 0
|
|
||||||
|
|
||||||
. = _start + GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY
|
|
||||||
reed_solomon_redundancy:
|
|
||||||
.long 0
|
|
||||||
. = _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH
|
|
||||||
.short (LOCAL(reed_solomon_part) - _start)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the area for all of the special variables.
|
|
||||||
*/
|
|
||||||
. = _start + 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 */
|
|
||||||
ADDR32 movb %dl, LOCAL(boot_drive)
|
|
||||||
|
|
||||||
/* reset disk system (%ah = 0) */
|
|
||||||
int $0x13
|
|
||||||
|
|
||||||
/* transition to protected mode */
|
|
||||||
DATA32 call 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
|
|
||||||
|
|
||||||
DATA32 call 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
|
|
||||||
|
|
||||||
. = _start + 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
|
|
||||||
DATA32 jmp real_to_prot
|
|
||||||
.code32
|
|
||||||
/* 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
|
|
||||||
1:
|
|
||||||
movl 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. */
|
|
||||||
|
|
||||||
. = GRUB_BOOT_MACHINE_SIZE - 16
|
|
||||||
|
|
||||||
.code16
|
|
||||||
|
|
||||||
jmp _start
|
|
||||||
. = 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)
|
|
||||||
lui $t1, %hi(GRUB_MACHINE_PCI_CONFSPACE)
|
|
||||||
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) - 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) ($t0)
|
|
||||||
lw $t2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + 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)
|
|
||||||
li $t1, GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED
|
|
||||||
sw $t1, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + 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 + GRUB_CS5536_LBAR_SMBUS)
|
|
||||||
|
|
||||||
/* Disable SMB. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
|
||||||
|
|
||||||
/* Disable interrupts. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1) ($t0)
|
|
||||||
|
|
||||||
/* Set as master. */
|
|
||||||
sb $zero, %lo(GRUB_MACHINE_PCI_IO_BASE + 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 + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
|
|
||||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + 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
|
|
||||||
|
|
||||||
. = start + 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)
|
|
||||||
|
|
||||||
. = start + 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)
|
|
||||||
|
|
||||||
. = start + 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 + GRUB_CS5536_LBAR_GPIO)
|
|
||||||
addiu $t0, $t0, %lo(GRUB_MACHINE_PCI_IO_BASE + 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
|
|
||||||
blt $t1, $zero, 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)
|
|
||||||
sw $a0, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_ADDR) ($t0)
|
|
||||||
sw $a1, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + GRUB_CS5536_MSR_MAILBOX_DATA0) ($t0)
|
|
||||||
jr $ra
|
|
||||||
sw $a2, (%lo(GRUB_MACHINE_PCI_CONFSPACE) + 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)
|
|
||||||
lb $t0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_STATUS + GRUB_MACHINE_PCI_IO_BASE) ($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, %hi(read_spd_fail)
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($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) ($t0)
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
sll $t1, $a1, 1
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
|
|
||||||
|
|
||||||
/* Send ACK. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($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) ($t0)
|
|
||||||
|
|
||||||
/* Send byte address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
bal smbus_wait
|
|
||||||
sb $t2, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($t0)
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($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) ($t0)
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
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) ($t0)
|
|
||||||
|
|
||||||
/* Send STOP. */
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
lb $t1, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL1 + GRUB_MACHINE_PCI_IO_BASE) ($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) ($t0)
|
|
||||||
|
|
||||||
lui $t0, %hi(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE)
|
|
||||||
lb $v0, %lo(GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_DATA + GRUB_MACHINE_PCI_IO_BASE) ($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
|
|
||||||
|
|
||||||
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,299 +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>
|
|
||||||
|
|
||||||
#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:
|
|
||||||
. = _start + GRUB_DECOMPRESSOR_MACHINE_COMPRESSED_SIZE
|
|
||||||
compressed_size:
|
|
||||||
.long 0
|
|
||||||
. = _start + GRUB_DECOMPRESSOR_MACHINE_UNCOMPRESSED_SIZE
|
|
||||||
uncompressed_size:
|
|
||||||
.long 0
|
|
||||||
. = _start + 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 $t4, 0($t2)
|
|
||||||
lb $t5, 0($t3)
|
|
||||||
addiu $t2, $t2, 1
|
|
||||||
addiu $t3, $t3, 1
|
|
||||||
beq $t5, $zero, 1f
|
|
||||||
nop
|
|
||||||
beq $t5, $t4, 3b
|
|
||||||
nop
|
|
||||||
bne $t4, $zero, 1f
|
|
||||||
nop
|
|
||||||
|
|
||||||
addiu $t3, $t3, 0xffff
|
|
||||||
digcont:
|
|
||||||
lb $t5, 0($t3)
|
|
||||||
/* Substract '0' from digit. */
|
|
||||||
addiu $t5, $t5, 0xffd0
|
|
||||||
bltz $t5, 1f
|
|
||||||
nop
|
|
||||||
addiu $t4, $t5, 0xfff7
|
|
||||||
bgtz $t4, 1f
|
|
||||||
nop
|
|
||||||
/* Multiply $v0 by 10 with bitshifts. */
|
|
||||||
sll $v0, $v0, 1
|
|
||||||
sll $t4, $v0, 2
|
|
||||||
addu $v0, $v0, $t4
|
|
||||||
addu $v0, $v0, $t5
|
|
||||||
addiu $t3, $t3, 1
|
|
||||||
b digcont
|
|
||||||
nop
|
|
||||||
1:
|
|
||||||
jr $ra
|
|
||||||
nop
|
|
||||||
busclockstr: .asciiz "busclock="
|
|
||||||
cpuclockstr: .asciiz "cpuclock="
|
|
||||||
memsizestr: .asciiz "memsize="
|
|
||||||
highmemsizestr: .asciiz "highmemsize="
|
|
||||||
machtype_yeeloong_str1: .asciiz "machtype=8.9"
|
|
||||||
machtype_yeeloong_str2: .asciiz "machtype=lemote-yeeloong-"
|
|
||||||
machtype_fuloong2f_str: .asciiz "machtype=lemote-fuloong-2f"
|
|
||||||
machtype_fuloong2e_str: .asciiz "machtype=lemote-fuloong-2e"
|
|
||||||
pmon_yeeloong_str: .asciiz "PMON_VER=LM8"
|
|
||||||
pmon_fuloong2f_str: .asciiz "PMON_VER=LM6"
|
|
||||||
pmon_yeeloong_verstr: .asciiz "Version=LM8"
|
|
||||||
pmon_fuloong2f_verstr: .asciiz "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 $t4, 0($t7)
|
|
||||||
beq $t4, $zero, 1f
|
|
||||||
lb $t3, 0($t6)
|
|
||||||
bne $t3, $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 $t4, 0($t2)
|
|
||||||
sb $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
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
<chrp-boot>
|
|
||||||
<description>@PACKAGE@ @VERSION@</description>
|
|
||||||
<os-name>@PACKAGE@ @VERSION@</os-name>
|
|
||||||
<boot-script>boot &device;:\boot\grub\powerpc.elf</boot-script>
|
|
||||||
<icon size=64,64 color-space=3,3,2>
|
|
||||||
<bitmap>
|
|
||||||
FF FF FF FF FF FF FF FF FF FF 92 6D 6D 6D 6D 6D 6D 6D 6D 6D DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF B6 92 6D 92 92 92 DB FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF DB 6D 92 DB FF FF FF FF FF DB B6 FF FF 92 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 92 DB FF FF FF FF FF B6 6D 92 DB FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF 49 92 FF FF B6 B6 24 00 24 00 00 00 00 49 6D DB 6D 92 DB B6 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF B6 6D DB 92 6D 24 49 92 6D 6D FF FF FF 92 6D FF FF FF FF FF FF
|
|
||||||
FF FF FF FF B6 49 DB FF FF 24 00 00 00 92 92 B6 FF DB DB FF DB B6 FF DB 92 49 DB FF FF FF FF FF FF FF FF FF FF FF FF FF DB 49 6D B6 FF 6D B6 6D 6D 92 24 24 00 00 24 6D FF FF 49 DB FF FF FF FF
|
|
||||||
FF FF FF B6 49 FF DB 49 24 00 49 6D B6 FF B6 92 6D 6D 6D 92 DB DB DB B6 6D 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6D DB FF FF FF FF DB B6 B6 B6 FF DB 24 00 00 92 B6 FF 49 FF FF FF FF
|
|
||||||
FF FF DB 49 FF FF 49 00 00 24 FF FF 6D 49 92 DB FF FF FF DB 92 92 92 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 92 92 6D 6D B6 DB DB B6 6D 6D FF FF 24 00 00 DB FF 49 FF FF FF
|
|
||||||
FF FF 49 FF FF 49 00 00 6D DB DB 49 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 B6 B6 24 00 24 DB DB 6D FF FF
|
|
||||||
FF B6 92 FF B6 00 00 24 FF DB 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 B6 FF 00 00 49 FF 92 B6 FF
|
|
||||||
FF 6D FF FF 92 00 00 49 FF 6D FF FF FF FF FF FF FF FF FF FF FF FF FF B6 92 92 6D 6D 6D 6D DB FF FF FF FF FF FF B6 92 92 92 92 92 FF FF FF FF FF FF FF FF FF FF FF FF 6D FF 24 00 24 FF FF 6D FF
|
|
||||||
DB 92 FF DB 00 00 49 FF 92 DB FF FF FF FF FF FF FF FF FF FF FF DB 6D B6 FF FF FF FF FF FF 92 6D FF FF FF FF 6D B6 FF FF FF FF FF B6 B6 FF FF FF FF FF FF FF FF FF FF FF 92 DB 00 00 92 FF 92 DB
|
|
||||||
92 FF FF B6 00 00 6D FF 6D FF FF FF FF FF FF FF FF FF FF FF DB 6D FF FF FF 92 49 49 49 92 FF FF 49 DB DB 24 DB FF B6 49 49 92 FF FF DB 92 FF FF FF FF FF FF FF FF FF FF 92 FF 00 00 6D FF DB 92
|
|
||||||
6D FF FF FF 00 00 49 92 DB FF FF FF FF FF FF FF FF FF FF DB 6D FF FF 6D 00 00 00 00 00 00 00 B6 FF 49 00 24 24 49 24 00 00 00 00 6D FF DB 92 FF FF FF FF FF FF FF FF FF DB B6 00 00 92 FF FF 6D
|
|
||||||
6D FF FF 24 00 00 DB 6D FF FF FF FF FF FF FF FF FF FF DB 6D FF DB 00 00 00 00 00 00 00 00 00 00 B6 FF DB B6 49 92 24 24 00 00 00 00 24 FF DB 92 FF FF FF FF FF FF FF FF FF 92 6D 00 00 DB FF 6D
|
|
||||||
6D FF FF 24 00 00 FF 6D FF FF FF FF FF FF FF FF FF FF 49 FF B6 00 00 00 00 00 00 00 00 00 00 00 00 92 FF FF 92 DB DB 24 24 00 00 00 00 24 FF 92 DB FF FF FF FF FF FF FF FF 92 92 00 00 FF FF 6D
|
|
||||||
6D FF FF B6 00 00 92 6D FF FF FF FF FF FF FF FF FF 49 FF DB 00 00 00 00 00 00 00 00 00 00 00 00 00 92 FF FF B6 B6 FF 92 24 00 00 00 00 00 49 FF 6D FF FF FF FF FF FF FF FF 92 24 00 49 FF FF 6D
|
|
||||||
6D FF FF 00 00 00 DB 6D FF FF FF FF FF FF FF FF 6D DB DB 00 00 00 00 00 00 00 00 00 00 00 00 00 00 92 FF FF DB B6 FF B6 49 00 00 00 00 00 00 6D FF 6D FF FF FF FF FF FF FF 92 92 00 00 DB FF 6D
|
|
||||||
6D FF FF DB 00 00 B6 6D FF FF FF FF FF FF FF 6D B6 FF 24 00 00 00 00 00 00 00 00 00 00 00 24 B6 DB 6D FF FF FF FF FF 6D 49 24 00 00 00 00 00 00 B6 DB B6 FF FF FF FF FF B6 DB 24 00 92 FF FF 6D
|
|
||||||
6D FF FF 6D 00 00 24 DB 92 FF FF FF FF FF 92 92 FF 49 00 00 00 00 00 49 B6 FF FF DB B6 DB FF FF FF B6 92 FF FF DB 92 FF FF FF 49 6D 92 24 00 00 00 DB B6 DB FF FF FF FF 6D FF 00 00 00 DB FF 6D
|
|
||||||
6D FF FF 92 24 00 49 FF 6D B6 FF FF FF 6D 92 FF 49 00 00 49 DB FF FF FF FF FF FF B6 FF FF FF FF FF FF B6 6D 92 92 FF FF FF FF 6D FF FF FF DB 24 00 24 FF 92 B6 FF FF 92 B6 FF 00 00 B6 FF FF 6D
|
|
||||||
92 FF FF FF 00 00 24 92 FF 92 6D 92 49 B6 DB 24 00 24 DB FF FF FF FF FF DB 92 24 00 FF FF FF FF 6D 6D FF FF FF 6D 6D FF FF B6 DB 6D FF FF FF FF 00 00 24 DB B6 6D 6D B6 DB 00 00 00 6D FF FF 6D
|
|
||||||
DB 92 FF DB 49 00 00 00 B6 FF FF DB FF 6D 00 00 6D FF FF FF FF FF FF FF 24 92 00 49 FF FF FF FF FF 6D B6 FF FF 6D 6D FF 6D 00 DB DB 92 FF FF FF DB 00 00 00 6D FF FF DB 6D 00 00 24 FF FF 92 DB
|
|
||||||
FF 49 FF FF 6D 00 00 00 24 49 B6 FF 24 00 00 6D FF FF FF FF FF FF FF 49 92 B6 00 DB FF FF DB DB FF FF B6 FF FF FF FF FF 00 49 DB FF 92 FF FF FF FF 92 00 00 00 24 6D 00 00 00 00 24 DB FF 49 FF
|
|
||||||
FF 92 B6 FF 92 49 00 00 00 00 00 24 00 00 00 FF FF FF FF FF FF FF 92 6D FF B6 DB FF DB B6 DB B6 B6 FF FF B6 FF FF FF DB 00 B6 DB FF 92 FF FF FF FF FF 24 00 00 00 00 00 00 00 00 B6 FF 92 B6 FF
|
|
||||||
FF FF 49 FF FF 49 24 00 00 00 00 00 00 00 B6 FF FF FF FF FF FF FF B6 FF FF FF FF FF FF FF FF FF 6D FF FF 6D FF FF FF DB 24 FF FF FF 92 FF FF FF FF FF 6D 00 00 00 00 00 00 00 DB FF FF 6D FF FF
|
|
||||||
FF FF DB 6D FF FF 6D 49 00 00 00 00 00 24 FF FF FF FF FF FF FF FF FF FF FF FF FF DB 6D 49 24 24 24 FF FF DB FF FF FF FF 24 24 00 00 92 FF FF FF FF FF DB 00 00 00 00 00 00 FF DB FF 6D FF FF FF
|
|
||||||
FF FF FF 92 B6 FF FF DB 49 24 00 00 00 92 FF FF FF FF FF FF FF FF FF DB FF FF FF 49 49 24 00 24 FF FF FF FF FF FF FF FF 49 6D 00 24 49 FF FF FF FF FF FF 49 00 24 6D 6D B6 FF FF 6D B6 FF FF FF
|
|
||||||
FF FF FF FF 6D B6 FF FF DB 92 B6 49 00 FF FF FF FF FF FF FF FF FF FF B6 FF FF FF 92 DB 92 00 24 FF FF FF FF FF FF FF FF FF 00 00 6D FF FF FF FF FF FF FF DB 00 6D DB FF FF FF 6D B6 FF FF FF FF
|
|
||||||
FF FF FF FF FF 92 6D FF FF FF FF B6 49 FF FF FF FF FF FF FF FF FF FF 6D FF FF FF FF B6 92 92 B6 B6 DB FF FF FF FF FF FF FF B6 6D 49 6D FF FF FF FF FF FF FF 92 24 FF FF B6 6D DB FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF DB 49 6D B6 FF 6D 92 FF FF FF FF FF FF FF FF FF DB 6D FF FF FF FF FF FF FF FF FF 92 FF FF FF FF FF FF FF FF 6D DB 92 FF FF FF FF FF FF FF FF 6D 49 6D DB FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF DB 92 49 00 FF FF FF FF FF FF FF FF FF FF 6D 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 92 6D FF FF FF FF FF FF FF DB 92 FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF 49 FF FF FF FF FF FF FF FF FF DB 00 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 B6 92 6D B6 FF FF FF FF FF FF 49 DB FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF 24 FF FF FF FF FF FF FF FF FF 49 DB 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6D 6D FF 92 49 92 FF FF FF FF DB 49 DB FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF B6 49 FF FF FF FF FF FF FF FF 6D 92 FF 92 FF FF FF FF FF FF FF FF FF FF B6 6D 49 6D DB FF FF FF FF FF 6D 49 FF FF FF DB 6D 6D 92 92 6D 49 FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF 24 FF FF FF FF FF FF FF FF 6D 92 FF FF FF DB FF FF FF FF FF FF FF FF 6D 6D FF FF FF 92 6D FF FF FF FF FF 49 92 B6 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF DB 6D FF FF FF FF FF FF DB 24 92 FF FF FF FF FF FF FF FF FF FF FF FF FF 49 49 6D DB FF FF DB 6D B6 FF FF FF FF B6 B6 DB 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF 24 B6 FF FF FF FF B6 49 49 24 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF 00 49 FF DB DB FF FF FF B6 92 FF FF FF FF FF FF 92 DB FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF 24 B6 FF FF B6 24 00 6D DB FF 6D 92 FF FF FF FF FF FF FF FF FF FF FF FF FF 6D DB DB 00 00 24 FF FF FF FF B6 FF FF FF FF FF B6 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF B6 B6 DB B6 6D 49 49 92 FF FF FF B6 6D FF FF FF FF FF FF FF 92 92 FF FF FF FF FF FF FF 49 92 DB 49 FF FF FF FF FF FF FF FF FF 92 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF 92 24 49 49 6D FF 6D 92 FF FF FF B6 6D FF FF FF FF FF FF FF FF FF FF DB FF FF FF FF FF FF FF FF B6 FF FF FF FF FF FF FF FF FF 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF 6D 92 FF FF FF B6 6D FF FF FF FF FF FF FF FF FF FF B6 DB DB FF FF FF FF FF FF FF DB FF FF FF FF FF FF FF 6D 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF 6D 92 FF FF FF FF 24 92 FF FF FF FF FF FF FF FF FF FF 6D B6 FF FF FF FF FF FF FF FF FF FF FF FF FF DB 49 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF 6D B6 FF FF FF FF B6 6D FF FF FF FF FF FF FF FF FF FF B6 92 FF FF FF FF FF FF FF FF FF FF FF DB 6D 00 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF 6D 92 FF FF FF FF DB 49 FF FF FF FF FF FF FF FF FF FF FF 49 FF FF FF FF FF FF FF FF FF FF FF FF FF DB 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF 92 6D FF FF FF FF FF 00 24 DB FF FF FF FF FF FF FF FF FF DB 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF B6 49 FF FF FF FF FF FF 92 6D FF FF FF FF FF FF FF FF FF FF 6D B6 FF FF FF FF FF FF FF FF FF FF FF FF B6 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 FF FF FF FF FF FF FF 49 00 DB FF FF FF FF FF FF FF FF FF 6D 6D B6 DB DB DB 92 49 00 00 00 00 00 49 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF 49 DB FF FF FF FF FF FF FF 24 FF FF FF FF FF FF FF FF FF FF FF DB 6D 49 49 6D B6 DB FF FF FF B6 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 92 FF FF FF FF FF FF B6 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 24 FF FF FF FF FF FF DB 00 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DB 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 B6 FF FF FF FF FF FF DB 6D 00 49 FF FF FF FF FF FF FF FF FF FF FF FF DB B6 92 6D 6D 6D 49 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 49 FF FF FF FF FF FF FF FF 49 00 92 FF FF FF FF FF FF FF FF 49 00 00 00 00 00 49 B6 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DB 6D FF FF FF FF FF FF FF FF 6D 6D FF B6 B6 FF FF FF FF FF FF 92 92 FF FF 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 B6 FF FF FF FF FF FF DB 00 DB 6D 00 B6 FF FF FF FF FF FF FF FF FF FF 24 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 DB FF FF FF FF FF 92 00 FF 24 00 00 49 FF FF FF FF FF FF FF FF FF B6 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 FF FF FF FF FF FF 49 24 24 00 00 6D FF FF FF FF FF FF FF DB FF DB 6D FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF B6 FF FF FF FF FF FF 6D 00 24 24 24 FF FF FF FF FF FF DB B6 DB 49 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF B6 00 B6 00 49 DB FF FF FF DB 24 6D 24 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 B6 6D 00 00 DB FF 6D 00 00 00 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DB 00 6D FF FF 00 00 DB 49 00 00 00 00 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 DB FF FF 6D 00 00 92 24 00 00 00 00 00 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF B6 FF FF 00 6D 00 00 24 00 00 00 00 00 00 24 92 DB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6D DB 00 00 00 00 00 00 00 00 00 00 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DB 00 24 00 00 6D 00 00 00 B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF DB 49 92 6D 6D DB B6 92 92 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
|
|
||||||
</bitmap>
|
|
||||||
</icon>
|
|
||||||
</chrp-boot>
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
<CHRP-BOOT>
|
|
||||||
<COMPATIBLE>
|
|
||||||
MacRISC MacRISC3 MacRISC4
|
|
||||||
</COMPATIBLE>
|
|
||||||
<DESCRIPTION>
|
|
||||||
@PACKAGE@ @VERSION@
|
|
||||||
</DESCRIPTION>
|
|
||||||
<OS-BADGE-ICONS>
|
|
||||||
3434
|
|
||||||
00000000000000F781FB8181818181FBFAF500000000000000000000000000000000000000F6FAFAFAFA81F9F600000000000000
|
|
||||||
0000000000F8FBF9F500F95656FCFB5656FBF800000000000000000000000000000000F5FAF9F5F7F600F6F6F9FAF70000000000
|
|
||||||
000000F5FBFA0056FDFEFEFDFDFAAC81FB56568181560000000000000000000000F9F9F9F7FCFDFEFEFEFFFC81F656FA00000000
|
|
||||||
0000F5AC2BF7FBFEFEFD2BF6568181F9F7F6F6F8FBF50000000000000000000000FAF700F600F5F7F7F6F7FEFFACF82BFB000000
|
|
||||||
0000FC2BF5FEFFFFF5F7FC81F70000F7F9FAFAF8000000000000000000000000000056F9F9FAF9F7F7FA812BF7FFFF56F7FA0000
|
|
||||||
005656F5FEFFAC2BF9FA000000000000000000000000000000000000000000000000000000000000000000FA56FAFEFEF8F9F700
|
|
||||||
00FB00F7FFFF56F9F800000000000000000000F656FAFA56F50000000000F5F8F9F8F5000000000000000000F9F7FCFFFB00FB00
|
|
||||||
F8F800ACFFACF6FA000000000000000000F6FA562BF5F5F781FA000000F9FA2B00F556F9F5000000000000000081F8FFFEF6562B
|
|
||||||
810000FFFFF9FAF500000000000000002B8100F5F9FCACFBF82BFBF6FCFAF6FAFC81F600FA2B000000000000002BF8FEFFF8F5FA
|
|
||||||
FA00F5FEFFFA8100000000000000002B8100F9FEFFFFFFFFFFFBF6FDFEACFDFEFFFFFFFBF581F600000000000000F9FEFFF700FA
|
|
||||||
FA00FBFFFEF6F900000000000000F6FB00FCFFFFFFFFFFFFFFFFFCF600FCF7ACFEFFFFFFFDF6810000000000000056F9FFAC00FA
|
|
||||||
FA00F6FFFFF856000000000000F5FBF5ACFFFFFFFFFFFFFFFFFFFF2B002BF8F5ACFFFFFFFFFDF6FA000000000000F9FCFF560081
|
|
||||||
FA0081FFFFF8F9000000000000FBF6FBFFFFFFFFFFFFFFFFFFFFFFF800F55600FCFFFFFFFFFF81F8F80000000000F981FFAC0081
|
|
||||||
FA0000FEFEF8FB0000000000812BFAFFFFFFFFFFFFFEFFFFFDF92BFA0000F6F981ACFEFFFFFFFF56F9F600000000F9FDFF2B0081
|
|
||||||
FA00FAFFFF81812B000000FAF8F9FFFFFEACFBF80000F500000000F9F900562B0000FCF7F9ACFFFF2BF9F50000F9F6FEFFFB0081
|
|
||||||
810000FCFFFBF6FB56F7FBF8F9FFFE5600000000F5FAAC000000F82BF6FAFBF800F556F80000F9FFFE2BFAFAFAF8FAFFFEF60081
|
|
||||||
FAF6F5ACFFFFAC00F856F7ACFFFCF500000000FAFCFFFC00000056AC00F581F92BFEF9FAF6000081FFFFFBF6F62BFFFFACF6F6FA
|
|
||||||
F6FA00FAFFFFFFACFA56FFFFAC0000000000F6FD2BFEF6F5565600F5F800F60081FEF7F656000000FDFFFFFDFDFFFFFFAC0081F5
|
|
||||||
0081F52BFDFFFFFFFFFFFFFFF60000000000FBF6F6F5F656F52BF900FA000000FCFAF5F656000000F7FFFFFFFFFFFFFDF7F68100
|
|
||||||
00F6FB00F8FDFFFFFFFFFF810000000000F6F5000000F52B56F9FC00F7F70000FCF881FCF500000000FEFFFFFFFFAC5600FBF500
|
|
||||||
000056F900F8ACFDFFFFFFF5000000000000002B0000FDFEFFFE560000F60000F9ACFFFE810000000081FFFEFDFAF800FAF70000
|
|
||||||
000000FAF9002B56FAFDFC0000000000000000F80000FBF5FEFEF5000000000000ACFFFA2B0000000000FEFB2BF5008156000000
|
|
||||||
00000000F9FBF600F6FBF800000000000000F7F8000000F9F9F9F82B0000000000F6ACACF70000000000F7FD2BFA812B00000000
|
|
||||||
0000000000F681FCFBFD0000000000000000FBF6000000000000F52B000000000000F92B810000000000008181F6000000000000
|
|
||||||
0000000000000000F6FC00000000000000F6FF0000000000000000000000000000000081FBFB2B00000000F7F900000000000000
|
|
||||||
000000000000000000FC00000000000000FCFAF600000000000000000000000000000056ACF581FBF700000081FB000000000000
|
|
||||||
0000000000000000FAF90000000000008156F5F8000000000000002BFBFCFBF800000000FD2B000056FB8181FBF8000000000000
|
|
||||||
0000000000000000AC0000000000F5FBF90000F6000000000000F5AC56F6005681F50000F6ACFCFBF70000000000000000000000
|
|
||||||
00000000000000F881000000F5FAFDFD00000000000000000000F7FEFA2B0000F581F70000000000810000000000000000000000
|
|
||||||
000000000000F9FCF500FAFDACFAF5FD00000000000000000000F5ACF5FDFEFA0000F82B00000000810000000000000000000000
|
|
||||||
000000000000FCF8F9AC81FD000000FD000000000000FAF7000000F50081F9FAF800000000000000FB0000000000000000000000
|
|
||||||
000000000000FC81F956F5FD000000FD0000000000000000F800F5000000000056000000000000F7FB0000000000000000000000
|
|
||||||
00000000000000000000F5AC000000ACF800000000000000F5FAF80000000000F50000000000F8ACF50000000000000000000000
|
|
||||||
00000000000000000000F5AC000000F5AC000000000000000056F9000000000000000000F7ACFCF5000000000000000000000000
|
|
||||||
00000000000000000000F5FD00000000AC000000000000000000FB0000000000000000F5F6F5FCF6000000000000000000000000
|
|
||||||
0000000000000000000000FD00000000FBFDF600000000000000F8F900000000000000000000F5FB000000000000000000000000
|
|
||||||
0000000000000000000000FDF500000000F9ACF800000000000000815600000000F656818181AC56000000000000000000000000
|
|
||||||
000000000000000000000081F80000000000F9FC0000000000000000F9ACACACFCFBFAFA81FD2B00000000000000000000000000
|
|
||||||
0000000000000000000000F7FB0000000000FBF70000000000000000000000000000000000FB0000000000000000000000000000
|
|
||||||
000000000000000000000000ACF500000000F9FD56F5000000000000000000000000000000FB0000000000000000000000000000
|
|
||||||
000000000000000000000000F8FA0000000000F6FEFEF5000000000000F55681FCACFDACFC560000000000000000000000000000
|
|
||||||
00000000000000000000000000FBF600000000002BFCFA00F700000000F9FDFDFAFEF90000000000000000000000000000000000
|
|
||||||
00000000000000000000000000F5FB0000000000F5FEF7ACAC0000000000000000FCF50000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000F6FA000000002BFF2BFFFFAC00000000000000F7FA0000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000F65600000000FAFEFFFFAC0000000000F800F6810000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000F52B00000000F8FEFBFF5600000000FCFAACF60000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000F9FCFCFFFB00F8FEFFFDF5000000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000F9FDF7F5FFFD56FFFFFFFD00000000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000810000FBFFFFFBFFFFFFFFACF9F5F5000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000F600FC81FFFEFFFFFFFFFFFE8100000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000000000F7F6FDFFFFFFFEFFFFACF500000000000000000000000000000000
|
|
||||||
000000000000000000000000000000000000000000000000000000F5FC81FC81FAFBF9F500000000000000000000000000000000
|
|
||||||
|
|
||||||
00000000000000F781FB8181818181FBFAF500000000000000000000000000000000000000F6FAFAFAFA81F9F600000000000000
|
|
||||||
0000000000F8FBF9F500F95656FCFB5656FBF800000000000000000000000000000000F5FAF9F5F7F600F6F6F9FAF70000000000
|
|
||||||
000000F5FBFA0056FDFEFEFDFDFAAC81FB56568181560000000000000000000000F9F9F9F7FCFDFEFEFEFFFC81F656FA00000000
|
|
||||||
0000F5AC2BF7FBFEFEFD2BF6568181F9F7F6F6F8FBF50000000000000000000000FAF700F600F5F7F7F6F7FEFFACF82BFB000000
|
|
||||||
0000FC2BF5FEFFFFF5F7FC81F70000F7F9FAFAF8000000000000000000000000000056F9F9FAF9F7F7FA812BF7FFFF56F7FA0000
|
|
||||||
005656F5FEFFAC2BF9FA000000000000000000000000000000000000000000000000000000000000000000FA56FAFEFEF8F9F700
|
|
||||||
00FB00F7FFFF56F9F800000000000000000000F656FAFA56F50000000000F5F8F9F8F5000000000000000000F9F7FCFFFB00FB00
|
|
||||||
F8F800ACFFACF6FA000000000000000000F6FA562BF5F5F781FA000000F9FA2B00F556F9F5000000000000000081F8FFFEF6562B
|
|
||||||
810000FFFFF9FAF500000000000000002B8100F5F9FCACFBF82BFBF6FCFAF6FAFC81F600FA2B000000000000002BF8FEFFF8F5FA
|
|
||||||
FA00F5FEFFFA8100000000000000002B8100F9FEFFFFFFFFFFFBF6FDFEACFDFEFFFFFFFBF581F600000000000000F9FEFFF700FA
|
|
||||||
FA00FBFFFEF6F900000000000000F6FB00FCFFFFFFFFFFFFFFFFFCF600FCF7ACFEFFFFFFFDF6810000000000000056F9FFAC00FA
|
|
||||||
FA00F6FFFFF856000000000000F5FBF5ACFFFFFFFFFFFFFFFFFFFF2B002BF8F5ACFFFFFFFFFDF6FA000000000000F9FCFF560081
|
|
||||||
FA0081FFFFF8F9000000000000FBF6FBFFFFFFFFFFFFFFFFFFFFFFF800F55600FCFFFFFFFFFF81F8F80000000000F981FFAC0081
|
|
||||||
FA0000FEFEF8FB0000000000812BFAFFFFFFFFFFFFFEFFFFFDF92BFA0000F6F981ACFEFFFFFFFF56F9F600000000F9FDFF2B0081
|
|
||||||
FA00FAFFFF81812B000000FAF8F9FFFFFEACFBF80000F500000000F9F900562B0000FCF7F9ACFFFF2BF9F50000F9F6FEFFFB0081
|
|
||||||
810000FCFFFBF6FB56F7FBF8F9FFFE5600000000F5FAAC000000F82BF6FAFBF800F556F80000F9FFFE2BFAFAFAF8FAFFFEF60081
|
|
||||||
FAF6F5ACFFFFAC00F856F7ACFFFCF500000000FAFCFFFC00000056AC00F581F92BFEF9FAF6000081FFFFFBF6F62BFFFFACF6F6FA
|
|
||||||
F6FA00FAFFFFFFACFA56FFFFAC0000000000F6FD2BFEF6F5565600F5F800F60081FEF7F656000000FDFFFFFDFDFFFFFFAC0081F5
|
|
||||||
0081F52BFDFFFFFFFFFFFFFFF60000000000FBF6F6F5F656F52BF900FA000000FCFAF5F656000000F7FFFFFFFFFFFFFDF7F68100
|
|
||||||
00F6FB00F8FDFFFFFFFFFF810000000000F6F5000000F52B56F9FC00F7F70000FCF881FCF500000000FEFFFFFFFFAC5600FBF500
|
|
||||||
000056F900F8ACFDFFFFFFF5000000000000002B0000FDFEFFFE560000F60000F9ACFFFE810000000081FFFEFDFAF800FAF70000
|
|
||||||
000000FAF9002B56FAFDFC0000000000000000F80000FBF5FEFEF5000000000000ACFFFA2B0000000000FEFB2BF5008156000000
|
|
||||||
00000000F9FBF600F6FBF800000000000000F7F8000000F9F9F9F82B0000000000F6ACACF70000000000F7FD2BFA812B00000000
|
|
||||||
0000000000F681FCFBFD0000000000000000FBF6000000000000F52B000000000000F92B810000000000008181F6000000000000
|
|
||||||
0000000000000000F6FC00000000000000F6FF0000000000000000000000000000000081FBFB2B00000000F7F900000000000000
|
|
||||||
000000000000000000FC00000000000000FCFAF600000000000000000000000000000056ACF581FBF700000081FB000000000000
|
|
||||||
0000000000000000FAF90000000000008156F5F8000000000000002BFBFCFBF800000000FD2B000056FB8181FBF8000000000000
|
|
||||||
0000000000000000AC0000000000F5FBF90000F6000000000000F5AC56F6005681F50000F6ACFCFBF70000000000000000000000
|
|
||||||
00000000000000F881000000F5FAFDFD00000000000000000000F7FEFA2B0000F581F70000000000810000000000000000000000
|
|
||||||
000000000000F9FCF500FAFDACFAF5FD00000000000000000000F5ACF5FDFEFA0000F82B00000000810000000000000000000000
|
|
||||||
000000000000FCF8F9AC81FD000000FD000000000000FAF7000000F50081F9FAF800000000000000FB0000000000000000000000
|
|
||||||
000000000000FC81F956F5FD000000FD0000000000000000F800F5000000000056000000000000F7FB0000000000000000000000
|
|
||||||
00000000000000000000F5AC000000ACF800000000000000F5FAF80000000000F50000000000F8ACF50000000000000000000000
|
|
||||||
00000000000000000000F5AC000000F5AC000000000000000056F9000000000000000000F7ACFCF5000000000000000000000000
|
|
||||||
00000000000000000000F5FD00000000AC000000000000000000FB0000000000000000F5F6F5FCF6000000000000000000000000
|
|
||||||
0000000000000000000000FD00000000FBFDF600000000000000F8F900000000000000000000F5FB000000000000000000000000
|
|
||||||
0000000000000000000000FDF500000000F9ACF800000000000000815600000000F656818181AC56000000000000000000000000
|
|
||||||
000000000000000000000081F80000000000F9FC0000000000000000F9ACACACFCFBFAFA81FD2B00000000000000000000000000
|
|
||||||
0000000000000000000000F7FB0000000000FBF70000000000000000000000000000000000FB0000000000000000000000000000
|
|
||||||
000000000000000000000000ACF500000000F9FD56F5000000000000000000000000000000FB0000000000000000000000000000
|
|
||||||
000000000000000000000000F8FA0000000000F6FEFEF5000000000000F55681FCACFDACFC560000000000000000000000000000
|
|
||||||
00000000000000000000000000FBF600000000002BFCFA00F700000000F9FDFDFAFEF90000000000000000000000000000000000
|
|
||||||
00000000000000000000000000F5FB0000000000F5FEF7ACAC0000000000000000FCF50000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000F6FA000000002BFF2BFFFFAC00000000000000F7FA0000000000000000000000000000000000
|
|
||||||
000000000000000000000000000000F65600000000FAFEFFFFAC0000000000F800F6810000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000F52B00000000F8FEFBFF5600000000FCFAACF60000000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000F9FCFCFFFB00F8FEFFFDF5000000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000F9FDF7F5FFFD56FFFFFFFD00000000000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000810000FBFFFFFBFFFFFFFFACF9F5F5000000000000000000000000000000
|
|
||||||
0000000000000000000000000000000000000000000000F600FC81FFFEFFFFFFFFFFFE8100000000000000000000000000000000
|
|
||||||
00000000000000000000000000000000000000000000000000F7F6FDFFFFFFFEFFFFACF500000000000000000000000000000000
|
|
||||||
000000000000000000000000000000000000000000000000000000F5FC81FC81FAFBF9F500000000000000000000000000000000
|
|
||||||
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
||||||
</OS-BADGE-ICONS>
|
|
||||||
<BOOT-SCRIPT>
|
|
||||||
boot &device;:&partition;,\System\Library\CoreServices\grub.elf
|
|
||||||
</BOOT-SCRIPT>
|
|
||||||
</CHRP-BOOT>
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
/* -*-Asm-*- */
|
|
||||||
/*
|
|
||||||
* 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/machine/boot.h>
|
|
||||||
|
|
||||||
.text
|
|
||||||
.align 4
|
|
||||||
.globl _start
|
|
||||||
_start:
|
|
||||||
/* OF CIF entry point arrives in %o4 */
|
|
||||||
pic_base:
|
|
||||||
call boot_continue
|
|
||||||
mov %o4, CIF_REG
|
|
||||||
|
|
||||||
#ifndef CDBOOT
|
|
||||||
/* The offsets to these locations are defined by the
|
|
||||||
* GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
|
|
||||||
* and grub-setup uses this to patch these next three values as needed.
|
|
||||||
*
|
|
||||||
* The boot_path will be the OF device path of the partition where the
|
|
||||||
* rest of the GRUB kernel image resides. kernel_sector will be set to
|
|
||||||
* the location of the first block of the GRUB kernel, and
|
|
||||||
* kernel_address is the location where we should load that first block.
|
|
||||||
*
|
|
||||||
* After loading in that block we will execute it by jumping to the
|
|
||||||
* load address plus the size of the prepended A.OUT header (32 bytes).
|
|
||||||
*/
|
|
||||||
. = _start + GRUB_BOOT_MACHINE_BOOT_DEVPATH
|
|
||||||
boot_path:
|
|
||||||
. = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
|
|
||||||
kernel_byte: .xword (2 << 9)
|
|
||||||
boot_path_end:
|
|
||||||
kernel_address: .word GRUB_BOOT_MACHINE_KERNEL_ADDR
|
|
||||||
#else
|
|
||||||
#define boot_path (_start + 512 + SCRATCH_PAD_BOOT_SIZE)
|
|
||||||
#define boot_path_end (_start + 1024)
|
|
||||||
#include <grub/offsets.h>
|
|
||||||
|
|
||||||
. = _start + 8
|
|
||||||
kernel_byte: .xword (2 << 9)
|
|
||||||
kernel_size: .word 512
|
|
||||||
kernel_address: .word GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
prom_finddev_name: .asciz "finddevice"
|
|
||||||
prom_chosen_path: .asciz "/chosen"
|
|
||||||
prom_getprop_name: .asciz "getprop"
|
|
||||||
prom_stdout_name: .asciz "stdout"
|
|
||||||
prom_write_name: .asciz "write"
|
|
||||||
prom_bootpath_name: .asciz "bootpath"
|
|
||||||
prom_open_name: .asciz "open"
|
|
||||||
prom_seek_name: .asciz "seek"
|
|
||||||
prom_read_name: .asciz "read"
|
|
||||||
prom_exit_name: .asciz "exit"
|
|
||||||
grub_name: .asciz "GRUB "
|
|
||||||
#define GRUB_NAME_LEN 5
|
|
||||||
|
|
||||||
.align 4
|
|
||||||
|
|
||||||
prom_open_error:
|
|
||||||
GET_ABS(prom_open_name, %o2)
|
|
||||||
call console_write
|
|
||||||
mov 4, %o3
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
prom_error:
|
|
||||||
GET_ABS(prom_exit_name, %o0)
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
/* %o0: OF call name
|
|
||||||
* %o1: input arg 1
|
|
||||||
*/
|
|
||||||
prom_call_1_1_o2:
|
|
||||||
clr %o2
|
|
||||||
ba prom_call_x_1
|
|
||||||
mov 1, %g1
|
|
||||||
|
|
||||||
prom_call_getprop:
|
|
||||||
mov 4, %g1
|
|
||||||
stx %g1, [%l1 + 256]
|
|
||||||
mov CHOSEN_NODE_REG, %o1
|
|
||||||
ba prom_call_x_1
|
|
||||||
GET_ABS(prom_getprop_name, %o0)
|
|
||||||
|
|
||||||
prom_call_3_1_o1:
|
|
||||||
ba prom_call_3_1
|
|
||||||
mov BOOTDEV_REG, %o1
|
|
||||||
|
|
||||||
|
|
||||||
/* %o2: message string
|
|
||||||
* %o3: message length
|
|
||||||
*/
|
|
||||||
console_write:
|
|
||||||
GET_ABS(prom_write_name, %o0)
|
|
||||||
mov STDOUT_NODE_REG, %o1
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
/* %o0: OF call name
|
|
||||||
* %o1: input arg 1
|
|
||||||
* %o2: input arg 2
|
|
||||||
* %o3: input arg 3
|
|
||||||
*/
|
|
||||||
prom_call_3_1:
|
|
||||||
mov 3, %g1
|
|
||||||
prom_call_x_1:
|
|
||||||
mov 1, %o5
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
/* %o0: OF call name
|
|
||||||
* %g1: num inputs
|
|
||||||
* %o5: num outputs
|
|
||||||
* %o1-%o4: inputs
|
|
||||||
*/
|
|
||||||
prom_call:
|
|
||||||
stx %o0, [%l1 + 0x00]
|
|
||||||
stx %g1, [%l1 + 0x08]
|
|
||||||
stx %o5, [%l1 + 0x10]
|
|
||||||
stx %o1, [%l1 + 0x18]
|
|
||||||
stx %o2, [%l1 + 0x20]
|
|
||||||
stx %o3, [%l1 + 0x28]
|
|
||||||
stx %o4, [%l1 + 0x30]
|
|
||||||
jmpl CIF_REG, %g0
|
|
||||||
mov %l1, %o0
|
|
||||||
|
|
||||||
boot_continue:
|
|
||||||
mov %o7, PIC_REG /* PIC base */
|
|
||||||
#ifndef CDBOOT
|
|
||||||
sethi %hi(SCRATCH_PAD_BOOT), %l1 /* OF argument slots */
|
|
||||||
#else
|
|
||||||
GET_ABS(_start + 512, %l1) /* OF argument slots */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Find the /chosen node so we can fetch the stdout handle,
|
|
||||||
* and thus perform console output.
|
|
||||||
*
|
|
||||||
* chosen_node = prom_finddevice("/chosen")
|
|
||||||
*/
|
|
||||||
GET_ABS(prom_finddev_name, %o0)
|
|
||||||
call prom_call_1_1_o2
|
|
||||||
GET_ABS(prom_chosen_path, %o1)
|
|
||||||
|
|
||||||
ldx [%l1 + 0x20], CHOSEN_NODE_REG
|
|
||||||
brz CHOSEN_NODE_REG, prom_error
|
|
||||||
|
|
||||||
/* getprop(chosen_node, "stdout", &buffer, buffer_size) */
|
|
||||||
GET_ABS(prom_stdout_name, %o2)
|
|
||||||
add %l1, 256, %o3
|
|
||||||
call prom_call_getprop
|
|
||||||
mov 1024, %o4
|
|
||||||
|
|
||||||
lduw [%l1 + 256], STDOUT_NODE_REG
|
|
||||||
brz,pn STDOUT_NODE_REG, prom_error
|
|
||||||
|
|
||||||
/* write(stdout_node, "GRUB ", strlen("GRUB ")) */
|
|
||||||
GET_ABS(grub_name, %o2)
|
|
||||||
call console_write
|
|
||||||
mov GRUB_NAME_LEN, %o3
|
|
||||||
|
|
||||||
GET_ABS(boot_path, %o3)
|
|
||||||
#ifndef CDBOOT
|
|
||||||
ldub [%o3], %o1
|
|
||||||
brnz,pn %o1, bootpath_known
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* getprop(chosen_node, "bootpath", &buffer, buffer_size) */
|
|
||||||
GET_ABS(prom_bootpath_name, %o2)
|
|
||||||
call prom_call_getprop
|
|
||||||
mov (boot_path_end - boot_path), %o4
|
|
||||||
|
|
||||||
bootpath_known:
|
|
||||||
|
|
||||||
/* Open up the boot_path, and use that handle to read the
|
|
||||||
* first block of the GRUB kernel image.
|
|
||||||
*
|
|
||||||
* bootdev_handle = open(boot_path)
|
|
||||||
*/
|
|
||||||
GET_ABS(prom_open_name, %o0)
|
|
||||||
call prom_call_1_1_o2
|
|
||||||
GET_ABS(boot_path, %o1)
|
|
||||||
|
|
||||||
ldx [%l1 + 0x20], BOOTDEV_REG
|
|
||||||
brz,pn BOOTDEV_REG, prom_open_error
|
|
||||||
|
|
||||||
/* Since we have 64-bit cells, the high cell of the seek offset
|
|
||||||
* is zero and the low cell is the entire value.
|
|
||||||
*
|
|
||||||
* seek(bootdev, 0, *kernel_byte)
|
|
||||||
*/
|
|
||||||
GET_ABS(prom_seek_name, %o0)
|
|
||||||
clr %o2
|
|
||||||
call prom_call_3_1_o1
|
|
||||||
LDX_ABS(kernel_byte, 0x00, %o3)
|
|
||||||
|
|
||||||
/* read(bootdev, *kernel_address, 512) */
|
|
||||||
GET_ABS(prom_read_name, %o0)
|
|
||||||
LDUW_ABS(kernel_address, 0x00, %o2)
|
|
||||||
call prom_call_3_1_o1
|
|
||||||
#ifdef CDBOOT
|
|
||||||
LDUW_ABS(kernel_size, 0x00, %o3)
|
|
||||||
#else
|
|
||||||
mov 512, %o3
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LDUW_ABS(kernel_address, 0x00, %o2)
|
|
||||||
jmpl %o2, %o7
|
|
||||||
#ifdef CDBOOT
|
|
||||||
mov CIF_REG, %o4
|
|
||||||
#else
|
|
||||||
nop
|
|
||||||
#endif
|
|
||||||
. = _start + GRUB_BOOT_MACHINE_CODE_END
|
|
||||||
|
|
||||||
/* the last 4 bytes in the sector 0 contain the signature */
|
|
||||||
.word GRUB_BOOT_MACHINE_SIGNATURE
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
/* -*-Asm-*- */
|
|
||||||
/*
|
|
||||||
* 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/machine/boot.h>
|
|
||||||
#include <grub/offsets.h>
|
|
||||||
|
|
||||||
.text
|
|
||||||
.align 4
|
|
||||||
.globl _start
|
|
||||||
_start:
|
|
||||||
/* First stage boot block jumps to us here. */
|
|
||||||
pic_base:
|
|
||||||
call after_info_block
|
|
||||||
mov %o7, PIC_REG
|
|
||||||
|
|
||||||
prom_write_name: .asciz "write"
|
|
||||||
prom_seek_name: .asciz "seek"
|
|
||||||
prom_read_name: .asciz "read"
|
|
||||||
prom_close_name: .asciz "close"
|
|
||||||
|
|
||||||
notification_string: .asciz "Loading kernel"
|
|
||||||
#define NOTIFICATION_STRING_LEN 14
|
|
||||||
|
|
||||||
notification_step: .asciz "."
|
|
||||||
#define NOTIFICATION_STEP_LEN 1
|
|
||||||
|
|
||||||
notification_done: .asciz "\r\n"
|
|
||||||
#define NOTIFICATION_DONE_LEN 2
|
|
||||||
|
|
||||||
.align 4
|
|
||||||
|
|
||||||
/* %o2: message string
|
|
||||||
* %o3: message length
|
|
||||||
*/
|
|
||||||
console_write:
|
|
||||||
GET_ABS(prom_write_name, %o0)
|
|
||||||
mov STDOUT_NODE_REG, %o1
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
/* %o0: OF call name
|
|
||||||
* %o1: input arg 1
|
|
||||||
* %o2: input arg 2
|
|
||||||
* %o3: input arg 3
|
|
||||||
*/
|
|
||||||
prom_call_3_1:
|
|
||||||
mov 3, %g1
|
|
||||||
mov 1, %o5
|
|
||||||
/* fallthru */
|
|
||||||
|
|
||||||
/* %o0: OF call name
|
|
||||||
* %g1: num inputs
|
|
||||||
* %o5: num outputs
|
|
||||||
* %o1-%o4: inputs
|
|
||||||
*/
|
|
||||||
prom_call:
|
|
||||||
stx %o0, [%l1 + 0x00]
|
|
||||||
stx %g1, [%l1 + 0x08]
|
|
||||||
stx %o5, [%l1 + 0x10]
|
|
||||||
stx %o1, [%l1 + 0x18]
|
|
||||||
stx %o2, [%l1 + 0x20]
|
|
||||||
stx %o3, [%l1 + 0x28]
|
|
||||||
stx %o4, [%l1 + 0x30]
|
|
||||||
jmpl CIF_REG, %g0
|
|
||||||
mov %l1, %o0
|
|
||||||
|
|
||||||
|
|
||||||
after_info_block:
|
|
||||||
sethi %hi(SCRATCH_PAD_DISKBOOT), %l1 /* OF argument slots */
|
|
||||||
|
|
||||||
GET_ABS(notification_string, %o2)
|
|
||||||
call console_write
|
|
||||||
mov NOTIFICATION_STRING_LEN, %o3
|
|
||||||
|
|
||||||
GET_ABS(firstlist - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2)
|
|
||||||
set GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS, %l3
|
|
||||||
bootloop:
|
|
||||||
lduw [%l2 + 0x08], %o0
|
|
||||||
brz %o0, bootit
|
|
||||||
lduw [%l2 + 0x00], %o3
|
|
||||||
sllx %o3, 32, %o3
|
|
||||||
lduw [%l2 + 0x04], %o4
|
|
||||||
or %o3, %o4, %o3
|
|
||||||
GET_ABS(prom_seek_name, %o0)
|
|
||||||
mov BOOTDEV_REG, %o1
|
|
||||||
clr %o2
|
|
||||||
call prom_call_3_1
|
|
||||||
sllx %o3, 9, %o3
|
|
||||||
|
|
||||||
GET_ABS(prom_read_name, %o0)
|
|
||||||
mov BOOTDEV_REG, %o1
|
|
||||||
lduw [%l2 + 0x08], %o3
|
|
||||||
sllx %o3, 9, %o3
|
|
||||||
mov %l3, %o2
|
|
||||||
call prom_call_3_1
|
|
||||||
add %l3, %o3, %l3
|
|
||||||
|
|
||||||
GET_ABS(notification_step, %o2)
|
|
||||||
call console_write
|
|
||||||
mov NOTIFICATION_STEP_LEN, %o3
|
|
||||||
|
|
||||||
ba bootloop
|
|
||||||
sub %l2, GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2
|
|
||||||
|
|
||||||
bootit:
|
|
||||||
GET_ABS(prom_close_name, %o0)
|
|
||||||
mov 1, %g1
|
|
||||||
mov 0, %o5
|
|
||||||
call prom_call
|
|
||||||
mov BOOTDEV_REG, %o1
|
|
||||||
|
|
||||||
GET_ABS(notification_done, %o2)
|
|
||||||
call console_write
|
|
||||||
mov NOTIFICATION_DONE_LEN, %o3
|
|
||||||
sethi %hi(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o2
|
|
||||||
jmpl %o2 + %lo(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o7
|
|
||||||
mov CIF_REG, %o4
|
|
||||||
1: ba,a 1b
|
|
||||||
|
|
||||||
lastlist:
|
|
||||||
.word 0
|
|
||||||
.word 0
|
|
||||||
|
|
||||||
. = _start + (0x200 - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE)
|
|
||||||
blocklist_default_start:
|
|
||||||
.word 0
|
|
||||||
.word 2
|
|
||||||
blocklist_default_len:
|
|
||||||
.word 0
|
|
||||||
firstlist:
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
/* bonito.c - PCI bonito interface. */
|
|
||||||
/*
|
|
||||||
* 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/pci.h>
|
|
||||||
#include <grub/misc.h>
|
|
||||||
|
|
||||||
static grub_uint32_t base_win[GRUB_MACHINE_PCI_NUM_WIN];
|
|
||||||
static const grub_size_t sizes_win[GRUB_MACHINE_PCI_NUM_WIN] =
|
|
||||||
{GRUB_MACHINE_PCI_WIN1_SIZE, GRUB_MACHINE_PCI_WIN_SIZE,
|
|
||||||
GRUB_MACHINE_PCI_WIN_SIZE};
|
|
||||||
/* Usage counters. */
|
|
||||||
static int usage_win[GRUB_MACHINE_PCI_NUM_WIN];
|
|
||||||
static grub_addr_t addr_win[GRUB_MACHINE_PCI_NUM_WIN] =
|
|
||||||
{GRUB_MACHINE_PCI_WIN1_ADDR, GRUB_MACHINE_PCI_WIN2_ADDR,
|
|
||||||
GRUB_MACHINE_PCI_WIN3_ADDR};
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
write_bases (void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
grub_uint32_t reg = 0;
|
|
||||||
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
|
||||||
reg |= (((base_win[i] >> GRUB_MACHINE_PCI_WIN_SHIFT)
|
|
||||||
& GRUB_MACHINE_PCI_WIN_MASK)
|
|
||||||
<< (i * GRUB_MACHINE_PCI_WIN_MASK_SIZE));
|
|
||||||
GRUB_MACHINE_PCI_IO_CTRL_REG = reg;
|
|
||||||
}
|
|
||||||
|
|
||||||
volatile void *
|
|
||||||
grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)),
|
|
||||||
grub_addr_t base, grub_size_t size)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
grub_addr_t newbase;
|
|
||||||
|
|
||||||
/* First try already used registers. */
|
|
||||||
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
|
||||||
if (usage_win[i] && base_win[i] <= base
|
|
||||||
&& base_win[i] + sizes_win[i] > base + size)
|
|
||||||
{
|
|
||||||
usage_win[i]++;
|
|
||||||
return (void *)
|
|
||||||
(addr_win[i] | (base & GRUB_MACHINE_PCI_WIN_OFFSET_MASK));
|
|
||||||
}
|
|
||||||
/* Map new register. */
|
|
||||||
newbase = base & ~GRUB_MACHINE_PCI_WIN_OFFSET_MASK;
|
|
||||||
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
|
||||||
if (!usage_win[i] && newbase <= base
|
|
||||||
&& newbase + sizes_win[i] > base + size)
|
|
||||||
{
|
|
||||||
usage_win[i]++;
|
|
||||||
base_win[i] = newbase;
|
|
||||||
write_bases ();
|
|
||||||
return (void *)
|
|
||||||
(addr_win[i] | (base & GRUB_MACHINE_PCI_WIN_OFFSET_MASK));
|
|
||||||
}
|
|
||||||
grub_fatal ("Out of PCI windows.");
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
grub_pci_device_map_range_cached (grub_pci_device_t dev,
|
|
||||||
grub_addr_t base, grub_size_t size)
|
|
||||||
{
|
|
||||||
return (void *) (((grub_addr_t) grub_pci_device_map_range (dev, base, size))
|
|
||||||
& ~0x20000000);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)),
|
|
||||||
volatile void *mem,
|
|
||||||
grub_size_t size __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < GRUB_MACHINE_PCI_NUM_WIN; i++)
|
|
||||||
if (usage_win[i] && addr_win[i]
|
|
||||||
== (((grub_addr_t) mem | 0x20000000)
|
|
||||||
& ~GRUB_MACHINE_PCI_WIN_OFFSET_MASK))
|
|
||||||
{
|
|
||||||
usage_win[i]--;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
grub_fatal ("Tried to unmap not mapped region");
|
|
||||||
}
|
|
||||||
@@ -1,381 +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/cs5536.h>
|
|
||||||
#include <grub/pci.h>
|
|
||||||
#include <grub/time.h>
|
|
||||||
#include <grub/ata.h>
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
|
||||||
#include <grub/machine/kernel.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <grub/dl.h>
|
|
||||||
|
|
||||||
GRUB_MOD_LICENSE ("GPLv3+");
|
|
||||||
|
|
||||||
/* Context for grub_cs5536_find. */
|
|
||||||
struct grub_cs5536_find_ctx
|
|
||||||
{
|
|
||||||
grub_pci_device_t *devp;
|
|
||||||
int found;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Helper for grub_cs5536_find. */
|
|
||||||
static int
|
|
||||||
grub_cs5536_find_iter (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
|
|
||||||
{
|
|
||||||
struct grub_cs5536_find_ctx *ctx = data;
|
|
||||||
|
|
||||||
if (pciid == GRUB_CS5536_PCIID)
|
|
||||||
{
|
|
||||||
*ctx->devp = dev;
|
|
||||||
ctx->found = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
grub_cs5536_find (grub_pci_device_t *devp)
|
|
||||||
{
|
|
||||||
struct grub_cs5536_find_ctx ctx = {
|
|
||||||
.devp = devp,
|
|
||||||
.found = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
grub_pci_iterate (grub_cs5536_find_iter, &ctx);
|
|
||||||
|
|
||||||
return ctx.found;
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_uint64_t
|
|
||||||
grub_cs5536_read_msr (grub_pci_device_t dev, grub_uint32_t addr)
|
|
||||||
{
|
|
||||||
grub_uint64_t ret = 0;
|
|
||||||
grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_ADDR),
|
|
||||||
addr);
|
|
||||||
ret = (grub_uint64_t)
|
|
||||||
grub_pci_read (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA0));
|
|
||||||
ret |= (((grub_uint64_t)
|
|
||||||
grub_pci_read (grub_pci_make_address (dev,
|
|
||||||
GRUB_CS5536_MSR_MAILBOX_DATA1)))
|
|
||||||
<< 32);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_cs5536_write_msr (grub_pci_device_t dev, grub_uint32_t addr,
|
|
||||||
grub_uint64_t val)
|
|
||||||
{
|
|
||||||
grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_ADDR),
|
|
||||||
addr);
|
|
||||||
grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA0),
|
|
||||||
val & 0xffffffff);
|
|
||||||
grub_pci_write (grub_pci_make_address (dev, GRUB_CS5536_MSR_MAILBOX_DATA1),
|
|
||||||
val >> 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_cs5536_smbus_wait (grub_port_t smbbase)
|
|
||||||
{
|
|
||||||
grub_uint64_t start = grub_get_time_ms ();
|
|
||||||
while (1)
|
|
||||||
{
|
|
||||||
grub_uint8_t status;
|
|
||||||
status = grub_inb (smbbase + GRUB_CS5536_SMB_REG_STATUS);
|
|
||||||
if (status & GRUB_CS5536_SMB_REG_STATUS_SDAST)
|
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
if (status & GRUB_CS5536_SMB_REG_STATUS_BER)
|
|
||||||
return grub_error (GRUB_ERR_IO, "SM bus error");
|
|
||||||
if (status & GRUB_CS5536_SMB_REG_STATUS_NACK)
|
|
||||||
return grub_error (GRUB_ERR_IO, "NACK received");
|
|
||||||
if (grub_get_time_ms () > start + 40)
|
|
||||||
return grub_error (GRUB_ERR_IO, "SM stalled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_cs5536_read_spd_byte (grub_port_t smbbase, grub_uint8_t dev,
|
|
||||||
grub_uint8_t addr, grub_uint8_t *res)
|
|
||||||
{
|
|
||||||
grub_err_t err;
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
|
|
||||||
| GRUB_CS5536_SMB_REG_CTRL1_START,
|
|
||||||
smbbase + GRUB_CS5536_SMB_REG_CTRL1);
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
grub_outb (dev << 1, smbbase + GRUB_CS5536_SMB_REG_DATA);
|
|
||||||
|
|
||||||
/* Send ACK. */
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
|
|
||||||
| GRUB_CS5536_SMB_REG_CTRL1_ACK,
|
|
||||||
smbbase + GRUB_CS5536_SMB_REG_CTRL1);
|
|
||||||
|
|
||||||
/* Send byte address. */
|
|
||||||
grub_outb (addr, smbbase + GRUB_CS5536_SMB_REG_DATA);
|
|
||||||
|
|
||||||
/* Send START. */
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
|
|
||||||
| GRUB_CS5536_SMB_REG_CTRL1_START,
|
|
||||||
smbbase + GRUB_CS5536_SMB_REG_CTRL1);
|
|
||||||
|
|
||||||
/* Send device address. */
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
grub_outb ((dev << 1) | 1, smbbase + GRUB_CS5536_SMB_REG_DATA);
|
|
||||||
|
|
||||||
/* Send STOP. */
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
grub_outb (grub_inb (smbbase + GRUB_CS5536_SMB_REG_CTRL1)
|
|
||||||
| GRUB_CS5536_SMB_REG_CTRL1_STOP,
|
|
||||||
smbbase + GRUB_CS5536_SMB_REG_CTRL1);
|
|
||||||
|
|
||||||
err = grub_cs5536_smbus_wait (smbbase);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
*res = grub_inb (smbbase + GRUB_CS5536_SMB_REG_DATA);
|
|
||||||
|
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_cs5536_init_smbus (grub_pci_device_t dev, grub_uint16_t divisor,
|
|
||||||
grub_port_t *smbbase)
|
|
||||||
{
|
|
||||||
grub_uint64_t smbbar;
|
|
||||||
|
|
||||||
smbbar = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_SMB_BAR);
|
|
||||||
|
|
||||||
/* FIXME */
|
|
||||||
if (!(smbbar & GRUB_CS5536_LBAR_ENABLE))
|
|
||||||
return grub_error(GRUB_ERR_IO, "SMB controller not enabled\n");
|
|
||||||
*smbbase = (smbbar & GRUB_CS5536_LBAR_ADDR_MASK) + GRUB_MACHINE_PCI_IO_BASE;
|
|
||||||
|
|
||||||
if (divisor < 8)
|
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid divisor");
|
|
||||||
|
|
||||||
/* Disable SMB. */
|
|
||||||
grub_outb (0, *smbbase + GRUB_CS5536_SMB_REG_CTRL2);
|
|
||||||
|
|
||||||
/* Disable interrupts. */
|
|
||||||
grub_outb (0, *smbbase + GRUB_CS5536_SMB_REG_CTRL1);
|
|
||||||
|
|
||||||
/* Set as master. */
|
|
||||||
grub_outb (GRUB_CS5536_SMB_REG_ADDR_MASTER,
|
|
||||||
*smbbase + GRUB_CS5536_SMB_REG_ADDR);
|
|
||||||
|
|
||||||
/* Launch. */
|
|
||||||
grub_outb (((divisor >> 7) & 0xff), *smbbase + GRUB_CS5536_SMB_REG_CTRL3);
|
|
||||||
grub_outb (((divisor << 1) & 0xfe) | GRUB_CS5536_SMB_REG_CTRL2_ENABLE,
|
|
||||||
*smbbase + GRUB_CS5536_SMB_REG_CTRL2);
|
|
||||||
|
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_err_t
|
|
||||||
grub_cs5536_read_spd (grub_port_t smbbase, grub_uint8_t dev,
|
|
||||||
struct grub_smbus_spd *res)
|
|
||||||
{
|
|
||||||
grub_err_t err;
|
|
||||||
grub_size_t size;
|
|
||||||
grub_uint8_t b;
|
|
||||||
grub_size_t ptr;
|
|
||||||
|
|
||||||
err = grub_cs5536_read_spd_byte (smbbase, dev, 0, &b);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
if (b == 0)
|
|
||||||
return grub_error (GRUB_ERR_IO, "no SPD found");
|
|
||||||
size = b;
|
|
||||||
|
|
||||||
((grub_uint8_t *) res)[0] = b;
|
|
||||||
for (ptr = 1; ptr < size; ptr++)
|
|
||||||
{
|
|
||||||
err = grub_cs5536_read_spd_byte (smbbase, dev, ptr,
|
|
||||||
&((grub_uint8_t *) res)[ptr]);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
return GRUB_ERR_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_io_space (grub_pci_device_t dev, int num, grub_uint16_t start,
|
|
||||||
grub_uint16_t len)
|
|
||||||
{
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_REGIONS_START + num,
|
|
||||||
((((grub_uint64_t) start + len - 4)
|
|
||||||
<< GRUB_CS5536_MSR_GL_REGION_IO_TOP_SHIFT)
|
|
||||||
& GRUB_CS5536_MSR_GL_REGION_TOP_MASK)
|
|
||||||
| (((grub_uint64_t) start
|
|
||||||
<< GRUB_CS5536_MSR_GL_REGION_IO_BASE_SHIFT)
|
|
||||||
& GRUB_CS5536_MSR_GL_REGION_BASE_MASK)
|
|
||||||
| GRUB_CS5536_MSR_GL_REGION_IO
|
|
||||||
| GRUB_CS5536_MSR_GL_REGION_ENABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_iod (grub_pci_device_t dev, int num, int dest, int start, int mask)
|
|
||||||
{
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_IOD_START + num,
|
|
||||||
((grub_uint64_t) dest << GRUB_CS5536_IOD_DEST_SHIFT)
|
|
||||||
| (((grub_uint64_t) start & GRUB_CS5536_IOD_ADDR_MASK)
|
|
||||||
<< GRUB_CS5536_IOD_BASE_SHIFT)
|
|
||||||
| ((mask & GRUB_CS5536_IOD_ADDR_MASK)
|
|
||||||
<< GRUB_CS5536_IOD_MASK_SHIFT));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_p2d (grub_pci_device_t dev, int num, int dest, grub_uint32_t start)
|
|
||||||
{
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_P2D_START + num,
|
|
||||||
(((grub_uint64_t) dest) << GRUB_CS5536_P2D_DEST_SHIFT)
|
|
||||||
| ((grub_uint64_t) (start >> GRUB_CS5536_P2D_LOG_ALIGN)
|
|
||||||
<< GRUB_CS5536_P2D_BASE_SHIFT)
|
|
||||||
| (((1 << (32 - GRUB_CS5536_P2D_LOG_ALIGN)) - 1)
|
|
||||||
<< GRUB_CS5536_P2D_MASK_SHIFT));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_cs5536_init_geode (grub_pci_device_t dev)
|
|
||||||
{
|
|
||||||
/* Enable more BARs. */
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IRQ_MAP_BAR,
|
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_IRQ_MAP);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_MFGPT_BAR,
|
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_MFGPT);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_ACPI_BAR,
|
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_ACPI);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_PM_BAR,
|
|
||||||
GRUB_CS5536_LBAR_TURN_ON | GRUB_CS5536_LBAR_PM);
|
|
||||||
|
|
||||||
/* Setup DIVIL. */
|
|
||||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
|
||||||
switch (grub_arch_machine)
|
|
||||||
{
|
|
||||||
case GRUB_ARCH_MACHINE_YEELOONG:
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
|
||||||
GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
|
||||||
break;
|
|
||||||
case GRUB_ARCH_MACHINE_FULOONG2F:
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
|
||||||
GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
|
||||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK,
|
|
||||||
(~GRUB_CS5536_DIVIL_LPC_INTERRUPTS) & 0xffff);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK,
|
|
||||||
GRUB_CS5536_DIVIL_LPC_INTERRUPTS);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL,
|
|
||||||
GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL_ENABLE);
|
|
||||||
|
|
||||||
/* Initialise USB controller. */
|
|
||||||
/* FIXME: assign adresses dynamically. */
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_OHCI_BASE,
|
|
||||||
GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
|
|
||||||
| GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE
|
|
||||||
| 0x05024000);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE,
|
|
||||||
GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
|
|
||||||
| GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE
|
|
||||||
| (0x20ULL << GRUB_CS5536_MSR_USB_EHCI_BASE_FLDJ_SHIFT)
|
|
||||||
| 0x05023000);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_CONTROLLER_BASE,
|
|
||||||
GRUB_CS5536_MSR_USB_BASE_BUS_MASTER
|
|
||||||
| GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05020000);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_OPTION_CONTROLLER_BASE,
|
|
||||||
GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05022000);
|
|
||||||
set_p2d (dev, 0, GRUB_CS5536_DESTINATION_USB, 0x05020000);
|
|
||||||
set_p2d (dev, 1, GRUB_CS5536_DESTINATION_USB, 0x05022000);
|
|
||||||
set_p2d (dev, 5, GRUB_CS5536_DESTINATION_USB, 0x05024000);
|
|
||||||
set_p2d (dev, 6, GRUB_CS5536_DESTINATION_USB, 0x05023000);
|
|
||||||
|
|
||||||
{
|
|
||||||
volatile grub_uint32_t *oc;
|
|
||||||
oc = grub_pci_device_map_range (dev, 0x05022000,
|
|
||||||
GRUB_CS5536_USB_OPTION_REGS_SIZE);
|
|
||||||
|
|
||||||
oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX] =
|
|
||||||
(oc[GRUB_CS5536_USB_OPTION_REG_UOCMUX]
|
|
||||||
& ~GRUB_CS5536_USB_OPTION_REG_UOCMUX_PMUX_MASK)
|
|
||||||
| GRUB_CS5536_USB_OPTION_REG_UOCMUX_PMUX_HC;
|
|
||||||
grub_pci_device_unmap_range (dev, oc, GRUB_CS5536_USB_OPTION_REGS_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Setup IDE controller. */
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_IO_BAR,
|
|
||||||
GRUB_CS5536_LBAR_IDE
|
|
||||||
| GRUB_CS5536_MSR_IDE_IO_BAR_UNITS);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_CFG,
|
|
||||||
GRUB_CS5536_MSR_IDE_CFG_CHANNEL_ENABLE);
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_TIMING,
|
|
||||||
(GRUB_CS5536_MSR_IDE_TIMING_PIO0
|
|
||||||
<< GRUB_CS5536_MSR_IDE_TIMING_DRIVE0_SHIFT)
|
|
||||||
| (GRUB_CS5536_MSR_IDE_TIMING_PIO0
|
|
||||||
<< GRUB_CS5536_MSR_IDE_TIMING_DRIVE1_SHIFT));
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_IDE_CAS_TIMING,
|
|
||||||
(GRUB_CS5536_MSR_IDE_CAS_TIMING_CMD_PIO0
|
|
||||||
<< GRUB_CS5536_MSR_IDE_CAS_TIMING_CMD_SHIFT)
|
|
||||||
| (GRUB_CS5536_MSR_IDE_CAS_TIMING_PIO0
|
|
||||||
<< GRUB_CS5536_MSR_IDE_CAS_TIMING_DRIVE0_SHIFT)
|
|
||||||
| (GRUB_CS5536_MSR_IDE_CAS_TIMING_PIO0
|
|
||||||
<< GRUB_CS5536_MSR_IDE_CAS_TIMING_DRIVE1_SHIFT));
|
|
||||||
|
|
||||||
/* Setup Geodelink PCI. */
|
|
||||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_GL_PCI_CTRL,
|
|
||||||
(4ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_OUT_THR_SHIFT)
|
|
||||||
| (4ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_IN_THR_SHIFT)
|
|
||||||
| (8ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_LATENCY_SHIFT)
|
|
||||||
| GRUB_CS5536_MSR_GL_PCI_CTRL_IO_ENABLE
|
|
||||||
| GRUB_CS5536_MSR_GL_PCI_CTRL_MEMORY_ENABLE);
|
|
||||||
|
|
||||||
/* Setup windows. */
|
|
||||||
set_io_space (dev, 0, GRUB_CS5536_LBAR_SMBUS, GRUB_CS5536_SMBUS_REGS_SIZE);
|
|
||||||
set_io_space (dev, 1, GRUB_CS5536_LBAR_GPIO, GRUB_CS5536_GPIO_REGS_SIZE);
|
|
||||||
set_io_space (dev, 2, GRUB_CS5536_LBAR_MFGPT, GRUB_CS5536_MFGPT_REGS_SIZE);
|
|
||||||
set_io_space (dev, 3, GRUB_CS5536_LBAR_IRQ_MAP, GRUB_CS5536_IRQ_MAP_REGS_SIZE);
|
|
||||||
set_io_space (dev, 4, GRUB_CS5536_LBAR_PM, GRUB_CS5536_PM_REGS_SIZE);
|
|
||||||
set_io_space (dev, 5, GRUB_CS5536_LBAR_ACPI, GRUB_CS5536_ACPI_REGS_SIZE);
|
|
||||||
set_iod (dev, 0, GRUB_CS5536_DESTINATION_IDE, GRUB_ATA_CH0_PORT1, 0xffff8);
|
|
||||||
set_iod (dev, 1, GRUB_CS5536_DESTINATION_ACC, GRUB_CS5536_LBAR_ACC, 0xfff80);
|
|
||||||
set_iod (dev, 2, GRUB_CS5536_DESTINATION_IDE, GRUB_CS5536_LBAR_IDE, 0xffff0);
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
/* pci.c - Generic PCI interfaces. */
|
|
||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 2007,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/pci.h>
|
|
||||||
#include <grub/dl.h>
|
|
||||||
#include <grub/emu/misc.h>
|
|
||||||
#include <grub/util/misc.h>
|
|
||||||
|
|
||||||
grub_pci_address_t
|
|
||||||
grub_pci_make_address (grub_pci_device_t dev, int reg)
|
|
||||||
{
|
|
||||||
grub_pci_address_t ret;
|
|
||||||
ret.dev = dev;
|
|
||||||
ret.pos = reg;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_pci_iterate (grub_pci_iteratefunc_t hook, void *hook_data)
|
|
||||||
{
|
|
||||||
struct pci_device_iterator *iter;
|
|
||||||
struct pci_slot_match slot;
|
|
||||||
struct pci_device *dev;
|
|
||||||
slot.domain = PCI_MATCH_ANY;
|
|
||||||
slot.bus = PCI_MATCH_ANY;
|
|
||||||
slot.dev = PCI_MATCH_ANY;
|
|
||||||
slot.func = PCI_MATCH_ANY;
|
|
||||||
iter = pci_slot_match_iterator_create (&slot);
|
|
||||||
while ((dev = pci_device_next (iter)))
|
|
||||||
hook (dev, dev->vendor_id | (dev->device_id << 16), hook_data);
|
|
||||||
pci_iterator_destroy (iter);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
|
||||||
grub_pci_device_map_range (grub_pci_device_t dev, grub_addr_t base,
|
|
||||||
grub_size_t size)
|
|
||||||
{
|
|
||||||
void *addr;
|
|
||||||
int err;
|
|
||||||
err = pci_device_map_range (dev, base, size, PCI_DEV_MAP_FLAG_WRITABLE, &addr);
|
|
||||||
if (err)
|
|
||||||
grub_util_error ("mapping 0x%x failed (error %d)\n", base, err);
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_pci_device_unmap_range (grub_pci_device_t dev, void *mem,
|
|
||||||
grub_size_t size)
|
|
||||||
{
|
|
||||||
pci_device_unmap_range (dev, mem, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
GRUB_MOD_INIT (pci)
|
|
||||||
{
|
|
||||||
pci_system_init ();
|
|
||||||
}
|
|
||||||
|
|
||||||
GRUB_MOD_FINI (pci)
|
|
||||||
{
|
|
||||||
pci_system_cleanup ();
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* GRUB -- GRand Unified Bootloader
|
|
||||||
* Copyright (C) 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <grub/dl.h>
|
|
||||||
#include <grub/pci.h>
|
|
||||||
#include <grub/mm.h>
|
|
||||||
#include <grub/misc.h>
|
|
||||||
#include <grub/ieee1275/ieee1275.h>
|
|
||||||
|
|
||||||
volatile void *
|
|
||||||
grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)),
|
|
||||||
grub_addr_t base,
|
|
||||||
grub_size_t size)
|
|
||||||
{
|
|
||||||
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_REAL_MODE))
|
|
||||||
return (volatile void *) base;
|
|
||||||
if (grub_ieee1275_map (base, base, size, 7))
|
|
||||||
grub_fatal ("couldn't map 0x%lx", base);
|
|
||||||
return (volatile void *) base;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)),
|
|
||||||
volatile void *mem __attribute__ ((unused)),
|
|
||||||
grub_size_t size __attribute__ ((unused)))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
Loaded 100 of 1986 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user