Compare commits
439 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85de859da1 |
||
|
|
16cb5b303d | ||
|
|
70c5e62950 | ||
|
|
a4ec822e7e | ||
|
|
6467d85178 | ||
|
|
f4663b0ddc | ||
|
|
4614a09b9f | ||
|
|
b9b1d1e384 | ||
|
|
730ce27747 | ||
|
|
f6bc25c3e7 | ||
|
|
e02b6e88c7 | ||
|
|
354c77b195 | ||
|
|
8f6e9e55c1 | ||
|
|
06e458e5eb | ||
|
|
8f843cc6ef | ||
|
|
42ca1a56a1 | ||
|
|
01b4205642 | ||
|
|
159b7b546a | ||
|
|
828e1c5448 | ||
|
|
0e28d5ff18 | ||
|
|
9400ee8e83 | ||
|
|
9089407121 | ||
|
|
9fa1c31cb2 | ||
|
|
ffc692d90e | ||
|
|
5c361bf706 | ||
|
|
439310c622 | ||
|
|
cbf45b1f24 | ||
|
|
42b2a048bf | ||
|
|
c48d4f6719 | ||
|
|
50b73378ce | ||
|
|
b04ed232e2 | ||
|
|
0c53016c97 | ||
|
|
5427c36328 | ||
|
|
d03bbec735 | ||
|
|
ecd705e766 | ||
|
|
a60abb0cdc | ||
|
|
20db2b22d8 | ||
|
|
60fc42215c | ||
|
|
5ad3db9486 | ||
|
|
40c3b05654 | ||
|
|
cd9f78bd4d | ||
|
|
0083b9609a | ||
|
|
86c2c3cc6d | ||
|
|
5c68e667c7 | ||
|
|
0148405edf | ||
|
|
5ce10e3473 | ||
|
|
a0dbec9c2a | ||
|
|
283797a45d | ||
|
|
9eb852fbc5 | ||
|
|
0a3394ca4b | ||
|
|
7b0d0e6fb5 | ||
|
|
e42444fde3 | ||
|
|
d0e3049f97 | ||
|
|
19dcf163e6 | ||
|
|
3a9809b30e | ||
|
|
e3f47a4834 | ||
|
|
863039eee2 | ||
|
|
5c315b462c | ||
|
|
dd5f2023b0 | ||
|
|
ab7ed2db6e | ||
|
|
f9093b2645 | ||
|
|
7b5da77f73 | ||
|
|
f28d50ee44 | ||
|
|
ce5e45b505 | ||
|
|
28040b73c9 | ||
|
|
d4811852b4 | ||
|
|
ce0dd8c056 | ||
|
|
a137559e71 | ||
|
|
92efc5d3cd | ||
|
|
434cc479bc | ||
|
|
3e8a581288 | ||
|
|
d2fcd91e36 | ||
|
|
de8520b84a | ||
|
|
29406ad333 | ||
|
|
6cc927e76b | ||
|
|
d2d9f6012b | ||
|
|
ebd311ec52 | ||
|
|
0c1c9228d2 | ||
|
|
a162c0412f | ||
|
|
d11c8385d6 | ||
|
|
4562b72afc | ||
|
|
cadd7a1196 | ||
|
|
c4a49e5c9a | ||
|
|
7b857b827a | ||
|
|
88924af554 | ||
|
|
94ecc476ab | ||
|
|
8a9297c431 | ||
|
|
07412b4a97 | ||
|
|
62027d5ee3 | ||
|
|
45dbc926bf | ||
|
|
e1206cf45b | ||
|
|
8800efcb0b | ||
|
|
af4f1536b6 | ||
|
|
aa936e7b0c | ||
|
|
6c038d7d02 | ||
|
|
52d23fe6f6 | ||
|
|
d161705351 | ||
|
|
5c4529ecac | ||
|
|
6d1f9f4a80 | ||
|
|
5184f7bcf1 | ||
|
|
dc5c4e3f52 | ||
|
|
e6b8f35a69 | ||
|
|
ab62564e2f | ||
|
|
9d4d1e919c | ||
|
|
dc0bc06560 | ||
|
|
ecd22580ae | ||
|
|
6a9365c88d | ||
|
|
48cf39de05 | ||
|
|
4db0050f31 | ||
|
|
5c83f50804 | ||
|
|
b86fd390b8 | ||
|
|
63b29f783e | ||
|
|
851216d61a | ||
|
|
ed1787d5fc | ||
|
|
a5299c3192 | ||
|
|
3a3516d360 | ||
|
|
22838ae9d7 |
||
|
|
1163f8ebfd | ||
|
|
e4be65856a | ||
|
|
f8f88e1235 | ||
|
|
3ce59ed7e1 | ||
|
|
ac206cb17b | ||
|
|
7be2bf00c3 | ||
|
|
217ae25d88 | ||
|
|
b84b21f7a2 | ||
|
|
d2ad09e81a | ||
|
|
9e46a970c6 | ||
|
|
55921d8655 | ||
|
|
fa48146e4c | ||
|
|
85cfe6dd30 | ||
|
|
9b063ec0c5 | ||
|
|
78d64adfbe | ||
| 81ed67d3a8 | |||
|
|
1af394246e | ||
|
|
f09f9764c6 | ||
|
|
0ccadff7a2 | ||
|
|
558410c2d9 | ||
|
|
06e51d2a65 | ||
|
|
3972172d4d | ||
|
|
3d407d2111 | ||
|
|
bc32a76bab | ||
|
|
fdd5c6f423 | ||
|
|
4fa957c61c | ||
|
|
7a1af0ff6d | ||
|
|
c1f53c8596 | ||
|
|
c50cc54b88 | ||
|
|
db229abffb | ||
|
|
2fa153d5c6 | ||
|
|
82f5820dd4 | ||
|
|
d8336270fe | ||
|
|
c814f068c6 | ||
|
|
714559fb3d | ||
|
|
bb8ac90efb | ||
|
|
fc76aed533 | ||
|
|
2f39adbb14 | ||
|
|
89d7a298b6 | ||
|
|
867b41f7d3 | ||
|
|
ac27fd45d7 | ||
|
|
11e6d3f1b0 | ||
|
|
74d57bbd19 | ||
|
|
5b44e10cf3 | ||
|
|
e7aee52b19 | ||
|
|
f0ad2aaa26 | ||
|
|
a44a6377ed | ||
|
|
ea7cfdf726 | ||
|
|
d15d46b0e4 | ||
|
|
ac52d21d8a | ||
|
|
e622855aa2 | ||
|
|
f9344de20a | ||
|
|
1d98b5f260 | ||
|
|
6c2cc46451 | ||
|
|
2e106f9a3e | ||
|
|
d17f80cfd5 | ||
|
|
eeff7639b3 | ||
|
|
bd73b85ea3 | ||
|
|
d171a2a95c | ||
|
|
2b909b72a4 | ||
|
|
f29388d27a | ||
|
|
5d7c163550 | ||
|
|
5e72956199 | ||
|
|
2a0a68c542 | ||
|
|
93004a8494 | ||
|
|
ac0e146ae3 | ||
|
|
90dacf59d0 | ||
|
|
e31fc7ca96 | ||
|
|
3de994c662 | ||
|
|
e849938f16 | ||
|
|
e72456a804 | ||
|
|
9a30e00fc0 | ||
|
|
95d197a80c | ||
|
|
0bd5331192 | ||
|
|
9027ec262f | ||
|
|
fe0248c0ce | ||
|
|
e82a4fd034 | ||
|
|
9c910dfa10 | ||
|
|
1c4e61c989 | ||
|
|
8a74d28ac8 | ||
|
|
3e40727f72 | ||
|
|
a382c9e3c9 | ||
|
|
357489e3ea | ||
|
|
e602a0629d | ||
|
|
b256068060 | ||
|
|
46317f98bf | ||
|
|
d90546c5ee | ||
|
|
9fdaa794e0 | ||
|
|
af038a0bdc | ||
|
|
42a07486d8 | ||
|
|
99bcf9931e | ||
|
|
b3b9566edf | ||
|
|
07cf41c169 | ||
|
|
64dc7670b0 | ||
|
|
1f9e8074ae |
||
|
|
db96a0c4de | ||
|
|
702732583b | ||
|
|
67f07b7c9e |
||
|
|
fbeda573a9 |
||
|
|
419340f25e |
||
|
|
967c5629ed |
||
|
|
5e2444babe |
||
|
|
8efaf82828 |
||
|
|
504ecff2ed |
||
|
|
9cf30d96e9 |
||
|
|
fc19d7847d |
||
|
|
a02c397786 |
||
|
|
485dd93ff1 | ||
|
|
3459058062 |
||
|
|
13985b0e4c |
||
|
|
6d09d20265 | ||
|
|
6dc8b4a57a |
||
|
|
6b5d11f760 |
||
|
|
e91046d264 |
||
|
|
ddafa09a88 |
||
|
|
5ef95ecb65 |
||
|
|
2f63333bcf |
||
|
|
d672447dfb |
||
|
|
51b7d6220e |
||
|
|
46968b6e63 |
||
|
|
89b6faf012 |
||
|
|
3b8cfc9cf6 |
||
|
|
32351b3093 |
||
|
|
931f4f0364 | ||
|
|
c65a33ebca |
||
|
|
a32aa179fa | ||
|
|
b141171629 |
||
|
|
4fe0f66632 |
||
|
|
3a8f1e293b |
||
|
|
ca5becb9a3 |
||
|
|
f9736ec085 |
||
|
|
d84350c121 |
||
|
|
8c2cf1c368 |
||
|
|
c321e640dc |
||
|
|
ec73df1b6e |
||
|
|
96eeab8abd | ||
|
|
5a625020e2 |
||
|
|
fac1a22c9e |
||
|
|
f7e054f3d6 |
||
|
|
ae1167a78d |
||
|
|
cc2f966c55 |
||
|
|
db0149e860 |
||
|
|
47cf63735c | ||
|
|
dc2f1a03d9 | ||
|
|
95f5dd8a82 | ||
|
|
51e876849c |
||
|
|
9f83bf2258 |
||
|
|
0993459d92 |
||
|
|
098a8a9e99 |
||
|
|
7fb7a6a7a5 |
||
|
|
68246dd736 |
||
|
|
4cf8c08cf7 |
||
|
|
4ff1f12e40 | ||
|
|
4a742183a3 |
||
|
|
107dc9a693 |
||
|
|
b914a7e168 |
||
|
|
b28e5aa886 |
||
|
|
5b188159a7 |
||
|
|
7509e59c4a |
||
|
|
7c2bab5e98 |
||
|
|
904d351ffd |
||
|
|
1ac3b7869a | ||
|
|
fbe5a8c26a |
||
|
|
b888fb3a32 |
||
|
|
89bc295877 |
||
|
|
190e583e94 | ||
|
|
0cb30b7d2b | ||
|
|
af4ccfff6b | ||
|
|
3f3dfd4006 |
||
|
|
8733281382 |
||
|
|
5db4bc774e |
||
|
|
eeeca9c900 |
||
|
|
d3ceae4bfd |
||
|
|
897e388763 |
||
|
|
7ea6052755 |
||
|
|
be6e591e0f |
||
|
|
e1531466e1 |
||
|
|
c432d1fe96 |
||
|
|
0ca82180b8 |
||
|
|
498ea7003b | ||
|
|
d8bbf039e9 |
||
|
|
a1dedc8a10 |
||
|
|
7e98da058f |
||
|
|
18d67626ee |
||
|
|
300c372004 |
||
|
|
f2b28b651f |
||
|
|
04d38248e3 |
||
|
|
f6da347edf |
||
|
|
05efc9de7f |
||
|
|
96a8e420da |
||
|
|
2df60da858 |
||
|
|
7388f24e3e | ||
|
|
22467ee641 |
||
|
|
298aa12e25 |
||
|
|
d8cdcb3a21 |
||
|
|
a9b371c2fb |
||
|
|
0b428f20f3 |
||
|
|
a18e8e631d |
||
|
|
af06f22ee4 | ||
|
|
79551a59f5 |
||
|
|
62a05cdcd4 |
||
|
|
173fb18386 |
||
|
|
30b139ceba |
||
|
|
dd6e48876e |
||
|
|
88459565ec |
||
|
|
c1ccaf8a0e |
||
|
|
242b306a29 |
||
|
|
fad457cd90 |
||
|
|
a7449e2e58 |
||
|
|
8c44667ebf |
||
|
|
5d7e4540ed |
||
|
|
3690f710db |
||
|
|
c9b8b10a61 |
||
|
|
f6d4ab8f83 |
||
|
|
e3a408a521 |
||
|
|
11b49b804e |
||
|
|
5699af497f | ||
|
|
3463a4b800 | ||
|
|
23b6ae2b79 |
||
|
|
bb036b8233 |
||
|
|
4ff5f8dcef |
||
|
|
1f092caba7 |
||
|
|
f92a00c4b3 |
||
|
|
ff9dc1ed7d |
||
|
|
420527a50b |
||
|
|
efb46dff18 |
||
|
|
67aea4f8a5 |
||
|
|
66078fcba2 |
||
|
|
682540cbf5 |
||
|
|
db4a99687c | ||
|
|
7531222057 | ||
|
|
a3bfe35d12 | ||
|
|
ace3c257a6 | ||
|
|
e30274adfa | ||
|
|
c4e6bf30f6 | ||
|
|
98536ecf37 | ||
|
|
371309b06e | ||
|
|
5376ad0c95 | ||
|
|
543f7e2717 | ||
|
|
76df8270f6 | ||
|
|
0c72748086 | ||
|
|
1b51084aaa | ||
|
|
66fa5861ee | ||
|
|
c2f7a5e9af | ||
|
|
c87b938e5d | ||
|
|
cefdf750ef | ||
|
|
bed013f094 | ||
|
|
f0ceaa7597 | ||
|
|
2d1140eb96 |
||
|
|
4892e6bea5 | ||
|
|
73bf9047ae | ||
|
|
627591c8af | ||
|
|
e01902488c | ||
|
|
9763257b7e | ||
|
|
18694c1a36 | ||
|
|
3e07ee7c3e | ||
|
|
dbfd2e6b04 | ||
|
|
15a207211f | ||
|
|
8d563110da | ||
|
|
a45161331b | ||
|
|
da0e16c206 | ||
|
|
1f9267118f | ||
|
|
1b55f4c84d | ||
|
|
7b06e73552 | ||
|
|
70dc0337f9 | ||
|
|
ad4aff0c12 | ||
|
|
1d36e193e6 | ||
|
|
ce0f493268 | ||
|
|
b5667e66a1 | ||
|
|
e08eb33a57 | ||
|
|
321567331b | ||
|
|
ebe16ceeab | ||
|
|
3e6c63597b | ||
|
|
244d5814a5 | ||
|
|
dd7ef6cfa8 | ||
|
|
bfa240db6a | ||
|
|
6b2dd0f731 | ||
|
|
b887897c3c | ||
|
|
e8fe2763b0 | ||
|
|
64626d2a22 | ||
|
|
a52365a0df | ||
|
|
91f9e5a07c | ||
|
|
db5dccf332 | ||
|
|
64420615c2 | ||
|
|
cee2256e1c | ||
|
|
33444dc94a | ||
|
|
bf795fa3c9 | ||
|
|
ac03ec8379 | ||
|
|
752ceb1640 | ||
|
|
dd0009ec4d | ||
|
|
31cddd6fc0 | ||
|
|
bf33524673 | ||
|
|
15eb78a25c | ||
|
|
63f1a982b9 | ||
|
|
655e9ec04f | ||
|
|
9fefeed59c | ||
|
|
0e98773e00 | ||
|
|
bbce628672 | ||
|
|
dc178ac546 | ||
|
|
a8d8dcf190 | ||
|
|
578b4d713f | ||
|
|
fb3328442e | ||
|
|
c789522f7c | ||
|
|
ed50db379d | ||
|
|
4fd69fdbcd | ||
|
|
9f11ff245c | ||
|
|
0bcec266a0 | ||
|
|
78e1a10ec4 | ||
|
|
d73e0cbe7e | ||
|
|
61faef65b2 | ||
|
|
06b68a8c94 | ||
|
|
ec4acbbd98 | ||
|
|
38305f23ff |
||
|
|
8bbfda8a06 |
||
|
|
8b3d200862 | ||
|
|
d51395ea7f | ||
|
|
28076bb004 | ||
|
|
a91fed7f66 | ||
|
|
8cceee7ebe | ||
|
|
6f1e3d5698 | ||
|
|
da63b36ca7 | ||
|
|
17281fd098 |
588 changed files with 67912 additions and 38564 deletions
15
.git.diff.order
Normal file
15
.git.diff.order
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
*.dec
|
||||
*.dsc.inc
|
||||
*.dsc
|
||||
*.fdf
|
||||
*.inf
|
||||
*.vfr
|
||||
*.ac
|
||||
*.def
|
||||
*.c
|
||||
*.h
|
||||
*.S
|
||||
*.mk
|
||||
Makefile.*
|
||||
Make.*
|
||||
Makefile
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,7 +1,7 @@
|
|||
grub-*.tar.?z
|
||||
*.rpm
|
||||
clog
|
||||
/unifont-5.1.20080820.pcf.gz
|
||||
/unifont-*.pcf.?z
|
||||
/theme.tar.bz2
|
||||
kojilogs
|
||||
/grub-*/
|
||||
|
|
@ -9,3 +9,5 @@ kojilogs
|
|||
.*.git/
|
||||
tmp/
|
||||
.*.sw?
|
||||
results_grub2/
|
||||
/gnulib-*.tar.?z
|
||||
|
|
|
|||
|
|
@ -1,230 +0,0 @@
|
|||
From b0bad6fd9449d3333fe1ab58953c0e6c1ce12c0d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Wed, 3 May 2017 11:55:52 +0200
|
||||
Subject: [PATCH 001/194] Bump version to 2.03
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
grub-core/tests/checksums.h | 196 ++++++++++++++++++++++----------------------
|
||||
2 files changed, 99 insertions(+), 99 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index edd184154..d10d8adac 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -31,7 +31,7 @@ dnl (such as BUILD_CC, BUILD_CFLAGS, etc.) for the build type and variables
|
||||
dnl with the prefix "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are
|
||||
dnl used for the target type. See INSTALL for full list of variables.
|
||||
|
||||
-AC_INIT([GRUB],[2.02],[bug-grub@gnu.org])
|
||||
+AC_INIT([GRUB],[2.03],[bug-grub@gnu.org])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
diff --git a/grub-core/tests/checksums.h b/grub-core/tests/checksums.h
|
||||
index 68d8ce7c7..921e57ff4 100644
|
||||
--- a/grub-core/tests/checksums.h
|
||||
+++ b/grub-core/tests/checksums.h
|
||||
@@ -1,101 +1,101 @@
|
||||
- { "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xcd5fc34e, 0xcd5fc34e, 0xeabbecab, 0xeabbecab, 0xc9950151, 0xc9950151, 0x2be222b6, 0x2be222b6, 0xe88c769e, 0xe88c769e, 0x6be4910e, 0x6be4910e, 0x1dc1fe4f, 0x1dc1fe4f, 0xd7613e8f, 0xd7613e8f, 0xf8124196, 0xf8124196, 0x130f5935, 0x130f5935, 0x2872330e, 0x2872330e, 0xaa7b7868, 0xaa7b7868, 0x558eaeea, 0x558eaeea, 0x92f7960f, 0x92f7960f, 0xc5bfc709, 0xc5bfc709, 0x699732fe, 0x699732fe, 0xc859125f, 0xc859125f, 0xfc6ac729, 0xfc6ac729, 0xcdab6cd4, 0xcdab6cd4, 0x58a8b7f8, 0x58a8b7f8, 0xc0e73385, 0x6560d6ef, 0x3be8bb5d, 0x3be8bb5d, }, 45 },
|
||||
- { "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x13029f94, 0x13029f94, 0x7785fdab, 0x7785fdab, 0x95a7c1e8, 0x95a7c1e8, 0x315ab3e3, 0x315ab3e3, 0x6787f012, 0x6787f012, 0x79b1ecdc, 0x79b1ecdc, 0xdbc67810, 0xdbc67810, 0xafaa982e, 0xafaa982e, 0xc5cd0157, 0xc5cd0157, 0x3c50dd64, 0x3c50dd64, 0x1056cac0, 0x1056cac0, 0x1d7a41fa, 0x1d7a41fa, 0x5690b1e8, 0x5690b1e8, 0x616831d6, 0x616831d6, 0xfaf8e726, 0xfaf8e726, 0xd1ec5e26, 0xd1ec5e26, 0x3c269e1f, 0x3c269e1f, 0x1aa7952d, 0x1aa7952d, 0x6e7e2f99, 0x6e7e2f99, 0x98f4c02, 0x98f4c02, 0xc3f1abf2, 0xe348bb73, 0xea53cd60, 0xea53cd60, }, 45 },
|
||||
- { "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8fbb4f4c, 0x8fbb4f4c, 0x5dc00167, 0x5dc00167, 0xbc124df8, 0xbc124df8, 0x31cf0f8e, 0x31cf0f8e, 0x798cc4ed, 0x798cc4ed, 0xc5d2a091, 0xc5d2a091, 0xb58a0591, 0xb58a0591, 0x4d118aca, 0x4d118aca, 0xbb06c7ee, 0xbb06c7ee, 0x42179db7, 0x42179db7, 0x65f2d81e, 0x65f2d81e, 0xa2628bcb, 0xa2628bcb, 0xbdb7f4b, 0xbdb7f4b, 0x66b10309, 0x66b10309, 0x1a550ea9, 0x1a550ea9, 0x377a297d, 0x377a297d, 0x2ea99015, 0x2ea99015, 0x4e20d7bc, 0x4e20d7bc, 0x8ecbde02, 0x8ecbde02, 0xdfa2195a, 0xdfa2195a, 0xe113d2a, 0xe204ee5b, 0x734679c1, 0x734679c1, }, 45 },
|
||||
- { "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xe2f6bfe1, 0xe2f6bfe1, 0xf18aee15, 0xf18aee15, 0x5e83b689, 0x5e83b689, 0xb7e8b42c, 0xb7e8b42c, 0x85d78f92, 0x85d78f92, 0xd56fadae, 0xd56fadae, 0x7632f5bf, 0x7632f5bf, 0x2769a748, 0x2769a748, 0x4a6112cd, 0x4a6112cd, 0x4f9b66a4, 0x4f9b66a4, 0x70457d38, 0x70457d38, 0x8cadb1a7, 0x8cadb1a7, 0x451341f, 0x451341f, 0x8a62e741, 0x8a62e741, 0x1b1f9031, 0x1b1f9031, 0x75ab630e, 0x75ab630e, 0xd5ff53ac, 0xd5ff53ac, 0x73a2b3c7, 0x73a2b3c7, 0x7b52acd5, 0x7b52acd5, 0xf6f3e48c, 0xf6f3e48c, 0x8d0db133, 0x8db24310, 0x7aef56d4, 0x7aef56d4, }, 45 },
|
||||
- { "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x838a3f40, 0x838a3f40, 0x7351ba96, 0x7351ba96, 0x660963bb, 0x660963bb, 0x6f3362a6, 0x6f3362a6, 0x915d35d9, 0x915d35d9, 0xc7edaee9, 0xc7edaee9, 0xbc8ec24c, 0xbc8ec24c, 0xeb120ffd, 0xeb120ffd, 0x8f6d8232, 0x8f6d8232, 0x2de5d515, 0x2de5d515, 0x4f2ecd91, 0x4f2ecd91, 0x555a9b90, 0x555a9b90, 0x8f7b0d77, 0x8f7b0d77, 0x5f9536af, 0x5f9536af, 0x3dd79dbe, 0x3dd79dbe, 0xb555a0, 0xb555a0, 0x75aec882, 0x75aec882, 0xd5da89cb, 0xd5da89cb, 0xb47b3257, 0xb47b3257, 0x7c97c046, 0x7c97c046, 0x726a7abe, 0x4c8b8a56, 0xcffa0854, 0xcffa0854, }, 45 },
|
||||
- { "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x7bf761e, 0x7bf761e, 0xaf0b6dae, 0xaf0b6dae, 0x7db15930, 0x7db15930, 0xc9720d56, 0xc9720d56, 0x55590d6c, 0x55590d6c, 0xa0d193d9, 0xa0d193d9, 0x728987b2, 0x728987b2, 0x28aecde6, 0x28aecde6, 0xa59bb094, 0xa59bb094, 0x2d0b049d, 0x2d0b049d, 0xd8421240, 0xd8421240, 0x51fa339, 0x51fa339, 0xc625cc46, 0xc625cc46, 0x2c9e6fcc, 0x2c9e6fcc, 0x3d06ffd5, 0x3d06ffd5, 0x8dd72816, 0x8dd72816, 0xfcf2a982, 0xfcf2a982, 0x6ef2870f, 0x6ef2870f, 0xba2caab7, 0xba2caab7, 0x8e5a5872, 0x8e5a5872, 0x62b2fedc, 0x2bd3b588, 0x34ebdb15, 0x34ebdb15, }, 45 },
|
||||
- { "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xa133280a, 0xa133280a, 0x1e8f4227, 0x1e8f4227, 0xa01cd911, 0xa01cd911, 0xdcb3d617, 0xdcb3d617, 0x51200351, 0x51200351, 0x609ba305, 0x609ba305, 0x5d96abfd, 0x5d96abfd, 0xd855cc70, 0xd855cc70, 0xdbfaf18d, 0xdbfaf18d, 0x84814843, 0x84814843, 0x4b00e630, 0x4b00e630, 0xd362b0f5, 0xd362b0f5, 0xec863355, 0xec863355, 0x195898d0, 0x195898d0, 0xe8c698c7, 0xe8c698c7, 0x884229e7, 0x884229e7, 0xb41ed3a9, 0xb41ed3a9, 0x2be1ce40, 0x2be1ce40, 0x8c33eb7c, 0x8c33eb7c, 0xbbce1da, 0xbbce1da, 0xef9415fa, 0x22fbc0d, 0xd82c182c, 0xd82c182c, }, 45 },
|
||||
- { "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xbe029c, 0x6671ee1f, 0xbe029c, 0x4348cfdb, 0x59c36f00, 0x59c36f00, 0x3ad73295, 0x3ad73295, 0x3ad73295, 0x44575ff3, 0x44575ff3, 0x44575ff3, 0x26a14a21, 0x26a14a21, 0x26a14a21, 0x59c36f00, 0x4348cfdb, 0x4348cfdb, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x14e228ef, 0xb0c8af57, 0x14e228ef, 0x3ae7ad90, 0xaa4593fe, 0xaa4593fe, 0xbec19c1b, 0xbec19c1b, 0xbec19c1b, 0x1834917c, 0x1834917c, 0x1834917c, 0x350c3a04, 0x350c3a04, 0x350c3a04, 0xaa4593fe, 0x3ae7ad90, 0x3ae7ad90, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x651fb144, 0xdf93ee9c, 0x651fb144, 0x3808dcc0, 0xc9cbf769, 0xc9cbf769, 0xe4861949, 0xe4861949, 0xe4861949, 0x1a5ed885, 0x1a5ed885, 0x1a5ed885, 0xf314678d, 0xf314678d, 0xf314678d, 0xc9cbf769, 0x3808dcc0, 0x3808dcc0, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xdfd0119e, 0x6c7018a9, 0xdfd0119e, 0x71865846, 0x9813a416, 0x9813a416, 0xb5e8801c, 0xb5e8801c, 0xb5e8801c, 0x2433062f, 0x2433062f, 0x2433062f, 0x3d893bff, 0x3d893bff, 0x3d893bff, 0x9813a416, 0x71865846, 0x71865846, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x4e4844e0, 0x5ebe5f81, 0x4e4844e0, 0x38ee7153, 0x5fcf013d, 0x5fcf013d, 0x819b5c4e, 0x819b5c4e, 0x819b5c4e, 0x538b4438, 0x538b4438, 0x538b4438, 0x45f87ba7, 0x45f87ba7, 0x45f87ba7, 0x5fcf013d, 0x38ee7153, 0x38ee7153, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x701427d4, 0x246c830a, 0x701427d4, 0x6b11fdd3, 0xdd28f52b, 0xdd28f52b, 0xcd83646c, 0xcd83646c, 0xcd83646c, 0xecbf9d88, 0xecbf9d88, 0xecbf9d88, 0x91075604, 0x91075604, 0x91075604, 0xdd28f52b, 0x6b11fdd3, 0x6b11fdd3, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x7b5bd4c, 0xac246af1, 0x7b5bd4c, 0xf80aa6cc, 0x43d1f34, 0x43d1f34, 0xb200c08a, 0xb200c08a, 0xb200c08a, 0xcd0a6922, 0xcd0a6922, 0xcd0a6922, 0x545b6ca4, 0x545b6ca4, 0x545b6ca4, 0x43d1f34, 0xf80aa6cc, 0xf80aa6cc, 0x43d1f34, }, 20 },
|
||||
- { "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1027210c, 0x64e51c81, 0x1027210c, 0x45ca4a8a, 0x9a2e0d26, 0x12fd0f21, 0x12fd0f21, 0x12fd0f21, 0x4e25f9e1, 0x4e25f9e1, 0x4e25f9e1, 0x67bd3773, 0x67bd3773, 0x67bd3773, 0x59c36f00, 0x45ca4a8a, 0x45ca4a8a, }, 18 },
|
||||
- { "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8d12f697, 0xc5b32248, 0x8d12f697, 0x56720aa4, 0xa9d58ccd, 0xf766a14d, 0xf766a14d, 0xf766a14d, 0xa2390b47, 0xa2390b47, 0xa2390b47, 0xcb0ac30e, 0xcb0ac30e, 0xcb0ac30e, 0xaa4593fe, 0x56720aa4, 0x56720aa4, }, 18 },
|
||||
- { "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa5ec9f45, 0xdb7085d8, 0xa5ec9f45, 0x9caf1d3f, 0x5411be8b, 0xedc0ad83, 0xedc0ad83, 0xedc0ad83, 0x927e0b17, 0x927e0b17, 0x927e0b17, 0xd00a6b6f, 0xd00a6b6f, 0xd00a6b6f, 0xc9cbf769, 0x9caf1d3f, 0x9caf1d3f, }, 18 },
|
||||
- { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xce8e83bf, 0xeb96c838, 0xce8e83bf, 0x73cb3bc1, 0x740d78cf, 0xb35c7e64, 0xb35c7e64, 0xb35c7e64, 0x58f99418, 0x58f99418, 0x58f99418, 0x5eb294e8, 0x5eb294e8, 0x5eb294e8, 0x1c3742c9, 0x73cb3bc1, 0x73cb3bc1, }, 18 },
|
||||
- { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x56a03e51, 0xee7d8d4b, 0x56a03e51, 0x5bdf9413, 0xbcda144c, 0x220f7a5e, 0x220f7a5e, 0x220f7a5e, 0x4d46a64f, 0x4d46a64f, 0x4d46a64f, 0x40b0384c, 0x40b0384c, 0x40b0384c, 0xcc5a7bed, 0x5bdf9413, 0x5bdf9413, }, 18 },
|
||||
- { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0xea8a9cf0, 0x8929e522, 0xea8a9cf0, 0x78f3dfbc, 0x5d55a141, 0x377f1aeb, 0x377f1aeb, 0x377f1aeb, 0xf1cd5ef5, 0xf1cd5ef5, 0xf1cd5ef5, 0xe5a88e4a, 0xe5a88e4a, 0xe5a88e4a, 0xef4a3312, 0x78f3dfbc, 0x78f3dfbc, }, 18 },
|
||||
- { "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x6dcf1d57, 0x925a4c8f, 0x6dcf1d57, 0x69005b38, 0x6d6bb4bc, 0x756a36b9, 0x756a36b9, 0x756a36b9, 0xf499c068, 0xf499c068, 0xf499c068, 0x623d7907, 0x623d7907, 0x623d7907, 0x54e48d80, 0x69005b38, 0x69005b38, }, 18 },
|
||||
- { "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa49d26b0, 0xaa7d9b28, 0xa49d26b0, 0xe76bebf7, 0x59c36f00, 0x59c36f00, 0xea6ab252, 0xea6ab252, 0xea6ab252, 0x94eadf34, 0x94eadf34, 0x94eadf34, 0xf61ccae6, 0xf61ccae6, 0xf61ccae6, 0x59c36f00, 0xe76bebf7, 0xe76bebf7, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x7a277db, 0xf3bf80f7, 0x7a277db, 0x29a7f2a4, 0xaa4593fe, 0xaa4593fe, 0xf1cd57e3, 0xf1cd57e3, 0xf1cd57e3, 0x57385a84, 0x57385a84, 0x57385a84, 0x7a00f1fc, 0x7a00f1fc, 0x7a00f1fc, 0xaa4593fe, 0x29a7f2a4, 0x29a7f2a4, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x631edf85, 0x71926408, 0x631edf85, 0x3e09b201, 0xc9cbf769, 0xc9cbf769, 0xf224ab3, 0xf224ab3, 0xf224ab3, 0xf1fa8b7f, 0xf1fa8b7f, 0xf1fa8b7f, 0x18b03477, 0x18b03477, 0x18b03477, 0xc9cbf769, 0x3e09b201, 0x3e09b201, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xfbaf4635, 0xe69ef474, 0xfbaf4635, 0x55f90fed, 0x9813a416, 0x9813a416, 0x3aad8f41, 0x3aad8f41, 0x3aad8f41, 0xab760972, 0xab760972, 0xab760972, 0xb2cc34a2, 0xb2cc34a2, 0xb2cc34a2, 0x9813a416, 0x55f90fed, 0x55f90fed, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xdce50745, 0x1d8009e4, 0xdce50745, 0xaa4332f6, 0x5fcf013d, 0x5fcf013d, 0x354e5749, 0x354e5749, 0x354e5749, 0xe75e4f3f, 0xe75e4f3f, 0xe75e4f3f, 0xf12d70a0, 0xf12d70a0, 0xf12d70a0, 0x5fcf013d, 0xaa4332f6, 0xaa4332f6, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x3efebeff, 0xf101dfe2, 0x3efebeff, 0x25fb64f8, 0xdd28f52b, 0xdd28f52b, 0x70c69ebd, 0x70c69ebd, 0x70c69ebd, 0x51fa6759, 0x51fa6759, 0x51fa6759, 0x2c42acd5, 0x2c42acd5, 0x2c42acd5, 0xdd28f52b, 0x25fb64f8, 0x25fb64f8, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x59a34c64, 0x281cca78, 0x59a34c64, 0xa61c57e4, 0x43d1f34, 0x43d1f34, 0x95131d4, 0x95131d4, 0x95131d4, 0x765b987c, 0x765b987c, 0x765b987c, 0xef0a9dfa, 0xef0a9dfa, 0xef0a9dfa, 0x43d1f34, 0xa61c57e4, 0xa61c57e4, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa37c165, 0x72063383, 0xa37c165, 0x49c10c22, 0x59c36f00, 0x59c36f00, 0x4e53de8e, 0x4e53de8e, 0x4e53de8e, 0x30d3b3e8, 0x30d3b3e8, 0x30d3b3e8, 0x5225a63a, 0x5225a63a, 0x5225a63a, 0x59c36f00, 0x49c10c22, 0x49c10c22, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x45bba0ba, 0xe60fd0b6, 0x45bba0ba, 0x6bbe25c5, 0xaa4593fe, 0xaa4593fe, 0x28de2b41, 0x28de2b41, 0x28de2b41, 0x8e2b2626, 0x8e2b2626, 0x8e2b2626, 0xa3138d5e, 0xa3138d5e, 0xa3138d5e, 0xaa4593fe, 0x6bbe25c5, 0x6bbe25c5, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb43d4e9d, 0x16f88820, 0xb43d4e9d, 0xe92a2319, 0xc9cbf769, 0xc9cbf769, 0xb8959ec7, 0xb8959ec7, 0xb8959ec7, 0x464d5f0b, 0x464d5f0b, 0x464d5f0b, 0xaf07e003, 0xaf07e003, 0xaf07e003, 0xc9cbf769, 0xe92a2319, 0xe92a2319, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x46760365, 0x685ae30e, 0x46760365, 0xe8204abd, 0x9813a416, 0x9813a416, 0x8896050a, 0x8896050a, 0x8896050a, 0x194d8339, 0x194d8339, 0x194d8339, 0xf7bee9, 0xf7bee9, 0xf7bee9, 0x9813a416, 0xe8204abd, 0xe8204abd, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x6859aa86, 0xf3f11deb, 0x6859aa86, 0x1eff9f35, 0x5fcf013d, 0x5fcf013d, 0xd72b1482, 0xd72b1482, 0xd72b1482, 0x53b0cf4, 0x53b0cf4, 0x53b0cf4, 0x1348336b, 0x1348336b, 0x1348336b, 0x5fcf013d, 0x1eff9f35, 0x1eff9f35, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x688451e7, 0xf6936b72, 0x688451e7, 0x73818be0, 0xdd28f52b, 0xdd28f52b, 0xf12a65ac, 0xf12a65ac, 0xf12a65ac, 0xd0169c48, 0xd0169c48, 0xd0169c48, 0xadae57c4, 0xadae57c4, 0xadae57c4, 0xdd28f52b, 0x73818be0, 0x73818be0, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x9616af94, 0xd466be40, 0x9616af94, 0x69a9b414, 0x43d1f34, 0x43d1f34, 0xf3bb3240, 0xf3bb3240, 0xf3bb3240, 0x8cb19be8, 0x8cb19be8, 0x8cb19be8, 0x15e09e6e, 0x15e09e6e, 0x15e09e6e, 0x43d1f34, 0x69a9b414, 0x69a9b414, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x8708d1bd, 0x85dd5e9c, 0x8708d1bd, 0xc4fe1cfa, 0x59c36f00, 0x59c36f00, 0x7ae8aced, 0x7ae8aced, 0x7ae8aced, 0x468c18b, 0x468c18b, 0x468c18b, 0x669ed459, 0x669ed459, 0x669ed459, 0x59c36f00, 0xc4fe1cfa, 0xc4fe1cfa, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xa72b1043, 0x147d4ce0, 0xa72b1043, 0x892e953c, 0xaa4593fe, 0xaa4593fe, 0xb7b1dd40, 0xb7b1dd40, 0xb7b1dd40, 0x1144d027, 0x1144d027, 0x1144d027, 0x3c7c7b5f, 0x3c7c7b5f, 0x3c7c7b5f, 0xaa4593fe, 0x892e953c, 0x892e953c, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xc5fb1817, 0x745fb26c, 0xc5fb1817, 0x98ec7593, 0xc9cbf769, 0xc9cbf769, 0xf5f17e2d, 0xf5f17e2d, 0xf5f17e2d, 0xb29bfe1, 0xb29bfe1, 0xb29bfe1, 0xe26300e9, 0xe26300e9, 0xe26300e9, 0xc9cbf769, 0x98ec7593, 0x98ec7593, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4be837e1, 0xbf4963ca, 0x4be837e1, 0xe5be7e39, 0x9813a416, 0x9813a416, 0xd886fca0, 0xd886fca0, 0xd886fca0, 0x495d7a93, 0x495d7a93, 0x495d7a93, 0x50e74743, 0x50e74743, 0x50e74743, 0x9813a416, 0xe5be7e39, 0xe5be7e39, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x21a8ccb8, 0x17719be, 0x21a8ccb8, 0x570ef90b, 0x5fcf013d, 0x5fcf013d, 0x2a7b5333, 0x2a7b5333, 0x2a7b5333, 0xf86b4b45, 0xf86b4b45, 0xf86b4b45, 0xee1874da, 0xee1874da, 0xee1874da, 0x5fcf013d, 0x570ef90b, 0x570ef90b, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x7001fe50, 0x4798153f, 0x7001fe50, 0x6b042457, 0xdd28f52b, 0xdd28f52b, 0x46489369, 0x46489369, 0x46489369, 0x67746a8d, 0x67746a8d, 0x67746a8d, 0x1acca101, 0x1acca101, 0x1acca101, 0xdd28f52b, 0x6b042457, 0x6b042457, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x6e10591c, 0x48bd926e, 0x6e10591c, 0x91af429c, 0x43d1f34, 0x43d1f34, 0x59cb829, 0x59cb829, 0x59cb829, 0x7a961181, 0x7a961181, 0x7a961181, 0xe3c71407, 0xe3c71407, 0xe3c71407, 0x43d1f34, 0x91af429c, 0x91af429c, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x67627ed5, 0xdb276cef, 0x67627ed5, 0x2494b392, 0x59c36f00, 0x59c36f00, 0x43f511f3, 0x43f511f3, 0x43f511f3, 0x3d757c95, 0x3d757c95, 0x3d757c95, 0x5f836947, 0x5f836947, 0x5f836947, 0x59c36f00, 0x2494b392, 0x2494b392, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x987cbf71, 0x6e4c645c, 0x987cbf71, 0xb6793a0e, 0xaa4593fe, 0xaa4593fe, 0xb943d716, 0xb943d716, 0xb943d716, 0x1fb6da71, 0x1fb6da71, 0x1fb6da71, 0x328e7109, 0x328e7109, 0x328e7109, 0xaa4593fe, 0xb6793a0e, 0xb6793a0e, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xf9987c07, 0x4a92eed9, 0xf9987c07, 0xa48f1183, 0xc9cbf769, 0xc9cbf769, 0x5eb3ddf4, 0x5eb3ddf4, 0x5eb3ddf4, 0xa06b1c38, 0xa06b1c38, 0xa06b1c38, 0x4921a330, 0x4921a330, 0x4921a330, 0xc9cbf769, 0xa48f1183, 0xa48f1183, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xccd804e2, 0xb99e8d91, 0xccd804e2, 0x628e4d3a, 0x9813a416, 0x9813a416, 0x5aec5acc, 0x5aec5acc, 0x5aec5acc, 0xcb37dcff, 0xcb37dcff, 0xcb37dcff, 0xd28de12f, 0xd28de12f, 0xd28de12f, 0x9813a416, 0x628e4d3a, 0x628e4d3a, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x4990d896, 0x2b3aa242, 0x4990d896, 0x3f36ed25, 0x5fcf013d, 0x5fcf013d, 0x3cc6048d, 0x3cc6048d, 0x3cc6048d, 0xeed61cfb, 0xeed61cfb, 0xeed61cfb, 0xf8a52364, 0xf8a52364, 0xf8a52364, 0x5fcf013d, 0x3f36ed25, 0x3f36ed25, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x4ff5c69f, 0x66586489, 0x4ff5c69f, 0x54f01c98, 0xdd28f52b, 0xdd28f52b, 0xc3ff0bf5, 0xc3ff0bf5, 0xc3ff0bf5, 0xe2c3f211, 0xe2c3f211, 0xe2c3f211, 0x9f7b399d, 0x9f7b399d, 0x9f7b399d, 0xdd28f52b, 0x54f01c98, 0x54f01c98, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x909b7bb4, 0x2bb2a58c, 0x909b7bb4, 0x6f246034, 0x43d1f34, 0x43d1f34, 0x2df40751, 0x2df40751, 0x2df40751, 0x52feaef9, 0x52feaef9, 0x52feaef9, 0xcbafab7f, 0xcbafab7f, 0xcbafab7f, 0x43d1f34, 0x6f246034, 0x6f246034, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xc77bfcc6, 0xffcdf45d, 0xc77bfcc6, 0x848d3181, 0x59c36f00, 0x59c36f00, 0xd79cd5e, 0xd79cd5e, 0xd79cd5e, 0x73f9a038, 0x73f9a038, 0x73f9a038, 0x110fb5ea, 0x110fb5ea, 0x110fb5ea, 0x59c36f00, 0x848d3181, 0x848d3181, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd5494aa5, 0xa0924ec, 0xd5494aa5, 0xfb4ccfda, 0xaa4593fe, 0xaa4593fe, 0x8692c636, 0x8692c636, 0x8692c636, 0x2067cb51, 0x2067cb51, 0x2067cb51, 0xd5f6029, 0xd5f6029, 0xd5f6029, 0xaa4593fe, 0xfb4ccfda, 0xfb4ccfda, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x2436c4f, 0x2cde4e0c, 0x2436c4f, 0x5f5401cb, 0xc9cbf769, 0xc9cbf769, 0x558f50ae, 0x558f50ae, 0x558f50ae, 0xab579162, 0xab579162, 0xab579162, 0x421d2e6a, 0x421d2e6a, 0x421d2e6a, 0xc9cbf769, 0x5f5401cb, 0x5f5401cb, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x86f8a68c, 0xf4116451, 0x86f8a68c, 0x28aeef54, 0x9813a416, 0x9813a416, 0x7befbe43, 0x7befbe43, 0x7befbe43, 0xea343870, 0xea343870, 0xea343870, 0xf38e05a0, 0xf38e05a0, 0xf38e05a0, 0x9813a416, 0x28aeef54, 0x28aeef54, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x156c292f, 0x3c8eb473, 0x156c292f, 0x63ca1c9c, 0x5fcf013d, 0x5fcf013d, 0x895ea16b, 0x895ea16b, 0x895ea16b, 0x5b4eb91d, 0x5b4eb91d, 0x5b4eb91d, 0x4d3d8682, 0x4d3d8682, 0x4d3d8682, 0x5fcf013d, 0x63ca1c9c, 0x63ca1c9c, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xf57ebf12, 0x798b299b, 0xf57ebf12, 0xee7b6515, 0xdd28f52b, 0xdd28f52b, 0x22563fc6, 0x22563fc6, 0x22563fc6, 0x36ac622, 0x36ac622, 0x36ac622, 0x7ed20dae, 0x7ed20dae, 0x7ed20dae, 0xdd28f52b, 0xee7b6515, 0xee7b6515, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x2bc82eb1, 0x94064cc8, 0x2bc82eb1, 0xd4773531, 0x43d1f34, 0x43d1f34, 0x44cbf2f0, 0x44cbf2f0, 0x44cbf2f0, 0x3bc15b58, 0x3bc15b58, 0x3bc15b58, 0xa2905ede, 0xa2905ede, 0xa2905ede, 0x43d1f34, 0xd4773531, 0xd4773531, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x7f6dd146, 0x548af474, 0x7f6dd146, 0x3c9b1c01, 0x59c36f00, 0x59c36f00, 0x7d913e8d, 0x7d913e8d, 0x7d913e8d, 0x31153eb, 0x31153eb, 0x31153eb, 0x61e74639, 0x61e74639, 0x61e74639, 0x59c36f00, 0x3c9b1c01, 0x3c9b1c01, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf29ad079, 0x50d47c0, 0xf29ad079, 0xdc9f5506, 0xaa4593fe, 0xaa4593fe, 0x6bcf4c90, 0x6bcf4c90, 0x6bcf4c90, 0xcd3a41f7, 0xcd3a41f7, 0xcd3a41f7, 0xe002ea8f, 0xe002ea8f, 0xe002ea8f, 0xaa4593fe, 0xdc9f5506, 0xdc9f5506, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb25e3082, 0x2ed845dd, 0xb25e3082, 0xef495d06, 0xc9cbf769, 0xc9cbf769, 0xd5322575, 0xd5322575, 0xd5322575, 0x2beae4b9, 0x2beae4b9, 0x2beae4b9, 0xc2a05bb1, 0xc2a05bb1, 0xc2a05bb1, 0xc9cbf769, 0xef495d06, 0xef495d06, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4cdfcd2e, 0x8bf091f, 0x4cdfcd2e, 0xe28984f6, 0x9813a416, 0x9813a416, 0x8217f630, 0x8217f630, 0x8217f630, 0x13cc7003, 0x13cc7003, 0x13cc7003, 0xa764dd3, 0xa764dd3, 0xa764dd3, 0x9813a416, 0xe28984f6, 0xe28984f6, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xf2b49f88, 0x2eff252d, 0xf2b49f88, 0x8412aa3b, 0x5fcf013d, 0x5fcf013d, 0x5d3b9fe7, 0x5d3b9fe7, 0x5d3b9fe7, 0x8f2b8791, 0x8f2b8791, 0x8f2b8791, 0x9958b80e, 0x9958b80e, 0x9958b80e, 0x5fcf013d, 0x8412aa3b, 0x8412aa3b, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x786673be, 0x536f1359, 0x786673be, 0x6363a9b9, 0xdd28f52b, 0xdd28f52b, 0x38653b12, 0x38653b12, 0x38653b12, 0x1959c2f6, 0x1959c2f6, 0x1959c2f6, 0x64e1097a, 0x64e1097a, 0x64e1097a, 0xdd28f52b, 0x6363a9b9, 0x6363a9b9, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xac4a1127, 0x699c2ad8, 0xac4a1127, 0x53f50aa7, 0x43d1f34, 0x43d1f34, 0xfa47dfba, 0xfa47dfba, 0xfa47dfba, 0x854d7612, 0x854d7612, 0x854d7612, 0x1c1c7394, 0x1c1c7394, 0x1c1c7394, 0x43d1f34, 0x53f50aa7, 0x53f50aa7, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xbc5f6633, 0xda908ab0, 0xbc5f6633, 0xffa9ab74, 0x59c36f00, 0x59c36f00, 0x3ad73295, 0x3ad73295, 0x3ad73295, 0x44575ff3, 0x44575ff3, 0x44575ff3, 0x26a14a21, 0x26a14a21, 0x26a14a21, 0x59c36f00, 0xffa9ab74, 0xffa9ab74, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xad820d6b, 0x9a88ad3, 0xad820d6b, 0x83878814, 0xaa4593fe, 0xaa4593fe, 0xbec19c1b, 0xbec19c1b, 0xbec19c1b, 0x1834917c, 0x1834917c, 0x1834917c, 0x350c3a04, 0x350c3a04, 0x350c3a04, 0xaa4593fe, 0x83878814, 0x83878814, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xe5774112, 0x5ffb1eca, 0xe5774112, 0xb8602c96, 0xc9cbf769, 0xc9cbf769, 0xe4861949, 0xe4861949, 0xe4861949, 0x1a5ed885, 0x1a5ed885, 0x1a5ed885, 0xf314678d, 0xf314678d, 0xf314678d, 0xc9cbf769, 0xb8602c96, 0xb8602c96, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6af1a2bc, 0xd951ab8b, 0x6af1a2bc, 0xc4a7eb64, 0x9813a416, 0x9813a416, 0xb5e8801c, 0xb5e8801c, 0xb5e8801c, 0x2433062f, 0x2433062f, 0x2433062f, 0x3d893bff, 0x3d893bff, 0x3d893bff, 0x9813a416, 0xc4a7eb64, 0xc4a7eb64, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xc6baa18, 0x1c9db179, 0xc6baa18, 0x7acd9fab, 0x5fcf013d, 0x5fcf013d, 0x819b5c4e, 0x819b5c4e, 0x819b5c4e, 0x538b4438, 0x538b4438, 0x538b4438, 0x45f87ba7, 0x45f87ba7, 0x45f87ba7, 0x5fcf013d, 0x7acd9fab, 0x7acd9fab, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xe424a6ab, 0xb05c0275, 0xe424a6ab, 0xff217cac, 0xdd28f52b, 0xdd28f52b, 0xcd83646c, 0xcd83646c, 0xcd83646c, 0xecbf9d88, 0xecbf9d88, 0xecbf9d88, 0x91075604, 0x91075604, 0x91075604, 0xdd28f52b, 0xff217cac, 0xff217cac, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4a7dff41, 0xe1ec28fc, 0x4a7dff41, 0xb5c2e4c1, 0x43d1f34, 0x43d1f34, 0xb200c08a, 0xb200c08a, 0xb200c08a, 0xcd0a6922, 0xcd0a6922, 0xcd0a6922, 0x545b6ca4, 0x545b6ca4, 0x545b6ca4, 0x43d1f34, 0xb5c2e4c1, 0xb5c2e4c1, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd3d3e4a2, 0x9c635046, 0xd3d3e4a2, 0x902529e5, 0x59c36f00, 0x59c36f00, 0x85e713, 0x85e713, 0x85e713, 0x7e058a75, 0x7e058a75, 0x7e058a75, 0x1cf39fa7, 0x1cf39fa7, 0x1cf39fa7, 0x59c36f00, 0x902529e5, 0x902529e5, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd61c80f5, 0xdf78b496, 0xd61c80f5, 0xf819058a, 0xaa4593fe, 0xaa4593fe, 0xefc0f7e7, 0xefc0f7e7, 0xefc0f7e7, 0x4935fa80, 0x4935fa80, 0x4935fa80, 0x640d51f8, 0x640d51f8, 0x640d51f8, 0xaa4593fe, 0xf819058a, 0xf819058a, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x936bc89d, 0x523a3e80, 0x936bc89d, 0xce7ca519, 0xc9cbf769, 0xc9cbf769, 0xaa99ffb1, 0xaa99ffb1, 0xaa99ffb1, 0x54413e7d, 0x54413e7d, 0x54413e7d, 0xbd0b8175, 0xbd0b8175, 0xbd0b8175, 0xc9cbf769, 0xce7ca519, 0xce7ca519, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4fdd0291, 0x133fa83d, 0x4fdd0291, 0xe18b4b49, 0x9813a416, 0x9813a416, 0x74c38e90, 0x74c38e90, 0x74c38e90, 0xe51808a3, 0xe51808a3, 0xe51808a3, 0xfca23573, 0xfca23573, 0xfca23573, 0x9813a416, 0xe18b4b49, 0xe18b4b49, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x538203b0, 0x2a92e789, 0x538203b0, 0x25243603, 0x5fcf013d, 0x5fcf013d, 0x5e4d3dd8, 0x5e4d3dd8, 0x5e4d3dd8, 0x8c5d25ae, 0x8c5d25ae, 0x8c5d25ae, 0x9a2e1a31, 0x9a2e1a31, 0x9a2e1a31, 0x5fcf013d, 0x25243603, 0x25243603, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xcfc85125, 0xa5b0e11b, 0xcfc85125, 0xd4cd8b22, 0xdd28f52b, 0xdd28f52b, 0x1af8cddc, 0x1af8cddc, 0x1af8cddc, 0x3bc43438, 0x3bc43438, 0x3bc43438, 0x467cffb4, 0x467cffb4, 0x467cffb4, 0xdd28f52b, 0xd4cd8b22, 0xd4cd8b22, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xf2469ffb, 0x1d0c1d2, 0xf2469ffb, 0xdf9847b, 0x43d1f34, 0x43d1f34, 0xa2837c7a, 0xa2837c7a, 0xa2837c7a, 0xdd89d5d2, 0xdd89d5d2, 0xdd89d5d2, 0x44d8d054, 0x44d8d054, 0x44d8d054, 0x43d1f34, 0xdf9847b, 0xdf9847b, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x27851cc1, 0x15f731b5, 0x27851cc1, 0x6473d186, 0x59c36f00, 0x59c36f00, 0x125bcddf, 0x125bcddf, 0x125bcddf, 0x6cdba0b9, 0x6cdba0b9, 0x6cdba0b9, 0xe2db56b, 0xe2db56b, 0xe2db56b, 0x59c36f00, 0x6473d186, 0x6473d186, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xfcb223c, 0x2c2e18b9, 0xfcb223c, 0x21cea743, 0xaa4593fe, 0xaa4593fe, 0xd700be1a, 0xd700be1a, 0xd700be1a, 0x71f5b37d, 0x71f5b37d, 0x71f5b37d, 0x5ccd1805, 0x5ccd1805, 0x5ccd1805, 0xaa4593fe, 0x21cea743, 0x21cea743, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x807efaa5, 0xb673036a, 0x807efaa5, 0xdd699721, 0xc9cbf769, 0xc9cbf769, 0xdca3ed4b, 0xdca3ed4b, 0xdca3ed4b, 0x227b2c87, 0x227b2c87, 0x227b2c87, 0xcb31938f, 0xcb31938f, 0xcb31938f, 0xc9cbf769, 0xdd699721, 0xdd699721, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x651d0d50, 0xf0dc38fc, 0x651d0d50, 0xcb4b4488, 0x9813a416, 0x9813a416, 0x80d03ee8, 0x80d03ee8, 0x80d03ee8, 0x110bb8db, 0x110bb8db, 0x110bb8db, 0x8b1850b, 0x8b1850b, 0x8b1850b, 0x9813a416, 0xcb4b4488, 0xcb4b4488, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xb9b068f, 0xdc68ac3c, 0xb9b068f, 0x7d3d333c, 0x5fcf013d, 0x5fcf013d, 0xa1f0a6e4, 0xa1f0a6e4, 0xa1f0a6e4, 0x73e0be92, 0x73e0be92, 0x73e0be92, 0x6593810d, 0x6593810d, 0x6593810d, 0x5fcf013d, 0x7d3d333c, 0x7d3d333c, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xf0789d7e, 0x6f2f2b61, 0xf0789d7e, 0xeb7d4779, 0xdd28f52b, 0xdd28f52b, 0xb995630, 0xb995630, 0xb995630, 0x2aa5afd4, 0x2aa5afd4, 0x2aa5afd4, 0x571d6458, 0x571d6458, 0x571d6458, 0xdd28f52b, 0xeb7d4779, 0xeb7d4779, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x819821ff, 0xdd19128c, 0x819821ff, 0x7e273a7f, 0x43d1f34, 0x43d1f34, 0xf35981d3, 0xf35981d3, 0xf35981d3, 0x8c53287b, 0x8c53287b, 0x8c53287b, 0x15022dfd, 0x15022dfd, 0x15022dfd, 0x43d1f34, 0x7e273a7f, 0x7e273a7f, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa99604d1, 0xcf59e852, 0xa99604d1, 0xfebbba0f, 0x59c36f00, 0x59c36f00, 0x53767ce3, 0x53767ce3, 0x53767ce3, 0x2df61185, 0x2df61185, 0x2df61185, 0x4f000457, 0x4f000457, 0x4f000457, 0x59c36f00, 0xfebbba0f, 0xfebbba0f, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x7d0a218, 0xa3fa25a0, 0x7d0a218, 0xb777784e, 0xaa4593fe, 0xaa4593fe, 0x35db26e1, 0x35db26e1, 0x35db26e1, 0x932e2b86, 0x932e2b86, 0x932e2b86, 0xbe1680fe, 0xbe1680fe, 0xbe1680fe, 0xaa4593fe, 0xb777784e, 0xb777784e, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x63be90f4, 0xd932cf2c, 0x63be90f4, 0x739b8e5a, 0xc9cbf769, 0xc9cbf769, 0x70a00efe, 0x70a00efe, 0x70a00efe, 0x8e78cf32, 0x8e78cf32, 0x8e78cf32, 0x6732703a, 0x6732703a, 0x6732703a, 0xc9cbf769, 0x739b8e5a, 0x739b8e5a, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x53460c90, 0xe0e605a7, 0x53460c90, 0x6337f0bf, 0x9813a416, 0x9813a416, 0x4161864c, 0x4161864c, 0x4161864c, 0xd0ba007f, 0xd0ba007f, 0xd0ba007f, 0xc9003daf, 0xc9003daf, 0xc9003daf, 0x9813a416, 0x6337f0bf, 0x6337f0bf, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xf54761a0, 0xe5b17ac1, 0xf54761a0, 0x5b408e55, 0x5fcf013d, 0x5fcf013d, 0x580fda0e, 0x580fda0e, 0x580fda0e, 0x8a1fc278, 0x8a1fc278, 0x8a1fc278, 0x9c6cfde7, 0x9c6cfde7, 0x9c6cfde7, 0x5fcf013d, 0x5b408e55, 0x5b408e55, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xec78b0c1, 0xb800141f, 0xec78b0c1, 0x621c7b1b, 0xdd28f52b, 0xdd28f52b, 0x8f60179, 0x8f60179, 0x8f60179, 0x29caf89d, 0x29caf89d, 0x29caf89d, 0x54723311, 0x54723311, 0x54723311, 0xdd28f52b, 0x621c7b1b, 0x621c7b1b, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xf209411b, 0x599896a6, 0xf209411b, 0x6551c7bb, 0x43d1f34, 0x43d1f34, 0x5ac6bb4a, 0x5ac6bb4a, 0x5ac6bb4a, 0x25cc12e2, 0x25cc12e2, 0x25cc12e2, 0xbc9d1764, 0xbc9d1764, 0xbc9d1764, 0x43d1f34, 0x6551c7bb, 0x6551c7bb, 0x43d1f34, }, 20 },
|
||||
- { "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x93b4fcd8, 0xf57b105b, 0x93b4fcd8, 0x2bfe5312, 0x59c36f00, 0x59c36f00, 0x3ad73295, 0x3ad73295, 0x3ad73295, 0x44575ff3, 0x44575ff3, 0x44575ff3, 0x26a14a21, 0x26a14a21, 0x26a14a21, 0x59c36f00, 0x2bfe5312, 0x2bfe5312, 0x59c36f00, }, 20 },
|
||||
- { "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x656c9044, 0xc14617fc, 0x656c9044, 0xa6ea58cb, 0xaa4593fe, 0xaa4593fe, 0xbec19c1b, 0xbec19c1b, 0xbec19c1b, 0x1834917c, 0x1834917c, 0x1834917c, 0x350c3a04, 0x350c3a04, 0x350c3a04, 0xaa4593fe, 0xa6ea58cb, 0xa6ea58cb, 0xaa4593fe, }, 20 },
|
||||
- { "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa11479ed, 0x1b982635, 0xa11479ed, 0xe37185d0, 0xc9cbf769, 0xc9cbf769, 0xe4861949, 0xe4861949, 0xe4861949, 0x1a5ed885, 0x1a5ed885, 0x1a5ed885, 0xf314678d, 0xf314678d, 0xf314678d, 0xc9cbf769, 0xe37185d0, 0xe37185d0, 0xc9cbf769, }, 20 },
|
||||
- { "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x244770a7, 0x97e77990, 0x244770a7, 0x6a54d2ee, 0x9813a416, 0x9813a416, 0xb5e8801c, 0xb5e8801c, 0xb5e8801c, 0x2433062f, 0x2433062f, 0x2433062f, 0x3d893bff, 0x3d893bff, 0x3d893bff, 0x9813a416, 0x6a54d2ee, 0x6a54d2ee, 0x9813a416, }, 20 },
|
||||
- { "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x8ca34476, 0x9c555f17, 0x8ca34476, 0x1fc54b41, 0x5fcf013d, 0x5fcf013d, 0x819b5c4e, 0x819b5c4e, 0x819b5c4e, 0x538b4438, 0x538b4438, 0x538b4438, 0x45f87ba7, 0x45f87ba7, 0x45f87ba7, 0x5fcf013d, 0x1fc54b41, 0x1fc54b41, 0x5fcf013d, }, 20 },
|
||||
- { "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xf19f6af8, 0xa5e7ce26, 0xf19f6af8, 0x1619aea6, 0xdd28f52b, 0xdd28f52b, 0xcd83646c, 0xcd83646c, 0xcd83646c, 0xecbf9d88, 0xecbf9d88, 0xecbf9d88, 0x91075604, 0x91075604, 0x91075604, 0xdd28f52b, 0x1619aea6, 0x1619aea6, 0xdd28f52b, }, 20 },
|
||||
- { "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x5f75414f, 0xf4e496f2, 0x5f75414f, 0x27fd1fe0, 0x43d1f34, 0x43d1f34, 0xb200c08a, 0xb200c08a, 0xb200c08a, 0xcd0a6922, 0xcd0a6922, 0xcd0a6922, 0x545b6ca4, 0x545b6ca4, 0x545b6ca4, 0x43d1f34, 0x27fd1fe0, 0x27fd1fe0, 0x43d1f34, }, 20 },
|
||||
+ { "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x8851b0ee, 0x8851b0ee, 0xafb59f0b, 0xafb59f0b, 0x8c9b72f1, 0x8c9b72f1, 0x6eec5116, 0x6eec5116, 0xad82053e, 0xad82053e, 0x2eeae2ae, 0x2eeae2ae, 0x58cf8def, 0x58cf8def, 0x926f4d2f, 0x926f4d2f, 0xbd1c3236, 0xbd1c3236, 0x56012a95, 0x56012a95, 0x6d7c40ae, 0x6d7c40ae, 0xef750bc8, 0xef750bc8, 0x1080dd4a, 0x1080dd4a, 0xd7f9e5af, 0xd7f9e5af, 0x80b1b4a9, 0x80b1b4a9, 0x2c99415e, 0x2c99415e, 0x8d5761ff, 0x8d5761ff, 0xb964b489, 0xb964b489, 0x88a51f74, 0x88a51f74, 0x1da6c458, 0x1da6c458, 0x85e94025, 0x206ea54f, 0x7ee6c8fd, 0x7ee6c8fd, }, 45 },
|
||||
+ { "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x834b70a0, 0x834b70a0, 0xe7cc129f, 0xe7cc129f, 0x5ee2edc, 0x5ee2edc, 0xa1135cd7, 0xa1135cd7, 0xf7ce1f26, 0xf7ce1f26, 0xe9f803e8, 0xe9f803e8, 0x4b8f9724, 0x4b8f9724, 0x3fe3771a, 0x3fe3771a, 0x5584ee63, 0x5584ee63, 0xac193250, 0xac193250, 0x801f25f4, 0x801f25f4, 0x8d33aece, 0x8d33aece, 0xc6d95edc, 0xc6d95edc, 0xf121dee2, 0xf121dee2, 0x6ab10812, 0x6ab10812, 0x41a5b112, 0x41a5b112, 0xac6f712b, 0xac6f712b, 0x8aee7a19, 0x8aee7a19, 0xfe37c0ad, 0xfe37c0ad, 0x99c6a336, 0x99c6a336, 0x53b844c6, 0x73015447, 0x7a1a2254, 0x7a1a2254, }, 45 },
|
||||
+ { "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb121c912, 0xb121c912, 0x635a8739, 0x635a8739, 0x8288cba6, 0x8288cba6, 0xf5589d0, 0xf5589d0, 0x471642b3, 0x471642b3, 0xfb4826cf, 0xfb4826cf, 0x8b1083cf, 0x8b1083cf, 0x738b0c94, 0x738b0c94, 0x859c41b0, 0x859c41b0, 0x7c8d1be9, 0x7c8d1be9, 0x5b685e40, 0x5b685e40, 0x9cf80d95, 0x9cf80d95, 0x3541f915, 0x3541f915, 0x582b8557, 0x582b8557, 0x24cf88f7, 0x24cf88f7, 0x9e0af23, 0x9e0af23, 0x1033164b, 0x1033164b, 0x70ba51e2, 0x70ba51e2, 0xb051585c, 0xb051585c, 0xe1389f04, 0xe1389f04, 0x308bbb74, 0xdc9e6805, 0x4ddcff9f, 0x4ddcff9f, }, 45 },
|
||||
+ { "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xac16e832, 0xac16e832, 0xbf6ab9c6, 0xbf6ab9c6, 0x1063e15a, 0x1063e15a, 0xf908e3ff, 0xf908e3ff, 0xcb37d841, 0xcb37d841, 0x9b8ffa7d, 0x9b8ffa7d, 0x38d2a26c, 0x38d2a26c, 0x6989f09b, 0x6989f09b, 0x481451e, 0x481451e, 0x17b3177, 0x17b3177, 0x3ea52aeb, 0x3ea52aeb, 0xc24de674, 0xc24de674, 0x4ab163cc, 0x4ab163cc, 0xc482b092, 0xc482b092, 0x55ffc7e2, 0x55ffc7e2, 0x3b4b34dd, 0x3b4b34dd, 0x9b1f047f, 0x9b1f047f, 0x3d42e414, 0x3d42e414, 0x35b2fb06, 0x35b2fb06, 0xb813b35f, 0xb813b35f, 0xc3ede6e0, 0xc35214c3, 0x340f0107, 0x340f0107, }, 45 },
|
||||
+ { "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x9c47caee, 0x9c47caee, 0x6c9c4f38, 0x6c9c4f38, 0x79c49615, 0x79c49615, 0x70fe9708, 0x70fe9708, 0x8e90c077, 0x8e90c077, 0xd8205b47, 0xd8205b47, 0xa34337e2, 0xa34337e2, 0xf4dffa53, 0xf4dffa53, 0x90a0779c, 0x90a0779c, 0x322820bb, 0x322820bb, 0x50e3383f, 0x50e3383f, 0x4a976e3e, 0x4a976e3e, 0x90b6f8d9, 0x90b6f8d9, 0x4058c301, 0x4058c301, 0x221a6810, 0x221a6810, 0x1f78a00e, 0x1f78a00e, 0x6a633d2c, 0x6a633d2c, 0xca177c65, 0xca177c65, 0xabb6c7f9, 0xabb6c7f9, 0x635a35e8, 0x635a35e8, 0x6da78f10, 0x53467ff8, 0xd037fdfa, 0xd037fdfa, }, 45 },
|
||||
+ { "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x2b6b8225, 0x2b6b8225, 0x83df9995, 0x83df9995, 0x5165ad0b, 0x5165ad0b, 0xe5a6f96d, 0xe5a6f96d, 0x798df957, 0x798df957, 0x8c0567e2, 0x8c0567e2, 0x5e5d7389, 0x5e5d7389, 0x47a39dd, 0x47a39dd, 0x894f44af, 0x894f44af, 0x1dff0a6, 0x1dff0a6, 0xf496e67b, 0xf496e67b, 0x29cb5702, 0x29cb5702, 0xeaf1387d, 0xeaf1387d, 0x4a9bf7, 0x4a9bf7, 0x11d20bee, 0x11d20bee, 0xa103dc2d, 0xa103dc2d, 0xd0265db9, 0xd0265db9, 0x42267334, 0x42267334, 0x96f85e8c, 0x96f85e8c, 0xa28eac49, 0xa28eac49, 0x4e660ae7, 0x70741b3, 0x183f2f2e, 0x183f2f2e, }, 45 },
|
||||
+ { "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x77b51f44, 0x77b51f44, 0xc8097569, 0xc8097569, 0x769aee5f, 0x769aee5f, 0xa35e159, 0xa35e159, 0x87a6341f, 0x87a6341f, 0xb61d944b, 0xb61d944b, 0x8b109cb3, 0x8b109cb3, 0xed3fb3e, 0xed3fb3e, 0xd7cc6c3, 0xd7cc6c3, 0x52077f0d, 0x52077f0d, 0x9d86d17e, 0x9d86d17e, 0x5e487bb, 0x5e487bb, 0x3a00041b, 0x3a00041b, 0xcfdeaf9e, 0xcfdeaf9e, 0x3e40af89, 0x3e40af89, 0x5ec41ea9, 0x5ec41ea9, 0x6298e4e7, 0x6298e4e7, 0xfd67f90e, 0xfd67f90e, 0x5ab5dc32, 0x5ab5dc32, 0xdd3ad694, 0xdd3ad694, 0x391222b4, 0xd4a98b43, 0xeaa2f62, 0xeaa2f62, }, 45 },
|
||||
+ { "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x45b0713c, 0x237f9dbf, 0x45b0713c, 0x646bc7b, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x646bc7b, 0x646bc7b, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x84abc7db, 0x20814063, 0x84abc7db, 0xaaae42a4, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0xaaae42a4, 0xaaae42a4, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5b85371a, 0xe10968c2, 0x5b85371a, 0x6925a9e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x6925a9e, 0x6925a9e, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x9130464d, 0x22904f7a, 0x9130464d, 0x3f660f95, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x3f660f95, 0x3f660f95, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x5185b14e, 0x4173aa2f, 0x5185b14e, 0x272384fd, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x272384fd, 0x272384fd, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x5cc0d3ef, 0x8b87731, 0x5cc0d3ef, 0x47c509e8, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x47c509e8, 0x47c509e8, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xd1338a02, 0x7aa25dbf, 0xd1338a02, 0x2e8c9182, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x2e8c9182, 0x2e8c9182, 0x43d1f34, }, 20 },
|
||||
+ { "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1027210c, 0x64e51c81, 0x1027210c, 0x45ca4a8a, 0x9a2e0d26, 0x2b88b6ce, 0x2b88b6ce, 0x2b88b6ce, 0x7750400e, 0x7750400e, 0x7750400e, 0x5ec88e9c, 0x5ec88e9c, 0x5ec88e9c, 0x59c36f00, 0x45ca4a8a, 0x45ca4a8a, }, 18 },
|
||||
+ { "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8d12f697, 0xc5b32248, 0x8d12f697, 0x56720aa4, 0xa9d58ccd, 0xa1b1a1b5, 0xa1b1a1b5, 0xa1b1a1b5, 0xf4ee0bbf, 0xf4ee0bbf, 0xf4ee0bbf, 0x9dddc3f6, 0x9dddc3f6, 0x9dddc3f6, 0xaa4593fe, 0x56720aa4, 0x56720aa4, }, 18 },
|
||||
+ { "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa5ec9f45, 0xdb7085d8, 0xa5ec9f45, 0x9caf1d3f, 0x5411be8b, 0xa07e74d3, 0xa07e74d3, 0xa07e74d3, 0xdfc0d247, 0xdfc0d247, 0xdfc0d247, 0x9db4b23f, 0x9db4b23f, 0x9db4b23f, 0xc9cbf769, 0x9caf1d3f, 0x9caf1d3f, }, 18 },
|
||||
+ { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xce8e83bf, 0xeb96c838, 0xce8e83bf, 0x73cb3bc1, 0x740d78cf, 0x84312594, 0x84312594, 0x84312594, 0x6f94cfe8, 0x6f94cfe8, 0x6f94cfe8, 0x69dfcf18, 0x69dfcf18, 0x69dfcf18, 0x1c3742c9, 0x73cb3bc1, 0x73cb3bc1, }, 18 },
|
||||
+ { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x56a03e51, 0xee7d8d4b, 0x56a03e51, 0x5bdf9413, 0xbcda144c, 0x131c0760, 0x131c0760, 0x131c0760, 0x7c55db71, 0x7c55db71, 0x7c55db71, 0x71a34572, 0x71a34572, 0x71a34572, 0xcc5a7bed, 0x5bdf9413, 0x5bdf9413, }, 18 },
|
||||
+ { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0xea8a9cf0, 0x8929e522, 0xea8a9cf0, 0x78f3dfbc, 0x5d55a141, 0xb9092e0b, 0xb9092e0b, 0xb9092e0b, 0x7fbb6a15, 0x7fbb6a15, 0x7fbb6a15, 0x6bdebaaa, 0x6bdebaaa, 0x6bdebaaa, 0xef4a3312, 0x78f3dfbc, 0x78f3dfbc, }, 18 },
|
||||
+ { "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x6dcf1d57, 0x925a4c8f, 0x6dcf1d57, 0x69005b38, 0x6d6bb4bc, 0x14f7c6b1, 0x14f7c6b1, 0x14f7c6b1, 0x95043060, 0x95043060, 0x95043060, 0x3a0890f, 0x3a0890f, 0x3a0890f, 0x54e48d80, 0x69005b38, 0x69005b38, }, 18 },
|
||||
+ { "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x77ff5efc, 0x791fe364, 0x77ff5efc, 0x340993bb, 0x59c36f00, 0x59c36f00, 0x3908ca1e, 0x3908ca1e, 0x3908ca1e, 0x4788a778, 0x4788a778, 0x4788a778, 0x257eb2aa, 0x257eb2aa, 0x257eb2aa, 0x59c36f00, 0x340993bb, 0x340993bb, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xb2d04b0f, 0x46cdbc23, 0xb2d04b0f, 0x9cd5ce70, 0xaa4593fe, 0xaa4593fe, 0x44bf6b37, 0x44bf6b37, 0x44bf6b37, 0xe24a6650, 0xe24a6650, 0xe24a6650, 0xcf72cd28, 0xcf72cd28, 0xcf72cd28, 0xaa4593fe, 0x9cd5ce70, 0x9cd5ce70, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x4bb823b8, 0x59349835, 0x4bb823b8, 0x16af4e3c, 0xc9cbf769, 0xc9cbf769, 0x2784b68e, 0x2784b68e, 0x2784b68e, 0xd95c7742, 0xd95c7742, 0xd95c7742, 0x3016c84a, 0x3016c84a, 0x3016c84a, 0xc9cbf769, 0x16af4e3c, 0x16af4e3c, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xb821e44, 0x16b3ac05, 0xb821e44, 0xa5d4579c, 0x9813a416, 0x9813a416, 0xca80d730, 0xca80d730, 0xca80d730, 0x5b5b5103, 0x5b5b5103, 0x5b5b5103, 0x42e16cd3, 0x42e16cd3, 0x42e16cd3, 0x9813a416, 0xa5d4579c, 0xa5d4579c, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xbe0b9671, 0x7f6e98d0, 0xbe0b9671, 0xc8ada3c2, 0x5fcf013d, 0x5fcf013d, 0x57a0c67d, 0x57a0c67d, 0x57a0c67d, 0x85b0de0b, 0x85b0de0b, 0x85b0de0b, 0x93c3e194, 0x93c3e194, 0x93c3e194, 0x5fcf013d, 0xc8ada3c2, 0xc8ada3c2, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x9f18b29e, 0x50e7d383, 0x9f18b29e, 0x841d6899, 0xdd28f52b, 0xdd28f52b, 0xd12092dc, 0xd12092dc, 0xd12092dc, 0xf01c6b38, 0xf01c6b38, 0xf01c6b38, 0x8da4a0b4, 0x8da4a0b4, 0x8da4a0b4, 0xdd28f52b, 0x841d6899, 0x841d6899, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4e8d4d8c, 0x3f32cb90, 0x4e8d4d8c, 0xb132560c, 0x43d1f34, 0x43d1f34, 0x1e7f303c, 0x1e7f303c, 0x1e7f303c, 0x61759994, 0x61759994, 0x61759994, 0xf8249c12, 0xf8249c12, 0xf8249c12, 0x43d1f34, 0xb132560c, 0xb132560c, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x4f39b2c5, 0x37084023, 0x4f39b2c5, 0xccf7f82, 0x59c36f00, 0x59c36f00, 0xb5dad2e, 0xb5dad2e, 0xb5dad2e, 0x75ddc048, 0x75ddc048, 0x75ddc048, 0x172bd59a, 0x172bd59a, 0x172bd59a, 0x59c36f00, 0xccf7f82, 0xccf7f82, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd5f24f8e, 0x76463f82, 0xd5f24f8e, 0xfbf7caf1, 0xaa4593fe, 0xaa4593fe, 0xb897c475, 0xb897c475, 0xb897c475, 0x1e62c912, 0x1e62c912, 0x1e62c912, 0x335a626a, 0x335a626a, 0x335a626a, 0xaa4593fe, 0xfbf7caf1, 0xfbf7caf1, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8aa7c8c3, 0x28620e7e, 0x8aa7c8c3, 0xd7b0a547, 0xc9cbf769, 0xc9cbf769, 0x860f1899, 0x860f1899, 0x860f1899, 0x78d7d955, 0x78d7d955, 0x78d7d955, 0x919d665d, 0x919d665d, 0x919d665d, 0xc9cbf769, 0xd7b0a547, 0xd7b0a547, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x89654b6, 0x26bab4dd, 0x89654b6, 0xa6c01d6e, 0x9813a416, 0x9813a416, 0xc67652d9, 0xc67652d9, 0xc67652d9, 0x57add4ea, 0x57add4ea, 0x57add4ea, 0x4e17e93a, 0x4e17e93a, 0x4e17e93a, 0x9813a416, 0xa6c01d6e, 0xa6c01d6e, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x77945f28, 0xec3ce845, 0x77945f28, 0x1326a9b, 0x5fcf013d, 0x5fcf013d, 0xc8e6e12c, 0xc8e6e12c, 0xc8e6e12c, 0x1af6f95a, 0x1af6f95a, 0x1af6f95a, 0xc85c6c5, 0xc85c6c5, 0xc85c6c5, 0x5fcf013d, 0x1326a9b, 0x1326a9b, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x4450a5dc, 0xda479f49, 0x4450a5dc, 0x5f557fdb, 0xdd28f52b, 0xdd28f52b, 0xddfe9197, 0xddfe9197, 0xddfe9197, 0xfcc26873, 0xfcc26873, 0xfcc26873, 0x817aa3ff, 0x817aa3ff, 0x817aa3ff, 0xdd28f52b, 0x5f557fdb, 0x5f557fdb, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x409098da, 0x2e0890e, 0x409098da, 0xbf2f835a, 0x43d1f34, 0x43d1f34, 0x253d050e, 0x253d050e, 0x253d050e, 0x5a37aca6, 0x5a37aca6, 0x5a37aca6, 0xc366a920, 0xc366a920, 0xc366a920, 0x43d1f34, 0xbf2f835a, 0xbf2f835a, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x546aa9f1, 0x56bf26d0, 0x546aa9f1, 0x179c64b6, 0x59c36f00, 0x59c36f00, 0xa98ad4a1, 0xa98ad4a1, 0xa98ad4a1, 0xd70ab9c7, 0xd70ab9c7, 0xd70ab9c7, 0xb5fcac15, 0xb5fcac15, 0xb5fcac15, 0x59c36f00, 0x179c64b6, 0x179c64b6, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x12592c97, 0xa10f7034, 0x12592c97, 0x3c5ca9e8, 0xaa4593fe, 0xaa4593fe, 0x2c3e194, 0x2c3e194, 0x2c3e194, 0xa436ecf3, 0xa436ecf3, 0xa436ecf3, 0x890e478b, 0x890e478b, 0x890e478b, 0xaa4593fe, 0x3c5ca9e8, 0x3c5ca9e8, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xed5de42a, 0x5cf94e51, 0xed5de42a, 0xb04a89ae, 0xc9cbf769, 0xc9cbf769, 0xdd578210, 0xdd578210, 0xdd578210, 0x238f43dc, 0x238f43dc, 0x238f43dc, 0xcac5fcd4, 0xcac5fcd4, 0xcac5fcd4, 0xc9cbf769, 0xb04a89ae, 0xb04a89ae, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xbbc56f90, 0x4f643bbb, 0xbbc56f90, 0x15932648, 0x9813a416, 0x9813a416, 0x28aba4d1, 0x28aba4d1, 0x28aba4d1, 0xb97022e2, 0xb97022e2, 0xb97022e2, 0xa0ca1f32, 0xa0ca1f32, 0xa0ca1f32, 0x9813a416, 0x15932648, 0x15932648, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x43465d8c, 0x6399888a, 0x43465d8c, 0x35e0683f, 0x5fcf013d, 0x5fcf013d, 0x4895c207, 0x4895c207, 0x4895c207, 0x9a85da71, 0x9a85da71, 0x9a85da71, 0x8cf6e5ee, 0x8cf6e5ee, 0x8cf6e5ee, 0x5fcf013d, 0x35e0683f, 0x35e0683f, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd1e7f231, 0xe67e195e, 0xd1e7f231, 0xcae22836, 0xdd28f52b, 0xdd28f52b, 0xe7ae9f08, 0xe7ae9f08, 0xe7ae9f08, 0xc69266ec, 0xc69266ec, 0xc69266ec, 0xbb2aad60, 0xbb2aad60, 0xbb2aad60, 0xdd28f52b, 0xcae22836, 0xcae22836, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x793e58f4, 0x5f939386, 0x793e58f4, 0x86814374, 0x43d1f34, 0x43d1f34, 0x12b2b9c1, 0x12b2b9c1, 0x12b2b9c1, 0x6db81069, 0x6db81069, 0x6db81069, 0xf4e915ef, 0xf4e915ef, 0xf4e915ef, 0x43d1f34, 0x86814374, 0x86814374, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x226c0d75, 0x9e291f4f, 0x226c0d75, 0x619ac032, 0x59c36f00, 0x59c36f00, 0x6fb6253, 0x6fb6253, 0x6fb6253, 0x787b0f35, 0x787b0f35, 0x787b0f35, 0x1a8d1ae7, 0x1a8d1ae7, 0x1a8d1ae7, 0x59c36f00, 0x619ac032, 0x619ac032, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8355045, 0xfe058b68, 0x8355045, 0x2630d53a, 0xaa4593fe, 0xaa4593fe, 0x290a3822, 0x290a3822, 0x290a3822, 0x8fff3545, 0x8fff3545, 0x8fff3545, 0xa2c79e3d, 0xa2c79e3d, 0xa2c79e3d, 0xaa4593fe, 0x2630d53a, 0x2630d53a, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xc702fa59, 0x74086887, 0xc702fa59, 0x9a1597dd, 0xc9cbf769, 0xc9cbf769, 0x60295baa, 0x60295baa, 0x60295baa, 0x9ef19a66, 0x9ef19a66, 0x9ef19a66, 0x77bb256e, 0x77bb256e, 0x77bb256e, 0xc9cbf769, 0x9a1597dd, 0x9a1597dd, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x82385331, 0xf77eda42, 0x82385331, 0x2c6e1ae9, 0x9813a416, 0x9813a416, 0x140c0d1f, 0x140c0d1f, 0x140c0d1f, 0x85d78b2c, 0x85d78b2c, 0x85d78b2c, 0x9c6db6fc, 0x9c6db6fc, 0x9c6db6fc, 0x9813a416, 0x2c6e1ae9, 0x2c6e1ae9, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x565d2d38, 0x34f757ec, 0x565d2d38, 0x20fb188b, 0x5fcf013d, 0x5fcf013d, 0x230bf123, 0x230bf123, 0x230bf123, 0xf11be955, 0xf11be955, 0xf11be955, 0xe768d6ca, 0xe768d6ca, 0xe768d6ca, 0x5fcf013d, 0x20fb188b, 0x20fb188b, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x632132a4, 0x4a8c90b2, 0x632132a4, 0x7824e8a3, 0xdd28f52b, 0xdd28f52b, 0xef2bffce, 0xef2bffce, 0xef2bffce, 0xce17062a, 0xce17062a, 0xce17062a, 0xb3afcda6, 0xb3afcda6, 0xb3afcda6, 0xdd28f52b, 0x7824e8a3, 0x7824e8a3, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x461d4cfa, 0xfd3492c2, 0x461d4cfa, 0xb9a2577a, 0x43d1f34, 0x43d1f34, 0xfb72301f, 0xfb72301f, 0xfb72301f, 0x847899b7, 0x847899b7, 0x847899b7, 0x1d299c31, 0x1d299c31, 0x1d299c31, 0x43d1f34, 0xb9a2577a, 0xb9a2577a, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x82758f66, 0xbac387fd, 0x82758f66, 0xc1834221, 0x59c36f00, 0x59c36f00, 0x4877befe, 0x4877befe, 0x4877befe, 0x36f7d398, 0x36f7d398, 0x36f7d398, 0x5401c64a, 0x5401c64a, 0x5401c64a, 0x59c36f00, 0xc1834221, 0xc1834221, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x4500a591, 0x9a40cbd8, 0x4500a591, 0x6b0520ee, 0xaa4593fe, 0xaa4593fe, 0x16db2902, 0x16db2902, 0x16db2902, 0xb02e2465, 0xb02e2465, 0xb02e2465, 0x9d168f1d, 0x9d168f1d, 0x9d168f1d, 0xaa4593fe, 0x6b0520ee, 0x6b0520ee, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x3cd9ea11, 0x1244c852, 0x3cd9ea11, 0x61ce8795, 0xc9cbf769, 0xc9cbf769, 0x6b15d6f0, 0x6b15d6f0, 0x6b15d6f0, 0x95cd173c, 0x95cd173c, 0x95cd173c, 0x7c87a834, 0x7c87a834, 0x7c87a834, 0xc9cbf769, 0x61ce8795, 0x61ce8795, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xc818f15f, 0xbaf13382, 0xc818f15f, 0x664eb887, 0x9813a416, 0x9813a416, 0x350fe990, 0x350fe990, 0x350fe990, 0xa4d46fa3, 0xa4d46fa3, 0xa4d46fa3, 0xbd6e5273, 0xbd6e5273, 0xbd6e5273, 0x9813a416, 0x664eb887, 0x664eb887, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xaa1dc81, 0x234341dd, 0xaa1dc81, 0x7c07e932, 0x5fcf013d, 0x5fcf013d, 0x969354c5, 0x969354c5, 0x969354c5, 0x44834cb3, 0x44834cb3, 0x44834cb3, 0x52f0732c, 0x52f0732c, 0x52f0732c, 0x5fcf013d, 0x7c07e932, 0x7c07e932, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd9aa4b29, 0x555fdda0, 0xd9aa4b29, 0xc2af912e, 0xdd28f52b, 0xdd28f52b, 0xe82cbfd, 0xe82cbfd, 0xe82cbfd, 0x2fbe3219, 0x2fbe3219, 0x2fbe3219, 0x5206f995, 0x5206f995, 0x5206f995, 0xdd28f52b, 0xc2af912e, 0xc2af912e, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xfd4e19ff, 0x42807b86, 0xfd4e19ff, 0x2f1027f, 0x43d1f34, 0x43d1f34, 0x924dc5be, 0x924dc5be, 0x924dc5be, 0xed476c16, 0xed476c16, 0xed476c16, 0x74166990, 0x74166990, 0x74166990, 0x43d1f34, 0x2f1027f, 0x2f1027f, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x3a63a2e6, 0x118487d4, 0x3a63a2e6, 0x79956fa1, 0x59c36f00, 0x59c36f00, 0x389f4d2d, 0x389f4d2d, 0x389f4d2d, 0x461f204b, 0x461f204b, 0x461f204b, 0x24e93599, 0x24e93599, 0x24e93599, 0x59c36f00, 0x79956fa1, 0x79956fa1, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x62d33f4d, 0x9544a8f4, 0x62d33f4d, 0x4cd6ba32, 0xaa4593fe, 0xaa4593fe, 0xfb86a3a4, 0xfb86a3a4, 0xfb86a3a4, 0x5d73aec3, 0x5d73aec3, 0x5d73aec3, 0x704b05bb, 0x704b05bb, 0x704b05bb, 0xaa4593fe, 0x4cd6ba32, 0x4cd6ba32, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8cc4b6dc, 0x1042c383, 0x8cc4b6dc, 0xd1d3db58, 0xc9cbf769, 0xc9cbf769, 0xeba8a32b, 0xeba8a32b, 0xeba8a32b, 0x157062e7, 0x157062e7, 0x157062e7, 0xfc3addef, 0xfc3addef, 0xfc3addef, 0xc9cbf769, 0xd1d3db58, 0xd1d3db58, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x23f9afd, 0x465f5ecc, 0x23f9afd, 0xac69d325, 0x9813a416, 0x9813a416, 0xccf7a1e3, 0xccf7a1e3, 0xccf7a1e3, 0x5d2c27d0, 0x5d2c27d0, 0x5d2c27d0, 0x44961a00, 0x44961a00, 0x44961a00, 0x9813a416, 0xac69d325, 0xac69d325, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xed796a26, 0x3132d083, 0xed796a26, 0x9bdf5f95, 0x5fcf013d, 0x5fcf013d, 0x42f66a49, 0x42f66a49, 0x42f66a49, 0x90e6723f, 0x90e6723f, 0x90e6723f, 0x86954da0, 0x86954da0, 0x86954da0, 0x5fcf013d, 0x9bdf5f95, 0x9bdf5f95, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x54b28785, 0x7fbbe762, 0x54b28785, 0x4fb75d82, 0xdd28f52b, 0xdd28f52b, 0x14b1cf29, 0x14b1cf29, 0x14b1cf29, 0x358d36cd, 0x358d36cd, 0x358d36cd, 0x4835fd41, 0x4835fd41, 0x4835fd41, 0xdd28f52b, 0x4fb75d82, 0x4fb75d82, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x7acc2669, 0xbf1a1d96, 0x7acc2669, 0x85733de9, 0x43d1f34, 0x43d1f34, 0x2cc1e8f4, 0x2cc1e8f4, 0x2cc1e8f4, 0x53cb415c, 0x53cb415c, 0x53cb415c, 0xca9a44da, 0xca9a44da, 0xca9a44da, 0x43d1f34, 0x85733de9, 0x85733de9, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xf9511593, 0x9f9ef910, 0xf9511593, 0xbaa7d8d4, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0xbaa7d8d4, 0xbaa7d8d4, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x3dcbe25f, 0x99e165e7, 0x3dcbe25f, 0x13ce6720, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x13ce6720, 0x13ce6720, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xdbedc74c, 0x61619894, 0xdbedc74c, 0x86faaac8, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x86faaac8, 0x86faaac8, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2411f56f, 0x97b1fc58, 0x2411f56f, 0x8a47bcb7, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x8a47bcb7, 0x8a47bcb7, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x13a65fb6, 0x35044d7, 0x13a65fb6, 0x65006a05, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x65006a05, 0x65006a05, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc8f05290, 0x9c88f64e, 0xc8f05290, 0xd3f58897, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0xd3f58897, 0xd3f58897, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x9cfbc80f, 0x376a1fb2, 0x9cfbc80f, 0x6344d38f, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x6344d38f, 0x6344d38f, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd327ca68, 0x9c977e8c, 0xd327ca68, 0x90d1072f, 0x59c36f00, 0x59c36f00, 0x71c9d9, 0x71c9d9, 0x71c9d9, 0x7ef1a4bf, 0x7ef1a4bf, 0x7ef1a4bf, 0x1c07b16d, 0x1c07b16d, 0x1c07b16d, 0x59c36f00, 0x90d1072f, 0x90d1072f, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2da3855b, 0x24c7b138, 0x2da3855b, 0x3a60024, 0xaa4593fe, 0xaa4593fe, 0x147ff249, 0x147ff249, 0x147ff249, 0xb28aff2e, 0xb28aff2e, 0xb28aff2e, 0x9fb25456, 0x9fb25456, 0x9fb25456, 0xaa4593fe, 0x3a60024, 0x3a60024, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x660ab3d9, 0xa75b45c4, 0x660ab3d9, 0x3b1dde5d, 0xc9cbf769, 0xc9cbf769, 0x5ff884f5, 0x5ff884f5, 0x5ff884f5, 0xa1204539, 0xa1204539, 0xa1204539, 0x486afa31, 0x486afa31, 0x486afa31, 0xc9cbf769, 0x3b1dde5d, 0x3b1dde5d, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x920957ee, 0xceebfd42, 0x920957ee, 0x3c5f1e36, 0x9813a416, 0x9813a416, 0xa917dbef, 0xa917dbef, 0xa917dbef, 0x38cc5ddc, 0x38cc5ddc, 0x38cc5ddc, 0x2176600c, 0x2176600c, 0x2176600c, 0x9813a416, 0x3c5f1e36, 0x3c5f1e36, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x8298cd03, 0xfb88293a, 0x8298cd03, 0xf43ef8b0, 0x5fcf013d, 0x5fcf013d, 0x8f57f36b, 0x8f57f36b, 0x8f57f36b, 0x5d47eb1d, 0x5d47eb1d, 0x5d47eb1d, 0x4b34d482, 0x4b34d482, 0x4b34d482, 0x5fcf013d, 0xf43ef8b0, 0xf43ef8b0, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd8bbc577, 0xb2c37549, 0xd8bbc577, 0xc3be1f70, 0xdd28f52b, 0xdd28f52b, 0xd8b598e, 0xd8b598e, 0xd8b598e, 0x2cb7a06a, 0x2cb7a06a, 0x2cb7a06a, 0x510f6be6, 0x510f6be6, 0x510f6be6, 0xdd28f52b, 0xc3be1f70, 0xc3be1f70, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4d7993a1, 0xbeefcd88, 0x4d7993a1, 0xb2c68821, 0x43d1f34, 0x43d1f34, 0x1dbc7020, 0x1dbc7020, 0x1dbc7020, 0x62b6d988, 0x62b6d988, 0x62b6d988, 0xfbe7dc0e, 0xfbe7dc0e, 0xfbe7dc0e, 0x43d1f34, 0xb2c68821, 0xb2c68821, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x628b6f61, 0x50f94215, 0x628b6f61, 0x217da226, 0x59c36f00, 0x59c36f00, 0x5755be7f, 0x5755be7f, 0x5755be7f, 0x29d5d319, 0x29d5d319, 0x29d5d319, 0x4b23c6cb, 0x4b23c6cb, 0x4b23c6cb, 0x59c36f00, 0x217da226, 0x217da226, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x9f82cd08, 0xbc67f78d, 0x9f82cd08, 0xb1874877, 0xaa4593fe, 0xaa4593fe, 0x4749512e, 0x4749512e, 0x4749512e, 0xe1bc5c49, 0xe1bc5c49, 0xe1bc5c49, 0xcc84f731, 0xcc84f731, 0xcc84f731, 0xaa4593fe, 0xb1874877, 0xb1874877, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xbee47cfb, 0x88e98534, 0xbee47cfb, 0xe3f3117f, 0xc9cbf769, 0xc9cbf769, 0xe2396b15, 0xe2396b15, 0xe2396b15, 0x1ce1aad9, 0x1ce1aad9, 0x1ce1aad9, 0xf5ab15d1, 0xf5ab15d1, 0xf5ab15d1, 0xc9cbf769, 0xe3f3117f, 0xe3f3117f, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2bfd5a83, 0xbe3c6f2f, 0x2bfd5a83, 0x85ab135b, 0x9813a416, 0x9813a416, 0xce30693b, 0xce30693b, 0xce30693b, 0x5febef08, 0x5febef08, 0x5febef08, 0x4651d2d8, 0x4651d2d8, 0x4651d2d8, 0x9813a416, 0x85ab135b, 0x85ab135b, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x1456f321, 0xc3a55992, 0x1456f321, 0x62f0c692, 0x5fcf013d, 0x5fcf013d, 0xbe3d534a, 0xbe3d534a, 0xbe3d534a, 0x6c2d4b3c, 0x6c2d4b3c, 0x6c2d4b3c, 0x7a5e74a3, 0x7a5e74a3, 0x7a5e74a3, 0x5fcf013d, 0x62f0c692, 0x62f0c692, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdcac6945, 0x43fbdf5a, 0xdcac6945, 0xc7a9b342, 0xdd28f52b, 0xdd28f52b, 0x274da20b, 0x274da20b, 0x274da20b, 0x6715bef, 0x6715bef, 0x6715bef, 0x7bc99063, 0x7bc99063, 0x7bc99063, 0xdd28f52b, 0xc7a9b342, 0xc7a9b342, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x571e16b1, 0xb9f25c2, 0x571e16b1, 0xa8a10d31, 0x43d1f34, 0x43d1f34, 0x25dfb69d, 0x25dfb69d, 0x25dfb69d, 0x5ad51f35, 0x5ad51f35, 0x5ad51f35, 0xc3841ab3, 0xc3841ab3, 0xc3841ab3, 0x43d1f34, 0xa8a10d31, 0xa8a10d31, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xec987771, 0x8a579bf2, 0xec987771, 0xbbb5c9af, 0x59c36f00, 0x59c36f00, 0x16780f43, 0x16780f43, 0x16780f43, 0x68f86225, 0x68f86225, 0x68f86225, 0xa0e77f7, 0xa0e77f7, 0xa0e77f7, 0x59c36f00, 0xbbb5c9af, 0xbbb5c9af, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x97994d2c, 0x33b3ca94, 0x97994d2c, 0x273e977a, 0xaa4593fe, 0xaa4593fe, 0xa592c9d5, 0xa592c9d5, 0xa592c9d5, 0x367c4b2, 0x367c4b2, 0x367c4b2, 0x2e5f6fca, 0x2e5f6fca, 0x2e5f6fca, 0xaa4593fe, 0x273e977a, 0x273e977a, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5d2416aa, 0xe7a84972, 0x5d2416aa, 0x4d010804, 0xc9cbf769, 0xc9cbf769, 0x4e3a88a0, 0x4e3a88a0, 0x4e3a88a0, 0xb0e2496c, 0xb0e2496c, 0xb0e2496c, 0x59a8f664, 0x59a8f664, 0x59a8f664, 0xc9cbf769, 0x4d010804, 0x4d010804, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x1da65b43, 0xae065274, 0x1da65b43, 0x2dd7a76c, 0x9813a416, 0x9813a416, 0xf81d19f, 0xf81d19f, 0xf81d19f, 0x9e5a57ac, 0x9e5a57ac, 0x9e5a57ac, 0x87e06a7c, 0x87e06a7c, 0x87e06a7c, 0x9813a416, 0x2dd7a76c, 0x2dd7a76c, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xea8a940e, 0xfa7c8f6f, 0xea8a940e, 0x448d7bfb, 0x5fcf013d, 0x5fcf013d, 0x47c22fa0, 0x47c22fa0, 0x47c22fa0, 0x95d237d6, 0x95d237d6, 0x95d237d6, 0x83a10849, 0x83a10849, 0x83a10849, 0x5fcf013d, 0x448d7bfb, 0x448d7bfb, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc0ac44fa, 0x94d4e024, 0xc0ac44fa, 0x4ec88f20, 0xdd28f52b, 0xdd28f52b, 0x2422f542, 0x2422f542, 0x2422f542, 0x51e0ca6, 0x51e0ca6, 0x51e0ca6, 0x78a6c72a, 0x78a6c72a, 0x78a6c72a, 0xdd28f52b, 0x4ec88f20, 0x4ec88f20, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x248f7655, 0x8f1ea1e8, 0x248f7655, 0xb3d7f0f5, 0x43d1f34, 0x43d1f34, 0x8c408c04, 0x8c408c04, 0x8c408c04, 0xf34a25ac, 0xf34a25ac, 0xf34a25ac, 0x6a1b202a, 0x6a1b202a, 0x6a1b202a, 0x43d1f34, 0xb3d7f0f5, 0xb3d7f0f5, 0x43d1f34, }, 20 },
|
||||
+ { "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd6ba8f78, 0xb07563fb, 0xd6ba8f78, 0x6ef020b2, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x6ef020b2, 0x6ef020b2, 0x59c36f00, }, 20 },
|
||||
+ { "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf5257f70, 0x510ff8c8, 0xf5257f70, 0x36a3b7ff, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x36a3b7ff, 0x36a3b7ff, 0xaa4593fe, }, 20 },
|
||||
+ { "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x9f8effb3, 0x2502a06b, 0x9f8effb3, 0xddeb038e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0xddeb038e, 0xddeb038e, 0xc9cbf769, }, 20 },
|
||||
+ { "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6aa72774, 0xd9072e43, 0x6aa72774, 0x24b4853d, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x24b4853d, 0x24b4853d, 0x9813a416, }, 20 },
|
||||
+ { "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x936eb1d8, 0x8398aab9, 0x936eb1d8, 0x8beef, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x8beef, 0x8beef, 0x5fcf013d, }, 20 },
|
||||
+ { "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdd4b9ec3, 0x89333a1d, 0xdd4b9ec3, 0x3acd5a9d, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x3acd5a9d, 0x3acd5a9d, 0xdd28f52b, }, 20 },
|
||||
+ { "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x89f37601, 0x2262a1bc, 0x89f37601, 0xf17b28ae, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0xf17b28ae, 0xf17b28ae, 0x43d1f34, }, 20 },
|
||||
{ "videotest", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, }, 5 },
|
||||
{ "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, }, 5 },
|
||||
{ "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, }, 5 },
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:45 +0200
|
||||
Subject: [PATCH] Revert "templates: Fix user-facing typo with an incorrect use
|
||||
of "it's""
|
||||
|
||||
This reverts commit 722737630889607c3b5761f1f5a48f1674cd2821.
|
||||
---
|
||||
util/grub.d/30_os-prober.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 656301eaf22..376ca47efe4 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -36,7 +36,7 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
+grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
|
||||
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
From 5a0c548ba388b343b0bb6d2a38888e7eac5bbb96 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 03:47:13 +0300
|
||||
Subject: [PATCH 002/194] Remove bashisms from tests.
|
||||
|
||||
Those tests don't actually need bash. Just use common shebang.
|
||||
---
|
||||
tests/grub_cmd_date.in | 2 +-
|
||||
tests/grub_cmd_regexp.in | 2 +-
|
||||
tests/grub_cmd_set_date.in | 2 +-
|
||||
tests/grub_cmd_sleep.in | 2 +-
|
||||
tests/grub_cmd_test.in | 2 +-
|
||||
tests/grub_cmd_tr.in | 2 +-
|
||||
tests/grub_func_test.in | 2 +-
|
||||
tests/grub_script_blockarg.in | 2 +-
|
||||
tests/grub_script_expansion.in | 2 +-
|
||||
tests/help_test.in | 2 +-
|
||||
tests/test_sha512sum.in | 2 +-
|
||||
11 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/tests/grub_cmd_date.in b/tests/grub_cmd_date.in
|
||||
index a459353e8..0d8162e98 100644
|
||||
--- a/tests/grub_cmd_date.in
|
||||
+++ b/tests/grub_cmd_date.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_regexp.in b/tests/grub_cmd_regexp.in
|
||||
index e7e625701..7e9ab86aa 100644
|
||||
--- a/tests/grub_cmd_regexp.in
|
||||
+++ b/tests/grub_cmd_regexp.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
|
||||
index c594ae3fc..2f518dd9e 100644
|
||||
--- a/tests/grub_cmd_set_date.in
|
||||
+++ b/tests/grub_cmd_set_date.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_sleep.in b/tests/grub_cmd_sleep.in
|
||||
index eb362aa24..05b8f6b73 100644
|
||||
--- a/tests/grub_cmd_sleep.in
|
||||
+++ b/tests/grub_cmd_sleep.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_test.in b/tests/grub_cmd_test.in
|
||||
index 6269891c9..49ae8a9c8 100644
|
||||
--- a/tests/grub_cmd_test.in
|
||||
+++ b/tests/grub_cmd_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
|
||||
# create a randome file
|
||||
empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||
diff --git a/tests/grub_cmd_tr.in b/tests/grub_cmd_tr.in
|
||||
index 3fb15e35c..0e8d645eb 100644
|
||||
--- a/tests/grub_cmd_tr.in
|
||||
+++ b/tests/grub_cmd_tr.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash -e
|
||||
+#! /bin/sh -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in
|
||||
index c8cc26376..b32f24466 100644
|
||||
--- a/tests/grub_func_test.in
|
||||
+++ b/tests/grub_func_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_script_blockarg.in b/tests/grub_script_blockarg.in
|
||||
index 2765b61ac..63b60a2ea 100644
|
||||
--- a/tests/grub_script_blockarg.in
|
||||
+++ b/tests/grub_script_blockarg.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/tests/grub_script_expansion.in b/tests/grub_script_expansion.in
|
||||
index e46401c4c..2b7829568 100644
|
||||
--- a/tests/grub_script_expansion.in
|
||||
+++ b/tests/grub_script_expansion.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
diff --git a/tests/help_test.in b/tests/help_test.in
|
||||
index e780924ef..aa9645835 100644
|
||||
--- a/tests/help_test.in
|
||||
+++ b/tests/help_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/test_sha512sum.in b/tests/test_sha512sum.in
|
||||
index d5ef7f9ea..80ebdc59f 100644
|
||||
--- a/tests/test_sha512sum.in
|
||||
+++ b/tests/test_sha512sum.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/bash
|
||||
+#! /bin/sh
|
||||
|
||||
# create a randome file
|
||||
file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:54 +0200
|
||||
Subject: [PATCH] Revert "templates: Properly disable the os-prober by default"
|
||||
|
||||
This reverts commit 54e0a1bbf1e9106901a557195bb35e5e20fb3925.
|
||||
---
|
||||
util/grub-mkconfig.in | 5 +----
|
||||
util/grub.d/30_os-prober.in | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 32c480daeb2..7516a015be0 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -140,9 +140,6 @@ GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2
|
||||
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
|
||||
GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||
|
||||
-# Disable os-prober by default due to security reasons.
|
||||
-GRUB_DISABLE_OS_PROBER="true"
|
||||
-
|
||||
# Filesystem for the device containing our userland. Used for stuff like
|
||||
# choosing Hurd filesystem module.
|
||||
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
|
||||
@@ -204,7 +201,6 @@ export GRUB_DEVICE \
|
||||
GRUB_DEVICE_PARTUUID \
|
||||
GRUB_DEVICE_BOOT \
|
||||
GRUB_DEVICE_BOOT_UUID \
|
||||
- GRUB_DISABLE_OS_PROBER \
|
||||
GRUB_FS \
|
||||
GRUB_FONT \
|
||||
GRUB_PRELOAD_MODULES \
|
||||
@@ -250,6 +246,7 @@ export GRUB_DEFAULT \
|
||||
GRUB_BACKGROUND \
|
||||
GRUB_THEME \
|
||||
GRUB_GFXPAYLOAD_LINUX \
|
||||
+ GRUB_DISABLE_OS_PROBER \
|
||||
GRUB_INIT_TUNE \
|
||||
GRUB_SAVEDEFAULT \
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 376ca47efe4..30f27f15b83 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -26,8 +26,8 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
|
||||
- grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
|
||||
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
|
||||
+ gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -36,12 +36,12 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
-
|
||||
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
# empty os-prober output, nothing doing
|
||||
exit 0
|
||||
+else
|
||||
+ grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
fi
|
||||
|
||||
osx_entry() {
|
||||
70
0003-Revert-templates-Disable-the-os-prober-by-default.patch
Normal file
70
0003-Revert-templates-Disable-the-os-prober-by-default.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Fri, 11 Jun 2021 12:10:58 +0200
|
||||
Subject: [PATCH] Revert "templates: Disable the os-prober by default"
|
||||
|
||||
This reverts commit e346414725a70e5c74ee87ca14e580c66f517666.
|
||||
---
|
||||
docs/grub.texi | 18 ++++++++----------
|
||||
util/grub.d/30_os-prober.in | 5 +----
|
||||
2 files changed, 9 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index a225f9a88d2..974bc0ddb07 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -1552,13 +1552,10 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
GRUB will tell Linux to boot in normal text mode.
|
||||
|
||||
@item GRUB_DISABLE_OS_PROBER
|
||||
-The @command{grub-mkconfig} has a feature to use the external
|
||||
-@command{os-prober} program to discover other operating systems installed on
|
||||
-the same machine and generate appropriate menu entries for them. It is disabled
|
||||
-by default since automatic and silent execution of @command{os-prober}, and
|
||||
-creating boot entries based on that data, is a potential attack vector. Set
|
||||
-this option to @samp{false} to enable this feature in the
|
||||
-@command{grub-mkconfig} command.
|
||||
+Normally, @command{grub-mkconfig} will try to use the external
|
||||
+@command{os-prober} program, if installed, to discover other operating
|
||||
+systems installed on the same system and generate appropriate menu entries
|
||||
+for them. Set this option to @samp{true} to disable this.
|
||||
|
||||
@item GRUB_OS_PROBER_SKIP_LIST
|
||||
List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
@@ -1889,9 +1886,10 @@ than zero; otherwise 0.
|
||||
@section Multi-boot manual config
|
||||
|
||||
Currently autogenerating config files for multi-boot environments depends on
|
||||
-os-prober and has several shortcomings. Due to that it is disabled by default.
|
||||
-It is advised to use the power of GRUB syntax and do it yourself. A possible
|
||||
-configuration is detailed here, feel free to adjust to your needs.
|
||||
+os-prober and has several shortcomings. While fixing it is scheduled for the
|
||||
+next release, meanwhile you can make use of the power of GRUB syntax and do it
|
||||
+yourself. A possible configuration is detailed here, feel free to adjust to your
|
||||
+needs.
|
||||
|
||||
First create a separate GRUB partition, big enough to hold GRUB. Some of the
|
||||
following entries show how to load OS installer images from this same partition,
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index 30f27f15b83..f300e46fc6a 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -26,8 +26,7 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
||||
. "$pkgdatadir/grub-mkconfig_lib"
|
||||
|
||||
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
|
||||
- gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
|
||||
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -40,8 +39,6 @@ OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
|
||||
if [ -z "${OSPROBED}" ] ; then
|
||||
# empty os-prober output, nothing doing
|
||||
exit 0
|
||||
-else
|
||||
- grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
|
||||
fi
|
||||
|
||||
osx_entry() {
|
||||
|
|
@ -1,746 +0,0 @@
|
|||
From 37865c2c4ad26cd5e947b08abf1fde8145699919 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 14:35:59 +0300
|
||||
Subject: [PATCH 003/194] fs-tester: make sh-compatible
|
||||
|
||||
---
|
||||
tests/util/grub-fs-tester.in | 306 ++++++++++++++++++++++++-------------------
|
||||
1 file changed, 169 insertions(+), 137 deletions(-)
|
||||
|
||||
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
|
||||
index 2337771a1..4515d165e 100644
|
||||
--- a/tests/util/grub-fs-tester.in
|
||||
+++ b/tests/util/grub-fs-tester.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
@@ -13,8 +13,29 @@ run_it () {
|
||||
LC_ALL=C "$GRUBFSTEST" "$@"
|
||||
}
|
||||
|
||||
+range() {
|
||||
+ range_counter="$1"
|
||||
+ while test "$range_counter" -le "$2"; do
|
||||
+ echo "$range_counter"
|
||||
+ range_counter="$((range_counter + $3))"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+powrange() {
|
||||
+ range_counter="$1"
|
||||
+ while test "$range_counter" -le "$2"; do
|
||||
+ echo "$range_counter"
|
||||
+ range_counter="$((range_counter * 2))"
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
run_grubfstest () {
|
||||
- run_it -c $NEED_IMAGES_N "${NEED_IMAGES[@]}" "$@"
|
||||
+ need_images=
|
||||
+ for i in $(range 0 $((NEED_IMAGES_N-1)) 1); do
|
||||
+ need_images="$need_images $FSIMAGEP${i}.img";
|
||||
+ done
|
||||
+
|
||||
+ run_it -c $NEED_IMAGES_N $need_images "$@"
|
||||
}
|
||||
|
||||
# OS LIMITATION: GNU/Linux has no AFS support, so we use a premade image and a reference tar file. I.a. no multiblocksize test
|
||||
@@ -51,7 +72,7 @@ case x"$fs" in
|
||||
# OS limitation: zfs-fuse always uses ashift=9 with loop devices
|
||||
MAXLOGSECSIZE=9;;
|
||||
esac
|
||||
-for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE + 1)); do
|
||||
+for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
|
||||
SECSIZE="$((1 << LOGSECSIZE))"
|
||||
MINBLKSIZE=512
|
||||
MAXBLKSIZE=512
|
||||
@@ -169,7 +190,12 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
MINBLKSIZE=1024
|
||||
MAXBLKSIZE=4096;;
|
||||
esac
|
||||
- for ((BLKSIZE=MINBLKSIZE;BLKSIZE<=MAXBLKSIZE;BLKSIZE=BLKSTEP?BLKSIZE+BLKSTEP:2*BLKSIZE)); do
|
||||
+ if test "$BLKSTEP" -eq 0; then
|
||||
+ blksizes="$(powrange "$MINBLKSIZE" "$MAXBLKSIZE")"
|
||||
+ else
|
||||
+ blksizes="$(range "$MINBLKSIZE" "$MAXBLKSIZE" "$BLKSTEP")"
|
||||
+ fi
|
||||
+ for BLKSIZE in $blksizes; do
|
||||
MAXDEVICES=1
|
||||
MINDEVICES=1
|
||||
export fs
|
||||
@@ -199,13 +225,11 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
MAXDEVICES=7;;
|
||||
esac
|
||||
|
||||
- for ((NDEVICES=MINDEVICES; NDEVICES <= MAXDEVICES; NDEVICES++)); do
|
||||
+ for NDEVICES in $(range "$MINDEVICES" "$MAXDEVICES" 1); do
|
||||
export NDEVICES
|
||||
- unset FSIMAGES
|
||||
- for ((i=0; i < NDEVICES; i++)); do
|
||||
- FSIMAGES[i]="${tempdir}/${fs}_${SECSIZE}_${BLKSIZE}_${NDEVICES}_$i.img"
|
||||
- done
|
||||
- export FSIMAGES
|
||||
+ unset FSIMAGEP
|
||||
+ FSIMAGEP="${tempdir}/${fs}_${SECSIZE}_${BLKSIZE}_${NDEVICES}_"
|
||||
+ export FSIMAGEP
|
||||
unset NEED_IMAGES;
|
||||
|
||||
case x$fs in
|
||||
@@ -226,11 +250,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
*)
|
||||
NEED_IMAGES_N=$NDEVICES;;
|
||||
esac
|
||||
- for ((i=0;i < NEED_IMAGES_N; i++)); do
|
||||
- NEED_IMAGES[i]="${FSIMAGES[i]}";
|
||||
- done
|
||||
export NEED_IMAGES_N
|
||||
- export NEED_IMAGES
|
||||
|
||||
MNTPOINTRO="${tempdir}/${fs}_ro"
|
||||
MNTPOINTRW="${tempdir}/${fs}_rw"
|
||||
@@ -238,20 +258,25 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
MOUNTFS="$fs"
|
||||
MASTER="${tempdir}/master"
|
||||
FSLABEL="grub_;/testé莭莽茝😁киритi urewfceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewrewfceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfew"
|
||||
- CFILESN=1
|
||||
- if test -f /usr/share/dict/american-english; then
|
||||
- CFILESSRC[0]="/usr/share/dict/american-english"
|
||||
- else
|
||||
- CFILESSRC[0]="/usr/share/dict/linux.words"
|
||||
+ CFILESRC=
|
||||
+ for cand in /usr/share/dict/american-english /usr/share/dict/linux.words; do
|
||||
+ if test -f "$cand" ; then
|
||||
+ CFILESRC="$cand"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+ if test "$CFILESRC" = "" ; then
|
||||
+ echo "Couldn't find compressible file" >&2
|
||||
+ exit 1
|
||||
fi
|
||||
case x"$fs" in
|
||||
# FS LIMITATION: 8.3 names
|
||||
xmsdos*)
|
||||
- CFILES[0]="american.eng";;
|
||||
+ CFILE="american.eng";;
|
||||
xiso9660)
|
||||
- CFILES[0]="american_english";;
|
||||
+ CFILE="american_english";;
|
||||
*)
|
||||
- CFILES[0]="american-english";;
|
||||
+ CFILE="american-english";;
|
||||
esac
|
||||
# OS LIMITATION: Limited by NAME_MAX (usually 255) in GNU/Linux
|
||||
LONGNAME="qwertzuiopasdfghjklyxcvbnm1234567890qwertzuiopasdfghjklyxcvbnm1234567890oiewqfiewioqoiqoiurqruewqoiuwoieoiiuewqroreqiufieiuwrnureweriuvceoiroiewqoiricdsalkcndsakfirefoiwqeoircorejwoijfreoijojoiewjfwnfcoirenfoirefnreoifenoiwfnoi"
|
||||
@@ -388,8 +413,8 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
;;
|
||||
x"vfat16" | xmsdos16)
|
||||
BIGBLOCKCNT=$((25000 * BLKSIZE))
|
||||
- if [ $BIGBLOCKCNT -gt $((16#ffffffff)) ]; then
|
||||
- BIGBLOCKCNT=$((16#ffffffff))
|
||||
+ if [ $BIGBLOCKCNT -gt 4294967295 ]; then
|
||||
+ BIGBLOCKCNT=4294967295
|
||||
fi
|
||||
;;
|
||||
x"minix")
|
||||
@@ -410,7 +435,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
BIGBLOCKCNT=$((4000 * 1048576));;
|
||||
# FS LIMITATION: These FS have uint32 as file size field
|
||||
x"vfat"* | xmsdos* | x"cpio_crc" | x"cpio_newc" | x"cpio_bin" | x"cpio_hpbin" | xsfs*)
|
||||
- BIGBLOCKCNT=$((16#ffffffff));;
|
||||
+ BIGBLOCKCNT=4294967295;;
|
||||
# FS LIMITATION: These FS have int32 as file size field
|
||||
# FIXME: not so sure about AFFS
|
||||
# OS LIMITATION: minix2/minix3 could be formatted in a way to permit more.
|
||||
@@ -543,18 +568,18 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
|
||||
PDIR=""
|
||||
# OS LIMITATION: Limited by PATH_MAX (usually 1024)
|
||||
- for ((i=0;i<PDIRCOMPNUM;i++)); do
|
||||
+ for i in $(range 0 $((PDIRCOMPNUM-1)) 1); do
|
||||
PDIR="$PDIR/$i";
|
||||
- if [ $((i%3)) == 0 ]; then
|
||||
+ if test $((i%3)) = 0; then
|
||||
PDIR="$PDIR/"
|
||||
fi
|
||||
done
|
||||
|
||||
PDIR2=""
|
||||
# OS LIMITATION: Limited by PATH_MAX (usually 1024)
|
||||
- for ((i=0;i<PDIR2COMPNUM;i++)); do
|
||||
+ for i in $(range 0 $((PDIR2COMPNUM-1)) 1); do
|
||||
PDIR2="${PDIR2}/$i";
|
||||
- if [ $((i%3)) == 0 ]; then
|
||||
+ if test $((i%3)) = 0; then
|
||||
PDIR2="${PDIR2}/"
|
||||
fi
|
||||
done
|
||||
@@ -563,7 +588,9 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
|
||||
unset LODEVICES
|
||||
GENERATED=n
|
||||
-
|
||||
+ LODEVICES=
|
||||
+ MOUNTDEVICE=
|
||||
+
|
||||
case x"$fs" in
|
||||
x"tarfs" | x"cpio_"*| x"ziso9660" | x"romfs" | x"squash4_"*\
|
||||
| x"iso9660" | xjoliet | xrockridge | xrockridge_joliet \
|
||||
@@ -577,62 +604,65 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
*)
|
||||
mkdir -p "$MNTPOINTRW"
|
||||
mkdir -p "$MNTPOINTRO"
|
||||
- for ((i=0; i < NDEVICES; i++)); do
|
||||
- dd if=/dev/zero of="${FSIMAGES[i]}" count=1 bs=1 seek=$((DISKSIZE-1)) &> /dev/null
|
||||
- LODEVICES[i]=`losetup -f`
|
||||
- losetup "${LODEVICES[i]}" "${FSIMAGES[i]}"
|
||||
+ for i in $(range 0 $((NDEVICES-1)) 1); do
|
||||
+ dd if=/dev/zero of="$FSIMAGEP${i}.img" count=1 bs=1 seek=$((DISKSIZE-1)) &> /dev/null
|
||||
+ LODEVICE="$(losetup -f)"
|
||||
+ LODEVICES="$LODEVICES $LODEVICE"
|
||||
+ losetup "$LODEVICE" "$FSIMAGEP${i}.img"
|
||||
+ if test "$i" = 0; then
|
||||
+ MOUNTDEVICE="$LODEVICE"
|
||||
+ fi
|
||||
done ;;
|
||||
esac
|
||||
|
||||
- MOUNTDEVICE="${LODEVICES[0]}"
|
||||
case x"$fs" in
|
||||
x"afs")
|
||||
;;
|
||||
x"btrfs")
|
||||
- "mkfs.btrfs" -s $SECSIZE -L "$FSLABEL" "${LODEVICES[0]}" ;;
|
||||
+ "mkfs.btrfs" -s $SECSIZE -L "$FSLABEL" "${MOUNTDEVICE}" ;;
|
||||
x"btrfs_zlib" | x"btrfs_lzo")
|
||||
- "mkfs.btrfs" -s $SECSIZE -L "$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "mkfs.btrfs" -s $SECSIZE -L "$FSLABEL" "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="compress=${fs/btrfs_/},"
|
||||
MOUNTFS="btrfs"
|
||||
;;
|
||||
x"btrfs_raid0")
|
||||
- "mkfs.btrfs" -s $SECSIZE -d raid0 -m raid0 -L "$FSLABEL" "${LODEVICES[@]}"
|
||||
+ "mkfs.btrfs" -s $SECSIZE -d raid0 -m raid0 -L "$FSLABEL" $LODEVICES
|
||||
MOUNTFS="btrfs"
|
||||
;;
|
||||
x"btrfs_raid1")
|
||||
- "mkfs.btrfs" -s $SECSIZE -d raid1 -m raid1 -L "$FSLABEL" "${LODEVICES[@]}"
|
||||
+ "mkfs.btrfs" -s $SECSIZE -d raid1 -m raid1 -L "$FSLABEL" $LODEVICES
|
||||
MOUNTFS="btrfs"
|
||||
;;
|
||||
x"btrfs_raid10")
|
||||
- "mkfs.btrfs" -s $SECSIZE -d raid10 -m raid10 -L "$FSLABEL" "${LODEVICES[@]}"
|
||||
+ "mkfs.btrfs" -s $SECSIZE -d raid10 -m raid10 -L "$FSLABEL" $LODEVICES
|
||||
MOUNTFS="btrfs"
|
||||
;;
|
||||
x"btrfs_single")
|
||||
- "mkfs.btrfs" -s $SECSIZE -d single -L "$FSLABEL" "${LODEVICES[@]}"
|
||||
+ "mkfs.btrfs" -s $SECSIZE -d single -L "$FSLABEL" $LODEVICES
|
||||
MOUNTFS="btrfs"
|
||||
;;
|
||||
x"exfat")
|
||||
- "mkfs.$fs" -s $((BLKSIZE/512)) -n "$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "mkfs.$fs" -s $((BLKSIZE/512)) -n "$FSLABEL" "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="iocharset=utf8,"
|
||||
MOUNTFS="exfat-fuse";;
|
||||
x"minix")
|
||||
- "mkfs.minix" "${LODEVICES[0]}"
|
||||
+ "mkfs.minix" "${MOUNTDEVICE}"
|
||||
;;
|
||||
# mkfs.hfs and mkfs.hfsplus don't fill UUID.
|
||||
x"hfsplus")
|
||||
- "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${LODEVICES[0]}"
|
||||
- dd if=/dev/urandom of="${LODEVICES[0]}" bs=1 seek=$((16#468)) conv=notrunc count=8 ;;
|
||||
+ "mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
|
||||
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8 ;;
|
||||
x"hfsplus_wrap")
|
||||
- "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${LODEVICES[0]}"
|
||||
- dd if=/dev/urandom of="${LODEVICES[0]}" bs=1 seek=$((16#468)) conv=notrunc count=8
|
||||
+ "mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
|
||||
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8
|
||||
MOUNTFS="hfsplus";;
|
||||
x"hfsplus_casesens")
|
||||
- "mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${LODEVICES[0]}"
|
||||
- dd if=/dev/urandom of="${LODEVICES[0]}" bs=1 seek=$((16#468)) conv=notrunc count=8
|
||||
+ "mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
|
||||
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#468)) conv=notrunc count=8
|
||||
MOUNTFS="hfsplus";;
|
||||
x"hfs")
|
||||
- "mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode utf8..macroman`" -h "${LODEVICES[0]}"
|
||||
- dd if=/dev/urandom of="${LODEVICES[0]}" bs=1 seek=$((16#474)) conv=notrunc count=8
|
||||
+ "mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode utf8..macroman`" -h "${MOUNTDEVICE}"
|
||||
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((16#474)) conv=notrunc count=8
|
||||
MOUNTOPTS="iocharset=utf8,codepage=macroman,"
|
||||
;;
|
||||
x"vfat"*|xmsdos*)
|
||||
@@ -643,98 +673,98 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
A=
|
||||
fi
|
||||
- "mkfs.vfat" -a $A -S $SECSIZE -s $((BLKSIZE/SECSIZE)) -F "${BITS:0:2}" -n "$FSLABEL" "${FSIMAGES[0]}"
|
||||
+ "mkfs.vfat" -a $A -S $SECSIZE -s $((BLKSIZE/SECSIZE)) -F "${BITS:0:2}" -n "$FSLABEL" "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="iocharset=utf8,codepage=437,"
|
||||
MOUNTFS="$(echo "$fs"|sed 's,[0-9]*a\?$,,')";;
|
||||
x"minix2")
|
||||
- "mkfs.minix" -v "${LODEVICES[0]}"
|
||||
+ "mkfs.minix" -v "${MOUNTDEVICE}"
|
||||
MOUNTFS="minix";;
|
||||
x"minix3")
|
||||
- "mkfs.minix" -B $BLKSIZE -3 "${LODEVICES[0]}"
|
||||
+ "mkfs.minix" -B $BLKSIZE -3 "${MOUNTDEVICE}"
|
||||
MOUNTFS="minix";;
|
||||
x"ntfs"*)
|
||||
- "mkfs.ntfs" -s "$SECSIZE" -c "$BLKSIZE" -L "$FSLABEL" -Q -q "${LODEVICES[0]}"
|
||||
+ "mkfs.ntfs" -s "$SECSIZE" -c "$BLKSIZE" -L "$FSLABEL" -Q -q "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="iocharset=utf8,compression,"
|
||||
MOUNTFS="ntfs-3g";;
|
||||
x"udf")
|
||||
- "mkudffs" --utf8 -b $BLKSIZE --lvid="$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "mkudffs" --utf8 -b $BLKSIZE --lvid="$FSLABEL" "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="iocharset=utf8,bs=$BLKSIZE,";;
|
||||
x"ufs2")
|
||||
- "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 2 "${LODEVICES[0]}"
|
||||
+ "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 2 "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="ufstype=ufs2,"
|
||||
MOUNTFS="ufs";;
|
||||
x"ufs1")
|
||||
- "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 1 "${LODEVICES[0]}"
|
||||
+ "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 1 "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="ufstype=44bsd,"
|
||||
MOUNTFS="ufs";;
|
||||
x"ufs1_sun")
|
||||
- "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 1 "${LODEVICES[0]}"
|
||||
+ "mkfs.ufs" -b $BLKSIZE -L "$FSLABEL" -O 1 "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="ufstype=sun,"
|
||||
MOUNTFS="ufs";;
|
||||
x"zfs")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" "${MOUNTDEVICE}"
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_caseins")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" "${MOUNTDEVICE}"
|
||||
sleep 1
|
||||
"zfs" create -o casesensitivity=insensitive "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_lzjb" | xzfs_gzip | xzfs_zle)
|
||||
- "zpool" create -O compression=${fs/zfs_/} -R "$MNTPOINTRW" "$FSLABEL" "${LODEVICES[0]}"
|
||||
+ "zpool" create -O compression=${fs/zfs_/} -R "$MNTPOINTRW" "$FSLABEL" "${MOUNTDEVICE}"
|
||||
sleep 1
|
||||
"zfs" create -o compression=${fs/zfs_/} "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_raidz")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz1 "${LODEVICES[@]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz1 $LODEVICES
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_raidz2")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz2 "${LODEVICES[@]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz2 $LODEVICES
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_raidz3")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz3 "${LODEVICES[@]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" raidz3 $LODEVICES
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_mirror")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" mirror "${LODEVICES[@]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" mirror $LODEVICES
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"zfs_stripe")
|
||||
- "zpool" create -R "$MNTPOINTRW" "$FSLABEL" "${LODEVICES[@]}"
|
||||
+ "zpool" create -R "$MNTPOINTRW" "$FSLABEL" $LODEVICES
|
||||
sleep 1
|
||||
"zfs" create "$FSLABEL"/"grub fs"
|
||||
sleep 1;;
|
||||
x"tarfs" | x"cpio_"* | x"iso9660" | xjoliet | xrockridge | xrockridge_joliet | x"iso9660_1999" | xjoliet_1999 | xrockridge_1999 | xrockridge_joliet_1999 | x"ziso9660" | x"romfs" | x"squash4_"*)
|
||||
INSTDEVICE=/dev/null;;
|
||||
x"reiserfs")
|
||||
- "mkfs.reiserfs" --format=3.6 -b $BLKSIZE -l "$FSLABEL" -q "${LODEVICES[0]}" ;;
|
||||
+ "mkfs.reiserfs" --format=3.6 -b $BLKSIZE -l "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
x"reiserfs_old")
|
||||
- "mkfs.reiserfs" --format=3.5 -b $BLKSIZE -l "$FSLABEL" -q "${LODEVICES[0]}"
|
||||
+ "mkfs.reiserfs" --format=3.5 -b $BLKSIZE -l "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTFS=reiserfs;;
|
||||
x"jfs")
|
||||
- "mkfs.jfs" -L "$FSLABEL" -q "${LODEVICES[0]}"
|
||||
+ "mkfs.jfs" -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTOPTS="iocharset=utf8,";;
|
||||
x"jfs_caseins")
|
||||
- "mkfs.jfs" -O -L "$FSLABEL" -q "${LODEVICES[0]}"
|
||||
+ "mkfs.jfs" -O -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTFS=jfs
|
||||
MOUNTOPTS="iocharset=utf8,";;
|
||||
x"mdraid"*)
|
||||
- mdadm -C --chunk=$((BLKSIZE/1024)) --force -e "${fs:6:1}.${fs:7:1}" "/dev/md/${fs}_${NDEVICES}" --level="${fs:13}" --raid-devices="$NDEVICES" "${LODEVICES[@]}"
|
||||
+ mdadm -C --chunk=$((BLKSIZE/1024)) --force -e "${fs:6:1}.${fs:7:1}" "/dev/md/${fs}_${NDEVICES}" --level="${fs:13}" --raid-devices="$NDEVICES" $LODEVICES
|
||||
MOUNTDEVICE="/dev/md/${fs}_${NDEVICES}"
|
||||
MOUNTFS=ext2
|
||||
"mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
x"lvm"*)
|
||||
- for ((i=0;i<NDEVICES;i++)); do
|
||||
- pvcreate "${LODEVICES[i]}"
|
||||
+ for lodev in $LODEVICES; do
|
||||
+ pvcreate "$lodev"
|
||||
done
|
||||
- vgcreate -s $((BLKSIZE/1024))K grub_test "${LODEVICES[@]}"
|
||||
+ vgcreate -s $((BLKSIZE/1024))K grub_test $LODEVICES
|
||||
if [ x$fs = xlvm ] ; then
|
||||
lvcreate -l "$((NDEVICES*7*LVMBLKMUL))" -n testvol grub_test
|
||||
elif [ x$fs = xlvm_stripe ] ; then
|
||||
@@ -757,22 +787,22 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
MOUNTFS=ext2
|
||||
"mkfs.ext2" -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
xnilfs2)
|
||||
- "mkfs.nilfs2" -L "$FSLABEL" -b $BLKSIZE -q "${LODEVICES[0]}" ;;
|
||||
+ "mkfs.nilfs2" -L "$FSLABEL" -b $BLKSIZE -q "${MOUNTDEVICE}" ;;
|
||||
xext2_old)
|
||||
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext2" -r 0 -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}"
|
||||
+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext2" -r 0 -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTFS=ext2
|
||||
;;
|
||||
xext4_metabg)
|
||||
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}"
|
||||
+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTFS=ext4
|
||||
;;
|
||||
xext*)
|
||||
- MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
|
||||
+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
xxfs)
|
||||
- "mkfs.xfs" -m crc=0 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
|
||||
+ "mkfs.xfs" -m crc=0 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
xxfs_crc)
|
||||
MOUNTFS="xfs"
|
||||
- "mkfs.xfs" -m crc=1 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${LODEVICES[0]}" ;;
|
||||
+ "mkfs.xfs" -m crc=1 -b size=$BLKSIZE -s size=$SECSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
*)
|
||||
echo "Add appropriate mkfs command here"
|
||||
exit 1
|
||||
@@ -873,11 +903,13 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
*)
|
||||
if ! mount -t "$MOUNTFS" "${MOUNTDEVICE}" "$MNTPOINTRW" -o ${MOUNTOPTS}${SELINUXOPTS}rw ; then
|
||||
echo "MOUNT FAILED."
|
||||
- for ((i=0; i < NDEVICES; i++)); do
|
||||
- while ! losetup -d "${LODEVICES[i]}"; do
|
||||
+ for lodev in $LODEVICES; do
|
||||
+ while ! losetup -d "$lodev"; do
|
||||
sleep 1
|
||||
done
|
||||
- rm "${FSIMAGES[i]}"
|
||||
+ done
|
||||
+ for i in $(range 0 $((NDEVICES-1)) 1); do
|
||||
+ rm "$FSIMAGEP${i}.img"
|
||||
done
|
||||
exit 1;
|
||||
fi
|
||||
@@ -939,11 +971,11 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
if (test x$fs = xvfat12a || test x$fs = xmsdos12a) && test x$BLKSIZE = x131072; then
|
||||
# With this config there isn't enough space for full copy.
|
||||
# Copy as much as we can
|
||||
- cp "${CFILESSRC[0]}" "$MNTPOINTRW/$OSDIR/${CFILES[0]}" &> /dev/null;
|
||||
+ cp "${CFILESRC}" "$MNTPOINTRW/$OSDIR/${CFILE}" &> /dev/null;
|
||||
else
|
||||
- for ((i=0;i<$CFILESN;i++)); do
|
||||
- cp "${CFILESSRC[i]}" "$MNTPOINTRW/$OSDIR/${CFILES[i]}";
|
||||
- done
|
||||
+
|
||||
+ cp "${CFILESRC}" "$MNTPOINTRW/$OSDIR/${CFILE}";
|
||||
+
|
||||
fi
|
||||
|
||||
if [ x$NOSYMLINK != xy ]; then
|
||||
@@ -968,48 +1000,48 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
sleep 2
|
||||
;;
|
||||
x"tarfs")
|
||||
- (cd "$MASTER"; tar cf "${FSIMAGES[0]}" .) ;;
|
||||
+ (cd "$MASTER"; tar cf "${FSIMAGEP}0.img" .) ;;
|
||||
x"cpio_"*)
|
||||
- (cd "$MASTER"; find . | cpio -o -H "${fs/cpio_/}" > "${FSIMAGES[0]}" ) ;;
|
||||
+ (cd "$MASTER"; find . | cpio -o -H "$(echo ${fs} | sed 's@^cpio_@@')" > "${FSIMAGEP}0.img" ) ;;
|
||||
x"ziso9660")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso -compliance rec_mtime -set_filter_r --zisofs -- -zisofs default -as mkisofs -iso-level 3 -graft-points -R -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" -- -set_filter_r --zisofs -- -zisofs default -add /="$MASTER" ;;
|
||||
+ xorriso -compliance rec_mtime -set_filter_r --zisofs -- -zisofs default -as mkisofs -iso-level 3 -graft-points -R -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" -- -set_filter_r --zisofs -- -zisofs default -add /="$MASTER" ;;
|
||||
x"iso9660")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"joliet")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"rockridge")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"rockridge_joliet")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 3 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"iso9660_1999")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"joliet_1999")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge off -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"rockridge_1999")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"rockridge_joliet_1999")
|
||||
FSUUID=$(date -u +%Y-%m-%d-%H-%M-%S-00);
|
||||
- xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGES[0]}" /="$MASTER" ;;
|
||||
+ xorriso --rockridge on -compliance rec_mtime -as mkisofs -iso-level 4 -graft-points -J -joliet-long -V "$FSLABEL" --modification-date=$(echo ${FSUUID} | sed 's/-//g;') -o "${FSIMAGEP}0.img" /="$MASTER" ;;
|
||||
x"romfs")
|
||||
- genromfs -V "$FSLABEL" -f "${FSIMAGES[0]}" -d "$MASTER" ;;
|
||||
+ genromfs -V "$FSLABEL" -f "${FSIMAGEP}0.img" -d "$MASTER" ;;
|
||||
xsquash4_*)
|
||||
- echo mksquashfs "$MASTER" "${FSIMAGES[0]}" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE
|
||||
- mksquashfs "$MASTER" "${FSIMAGES[0]}" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE ;;
|
||||
+ echo mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE
|
||||
+ mksquashfs "$MASTER" "${FSIMAGEP}0.img" -always-use-fragments -comp "${fs/squash4_/}" -b $BLKSIZE ;;
|
||||
x"bfs")
|
||||
sleep 1
|
||||
fusermount -u "$MNTPOINTRW"
|
||||
;;
|
||||
xlvm*)
|
||||
sleep 1
|
||||
- for ((try=0;try < 20; try++)); do
|
||||
+ for try in $(range 0 20 1); do
|
||||
if umount "$MNTPOINTRW" ; then
|
||||
break;
|
||||
fi
|
||||
@@ -1021,7 +1053,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
;;
|
||||
xmdraid*)
|
||||
sleep 1
|
||||
- for ((try=0;try < 20; try++)); do
|
||||
+ for try in $(range 0 20 1); do
|
||||
if umount "$MNTPOINTRW" ; then
|
||||
break;
|
||||
fi
|
||||
@@ -1033,7 +1065,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
;;
|
||||
*)
|
||||
sleep 1
|
||||
- for ((try=0;try < 20; try++)); do
|
||||
+ for try in $(range 0 20 1); do
|
||||
if umount "$MNTPOINTRW" ; then
|
||||
break;
|
||||
fi
|
||||
@@ -1066,7 +1098,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
sleep 1
|
||||
mount -t "$MOUNTFS" "${MOUNTDEVICE}" "$MNTPOINTRO" -o ${MOUNTOPTS}${SELINUXOPTS}ro ;;
|
||||
xmdraid*)
|
||||
- mdadm --assemble /dev/md/"${fs}_$NDEVICES" "${LODEVICES[@]}"
|
||||
+ mdadm --assemble /dev/md/"${fs}_$NDEVICES" $LODEVICES
|
||||
sleep 1
|
||||
mount -t "$MOUNTFS" "${MOUNTDEVICE}" "$MNTPOINTRO" -o ${MOUNTOPTS}${SELINUXOPTS}ro ;;
|
||||
*)
|
||||
@@ -1085,7 +1117,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo LIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1094,7 +1126,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo NLIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -lA "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -lA "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1103,7 +1135,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo ILIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1112,7 +1144,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo LONG LIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1123,7 +1155,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo TIME FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1133,7 +1165,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo LONG TIME FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -1149,7 +1181,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo DOT IN ROOTDIR FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1163,7 +1195,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo DOTDOT IN ROOTDIR FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
@@ -1180,7 +1212,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo SLIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/sdir"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO/sdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1195,7 +1227,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo PLIST FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$PDIR"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO/$PDIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1210,7 +1242,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo DOT IN SUBDIR FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/sdir"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO/$OSDIR/sdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1225,7 +1257,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
else
|
||||
echo DOTDOT IN SUBDIR FAIL
|
||||
echo "$LSROUT"
|
||||
- TZ=UTC ls --time-style=+%Y%m%d%H%M%S.%N -l "$MNTPOINTRO/$OSDIR/ssdir"
|
||||
+ TZ=UTC ls -l "$MNTPOINTRO/$OSDIR/ssdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -1245,8 +1277,8 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
case x"$fs" in
|
||||
x"iso9660" | x"ziso9660" | xrockridge | xjoliet | xrockridge_joliet | x"iso9660_1999" | xrockridge_1999 | xjoliet_1999 | xrockridge_joliet_1999) ;;
|
||||
x"zfs"*)
|
||||
- for ((i=0;i<NDEVICES;i++)); do
|
||||
- FSUUID=$(printf "%016x\n" $(blkid -o export "${LODEVICES[i]}" |grep -F UUID=|sed s,UUID=,,g))
|
||||
+ for lodev in $LODEVICES; do
|
||||
+ FSUUID=$(printf "%016x\n" $(blkid -o export "$lodev" |grep -F UUID=|sed s,UUID=,,g))
|
||||
if [ "$FSUUID" != 0000000000000000 ]; then
|
||||
break;
|
||||
fi
|
||||
@@ -1264,8 +1296,8 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
echo UUID FAIL
|
||||
echo "$LSOUT"
|
||||
echo "$GRUBUUID"
|
||||
- for ((i=0;i<NDEVICES;i++)); do
|
||||
- blkid "${LODEVICES[i]}"
|
||||
+ for lodev in $LODEVICES; do
|
||||
+ blkid "$lodev"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
@@ -1290,7 +1322,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
echo UUID FAIL
|
||||
echo "$FSUUID"
|
||||
echo "$LSOUT"
|
||||
- blkid "${LODEVICES[0]}"
|
||||
+ blkid "${MOUNTDEVICE}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
@@ -1304,7 +1336,7 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
# may be delayed for a long time.
|
||||
FSTIME="$UMOUNT_TIME";;
|
||||
*)
|
||||
- FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGES[0]}"|awk '{print $6; }'|sed 's,_, ,g')";;
|
||||
+ FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGEP}0.img"|awk '{print $6; }'|sed 's,_, ,g')";;
|
||||
esac
|
||||
# With some abstractions like mdraid computing of UMOUNT_TIME
|
||||
# is not precise. Account for small difference here.
|
||||
@@ -1410,11 +1442,9 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
exit 1
|
||||
fi
|
||||
ok=true
|
||||
- for ((i=0;i<$CFILESN;i++)); do
|
||||
- if ! run_grubfstest cmp "$GRUBDIR/${CFILES[i]}" "$MNTPOINTRO/$OSDIR/${CFILES[i]}" ; then
|
||||
- ok=false;
|
||||
- fi
|
||||
- done
|
||||
+ if ! run_grubfstest cmp "$GRUBDIR/${CFILE}" "$MNTPOINTRO/$OSDIR/${CFILE}" ; then
|
||||
+ ok=false;
|
||||
+ fi
|
||||
if test x$ok = xtrue; then
|
||||
:
|
||||
else
|
||||
@@ -1503,15 +1533,17 @@ for ((LOGSECSIZE=MINLOGSECSIZE;LOGSECSIZE<=MAXLOGSECSIZE;LOGSECSIZE=LOGSECSIZE +
|
||||
sleep 1
|
||||
;;
|
||||
esac
|
||||
- for ((i=0; i < NDEVICES; i++)); do
|
||||
- case x"$fs" in
|
||||
- x"tarfs" | x"cpio_"* | x"iso9660" | xrockridge | xjoliet | xrockridge_joliet | x"ziso9660" | x"romfs" | x"squash4_"* | x"iso9660_1999" | xrockridge_1999 | xjoliet_1999 | xrockridge_joliet_1999) ;;
|
||||
- *)
|
||||
- while ! losetup -d "${LODEVICES[i]}"; do
|
||||
+ case x"$fs" in
|
||||
+ x"tarfs" | x"cpio_"* | x"iso9660" | xrockridge | xjoliet | xrockridge_joliet | x"ziso9660" | x"romfs" | x"squash4_"* | x"iso9660_1999" | xrockridge_1999 | xjoliet_1999 | xrockridge_joliet_1999) ;;
|
||||
+ *)
|
||||
+ for lodev in $LODEVICES; do
|
||||
+ while ! losetup -d "$lodev"; do
|
||||
sleep 1
|
||||
- done;;
|
||||
- esac
|
||||
- rm "${FSIMAGES[i]}"
|
||||
+ done
|
||||
+ done;;
|
||||
+ esac
|
||||
+ for i in $(range 0 $((NDEVICES-1)) 1); do
|
||||
+ rm "$FSIMAGEP${i}.img"
|
||||
done
|
||||
if [ x"$fs" = x"zfs" ]; then
|
||||
rmdir "$MNTPOINTRW"/"grub fs" || true
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,22 +1,26 @@
|
|||
From a6c2dfdf5ea765938849dc7f54a685de0ef21193 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <mjg59@coreos.com>
|
||||
Date: Sun, 9 Aug 2015 16:12:39 -0700
|
||||
Subject: [PATCH 156/194] Rework linux command
|
||||
Subject: [PATCH] Rework linux command
|
||||
|
||||
We want a single buffer that contains the entire kernel image in order to
|
||||
perform a TPM measurement. Allocate one and copy the entire kernel into it
|
||||
before pulling out the individual blocks later on.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg59@coreos.com>
|
||||
---
|
||||
grub-core/loader/i386/linux.c | 34 +++++++++++++++++++++-------------
|
||||
1 file changed, 21 insertions(+), 13 deletions(-)
|
||||
grub-core/loader/i386/linux.c | 35 +++++++++++++++++++++++------------
|
||||
1 file changed, 23 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
|
||||
index b2438547d..e4b8342f5 100644
|
||||
index 977757f2cc9..10f967f2563 100644
|
||||
--- a/grub-core/loader/i386/linux.c
|
||||
+++ b/grub-core/loader/i386/linux.c
|
||||
@@ -681,12 +681,13 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -661,13 +661,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
grub_file_t file = 0;
|
||||
struct linux_kernel_header lh;
|
||||
struct linux_i386_kernel_header lh;
|
||||
+ grub_uint8_t *linux_params_ptr;
|
||||
grub_uint8_t setup_sects;
|
||||
- grub_size_t real_size, prot_size, prot_file_size;
|
||||
+ grub_size_t real_size, prot_size, prot_file_size, kernel_offset;
|
||||
|
|
@ -29,7 +33,7 @@ index b2438547d..e4b8342f5 100644
|
|||
|
||||
grub_dl_ref (my_mod);
|
||||
|
||||
@@ -700,7 +701,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -681,7 +683,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (! file)
|
||||
goto fail;
|
||||
|
||||
|
|
@ -46,7 +50,7 @@ index b2438547d..e4b8342f5 100644
|
|||
{
|
||||
if (!grub_errno)
|
||||
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
@@ -708,6 +717,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -689,6 +699,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -56,24 +60,25 @@ index b2438547d..e4b8342f5 100644
|
|||
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
|
||||
@@ -807,13 +819,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
linux_params.ps_mouse = linux_params.padding10 = 0;
|
||||
@@ -796,13 +809,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
/* We've already read lh so there is no need to read it second time. */
|
||||
len -= sizeof(lh);
|
||||
|
||||
len = sizeof (linux_params) - sizeof (lh);
|
||||
- if (grub_file_read (file, (char *) &linux_params + sizeof (lh), len) != len)
|
||||
- {
|
||||
- if ((len > 0) &&
|
||||
- (grub_file_read (file, (char *) &linux_params + sizeof (lh), len) != len))
|
||||
+ linux_params_ptr = (void *)&linux_params;
|
||||
+ if (len > 0)
|
||||
{
|
||||
- if (!grub_errno)
|
||||
- grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
- argv[0]);
|
||||
- goto fail;
|
||||
- }
|
||||
+
|
||||
+ grub_memcpy (&linux_params + sizeof (lh), kernel + kernel_offset, len);
|
||||
+ kernel_offset += len;
|
||||
+ grub_memcpy (linux_params_ptr + sizeof (lh), kernel + kernel_offset, len);
|
||||
+ kernel_offset += len;
|
||||
}
|
||||
|
||||
linux_params.type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE;
|
||||
|
||||
@@ -872,7 +880,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
linux_params.code32_start = prot_mode_target + lh.code32_start - GRUB_LINUX_BZIMAGE_ADDR;
|
||||
@@ -865,7 +876,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
/* The other parameters are filled when booting. */
|
||||
|
||||
|
|
@ -82,8 +87,8 @@ index b2438547d..e4b8342f5 100644
|
|||
|
||||
grub_dprintf ("linux", "bzImage, setup=0x%x, size=0x%x\n",
|
||||
(unsigned) real_size, (unsigned) prot_size);
|
||||
@@ -1020,9 +1028,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
- (sizeof (LINUX_IMAGE) - 1));
|
||||
@@ -1019,9 +1030,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
len = prot_file_size;
|
||||
- if (grub_file_read (file, prot_mode_mem, len) != len && !grub_errno)
|
||||
|
|
@ -93,7 +98,7 @@ index b2438547d..e4b8342f5 100644
|
|||
|
||||
if (grub_errno == GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -1033,6 +1039,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -1032,6 +1041,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
fail:
|
||||
|
||||
|
|
@ -102,6 +107,3 @@ index b2438547d..e4b8342f5 100644
|
|||
if (file)
|
||||
grub_file_close (file);
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From b43b8cacc813c2c15347de1e35cc88d9aa912d22 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 14:31:36 +0300
|
||||
Subject: [PATCH 004/194] support busybox date.
|
||||
|
||||
Busybox date doesn't understand weekdays in -d input,
|
||||
so strip them beforehand.
|
||||
---
|
||||
tests/grub_cmd_date.in | 2 +-
|
||||
tests/grub_cmd_sleep.in | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/grub_cmd_date.in b/tests/grub_cmd_date.in
|
||||
index 0d8162e98..60f039ebc 100644
|
||||
--- a/tests/grub_cmd_date.in
|
||||
+++ b/tests/grub_cmd_date.in
|
||||
@@ -9,7 +9,7 @@ if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ];
|
||||
fi
|
||||
|
||||
pdt="$(date -u +%s)"
|
||||
-dt=`echo date | @builddir@/grub-shell`
|
||||
+dt=`echo date | @builddir@/grub-shell | sed 's, [A-Z][a-z]*$,,'`
|
||||
dtg="$(date -u -d "$dt" +%s)"
|
||||
ndt="$(date -u +%s)"
|
||||
|
||||
diff --git a/tests/grub_cmd_sleep.in b/tests/grub_cmd_sleep.in
|
||||
index 05b8f6b73..ac51d4209 100644
|
||||
--- a/tests/grub_cmd_sleep.in
|
||||
+++ b/tests/grub_cmd_sleep.in
|
||||
@@ -11,8 +11,8 @@ fi
|
||||
# Compare RTC with interval timer.
|
||||
# Not 100% proper but should check that timer is running ok
|
||||
dt=`echo 'date; sleep 10; date' | @builddir@/grub-shell`
|
||||
-dt1="$(date -u -d "$(echo "$dt" | head -n 1)" +%s)"
|
||||
-dt2="$(date -u -d "$(echo "$dt" | tail -n 1)" +%s)"
|
||||
+dt1="$(date -u -d "$(echo "$dt" | head -n 1 | sed 's, [A-Z][a-z]*$,,')" +%s)"
|
||||
+dt2="$(date -u -d "$(echo "$dt" | tail -n 1 | sed 's, [A-Z][a-z]*$,,')" +%s)"
|
||||
|
||||
# Ignore QEMU bug
|
||||
if [ "${grub_modinfo_target_cpu}" = arm ] && [ $((dt2 - dt1)) -ge 15 ] && [ $((dt2 - dt1)) -le 17 ]; then
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
From 6dec3a26b37e128ded5d912e08abc5cee1592499 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 21:24:05 +0300
|
||||
Subject: [PATCH 005/194] Don't retrieve fstime when it's not useful.
|
||||
|
||||
---
|
||||
tests/util/grub-fs-tester.in | 48 ++++++++++++++++++++++----------------------
|
||||
1 file changed, 24 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
|
||||
index 4515d165e..bf47305f3 100644
|
||||
--- a/tests/util/grub-fs-tester.in
|
||||
+++ b/tests/util/grub-fs-tester.in
|
||||
@@ -1328,31 +1328,31 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
|
||||
;;
|
||||
esac
|
||||
|
||||
- case x$fs in
|
||||
- xiso9660 | xziso9660 | xrockridge | xjoliet | xrockridge_joliet | xiso9660_1999 | xrockridge_1999 | xjoliet_1999 | xrockridge_joliet_1999)
|
||||
- FSTIME="$(date -d "$(echo ${FSUUID} | awk -F - '{ print $1"-"$2"-"$3" "$4":"$5":"$6 ;}')" '+%Y-%m-%d %H:%M:%S')";;
|
||||
- xlvm*|xmdraid*)
|
||||
- # With some abstractions like mdraid flushing to disk
|
||||
- # may be delayed for a long time.
|
||||
- FSTIME="$UMOUNT_TIME";;
|
||||
- *)
|
||||
- FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGEP}0.img"|awk '{print $6; }'|sed 's,_, ,g')";;
|
||||
- esac
|
||||
- # With some abstractions like mdraid computing of UMOUNT_TIME
|
||||
- # is not precise. Account for small difference here.
|
||||
- FSTIMEM1="$(date -d "$FSTIME UTC -1 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
- FSTIMEM2="$(date -d "$FSTIME UTC -2 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
- FSTIMEM3="$(date -d "$FSTIME UTC -3 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
+ if [ x$NOFSTIME != xy ]; then
|
||||
+ case x$fs in
|
||||
+ xiso9660 | xziso9660 | xrockridge | xjoliet | xrockridge_joliet | xiso9660_1999 | xrockridge_1999 | xjoliet_1999 | xrockridge_joliet_1999)
|
||||
+ FSTIME="$(date -d "$(echo ${FSUUID} | awk -F - '{ print $1"-"$2"-"$3" "$4":"$5":"$6 ;}')" '+%Y-%m-%d %H:%M:%S')";;
|
||||
+ xlvm*|xmdraid*)
|
||||
+ # With some abstractions like mdraid flushing to disk
|
||||
+ # may be delayed for a long time.
|
||||
+ FSTIME="$UMOUNT_TIME";;
|
||||
+ *)
|
||||
+ FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGEP}0.img"|awk '{print $6; }'|sed 's,_, ,g')";;
|
||||
+ esac
|
||||
+ # With some abstractions like mdraid computing of UMOUNT_TIME
|
||||
+ # is not precise. Account for small difference here.
|
||||
+ FSTIMEM1="$(date -d "$FSTIME UTC -1 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
+ FSTIMEM2="$(date -d "$FSTIME UTC -2 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
+ FSTIMEM3="$(date -d "$FSTIME UTC -3 second" -u "+%Y-%m-%d %H:%M:%S")"
|
||||
|
||||
- if [ x$NOFSTIME = xy ]; then
|
||||
- :
|
||||
- elif echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM3" > /dev/null; then
|
||||
- :
|
||||
- else
|
||||
- echo FSTIME FAIL
|
||||
- echo "$FSTIME"
|
||||
- echo "$LSOUT"
|
||||
- exit 1
|
||||
+ if echo "$LSOUT" | grep -F 'Last modification time '"$FSTIME" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM1" > /dev/null || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM2" || echo "$LSOUT" | grep -F 'Last modification time '"$FSTIMEM3" > /dev/null; then
|
||||
+ :
|
||||
+ else
|
||||
+ echo FSTIME FAIL
|
||||
+ echo "$FSTIME"
|
||||
+ echo "$LSOUT"
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
|
||||
if [ x$NOHARDLINK != xy ]; then
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,22 +1,24 @@
|
|||
From fe4560a74b419441cc337e6395fd42f988616b32 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <mjg59@coreos.com>
|
||||
Date: Sun, 9 Aug 2015 16:20:58 -0700
|
||||
Subject: [PATCH 157/194] Rework linux16 command
|
||||
Subject: [PATCH] Rework linux16 command
|
||||
|
||||
We want a single buffer that contains the entire kernel image in order to
|
||||
perform a TPM measurement. Allocate one and copy the entire kernel int it
|
||||
before pulling out the individual blocks later on.
|
||||
|
||||
Signed-off-by: Matthew Garrett <mjg59@coreos.com>
|
||||
---
|
||||
grub-core/loader/i386/pc/linux.c | 34 +++++++++++++++++++++-------------
|
||||
1 file changed, 21 insertions(+), 13 deletions(-)
|
||||
grub-core/loader/i386/pc/linux.c | 33 +++++++++++++++++++++------------
|
||||
1 file changed, 21 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
|
||||
index 91283157e..b864e5403 100644
|
||||
index 4adeee9ae00..600530a742b 100644
|
||||
--- a/grub-core/loader/i386/pc/linux.c
|
||||
+++ b/grub-core/loader/i386/pc/linux.c
|
||||
@@ -124,13 +124,14 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_file_t file = 0;
|
||||
struct linux_kernel_header lh;
|
||||
struct linux_i386_kernel_header lh;
|
||||
grub_uint8_t setup_sects;
|
||||
- grub_size_t real_size;
|
||||
+ grub_size_t real_size, kernel_offset = 0;
|
||||
|
|
@ -57,7 +59,7 @@ index 91283157e..b864e5403 100644
|
|||
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
|
||||
@@ -315,13 +327,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -320,13 +332,9 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_memmove (grub_linux_real_chunk, &lh, sizeof (lh));
|
||||
|
||||
len = real_size + GRUB_DISK_SECTOR_SIZE - sizeof (lh);
|
||||
|
|
@ -72,14 +74,13 @@ index 91283157e..b864e5403 100644
|
|||
+ len);
|
||||
+ kernel_offset += len;
|
||||
|
||||
if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
|
||||
if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|
||||
|| grub_le_to_cpu16 (lh.version) < 0x0200)
|
||||
@@ -356,10 +364,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -364,9 +372,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
len = grub_linux16_prot_size;
|
||||
- if (grub_file_read (file, grub_linux_prot_chunk, grub_linux16_prot_size)
|
||||
- != (grub_ssize_t) grub_linux16_prot_size && !grub_errno)
|
||||
- if (grub_file_read (file, grub_linux_prot_chunk, len) != len && !grub_errno)
|
||||
- grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
- argv[0]);
|
||||
+ grub_memcpy (grub_linux_prot_chunk, kernel + kernel_offset, len);
|
||||
|
|
@ -87,7 +88,7 @@ index 91283157e..b864e5403 100644
|
|||
|
||||
if (grub_errno == GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -369,6 +375,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
@@ -376,6 +383,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
fail:
|
||||
|
||||
|
|
@ -96,6 +97,3 @@ index 91283157e..b864e5403 100644
|
|||
if (file)
|
||||
grub_file_close (file);
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
From 608bec51128008afb81c9e3f297283e9f830a146 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 20:21:05 +0300
|
||||
Subject: [PATCH 006/194] Support lseek64.
|
||||
|
||||
Android doesn't have 64-bit off_t, so use off64_t instead.
|
||||
---
|
||||
configure.ac | 5 ++++-
|
||||
grub-core/osdep/unix/hostdisk.c | 8 ++++++++
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d10d8adac..e0262e159 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -373,7 +373,10 @@ case "$host_os" in
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
- test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
|
||||
+ if test x"$ac_cv_sizeof_off_t" != x8 ; then
|
||||
+ AC_CHECK_SIZEOF(off64_t)
|
||||
+ test x"$ac_cv_sizeof_off64_t" = x8 || AC_MSG_ERROR([Large file support is required])
|
||||
+ fi;;
|
||||
esac
|
||||
|
||||
if test x$USE_NLS = xno; then
|
||||
diff --git a/grub-core/osdep/unix/hostdisk.c b/grub-core/osdep/unix/hostdisk.c
|
||||
index 2a8c5882e..5450cf416 100644
|
||||
--- a/grub-core/osdep/unix/hostdisk.c
|
||||
+++ b/grub-core/osdep/unix/hostdisk.c
|
||||
@@ -77,11 +77,19 @@ grub_util_get_fd_size (grub_util_fd_t fd, const char *name, unsigned *log_secsiz
|
||||
int
|
||||
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
||||
{
|
||||
+#if SIZEOF_OFF_T == 8
|
||||
off_t offset = (off_t) off;
|
||||
|
||||
if (lseek (fd, offset, SEEK_SET) != offset)
|
||||
return -1;
|
||||
+#elif SIZEOF_OFF64_T == 8
|
||||
+ off64_t offset = (off64_t) off;
|
||||
|
||||
+ if (lseek64 (fd, offset, SEEK_SET) != offset)
|
||||
+ return -1;
|
||||
+#else
|
||||
+#error "No large file support"
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
246
0006-re-write-.gitignore.patch
Normal file
246
0006-re-write-.gitignore.patch
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 12:55:29 +0200
|
||||
Subject: [PATCH] re-write .gitignore
|
||||
|
||||
---
|
||||
.gitignore | 150 ++++++++++++++++++++++++++++++++++++++
|
||||
docs/.gitignore | 5 ++
|
||||
grub-core/.gitignore | 16 ++++
|
||||
grub-core/lib/.gitignore | 1 +
|
||||
include/grub/gcrypt/.gitignore | 2 +
|
||||
po/.gitignore | 5 ++
|
||||
util/bash-completion.d/.gitignore | 2 +
|
||||
7 files changed, 181 insertions(+)
|
||||
create mode 100644 docs/.gitignore
|
||||
create mode 100644 grub-core/.gitignore
|
||||
create mode 100644 grub-core/lib/.gitignore
|
||||
create mode 100644 include/grub/gcrypt/.gitignore
|
||||
create mode 100644 po/.gitignore
|
||||
create mode 100644 util/bash-completion.d/.gitignore
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 4d0dfb700e4..a18787dcfe6 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -279,3 +279,153 @@ widthspec.bin
|
||||
/xfs_test
|
||||
/xzcompress_test
|
||||
/zfs_test
|
||||
+=======
|
||||
+# things ./autogen.sh will create
|
||||
+/Makefile.utilgcry.def
|
||||
+/ABOUT-NLS
|
||||
+/aclocal.m4
|
||||
+/autom4te.cache
|
||||
+/build-aux
|
||||
+/configure
|
||||
+/gnulib
|
||||
+/grub-core/lib/gnulib/
|
||||
+/Makefile
|
||||
+
|
||||
+# things very common editors create that we never want
|
||||
+*~
|
||||
+.*.sw?
|
||||
+*.patch
|
||||
+
|
||||
+# stuff you're likely to make while building test trees
|
||||
+grub.cfg
|
||||
+/build*/
|
||||
+
|
||||
+# built objects across the whole tree
|
||||
+Makefile.in
|
||||
+*.a
|
||||
+*.am
|
||||
+*.efi
|
||||
+*.exec
|
||||
+*.image
|
||||
+*.img
|
||||
+*.info
|
||||
+*.lst
|
||||
+*.marker
|
||||
+/m4
|
||||
+*.mod
|
||||
+*.module
|
||||
+*.o
|
||||
+*.pf2
|
||||
+*.yy.[ch]
|
||||
+.deps/
|
||||
+.deps-core/
|
||||
+.deps-util/
|
||||
+.dirstamp
|
||||
+
|
||||
+# next are things you get if you do ./configure in the topdir (for e.g.
|
||||
+# "make dist" invocation.
|
||||
+/config-util.h
|
||||
+/config.h
|
||||
+/include/grub/cpu
|
||||
+/include/grub/machine
|
||||
+/INSTALL
|
||||
+/INSTALL.grub
|
||||
+/po/Makefile.in.in
|
||||
+/po/Makevars
|
||||
+/po/Makevars.template
|
||||
+/po/POTFILES
|
||||
+/po/Rules-quot
|
||||
+/stamp-h
|
||||
+/stamp-h1
|
||||
+bootstrap.log
|
||||
+config.log
|
||||
+config.status
|
||||
+
|
||||
+# stuff "make dist" creates
|
||||
+ChangeLog
|
||||
+grub-*.tar
|
||||
+grub-*.tar.*
|
||||
+
|
||||
+# stuff "make" creates
|
||||
+/[[:digit:]][[:digit:]]_?*
|
||||
+/ascii.h
|
||||
+/build-grub-gen-asciih
|
||||
+/build-grub-gen-widthspec
|
||||
+/build-grub-mkfont
|
||||
+/config-util.h.in
|
||||
+/garbage-gen
|
||||
+/grub*-bios-setup
|
||||
+/grub*-bios-setup.8
|
||||
+/grub*-editenv
|
||||
+/grub*-editenv.1
|
||||
+/grub*-file
|
||||
+/grub*-file.1
|
||||
+/grub*-fs-tester
|
||||
+/grub*-fstest
|
||||
+/grub*-fstest.1
|
||||
+/grub*-get-kernel-settings
|
||||
+/grub*-get-kernel-settings.3
|
||||
+/grub*-glue-efi
|
||||
+/grub*-glue-efi.1
|
||||
+/grub*-install
|
||||
+/grub*-install.8
|
||||
+/grub*-kbdcomp
|
||||
+/grub*-kbdcomp.1
|
||||
+/grub*-macbless
|
||||
+/grub*-macbless.8
|
||||
+/grub*-menulst2cfg
|
||||
+/grub*-menulst2cfg.1
|
||||
+/grub*-mount
|
||||
+/grub*-mount.1
|
||||
+/grub*-mkconfig
|
||||
+/grub*-mkconfig.8
|
||||
+/grub*-mkconfig_lib
|
||||
+/grub*-mkfont
|
||||
+/grub*-mkfont.1
|
||||
+/grub*-mkimage
|
||||
+/grub*-mkimage.1
|
||||
+/grub*-mklayout
|
||||
+/grub*-mklayout.1
|
||||
+/grub*-mknetdir
|
||||
+/grub*-mknetdir.1
|
||||
+/grub*-mkpasswd-pbkdf2
|
||||
+/grub*-mkpasswd-pbkdf2.1
|
||||
+/grub*-mkrelpath
|
||||
+/grub*-mkrelpath.1
|
||||
+/grub*-mkrescue
|
||||
+/grub*-mkrescue.1
|
||||
+/grub*-mkstandalone
|
||||
+/grub*-mkstandalone.1
|
||||
+/grub*-ofpathname
|
||||
+/grub*-ofpathname.8
|
||||
+/grub*-probe
|
||||
+/grub*-probe.8
|
||||
+/grub*-reboot
|
||||
+/grub*-reboot.8
|
||||
+/grub*-render-label
|
||||
+/grub*-render-label.1
|
||||
+/grub*-script-check
|
||||
+/grub*-script-check.1
|
||||
+/grub*-set-bootflag
|
||||
+/grub*-set-bootflag.1
|
||||
+/grub*-set-default
|
||||
+/grub*-set-default.8
|
||||
+/grub*-set-password
|
||||
+/grub*-set-password.8
|
||||
+/grub*-shell
|
||||
+/grub*-shell-tester
|
||||
+/grub*-sparc64-setup
|
||||
+/grub*-sparc64-setup.8
|
||||
+/grub*-syslinux2cfg
|
||||
+/grub*-syslinux2cfg.1
|
||||
+/grub*-switch-to-blscfg
|
||||
+/grub*-switch-to-blscfg.8
|
||||
+/grub_fstest.pp
|
||||
+/grub_fstest_init.c
|
||||
+/grub_fstest_init.lst
|
||||
+/grub_script.tab.[ch]
|
||||
+/libgrub.pp
|
||||
+/libgrub_a_init.c
|
||||
+/libgrub_a_init.lst
|
||||
+/stamp-h.in
|
||||
+/widthspec.h
|
||||
diff --git a/docs/.gitignore b/docs/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..e1d849ef95b
|
||||
--- /dev/null
|
||||
+++ b/docs/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/*.in
|
||||
+/Makefile
|
||||
+/stamp-1
|
||||
+/stamp-vti
|
||||
+/version*.texi
|
||||
diff --git a/grub-core/.gitignore b/grub-core/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..2acce281159
|
||||
--- /dev/null
|
||||
+++ b/grub-core/.gitignore
|
||||
@@ -0,0 +1,16 @@
|
||||
+/*.lst
|
||||
+/Makefile
|
||||
+/Makefile.gcry.def
|
||||
+/unidata.c
|
||||
+/build-grub-module-verifier
|
||||
+/gdb_grub
|
||||
+/genmod.sh
|
||||
+/gensyminfo.sh
|
||||
+/gentrigtables
|
||||
+/gmodule.pl
|
||||
+/grub_script.tab.[ch]
|
||||
+/modinfo.sh
|
||||
+/rs_decoder.h
|
||||
+/symlist.c
|
||||
+/symlist.h
|
||||
+/trigtables.c
|
||||
diff --git a/grub-core/lib/.gitignore b/grub-core/lib/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..68154591404
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/.gitignore
|
||||
@@ -0,0 +1 @@
|
||||
+/libgcrypt-grub/
|
||||
diff --git a/include/grub/gcrypt/.gitignore b/include/grub/gcrypt/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..8fbf5646246
|
||||
--- /dev/null
|
||||
+++ b/include/grub/gcrypt/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+g10lib.h
|
||||
+gcrypt.h
|
||||
diff --git a/po/.gitignore b/po/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..f507e7741e3
|
||||
--- /dev/null
|
||||
+++ b/po/.gitignore
|
||||
@@ -0,0 +1,5 @@
|
||||
+/Makefile
|
||||
+/POTFILES*.in
|
||||
+/grub.pot
|
||||
+/remove-potcdate.sed
|
||||
+/stamp-po
|
||||
diff --git a/util/bash-completion.d/.gitignore b/util/bash-completion.d/.gitignore
|
||||
new file mode 100644
|
||||
index 00000000000..6813a527ad3
|
||||
--- /dev/null
|
||||
+++ b/util/bash-completion.d/.gitignore
|
||||
@@ -0,0 +1,2 @@
|
||||
+Makefile
|
||||
+grub
|
||||
|
|
@ -1,37 +1,42 @@
|
|||
From 34423216f8f3d7ce6086e2f1ee9869407e6a2221 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Thu, 20 Sep 2012 18:07:39 -0300
|
||||
Subject: [PATCH 066/194] IBM client architecture (CAS) reboot support
|
||||
Subject: [PATCH] IBM client architecture (CAS) reboot support
|
||||
|
||||
This is an implementation of IBM client architecture (CAS) reboot for GRUB.
|
||||
|
||||
There are cases where the POWER firmware must reboot in order to support
|
||||
specific features requested by a kernel. The kernel calls
|
||||
ibm,client-architecture-support and it may either return or reboot with the new
|
||||
feature set. eg:
|
||||
ibm,client-architecture-support and it may either return or reboot with
|
||||
the new feature set. eg:
|
||||
|
||||
Calling ibm,client-architecture-support.../
|
||||
Elapsed time since release of system processors: 70959 mins 50 secs
|
||||
Welcome to GRUB!
|
||||
|
||||
Instead of return to the GRUB menu, it will check if the flag for CAS reboot is
|
||||
set. If so, grub will automatically boot the last booted kernel using the same
|
||||
parameters
|
||||
Instead of return to the GRUB menu, it will check if the flag for CAS
|
||||
reboot is set. If so, grub will automatically boot the last booted
|
||||
kernel using the same parameters
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
[rharwood@redhat.com: commit message rewrap]
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/openfw.c | 62 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/ieee1275/openfw.c | 63 ++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/normal/main.c | 19 ++++++++++++
|
||||
grub-core/script/execute.c | 7 +++++
|
||||
include/grub/ieee1275/ieee1275.h | 2 ++
|
||||
4 files changed, 90 insertions(+)
|
||||
4 files changed, 91 insertions(+)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
|
||||
index ddb778340..6db8b9865 100644
|
||||
index 11b2beb2ff2..e2ecc65d2d8 100644
|
||||
--- a/grub-core/kern/ieee1275/openfw.c
|
||||
+++ b/grub-core/kern/ieee1275/openfw.c
|
||||
@@ -561,3 +561,65 @@ grub_ieee1275_canonicalise_devname (const char *path)
|
||||
return NULL;
|
||||
}
|
||||
@@ -591,3 +591,66 @@ grub_ieee1275_get_boot_dev (void)
|
||||
|
||||
return bootpath;
|
||||
}
|
||||
+
|
||||
+/* Check if it's a CAS reboot. If so, set the script to be executed. */
|
||||
+int
|
||||
+grub_ieee1275_cas_reboot (char *script)
|
||||
|
|
@ -95,10 +100,10 @@ index ddb778340..6db8b9865 100644
|
|||
+ return 0;
|
||||
+}
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 78a70a8bf..249e19bc7 100644
|
||||
index bd44310005d..d3f53d93d87 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -33,6 +33,9 @@
|
||||
@@ -34,6 +34,9 @@
|
||||
#include <grub/charset.h>
|
||||
#include <grub/script_sh.h>
|
||||
#include <grub/bufio.h>
|
||||
|
|
@ -108,7 +113,7 @@ index 78a70a8bf..249e19bc7 100644
|
|||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -275,6 +278,22 @@ grub_normal_execute (const char *config, int nested, int batch)
|
||||
@@ -276,6 +279,22 @@ grub_normal_execute (const char *config, int nested, int batch)
|
||||
{
|
||||
menu = read_config_file (config);
|
||||
|
||||
|
|
@ -132,20 +137,20 @@ index 78a70a8bf..249e19bc7 100644
|
|||
grub_errno = GRUB_ERR_NONE;
|
||||
}
|
||||
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
|
||||
index a8502d907..ab78ca87f 100644
|
||||
index 14ff09094f0..dab8fd2aeb0 100644
|
||||
--- a/grub-core/script/execute.c
|
||||
+++ b/grub-core/script/execute.c
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <grub/normal.h>
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <grub/extcmd.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/verify.h>
|
||||
+#ifdef GRUB_MACHINE_IEEE1275
|
||||
+#include <grub/ieee1275/ieee1275.h>
|
||||
+#endif
|
||||
|
||||
/* Max digits for a char is 3 (0xFF is 255), similarly for an int it
|
||||
is sizeof (int) * 3, and one extra for a possible -ve sign. */
|
||||
@@ -877,6 +880,10 @@ grub_script_execute_sourcecode (const char *source)
|
||||
@@ -883,6 +886,10 @@ grub_script_execute_sourcecode (const char *source)
|
||||
grub_err_t ret = 0;
|
||||
struct grub_script *parsed_script;
|
||||
|
||||
|
|
@ -157,18 +162,15 @@ index a8502d907..ab78ca87f 100644
|
|||
{
|
||||
char *line;
|
||||
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
|
||||
index 8e4251303..9f26c69a2 100644
|
||||
index dddb385149e..4f6e6aaa098 100644
|
||||
--- a/include/grub/ieee1275/ieee1275.h
|
||||
+++ b/include/grub/ieee1275/ieee1275.h
|
||||
@@ -234,6 +234,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali
|
||||
@@ -251,6 +251,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali
|
||||
void EXPORT_FUNC(grub_ieee1275_children_peer) (struct grub_ieee1275_devalias *alias);
|
||||
void EXPORT_FUNC(grub_ieee1275_children_first) (const char *devpath,
|
||||
struct grub_ieee1275_devalias *alias);
|
||||
+int EXPORT_FUNC(grub_ieee1275_cas_reboot) (char *script);
|
||||
+int EXPORT_FUNC(grub_ieee1275_set_boot_last_label) (const char *text);
|
||||
|
||||
#define FOR_IEEE1275_DEVALIASES(alias) for (grub_ieee1275_devalias_init_iterator (&(alias)); grub_ieee1275_devalias_next (&(alias));)
|
||||
char *EXPORT_FUNC(grub_ieee1275_get_boot_dev) (void);
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From c2ea443446b7feea868e54f94a87781f69820375 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 00:55:30 +0300
|
||||
Subject: [PATCH 007/194] Use $(SHELL) rather than /bin/sh.
|
||||
|
||||
/bin/sh doesn't exist under termux.
|
||||
---
|
||||
grub-core/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 04e9395fd..809a8aa26 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -278,7 +278,7 @@ 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)
|
||||
+ cat symlist.p | $(SHELL) $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
|
||||
rm -f symlist.p
|
||||
CLEANFILES += symlist.c
|
||||
BUILT_SOURCES += symlist.c
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 070dc282d3cc6602571296e90945df9d4671aecb Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Wed, 24 Apr 2013 10:51:48 -0300
|
||||
Subject: [PATCH 067/194] for ppc, reset console display attr when clear screen
|
||||
Subject: [PATCH] for ppc, reset console display attr when clear screen
|
||||
|
||||
v2: Also use \x0c instead of a literal ^L to make future patches less
|
||||
awkward.
|
||||
|
|
@ -10,12 +10,14 @@ This should fix this bugzilla:
|
|||
https://bugzilla.redhat.com/show_bug.cgi?id=908519
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/term/terminfo.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
|
||||
index d317efa36..29df35e6d 100644
|
||||
index 4e534c683eb..3dbe88e8933 100644
|
||||
--- a/grub-core/term/terminfo.c
|
||||
+++ b/grub-core/term/terminfo.c
|
||||
@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
|
||||
|
|
@ -27,6 +29,3 @@ index d317efa36..29df35e6d 100644
|
|||
data->reverse_video_on = grub_strdup ("\e[7m");
|
||||
data->reverse_video_off = grub_strdup ("\e[m");
|
||||
if (grub_strcmp ("ieee1275", str) == 0)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 4341f82af0b61d3dfbe675670d4105dc759c0df3 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 14:54:03 +0300
|
||||
Subject: [PATCH 008/194] po: Use @SHELL@ rather than /bin/sh.
|
||||
|
||||
/bin/sh might not exist.
|
||||
---
|
||||
po/Makefile.in.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
|
||||
index 3619458e8..e68e9da84 100644
|
||||
--- a/po/Makefile.in.in
|
||||
+++ b/po/Makefile.in.in
|
||||
@@ -15,7 +15,7 @@ PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
-SHELL = /bin/sh
|
||||
+SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 1073ddb12078f3c8edbdb74bb8f5afc674983f40 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 23 Jan 2017 14:52:48 +0300
|
||||
Subject: [PATCH 009/194] Add termux path to dict.
|
||||
|
||||
---
|
||||
tests/util/grub-fs-tester.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
|
||||
index bf47305f3..468d9e785 100644
|
||||
--- a/tests/util/grub-fs-tester.in
|
||||
+++ b/tests/util/grub-fs-tester.in
|
||||
@@ -259,7 +259,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
|
||||
MASTER="${tempdir}/master"
|
||||
FSLABEL="grub_;/testé莭莽茝😁киритi urewfceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewrewfceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfewceniuewruevrewnuuireurevueurnievrewfnerfcnevirivinrewvnirewnivrewiuvcrewvnuewvrrrewniuerwreiuviurewiuviurewnuvewnvrenurnunuvrevuurerejiremvreijnvcreivire nverivnreivrevnureiorfnfrvoeoiroireoireoifrefoieroifoireoifoirefoireoifoijfoirereoireoivoioirevoinvoinreoinvnoieoinreoinveoinveoinreoinvoineoinoinoineoinernoiveoinvreoiioewdioewoirvnoireoivfoirewfewoifoijewoijfoijewfoijfewoijoijoijoijoijoijoijfew"
|
||||
CFILESRC=
|
||||
- for cand in /usr/share/dict/american-english /usr/share/dict/linux.words; do
|
||||
+ for cand in /usr/share/dict/american-english /usr/share/dict/linux.words /data/data/com.termux/files/usr/share/hunspell/en_US.dic; do
|
||||
if test -f "$cand" ; then
|
||||
CFILESRC="$cand"
|
||||
break
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
From 4e31478fdf4cda470305c1bb2acb9b820e790757 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Tue, 11 Jun 2013 15:14:05 -0300
|
||||
Subject: [PATCH 068/194] Disable GRUB video support for IBM power machines
|
||||
Subject: [PATCH] Disable GRUB video support for IBM power machines
|
||||
|
||||
Should fix the problem in bugzilla:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=973205
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/cmain.c | 5 ++++-
|
||||
grub-core/video/ieee1275.c | 9 ++++++---
|
||||
|
|
@ -12,10 +15,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=973205
|
|||
3 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
|
||||
index 3e12e6b24..3e14f5393 100644
|
||||
index e74de32483f..810a089a934 100644
|
||||
--- a/grub-core/kern/ieee1275/cmain.c
|
||||
+++ b/grub-core/kern/ieee1275/cmain.c
|
||||
@@ -90,7 +90,10 @@ grub_ieee1275_find_options (void)
|
||||
@@ -89,7 +89,10 @@ grub_ieee1275_find_options (void)
|
||||
}
|
||||
|
||||
if (rc >= 0 && grub_strncmp (tmp, "IBM", 3) == 0)
|
||||
|
|
@ -28,10 +31,10 @@ index 3e12e6b24..3e14f5393 100644
|
|||
/* Old Macs have no key repeat, newer ones have fully working one.
|
||||
The ones inbetween when repeated key generates an escaoe sequence
|
||||
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
|
||||
index 17a3dbbb5..b8e4b3feb 100644
|
||||
index ca3d3c3b2c8..5592e4bb7c9 100644
|
||||
--- a/grub-core/video/ieee1275.c
|
||||
+++ b/grub-core/video/ieee1275.c
|
||||
@@ -352,9 +352,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
|
||||
@@ -351,9 +351,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
|
||||
|
||||
GRUB_MOD_INIT(ieee1275_fb)
|
||||
{
|
||||
|
|
@ -48,18 +51,15 @@ index 17a3dbbb5..b8e4b3feb 100644
|
|||
|
||||
GRUB_MOD_FINI(ieee1275_fb)
|
||||
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
|
||||
index 9f26c69a2..ab4f284c3 100644
|
||||
index 4f6e6aaa098..db0ec5f4c68 100644
|
||||
--- a/include/grub/ieee1275/ieee1275.h
|
||||
+++ b/include/grub/ieee1275/ieee1275.h
|
||||
@@ -146,6 +146,8 @@ enum grub_ieee1275_flag
|
||||
GRUB_IEEE1275_FLAG_BROKEN_REPEAT,
|
||||
@@ -145,6 +145,8 @@ enum grub_ieee1275_flag
|
||||
GRUB_IEEE1275_FLAG_POWER_VM,
|
||||
|
||||
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN,
|
||||
GRUB_IEEE1275_FLAG_POWER_KVM,
|
||||
+
|
||||
+ GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT
|
||||
};
|
||||
|
||||
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,684 +0,0 @@
|
|||
From a827807a1330d5ad619faa103bc7f12d89fc8bee Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Sun, 22 Jan 2017 20:22:34 +0300
|
||||
Subject: [PATCH 010/194] Fix shebang for termux.
|
||||
|
||||
Termux doesn't have a /bin/sh. So we needto use $SHELL.
|
||||
Keep /bin/sh as much as possible.
|
||||
---
|
||||
configure.ac | 10 ++++++++++
|
||||
grub-core/genmod.sh.in | 2 +-
|
||||
grub-core/gensyminfo.sh.in | 2 +-
|
||||
grub-core/modinfo.sh.in | 2 +-
|
||||
tests/ahci_test.in | 2 +-
|
||||
tests/btrfs_test.in | 2 +-
|
||||
tests/cdboot_test.in | 2 +-
|
||||
tests/core_compress_test.in | 2 +-
|
||||
tests/cpio_test.in | 2 +-
|
||||
tests/ehci_test.in | 2 +-
|
||||
tests/example_scripted_test.in | 2 +-
|
||||
tests/exfat_test.in | 2 +-
|
||||
tests/ext234_test.in | 2 +-
|
||||
tests/fat_test.in | 2 +-
|
||||
tests/fddboot_test.in | 2 +-
|
||||
tests/file_filter_test.in | 2 +-
|
||||
tests/gettext_strings_test.in | 2 +-
|
||||
tests/grub_cmd_date.in | 2 +-
|
||||
tests/grub_cmd_regexp.in | 2 +-
|
||||
tests/grub_cmd_set_date.in | 2 +-
|
||||
tests/grub_cmd_sleep.in | 2 +-
|
||||
tests/grub_cmd_test.in | 2 +-
|
||||
tests/grub_cmd_tr.in | 2 +-
|
||||
tests/grub_func_test.in | 2 +-
|
||||
tests/grub_script_blanklines.in | 2 +-
|
||||
tests/grub_script_blockarg.in | 2 +-
|
||||
tests/grub_script_dollar.in | 2 +-
|
||||
tests/grub_script_expansion.in | 2 +-
|
||||
tests/grub_script_final_semicolon.in | 2 +-
|
||||
tests/grub_script_no_commands.in | 2 +-
|
||||
tests/gzcompress_test.in | 2 +-
|
||||
tests/hddboot_test.in | 2 +-
|
||||
tests/help_test.in | 2 +-
|
||||
tests/hfs_test.in | 2 +-
|
||||
tests/hfsplus_test.in | 2 +-
|
||||
tests/iso9660_test.in | 2 +-
|
||||
tests/jfs_test.in | 2 +-
|
||||
tests/lzocompress_test.in | 2 +-
|
||||
tests/minixfs_test.in | 2 +-
|
||||
tests/netboot_test.in | 2 +-
|
||||
tests/nilfs2_test.in | 2 +-
|
||||
tests/ntfs_test.in | 2 +-
|
||||
tests/ohci_test.in | 2 +-
|
||||
tests/partmap_test.in | 2 +-
|
||||
tests/pata_test.in | 2 +-
|
||||
tests/pseries_test.in | 2 +-
|
||||
tests/reiserfs_test.in | 2 +-
|
||||
tests/romfs_test.in | 2 +-
|
||||
tests/squashfs_test.in | 2 +-
|
||||
tests/syslinux_test.in | 2 +-
|
||||
tests/tar_test.in | 2 +-
|
||||
tests/test_sha512sum.in | 2 +-
|
||||
tests/udf_test.in | 2 +-
|
||||
tests/uhci_test.in | 2 +-
|
||||
tests/util/grub-fs-tester.in | 2 +-
|
||||
tests/util/grub-shell-tester.in | 2 +-
|
||||
tests/util/grub-shell.in | 2 +-
|
||||
tests/xfs_test.in | 2 +-
|
||||
tests/xzcompress_test.in | 2 +-
|
||||
tests/zfs_test.in | 2 +-
|
||||
60 files changed, 69 insertions(+), 59 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e0262e159..ee2c86537 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -459,6 +459,16 @@ case "$build_os" in
|
||||
esac
|
||||
AC_SUBST(BUILD_EXEEXT)
|
||||
|
||||
+# In some build environments like termux /bin/sh is not a valid
|
||||
+# shebang. Use $SHELL instead if it's executable and /bin/sh isn't
|
||||
+BUILD_SHEBANG=/bin/sh
|
||||
+for she in /bin/sh "$SHELL"; do
|
||||
+ if test -x "$she" ; then
|
||||
+ BUILD_SHEBANG="$she"
|
||||
+ fi
|
||||
+done
|
||||
+AC_SUBST(BUILD_SHEBANG)
|
||||
+
|
||||
# For gnulib.
|
||||
gl_INIT
|
||||
|
||||
diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
|
||||
index 03cc3b7f6..3de06ee01 100644
|
||||
--- a/grub-core/genmod.sh.in
|
||||
+++ b/grub-core/genmod.sh.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/grub-core/gensyminfo.sh.in b/grub-core/gensyminfo.sh.in
|
||||
index 2e8716b42..9bc767532 100644
|
||||
--- a/grub-core/gensyminfo.sh.in
|
||||
+++ b/grub-core/gensyminfo.sh.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/grub-core/modinfo.sh.in b/grub-core/modinfo.sh.in
|
||||
index faf0ad30e..f6cd657ce 100644
|
||||
--- a/grub-core/modinfo.sh.in
|
||||
+++ b/grub-core/modinfo.sh.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
# User-controllable options
|
||||
grub_modinfo_target_cpu=@target_cpu@
|
||||
diff --git a/tests/ahci_test.in b/tests/ahci_test.in
|
||||
index 1d01d1f59..7df560462 100644
|
||||
--- a/tests/ahci_test.in
|
||||
+++ b/tests/ahci_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/btrfs_test.in b/tests/btrfs_test.in
|
||||
index c55d9477f..2b37ddd33 100644
|
||||
--- a/tests/btrfs_test.in
|
||||
+++ b/tests/btrfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/cdboot_test.in b/tests/cdboot_test.in
|
||||
index 1cc901977..75acdfedb 100644
|
||||
--- a/tests/cdboot_test.in
|
||||
+++ b/tests/cdboot_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/core_compress_test.in b/tests/core_compress_test.in
|
||||
index 1003587cc..9d216ebcf 100644
|
||||
--- a/tests/core_compress_test.in
|
||||
+++ b/tests/core_compress_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/cpio_test.in b/tests/cpio_test.in
|
||||
index 0b09db549..5742cf17b 100644
|
||||
--- a/tests/cpio_test.in
|
||||
+++ b/tests/cpio_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/ehci_test.in b/tests/ehci_test.in
|
||||
index 7dd8d3e8f..b197f8cdc 100644
|
||||
--- a/tests/ehci_test.in
|
||||
+++ b/tests/ehci_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/example_scripted_test.in b/tests/example_scripted_test.in
|
||||
index 09633e893..783b7f138 100644
|
||||
--- a/tests/example_scripted_test.in
|
||||
+++ b/tests/example_scripted_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
true
|
||||
diff --git a/tests/exfat_test.in b/tests/exfat_test.in
|
||||
index fc1a0fe5e..cd3cd4cb2 100644
|
||||
--- a/tests/exfat_test.in
|
||||
+++ b/tests/exfat_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/ext234_test.in b/tests/ext234_test.in
|
||||
index c986960a8..892b99cbd 100644
|
||||
--- a/tests/ext234_test.in
|
||||
+++ b/tests/ext234_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/fat_test.in b/tests/fat_test.in
|
||||
index 1d132b517..b6b4748ca 100644
|
||||
--- a/tests/fat_test.in
|
||||
+++ b/tests/fat_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/fddboot_test.in b/tests/fddboot_test.in
|
||||
index a59645b7f..2d7dfc889 100644
|
||||
--- a/tests/fddboot_test.in
|
||||
+++ b/tests/fddboot_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/file_filter_test.in b/tests/file_filter_test.in
|
||||
index 8909e4021..bfb638227 100644
|
||||
--- a/tests/file_filter_test.in
|
||||
+++ b/tests/file_filter_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/gettext_strings_test.in b/tests/gettext_strings_test.in
|
||||
index 5c305e75b..813999ebe 100644
|
||||
--- a/tests/gettext_strings_test.in
|
||||
+++ b/tests/gettext_strings_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
cd '@srcdir@'
|
||||
|
||||
diff --git a/tests/grub_cmd_date.in b/tests/grub_cmd_date.in
|
||||
index 60f039ebc..f7c9ca004 100644
|
||||
--- a/tests/grub_cmd_date.in
|
||||
+++ b/tests/grub_cmd_date.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_regexp.in b/tests/grub_cmd_regexp.in
|
||||
index 7e9ab86aa..6520bd6d7 100644
|
||||
--- a/tests/grub_cmd_regexp.in
|
||||
+++ b/tests/grub_cmd_regexp.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in
|
||||
index 2f518dd9e..aac120a6c 100644
|
||||
--- a/tests/grub_cmd_set_date.in
|
||||
+++ b/tests/grub_cmd_set_date.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_sleep.in b/tests/grub_cmd_sleep.in
|
||||
index ac51d4209..8797f6632 100644
|
||||
--- a/tests/grub_cmd_sleep.in
|
||||
+++ b/tests/grub_cmd_sleep.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_cmd_test.in b/tests/grub_cmd_test.in
|
||||
index 49ae8a9c8..3399eb292 100644
|
||||
--- a/tests/grub_cmd_test.in
|
||||
+++ b/tests/grub_cmd_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
|
||||
# create a randome file
|
||||
empty="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||
diff --git a/tests/grub_cmd_tr.in b/tests/grub_cmd_tr.in
|
||||
index 0e8d645eb..bed469c03 100644
|
||||
--- a/tests/grub_cmd_tr.in
|
||||
+++ b/tests/grub_cmd_tr.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh -e
|
||||
+#! @BUILD_SHEBANG@ -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/tests/grub_func_test.in b/tests/grub_func_test.in
|
||||
index b32f24466..c67f9e422 100644
|
||||
--- a/tests/grub_func_test.in
|
||||
+++ b/tests/grub_func_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/grub_script_blanklines.in b/tests/grub_script_blanklines.in
|
||||
index 89ed763d3..bd8735491 100644
|
||||
--- a/tests/grub_script_blanklines.in
|
||||
+++ b/tests/grub_script_blanklines.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
@builddir@/grub-script-check <<EOF
|
||||
diff --git a/tests/grub_script_blockarg.in b/tests/grub_script_blockarg.in
|
||||
index 63b60a2ea..6ea9b8c3d 100644
|
||||
--- a/tests/grub_script_blockarg.in
|
||||
+++ b/tests/grub_script_blockarg.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/tests/grub_script_dollar.in b/tests/grub_script_dollar.in
|
||||
index 2e076427a..392fe2e7a 100644
|
||||
--- a/tests/grub_script_dollar.in
|
||||
+++ b/tests/grub_script_dollar.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
@builddir@/grub-script-check << EOF
|
||||
diff --git a/tests/grub_script_expansion.in b/tests/grub_script_expansion.in
|
||||
index 2b7829568..9d0dcdd29 100644
|
||||
--- a/tests/grub_script_expansion.in
|
||||
+++ b/tests/grub_script_expansion.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
diff --git a/tests/grub_script_final_semicolon.in b/tests/grub_script_final_semicolon.in
|
||||
index 3ac26540b..f17a9bf95 100644
|
||||
--- a/tests/grub_script_final_semicolon.in
|
||||
+++ b/tests/grub_script_final_semicolon.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
@builddir@/grub-script-check <<EOF
|
||||
diff --git a/tests/grub_script_no_commands.in b/tests/grub_script_no_commands.in
|
||||
index c31d267e5..996bb1810 100644
|
||||
--- a/tests/grub_script_no_commands.in
|
||||
+++ b/tests/grub_script_no_commands.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# grub-script-check refuses to pass a file with no commands; this usually
|
||||
diff --git a/tests/gzcompress_test.in b/tests/gzcompress_test.in
|
||||
index 11b6bb208..42c8fe7c4 100644
|
||||
--- a/tests/gzcompress_test.in
|
||||
+++ b/tests/gzcompress_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/hddboot_test.in b/tests/hddboot_test.in
|
||||
index c229716a6..6d70847a5 100644
|
||||
--- a/tests/hddboot_test.in
|
||||
+++ b/tests/hddboot_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/help_test.in b/tests/help_test.in
|
||||
index aa9645835..b08cf2013 100644
|
||||
--- a/tests/help_test.in
|
||||
+++ b/tests/help_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
. "@builddir@/grub-core/modinfo.sh"
|
||||
diff --git a/tests/hfs_test.in b/tests/hfs_test.in
|
||||
index e3e88f190..d7ec56bef 100644
|
||||
--- a/tests/hfs_test.in
|
||||
+++ b/tests/hfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/hfsplus_test.in b/tests/hfsplus_test.in
|
||||
index f947c4a44..85f1c37dc 100644
|
||||
--- a/tests/hfsplus_test.in
|
||||
+++ b/tests/hfsplus_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/iso9660_test.in b/tests/iso9660_test.in
|
||||
index fdcc9e124..571b938d7 100644
|
||||
--- a/tests/iso9660_test.in
|
||||
+++ b/tests/iso9660_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/jfs_test.in b/tests/jfs_test.in
|
||||
index c2e5ecedd..6cf7576b3 100644
|
||||
--- a/tests/jfs_test.in
|
||||
+++ b/tests/jfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/lzocompress_test.in b/tests/lzocompress_test.in
|
||||
index 41984c254..4e5f7e078 100644
|
||||
--- a/tests/lzocompress_test.in
|
||||
+++ b/tests/lzocompress_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/minixfs_test.in b/tests/minixfs_test.in
|
||||
index 1784b1261..3b16a4de0 100644
|
||||
--- a/tests/minixfs_test.in
|
||||
+++ b/tests/minixfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/netboot_test.in b/tests/netboot_test.in
|
||||
index c757023d9..9f71e3d88 100644
|
||||
--- a/tests/netboot_test.in
|
||||
+++ b/tests/netboot_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/nilfs2_test.in b/tests/nilfs2_test.in
|
||||
index 780b60ec1..ad44d5b33 100644
|
||||
--- a/tests/nilfs2_test.in
|
||||
+++ b/tests/nilfs2_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/ntfs_test.in b/tests/ntfs_test.in
|
||||
index e25c6384a..9eb7b01f6 100644
|
||||
--- a/tests/ntfs_test.in
|
||||
+++ b/tests/ntfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/ohci_test.in b/tests/ohci_test.in
|
||||
index 7fede6f26..8693f8c47 100644
|
||||
--- a/tests/ohci_test.in
|
||||
+++ b/tests/ohci_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/partmap_test.in b/tests/partmap_test.in
|
||||
index f8dc456fb..6ef518b0a 100644
|
||||
--- a/tests/partmap_test.in
|
||||
+++ b/tests/partmap_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
diff --git a/tests/pata_test.in b/tests/pata_test.in
|
||||
index c1d0f63ea..4b18fdef3 100644
|
||||
--- a/tests/pata_test.in
|
||||
+++ b/tests/pata_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/pseries_test.in b/tests/pseries_test.in
|
||||
index 226494593..655eb4f3a 100644
|
||||
--- a/tests/pseries_test.in
|
||||
+++ b/tests/pseries_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/reiserfs_test.in b/tests/reiserfs_test.in
|
||||
index 678efe7b3..b5fed7635 100644
|
||||
--- a/tests/reiserfs_test.in
|
||||
+++ b/tests/reiserfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/romfs_test.in b/tests/romfs_test.in
|
||||
index 83e09315a..98bb50c32 100644
|
||||
--- a/tests/romfs_test.in
|
||||
+++ b/tests/romfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/squashfs_test.in b/tests/squashfs_test.in
|
||||
index ec34e0108..2f044f95d 100644
|
||||
--- a/tests/squashfs_test.in
|
||||
+++ b/tests/squashfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/syslinux_test.in b/tests/syslinux_test.in
|
||||
index fc4edd8ef..4ea86390e 100644
|
||||
--- a/tests/syslinux_test.in
|
||||
+++ b/tests/syslinux_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/tar_test.in b/tests/tar_test.in
|
||||
index 46ba3bce2..6e2f2de8b 100644
|
||||
--- a/tests/tar_test.in
|
||||
+++ b/tests/tar_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/test_sha512sum.in b/tests/test_sha512sum.in
|
||||
index 80ebdc59f..027092a8b 100644
|
||||
--- a/tests/test_sha512sum.in
|
||||
+++ b/tests/test_sha512sum.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
|
||||
# create a randome file
|
||||
file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
|
||||
diff --git a/tests/udf_test.in b/tests/udf_test.in
|
||||
index fe244e2bd..fb92f0173 100644
|
||||
--- a/tests/udf_test.in
|
||||
+++ b/tests/udf_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/uhci_test.in b/tests/uhci_test.in
|
||||
index 89e2c1805..4af72fd8f 100644
|
||||
--- a/tests/uhci_test.in
|
||||
+++ b/tests/uhci_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
|
||||
index 468d9e785..88cbe7365 100644
|
||||
--- a/tests/util/grub-fs-tester.in
|
||||
+++ b/tests/util/grub-fs-tester.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in
|
||||
index 5adce0a47..8a87109b1 100644
|
||||
--- a/tests/util/grub-shell-tester.in
|
||||
+++ b/tests/util/grub-shell-tester.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Compares GRUB script output with BASH output.
|
||||
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
|
||||
index 814f36c6b..d690d6734 100644
|
||||
--- a/tests/util/grub-shell.in
|
||||
+++ b/tests/util/grub-shell.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Run GRUB script in a Qemu instance
|
||||
diff --git a/tests/xfs_test.in b/tests/xfs_test.in
|
||||
index 3807e2e5c..03a351359 100644
|
||||
--- a/tests/xfs_test.in
|
||||
+++ b/tests/xfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
diff --git a/tests/xzcompress_test.in b/tests/xzcompress_test.in
|
||||
index b2bd999ec..03bfb5e95 100644
|
||||
--- a/tests/xzcompress_test.in
|
||||
+++ b/tests/xzcompress_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /bin/sh
|
||||
+#! @BUILD_SHEBANG@
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
diff --git a/tests/zfs_test.in b/tests/zfs_test.in
|
||||
index 047120e47..eee62c10d 100644
|
||||
--- a/tests/zfs_test.in
|
||||
+++ b/tests/zfs_test.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/sh
|
||||
+#!@BUILD_SHEBANG@
|
||||
|
||||
set -e
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 999bbc2002275efce284aed6e1e31b3ca351fa19 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 3 Apr 2013 14:35:34 -0400
|
||||
Subject: [PATCH 070/194] Move bash completion script (#922997)
|
||||
Subject: [PATCH] Move bash completion script (#922997)
|
||||
|
||||
Apparently these go in a new place now.
|
||||
---
|
||||
|
|
@ -10,10 +10,10 @@ Apparently these go in a new place now.
|
|||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 571f7a0b5..9ae97f026 100644
|
||||
index cd667a2eb75..ae3a49321ad 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -288,6 +288,14 @@ AC_SUBST(grubdirname)
|
||||
@@ -319,6 +319,14 @@ AC_SUBST(grubdirname)
|
||||
AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
|
||||
[Default grub directory name])
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ index 571f7a0b5..9ae97f026 100644
|
|||
#
|
||||
# Checks for build programs.
|
||||
#
|
||||
@@ -497,6 +505,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
|
||||
@@ -534,6 +542,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
|
||||
# Check for target programs.
|
||||
#
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ index 571f7a0b5..9ae97f026 100644
|
|||
if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
|
||||
tmp_ac_tool_prefix="$ac_tool_prefix"
|
||||
diff --git a/util/bash-completion.d/Makefile.am b/util/bash-completion.d/Makefile.am
|
||||
index 136287cf1..61108f054 100644
|
||||
index 136287cf1bf..61108f05429 100644
|
||||
--- a/util/bash-completion.d/Makefile.am
|
||||
+++ b/util/bash-completion.d/Makefile.am
|
||||
@@ -6,7 +6,6 @@ EXTRA_DIST = $(bash_completion_source)
|
||||
|
|
@ -50,6 +50,3 @@ index 136287cf1..61108f054 100644
|
|||
bashcompletion_DATA = $(bash_completion_script)
|
||||
|
||||
$(bash_completion_script): $(bash_completion_source) $(top_builddir)/config.status
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From ede6c9689395499f98a4c14d76b97151b4de5f54 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Wed, 3 May 2017 12:58:15 +0200
|
||||
Subject: [PATCH 011/194] Add strtoull test.
|
||||
|
||||
---
|
||||
grub-core/Makefile.core.def | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 2dfa22a92..8dcd0e5a9 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1962,6 +1962,11 @@ module = {
|
||||
};
|
||||
|
||||
module = {
|
||||
+ name = strtoull_test;
|
||||
+ common = tests/strtoull_test.c;
|
||||
+};
|
||||
+
|
||||
+module = {
|
||||
name = setjmp_test;
|
||||
common = tests/setjmp_test.c;
|
||||
};
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From 15e9ccc8abd5621107788bea6ae6f2bdb27a3ed3 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 5 Sep 2014 10:07:04 -0400
|
||||
Subject: [PATCH 072/194] Allow "fallback" to include entries by title, not
|
||||
just number.
|
||||
Subject: [PATCH] Allow "fallback" to include entries by title, not just
|
||||
number.
|
||||
|
||||
Resolves: rhbz#1026084
|
||||
|
||||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 58 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index e7a83c2d6..d2f64b05e 100644
|
||||
index 6a90e091f22..6444ee6f969 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -163,16 +163,41 @@ grub_menu_set_timeout (int timeout)
|
||||
@@ -163,15 +163,40 @@ grub_menu_set_timeout (int timeout)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -51,14 +51,13 @@ index e7a83c2d6..d2f64b05e 100644
|
|||
-get_and_remove_first_entry_number (const char *name)
|
||||
+get_and_remove_first_entry_number (grub_menu_t menu, const char *name)
|
||||
{
|
||||
const char *val;
|
||||
char *tail;
|
||||
const char *val, *tail;
|
||||
int entry;
|
||||
+ int sz = 0;
|
||||
|
||||
val = grub_env_get (name);
|
||||
if (! val)
|
||||
@@ -182,9 +207,39 @@ get_and_remove_first_entry_number (const char *name)
|
||||
@@ -181,9 +206,39 @@ get_and_remove_first_entry_number (const char *name)
|
||||
|
||||
entry = (int) grub_strtoul (val, &tail, 0);
|
||||
|
||||
|
|
@ -99,7 +98,7 @@ index e7a83c2d6..d2f64b05e 100644
|
|||
while (*tail && grub_isspace (*tail))
|
||||
tail++;
|
||||
grub_env_set (name, tail);
|
||||
@@ -347,7 +402,7 @@ grub_menu_execute_with_fallback (grub_menu_t menu,
|
||||
@@ -346,7 +401,7 @@ grub_menu_execute_with_fallback (grub_menu_t menu,
|
||||
grub_menu_execute_entry (entry, 1);
|
||||
|
||||
/* Deal with fallback entries. */
|
||||
|
|
@ -108,7 +107,7 @@ index e7a83c2d6..d2f64b05e 100644
|
|||
>= 0)
|
||||
{
|
||||
grub_print_error ();
|
||||
@@ -465,30 +520,6 @@ grub_menu_register_viewer (struct grub_menu_viewer *viewer)
|
||||
@@ -464,30 +519,6 @@ grub_menu_register_viewer (struct grub_menu_viewer *viewer)
|
||||
viewers = viewer;
|
||||
}
|
||||
|
||||
|
|
@ -139,6 +138,3 @@ index e7a83c2d6..d2f64b05e 100644
|
|||
/* Get the entry number from the variable NAME. */
|
||||
static int
|
||||
get_entry_number (grub_menu_t menu, const char *name)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 68d514b51b81911d8359d7825618112dae4a44d9 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 26 Feb 2014 21:49:12 -0500
|
||||
Subject: [PATCH 074/194] Make "exit" take a return code.
|
||||
Subject: [PATCH] Make "exit" take a return code.
|
||||
|
||||
This adds "exit" with a return code. With this patch, any "exit"
|
||||
command /may/ include a return code, and on platforms that support
|
||||
|
|
@ -13,24 +13,24 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
grub-core/commands/minicmd.c | 20 ++++++++++++++++----
|
||||
grub-core/kern/efi/efi.c | 9 +++++++--
|
||||
grub-core/kern/emu/main.c | 2 +-
|
||||
grub-core/kern/emu/misc.c | 5 +++--
|
||||
grub-core/kern/emu/misc.c | 9 +++++----
|
||||
grub-core/kern/i386/coreboot/init.c | 2 +-
|
||||
grub-core/kern/i386/qemu/init.c | 2 +-
|
||||
grub-core/kern/ieee1275/init.c | 2 +-
|
||||
grub-core/kern/mips/arc/init.c | 2 +-
|
||||
grub-core/kern/mips/loongson/init.c | 2 +-
|
||||
grub-core/kern/mips/qemu_mips/init.c | 2 +-
|
||||
grub-core/kern/misc.c | 2 +-
|
||||
grub-core/kern/misc.c | 11 ++++++++++-
|
||||
grub-core/kern/uboot/init.c | 6 +++---
|
||||
grub-core/kern/xen/init.c | 2 +-
|
||||
include/grub/misc.h | 2 +-
|
||||
14 files changed, 39 insertions(+), 21 deletions(-)
|
||||
14 files changed, 50 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
|
||||
index a3a118241..b25ca4b9f 100644
|
||||
index fa498931ed2..2bd3ac76f2d 100644
|
||||
--- a/grub-core/commands/minicmd.c
|
||||
+++ b/grub-core/commands/minicmd.c
|
||||
@@ -176,12 +176,24 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -182,12 +182,24 @@ grub_mini_cmd_lsmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
}
|
||||
|
||||
/* exit */
|
||||
|
|
@ -60,10 +60,10 @@ index a3a118241..b25ca4b9f 100644
|
|||
}
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index d467785fc..684ca93f8 100644
|
||||
index b93ae3aba12..885d7c6420e 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -155,11 +155,16 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
|
||||
@@ -175,11 +175,16 @@ grub_reboot (void)
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -76,14 +76,14 @@ index d467785fc..684ca93f8 100644
|
|||
+ rc = GRUB_EFI_SUCCESS;
|
||||
+
|
||||
grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
||||
efi_call_4 (grub_efi_system_table->boot_services->exit,
|
||||
- grub_efi_image_handle, GRUB_EFI_SUCCESS, 0, 0);
|
||||
+ grub_efi_image_handle, rc, 0, 0);
|
||||
grub_efi_system_table->boot_services->exit (grub_efi_image_handle,
|
||||
- GRUB_EFI_SUCCESS, 0, 0);
|
||||
+ rc, 0, 0);
|
||||
for (;;) ;
|
||||
}
|
||||
|
||||
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
|
||||
index 425bb9603..55ea5a11c 100644
|
||||
index 855b11c3dec..38c1576a2ef 100644
|
||||
--- a/grub-core/kern/emu/main.c
|
||||
+++ b/grub-core/kern/emu/main.c
|
||||
@@ -67,7 +67,7 @@ grub_reboot (void)
|
||||
|
|
@ -96,10 +96,19 @@ index 425bb9603..55ea5a11c 100644
|
|||
grub_reboot ();
|
||||
}
|
||||
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
|
||||
index 76661337f..82012a72f 100644
|
||||
index 521220b49d2..16c79bc9488 100644
|
||||
--- a/grub-core/kern/emu/misc.c
|
||||
+++ b/grub-core/kern/emu/misc.c
|
||||
@@ -137,9 +137,10 @@ xasprintf (const char *fmt, ...)
|
||||
@@ -83,7 +83,7 @@ grub_util_error (const char *fmt, ...)
|
||||
vfprintf (stderr, fmt, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, ".\n");
|
||||
- grub_exit ();
|
||||
+ grub_exit (1);
|
||||
}
|
||||
|
||||
void *
|
||||
@@ -152,12 +152,13 @@ xasprintf (const char *fmt, ...)
|
||||
|
||||
#if !defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||
void
|
||||
|
|
@ -107,13 +116,17 @@ index 76661337f..82012a72f 100644
|
|||
+__attribute__ ((noreturn))
|
||||
+grub_exit (int rc)
|
||||
{
|
||||
-#if defined (GRUB_KERNEL)
|
||||
+#if defined (GRUB_KERNEL) && !defined (GRUB_MACHINE_EFI)
|
||||
grub_reboot ();
|
||||
#endif
|
||||
- exit (1);
|
||||
+ exit (rc < 0 ? 1 : rc);
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/grub-core/kern/i386/coreboot/init.c b/grub-core/kern/i386/coreboot/init.c
|
||||
index 3314f027f..36f9134b7 100644
|
||||
index 4fae8b571f1..feaf9295e30 100644
|
||||
--- a/grub-core/kern/i386/coreboot/init.c
|
||||
+++ b/grub-core/kern/i386/coreboot/init.c
|
||||
@@ -41,7 +41,7 @@ extern grub_uint8_t _end[];
|
||||
|
|
@ -126,7 +139,7 @@ index 3314f027f..36f9134b7 100644
|
|||
/* We can't use grub_fatal() in this function. This would create an infinite
|
||||
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
diff --git a/grub-core/kern/i386/qemu/init.c b/grub-core/kern/i386/qemu/init.c
|
||||
index 271b6fbfa..9fafe98f0 100644
|
||||
index 08f81d25e68..604fc94b5a0 100644
|
||||
--- a/grub-core/kern/i386/qemu/init.c
|
||||
+++ b/grub-core/kern/i386/qemu/init.c
|
||||
@@ -42,7 +42,7 @@ extern grub_uint8_t _end[];
|
||||
|
|
@ -139,11 +152,11 @@ index 271b6fbfa..9fafe98f0 100644
|
|||
/* We can't use grub_fatal() in this function. This would create an infinite
|
||||
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index 12590225e..e69c0133e 100644
|
||||
index fb7d1a3bacf..50c65b2f6e5 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -68,7 +68,7 @@ grub_addr_t grub_ieee1275_original_stack;
|
||||
#endif
|
||||
@@ -114,7 +114,7 @@ grub_addr_t grub_ieee1275_original_stack;
|
||||
#define BYTE22 (DY_MEM_V2 | DRC_INFO)
|
||||
|
||||
void
|
||||
-grub_exit (void)
|
||||
|
|
@ -152,7 +165,7 @@ index 12590225e..e69c0133e 100644
|
|||
grub_ieee1275_exit ();
|
||||
}
|
||||
diff --git a/grub-core/kern/mips/arc/init.c b/grub-core/kern/mips/arc/init.c
|
||||
index 3834a1490..86b3a25ec 100644
|
||||
index 2ed3ff3191e..5c40c34078d 100644
|
||||
--- a/grub-core/kern/mips/arc/init.c
|
||||
+++ b/grub-core/kern/mips/arc/init.c
|
||||
@@ -276,7 +276,7 @@ grub_halt (void)
|
||||
|
|
@ -165,7 +178,7 @@ index 3834a1490..86b3a25ec 100644
|
|||
GRUB_ARC_FIRMWARE_VECTOR->exit ();
|
||||
|
||||
diff --git a/grub-core/kern/mips/loongson/init.c b/grub-core/kern/mips/loongson/init.c
|
||||
index 7b96531b9..dff598ca7 100644
|
||||
index 5bd721260f6..97b09b0eeea 100644
|
||||
--- a/grub-core/kern/mips/loongson/init.c
|
||||
+++ b/grub-core/kern/mips/loongson/init.c
|
||||
@@ -304,7 +304,7 @@ grub_halt (void)
|
||||
|
|
@ -178,7 +191,7 @@ index 7b96531b9..dff598ca7 100644
|
|||
grub_halt ();
|
||||
}
|
||||
diff --git a/grub-core/kern/mips/qemu_mips/init.c b/grub-core/kern/mips/qemu_mips/init.c
|
||||
index be88b77d2..8b6c55ffc 100644
|
||||
index b5477b87ffa..69488a34e7c 100644
|
||||
--- a/grub-core/kern/mips/qemu_mips/init.c
|
||||
+++ b/grub-core/kern/mips/qemu_mips/init.c
|
||||
@@ -75,7 +75,7 @@ grub_machine_fini (int flags __attribute__ ((unused)))
|
||||
|
|
@ -191,10 +204,10 @@ index be88b77d2..8b6c55ffc 100644
|
|||
grub_halt ();
|
||||
}
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index 3b633d51f..952411d5d 100644
|
||||
index 7cee5d75c3c..11037dc0227 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -1095,7 +1095,7 @@ grub_abort (void)
|
||||
@@ -1311,9 +1311,18 @@ grub_abort (void)
|
||||
grub_getkey ();
|
||||
}
|
||||
|
||||
|
|
@ -202,9 +215,20 @@ index 3b633d51f..952411d5d 100644
|
|||
+ grub_exit (1);
|
||||
}
|
||||
|
||||
+#if defined (__clang__) && !defined (GRUB_UTIL)
|
||||
+/* clang emits references to abort(). */
|
||||
+void __attribute__ ((noreturn))
|
||||
+abort (void)
|
||||
+{
|
||||
+ grub_abort ();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
void
|
||||
grub_fatal (const char *fmt, ...)
|
||||
{
|
||||
diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
|
||||
index 3e338645c..be2a5be1d 100644
|
||||
index 3e338645c57..be2a5be1d07 100644
|
||||
--- a/grub-core/kern/uboot/init.c
|
||||
+++ b/grub-core/kern/uboot/init.c
|
||||
@@ -39,9 +39,9 @@ extern grub_size_t grub_total_module_size;
|
||||
|
|
@ -229,10 +253,10 @@ index 3e338645c..be2a5be1d 100644
|
|||
else if (ver > API_SIG_VERSION)
|
||||
{
|
||||
diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c
|
||||
index 0559c033c..fce526d41 100644
|
||||
index 782ca72952a..708b060f324 100644
|
||||
--- a/grub-core/kern/xen/init.c
|
||||
+++ b/grub-core/kern/xen/init.c
|
||||
@@ -549,7 +549,7 @@ grub_machine_init (void)
|
||||
@@ -584,7 +584,7 @@ grub_machine_init (void)
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -242,18 +266,15 @@ index 0559c033c..fce526d41 100644
|
|||
struct sched_shutdown arg;
|
||||
|
||||
diff --git a/include/grub/misc.h b/include/grub/misc.h
|
||||
index 2a9f87cc2..062081437 100644
|
||||
index 1b35a167fde..72aff15750d 100644
|
||||
--- a/include/grub/misc.h
|
||||
+++ b/include/grub/misc.h
|
||||
@@ -334,7 +334,7 @@ int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt,
|
||||
char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...)
|
||||
@@ -385,7 +385,7 @@ char *EXPORT_FUNC(grub_xasprintf) (const char *fmt, ...)
|
||||
__attribute__ ((format (GNU_PRINTF, 1, 2))) WARN_UNUSED_RESULT;
|
||||
char *EXPORT_FUNC(grub_xvasprintf) (const char *fmt, va_list args) WARN_UNUSED_RESULT;
|
||||
|
||||
-void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn));
|
||||
+void EXPORT_FUNC(grub_exit) (int rc) __attribute__ ((noreturn));
|
||||
void EXPORT_FUNC(grub_abort) (void) __attribute__ ((noreturn));
|
||||
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
||||
grub_uint64_t d,
|
||||
grub_uint64_t *r);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
From dc6e1b5af83eb1c4290baf97c2d221c0865127be Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Wed, 10 Aug 2016 17:49:42 +0200
|
||||
Subject: [PATCH 012/194] strtoull: Fix behaviour on chars between '9' and 'a'.
|
||||
|
||||
Reported by: Aaron Miller <aaronmiller@fb.com>
|
||||
---
|
||||
grub-core/kern/misc.c | 13 +++++++------
|
||||
grub-core/tests/lib/functional_test.c | 13 +++++++++++--
|
||||
2 files changed, 18 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index d1a54df6c..3b633d51f 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -391,12 +391,13 @@ grub_strtoull (const char *str, char **end, int base)
|
||||
unsigned long digit;
|
||||
|
||||
digit = grub_tolower (*str) - '0';
|
||||
- if (digit > 9)
|
||||
- {
|
||||
- digit += '0' - 'a' + 10;
|
||||
- if (digit >= (unsigned long) base)
|
||||
- break;
|
||||
- }
|
||||
+ if (digit >= 'a' - '0')
|
||||
+ digit += '0' - 'a' + 10;
|
||||
+ else if (digit > 9)
|
||||
+ break;
|
||||
+
|
||||
+ if (digit >= (unsigned long) base)
|
||||
+ break;
|
||||
|
||||
found = 1;
|
||||
|
||||
diff --git a/grub-core/tests/lib/functional_test.c b/grub-core/tests/lib/functional_test.c
|
||||
index d4822a124..96781fb39 100644
|
||||
--- a/grub-core/tests/lib/functional_test.c
|
||||
+++ b/grub-core/tests/lib/functional_test.c
|
||||
@@ -26,14 +26,23 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_err_t
|
||||
grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
||||
- int argc __attribute__ ((unused)),
|
||||
- char **args __attribute__ ((unused)))
|
||||
+ int argc,
|
||||
+ char **args)
|
||||
{
|
||||
grub_test_t test;
|
||||
int ok = 1;
|
||||
+ int i;
|
||||
|
||||
FOR_LIST_ELEMENTS (test, grub_test_list)
|
||||
{
|
||||
+ if (argc != 0)
|
||||
+ {
|
||||
+ for (i = 0; i < argc; i++)
|
||||
+ if (grub_strcmp(args[i], test->name) == 0)
|
||||
+ break;
|
||||
+ if (i == argc)
|
||||
+ continue;
|
||||
+ }
|
||||
grub_errno = 0;
|
||||
ok = ok && !grub_test_run (test);
|
||||
grub_errno = 0;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,349 +0,0 @@
|
|||
From d9f7de0ae3c0c09cff7257c55418450261f3e082 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Mon, 23 Dec 2013 12:32:02 -0200
|
||||
Subject: [PATCH 013/194] Add Virtual LAN support.
|
||||
|
||||
This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows
|
||||
multiple VLANs in a bridged network to share the same physical network link
|
||||
but maintain isolation:
|
||||
|
||||
http://en.wikipedia.org/wiki/IEEE_802.1Q
|
||||
|
||||
* grub-core/net/ethernet.c: Add check, get, and set vlan tag id.
|
||||
* grub-core/net/drivers/ieee1275/ofnet.c: Get vlan tag id from bootargs.
|
||||
* grub-core/net/arp.c: Add check.
|
||||
* grub-core/net/ip.c: Likewise.
|
||||
* include/grub/net/arp.h: Add vlantag attribute.
|
||||
* include/grub/net/ip.h: Likewise.
|
||||
---
|
||||
grub-core/net/arp.c | 12 +++++++--
|
||||
grub-core/net/drivers/ieee1275/ofnet.c | 9 ++++++-
|
||||
grub-core/net/ethernet.c | 47 ++++++++++++++++++++++++++++++----
|
||||
grub-core/net/ip.c | 33 +++++++++++++++++-------
|
||||
include/grub/net.h | 3 +++
|
||||
include/grub/net/arp.h | 5 ++--
|
||||
include/grub/net/ip.h | 3 ++-
|
||||
7 files changed, 92 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c
|
||||
index 4b68c4151..54306e3b1 100644
|
||||
--- a/grub-core/net/arp.c
|
||||
+++ b/grub-core/net/arp.c
|
||||
@@ -111,8 +111,8 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
-grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
- struct grub_net_card *card)
|
||||
+grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
|
||||
+ grub_uint16_t *vlantag)
|
||||
{
|
||||
struct arppkt *arp_packet = (struct arppkt *) nb->data;
|
||||
grub_net_network_level_address_t sender_addr, target_addr;
|
||||
@@ -138,6 +138,14 @@ grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
|
||||
FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
|
||||
{
|
||||
+ /* Verify vlantag id */
|
||||
+ if (inf->card == card && inf->vlantag != *vlantag)
|
||||
+ {
|
||||
+ grub_dprintf ("net", "invalid vlantag! %x != %x\n",
|
||||
+ inf->vlantag, *vlantag);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* Am I the protocol address target? */
|
||||
if (grub_net_addr_cmp (&inf->address, &target_addr) == 0
|
||||
&& arp_packet->op == grub_cpu_to_be16_compile_time (ARP_REQUEST))
|
||||
diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
index a78d164db..002446be1 100644
|
||||
--- a/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
+++ b/grub-core/net/drivers/ieee1275/ofnet.c
|
||||
@@ -153,11 +153,11 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
char *comma_char = 0;
|
||||
char *equal_char = 0;
|
||||
grub_size_t field_counter = 0;
|
||||
-
|
||||
grub_net_network_level_address_t client_addr, gateway_addr, subnet_mask;
|
||||
grub_net_link_level_address_t hw_addr;
|
||||
grub_net_interface_flags_t flags = 0;
|
||||
struct grub_net_network_level_interface *inter = NULL;
|
||||
+ grub_uint16_t vlantag = 0;
|
||||
|
||||
hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
|
||||
|
||||
@@ -175,6 +175,11 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
*equal_char = 0;
|
||||
grub_env_set_net_property ((*card)->name, args, equal_char + 1,
|
||||
grub_strlen(equal_char + 1));
|
||||
+
|
||||
+ if ((grub_strcmp (args, "vtag") == 0) &&
|
||||
+ (grub_strlen (equal_char + 1) == 8))
|
||||
+ vlantag = grub_strtoul (equal_char + 1 + 4, 0, 16);
|
||||
+
|
||||
*equal_char = '=';
|
||||
}
|
||||
else
|
||||
@@ -213,8 +218,10 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
hw_addr.mac, sizeof(hw_addr.mac), 0);
|
||||
inter = grub_net_add_addr ((*card)->name, *card, &client_addr, &hw_addr,
|
||||
flags);
|
||||
+ inter->vlantag = vlantag;
|
||||
grub_net_add_ipv4_local (inter,
|
||||
__builtin_ctz (~grub_le_to_cpu32 (subnet_mask.ipv4)));
|
||||
+
|
||||
}
|
||||
|
||||
if (gateway_addr.ipv4 != 0)
|
||||
diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
|
||||
index c397b1b34..4d7ceed6f 100644
|
||||
--- a/grub-core/net/ethernet.c
|
||||
+++ b/grub-core/net/ethernet.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
+#include <grub/env.h>
|
||||
#include <grub/net/ethernet.h>
|
||||
#include <grub/net/ip.h>
|
||||
#include <grub/net/arp.h>
|
||||
@@ -56,10 +57,17 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
||||
{
|
||||
struct etherhdr *eth;
|
||||
grub_err_t err;
|
||||
+ grub_uint8_t etherhdr_size;
|
||||
+ grub_uint16_t vlantag_id = VLANTAG_IDENTIFIER;
|
||||
|
||||
- COMPILE_TIME_ASSERT (sizeof (*eth) < GRUB_NET_MAX_LINK_HEADER_SIZE);
|
||||
+ etherhdr_size = sizeof (*eth);
|
||||
+ COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE);
|
||||
|
||||
- err = grub_netbuff_push (nb, sizeof (*eth));
|
||||
+ /* Increase ethernet header in case of vlantag */
|
||||
+ if (inf->vlantag != 0)
|
||||
+ etherhdr_size += 4;
|
||||
+
|
||||
+ err = grub_netbuff_push (nb, etherhdr_size);
|
||||
if (err)
|
||||
return err;
|
||||
eth = (struct etherhdr *) nb->data;
|
||||
@@ -76,6 +84,19 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
||||
return err;
|
||||
inf->card->opened = 1;
|
||||
}
|
||||
+
|
||||
+ /* Check and add a vlan-tag if needed. */
|
||||
+ if (inf->vlantag != 0)
|
||||
+ {
|
||||
+ /* Move eth type to the right */
|
||||
+ grub_memcpy ((char *) nb->data + etherhdr_size - 2,
|
||||
+ (char *) nb->data + etherhdr_size - 6, 2);
|
||||
+
|
||||
+ /* Add the tag in the middle */
|
||||
+ grub_memcpy ((char *) nb->data + etherhdr_size - 6, &vlantag_id, 2);
|
||||
+ grub_memcpy ((char *) nb->data + etherhdr_size - 4, (char *) &(inf->vlantag), 2);
|
||||
+ }
|
||||
+
|
||||
return inf->card->driver->send (inf->card, nb);
|
||||
}
|
||||
|
||||
@@ -90,10 +111,25 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
|
||||
grub_net_link_level_address_t hwaddress;
|
||||
grub_net_link_level_address_t src_hwaddress;
|
||||
grub_err_t err;
|
||||
+ grub_uint8_t etherhdr_size = sizeof (*eth);
|
||||
+ grub_uint16_t vlantag = 0;
|
||||
+
|
||||
+
|
||||
+ /* Check if a vlan-tag is present. If so, the ethernet header is 4 bytes */
|
||||
+ /* longer than the original one. The vlantag id is extracted and the header */
|
||||
+ /* is reseted to the original size. */
|
||||
+ if (grub_get_unaligned16 (nb->data + etherhdr_size - 2) == VLANTAG_IDENTIFIER)
|
||||
+ {
|
||||
+ vlantag = grub_get_unaligned16 (nb->data + etherhdr_size);
|
||||
+ etherhdr_size += 4;
|
||||
+ /* Move eth type to the original position */
|
||||
+ grub_memcpy((char *) nb->data + etherhdr_size - 6,
|
||||
+ (char *) nb->data + etherhdr_size - 2, 2);
|
||||
+ }
|
||||
|
||||
eth = (struct etherhdr *) nb->data;
|
||||
type = grub_be_to_cpu16 (eth->type);
|
||||
- err = grub_netbuff_pull (nb, sizeof (*eth));
|
||||
+ err = grub_netbuff_pull (nb, etherhdr_size);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -121,13 +157,14 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
|
||||
{
|
||||
/* ARP packet. */
|
||||
case GRUB_NET_ETHERTYPE_ARP:
|
||||
- grub_net_arp_receive (nb, card);
|
||||
+ grub_net_arp_receive (nb, card, &vlantag);
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
/* IP packet. */
|
||||
case GRUB_NET_ETHERTYPE_IP:
|
||||
case GRUB_NET_ETHERTYPE_IP6:
|
||||
- return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress);
|
||||
+ return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress,
|
||||
+ &vlantag);
|
||||
}
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c
|
||||
index aba4f8908..7c95cc746 100644
|
||||
--- a/grub-core/net/ip.c
|
||||
+++ b/grub-core/net/ip.c
|
||||
@@ -228,12 +228,13 @@ handle_dgram (struct grub_net_buff *nb,
|
||||
grub_net_ip_protocol_t proto,
|
||||
const grub_net_network_level_address_t *source,
|
||||
const grub_net_network_level_address_t *dest,
|
||||
+ grub_uint16_t *vlantag,
|
||||
grub_uint8_t ttl)
|
||||
{
|
||||
struct grub_net_network_level_interface *inf = NULL;
|
||||
grub_err_t err;
|
||||
int multicast = 0;
|
||||
-
|
||||
+
|
||||
/* DHCP needs special treatment since we don't know IP yet. */
|
||||
{
|
||||
struct udphdr *udph;
|
||||
@@ -293,6 +294,15 @@ handle_dgram (struct grub_net_buff *nb,
|
||||
&& grub_net_addr_cmp (&inf->address, dest) == 0
|
||||
&& grub_net_hwaddr_cmp (&inf->hwaddress, hwaddress) == 0)
|
||||
break;
|
||||
+
|
||||
+ /* Verify vlantag id */
|
||||
+ if (inf->card == card && inf->vlantag != *vlantag)
|
||||
+ {
|
||||
+ grub_dprintf ("net", "invalid vlantag! %x != %x\n",
|
||||
+ inf->vlantag, *vlantag);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* Solicited node multicast. */
|
||||
if (inf->card == card
|
||||
&& inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6
|
||||
@@ -383,7 +393,8 @@ static grub_err_t
|
||||
grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
- const grub_net_link_level_address_t *src_hwaddress)
|
||||
+ const grub_net_link_level_address_t *src_hwaddress,
|
||||
+ grub_uint16_t *vlantag)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *) nb->data;
|
||||
grub_err_t err;
|
||||
@@ -458,7 +469,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
dest.ipv4 = iph->dest;
|
||||
|
||||
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
|
||||
- &source, &dest, iph->ttl);
|
||||
+ &source, &dest, vlantag, iph->ttl);
|
||||
}
|
||||
|
||||
for (prev = &reassembles, rsm = *prev; rsm; prev = &rsm->next, rsm = *prev)
|
||||
@@ -594,7 +605,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
dest.ipv4 = dst;
|
||||
|
||||
return handle_dgram (ret, card, src_hwaddress,
|
||||
- hwaddress, proto, &source, &dest,
|
||||
+ hwaddress, proto, &source, &dest, vlantag,
|
||||
ttl);
|
||||
}
|
||||
}
|
||||
@@ -652,7 +663,8 @@ static grub_err_t
|
||||
grub_net_recv_ip6_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
- const grub_net_link_level_address_t *src_hwaddress)
|
||||
+ const grub_net_link_level_address_t *src_hwaddress,
|
||||
+ grub_uint16_t *vlantag)
|
||||
{
|
||||
struct ip6hdr *iph = (struct ip6hdr *) nb->data;
|
||||
grub_err_t err;
|
||||
@@ -703,21 +715,24 @@ grub_net_recv_ip6_packets (struct grub_net_buff *nb,
|
||||
grub_memcpy (dest.ipv6, &iph->dest, sizeof (dest.ipv6));
|
||||
|
||||
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
|
||||
- &source, &dest, iph->ttl);
|
||||
+ &source, &dest, vlantag, iph->ttl);
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_net_recv_ip_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
- const grub_net_link_level_address_t *src_hwaddress)
|
||||
+ const grub_net_link_level_address_t *src_hwaddress,
|
||||
+ grub_uint16_t *vlantag)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *) nb->data;
|
||||
|
||||
if ((iph->verhdrlen >> 4) == 4)
|
||||
- return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress);
|
||||
+ return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress,
|
||||
+ vlantag);
|
||||
if ((iph->verhdrlen >> 4) == 6)
|
||||
- return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress);
|
||||
+ return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress,
|
||||
+ vlantag);
|
||||
grub_dprintf ("net", "Bad IP version: %d\n", (iph->verhdrlen >> 4));
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
diff --git a/include/grub/net.h b/include/grub/net.h
|
||||
index 2192fa186..1096b2432 100644
|
||||
--- a/include/grub/net.h
|
||||
+++ b/include/grub/net.h
|
||||
@@ -291,6 +291,7 @@ struct grub_net_network_level_interface
|
||||
grub_net_interface_flags_t flags;
|
||||
struct grub_net_bootp_packet *dhcp_ack;
|
||||
grub_size_t dhcp_acklen;
|
||||
+ grub_uint16_t vlantag;
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -561,4 +562,6 @@ extern char *grub_net_default_server;
|
||||
#define GRUB_NET_INTERVAL 400
|
||||
#define GRUB_NET_INTERVAL_ADDITION 20
|
||||
|
||||
+#define VLANTAG_IDENTIFIER 0x8100
|
||||
+
|
||||
#endif /* ! GRUB_NET_HEADER */
|
||||
diff --git a/include/grub/net/arp.h b/include/grub/net/arp.h
|
||||
index bb1703622..8d9d08113 100644
|
||||
--- a/include/grub/net/arp.h
|
||||
+++ b/include/grub/net/arp.h
|
||||
@@ -22,10 +22,11 @@
|
||||
#include <grub/net.h>
|
||||
|
||||
extern grub_err_t grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
- struct grub_net_card *card);
|
||||
+ struct grub_net_card *card,
|
||||
+ grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
|
||||
- const grub_net_network_level_address_t *proto_addr);
|
||||
+ const grub_net_network_level_address_t *proto_addr);
|
||||
|
||||
#endif
|
||||
diff --git a/include/grub/net/ip.h b/include/grub/net/ip.h
|
||||
index dcceaa568..ab9d68f98 100644
|
||||
--- a/include/grub/net/ip.h
|
||||
+++ b/include/grub/net/ip.h
|
||||
@@ -48,7 +48,8 @@ grub_err_t
|
||||
grub_net_recv_ip_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
- const grub_net_link_level_address_t *src_hwaddress);
|
||||
+ const grub_net_link_level_address_t *src_hwaddress,
|
||||
+ grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_send_ip_packet (struct grub_net_network_level_interface *inf,
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,35 +1,43 @@
|
|||
From 506b52759b2b2ad46e7b389979fcbaa78d68dab9 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 7 Dec 2015 14:20:49 -0500
|
||||
Subject: [PATCH 076/194] Make efi machines load an env block from a variable
|
||||
Subject: [PATCH] Make efi machines load an env block from a variable
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/kern/efi/init.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 34 insertions(+), 1 deletion(-)
|
||||
grub-core/kern/efi/init.c | 34 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index a65c27f7f..1eb86bed3 100644
|
||||
index 1571421d7e8..0bffbfea917 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -191,6 +191,7 @@ kernel = {
|
||||
efi = term/efi/console.c;
|
||||
efi = kern/acpi.c;
|
||||
@@ -219,6 +219,7 @@ kernel = {
|
||||
efi = kern/efi/acpi.c;
|
||||
efi = kern/efi/sb.c;
|
||||
efi = kern/lockdown.c;
|
||||
+ efi = lib/envblk.c;
|
||||
i386_coreboot = kern/i386/pc/acpi.c;
|
||||
i386_multiboot = kern/i386/pc/acpi.c;
|
||||
i386_coreboot = kern/acpi.c;
|
||||
diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c
|
||||
index 2c31847bf..f7782b6e1 100644
|
||||
index 6c54af6e79e..b5201974a76 100644
|
||||
--- a/grub-core/kern/efi/init.c
|
||||
+++ b/grub-core/kern/efi/init.c
|
||||
@@ -25,9 +25,40 @@
|
||||
@@ -28,8 +28,11 @@
|
||||
#include <grub/env.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/kernel.h>
|
||||
+
|
||||
#include <grub/stack_protector.h>
|
||||
|
||||
+#include <grub/lib/envblk.h>
|
||||
+
|
||||
#ifdef GRUB_STACK_PROTECTOR
|
||||
|
||||
static grub_efi_char16_t stack_chk_fail_msg[] =
|
||||
@@ -103,6 +106,36 @@ stack_protector_init (void)
|
||||
|
||||
grub_addr_t grub_modbase;
|
||||
|
||||
|
|
@ -50,12 +58,12 @@ index 2c31847bf..f7782b6e1 100644
|
|||
+static void
|
||||
+grub_efi_env_init (void)
|
||||
+{
|
||||
+ grub_efi_guid_t efi_grub_guid = GRUB_EFI_GRUB_VARIABLE_GUID;
|
||||
+ grub_guid_t efi_grub_guid = GRUB_EFI_GRUB_VARIABLE_GUID;
|
||||
+ struct grub_envblk envblk_s = { NULL, 0 };
|
||||
+ grub_envblk_t envblk = &envblk_s;
|
||||
+
|
||||
+ envblk_s.buf = grub_efi_get_variable ("GRUB_ENV", &efi_grub_guid,
|
||||
+ &envblk_s.size);
|
||||
+ grub_efi_get_variable ("GRUB_ENV", &efi_grub_guid, &envblk_s.size,
|
||||
+ (void **) &envblk_s.buf);
|
||||
+ if (!envblk_s.buf || envblk_s.size < 1)
|
||||
+ return;
|
||||
+
|
||||
|
|
@ -63,22 +71,14 @@ index 2c31847bf..f7782b6e1 100644
|
|||
+ grub_free (envblk_s.buf);
|
||||
+}
|
||||
+
|
||||
void
|
||||
__attribute__ ((__optimize__ ("-fno-stack-protector"))) void
|
||||
grub_efi_init (void)
|
||||
{
|
||||
@@ -42,10 +73,11 @@ grub_efi_init (void)
|
||||
efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
|
||||
0, 0, 0, NULL);
|
||||
@@ -128,6 +161,7 @@ grub_efi_init (void)
|
||||
|
||||
grub_efi_system_table->boot_services->set_watchdog_timer (0, 0, 0, NULL);
|
||||
|
||||
+ grub_efi_env_init ();
|
||||
grub_efidisk_init ();
|
||||
}
|
||||
|
||||
-void (*grub_efi_net_config) (grub_efi_handle_t hnd,
|
||||
+void (*grub_efi_net_config) (grub_efi_handle_t hnd,
|
||||
char **device,
|
||||
char **path);
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
grub_efi_register_debug_commands ();
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
From 91b2efdd5e9c3b0784d0a70282407324f07a30b8 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Hamzy <hamzy@us.ibm.com>
|
||||
Date: Wed, 28 Mar 2012 14:46:41 -0500
|
||||
Subject: [PATCH 081/194] Migrate PPC from Yaboot to Grub2
|
||||
Subject: [PATCH] Migrate PPC from Yaboot to Grub2
|
||||
|
||||
Add configuration support for serial terminal consoles. This will set the
|
||||
maximum screen size so that text is not overwritten.
|
||||
Add configuration support for serial terminal consoles. This will set
|
||||
the maximum screen size so that text is not overwritten.
|
||||
|
||||
Signed-off-by: Mark Hamzy <hamzy@us.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
Makefile.util.def | 7 +++
|
||||
util/grub.d/20_ppc_terminfo.in | 114 +++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
@ -12,26 +15,26 @@ maximum screen size so that text is not overwritten.
|
|||
create mode 100644 util/grub.d/20_ppc_terminfo.in
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index f9caccb97..6d452da02 100644
|
||||
index 9432365a9df..09bfcadd976 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -487,6 +487,13 @@ script = {
|
||||
@@ -517,6 +517,13 @@ script = {
|
||||
installdir = grubconf;
|
||||
};
|
||||
|
||||
script = {
|
||||
+script = {
|
||||
+ name = '20_ppc_terminfo';
|
||||
+ common = util/grub.d/20_ppc_terminfo.in;
|
||||
+ installdir = grubconf;
|
||||
+ condition = COND_HOST_LINUX;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
script = {
|
||||
name = '30_os-prober';
|
||||
common = util/grub.d/30_os-prober.in;
|
||||
installdir = grubconf;
|
||||
diff --git a/util/grub.d/20_ppc_terminfo.in b/util/grub.d/20_ppc_terminfo.in
|
||||
new file mode 100644
|
||||
index 000000000..10d665868
|
||||
index 00000000000..10d66586820
|
||||
--- /dev/null
|
||||
+++ b/util/grub.d/20_ppc_terminfo.in
|
||||
@@ -0,0 +1,114 @@
|
||||
|
|
@ -149,6 +152,3 @@ index 000000000..10d665868
|
|||
+cat << EOF
|
||||
+ terminfo -g ${X}x${Y} ${TERMINAL}
|
||||
+EOF
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
From a35ac854308b0af7c86c2c7b199f6abdfa2110b0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 17:32:15 +0200
|
||||
Subject: [PATCH 014/194] mkimage: Pass layout to mkimage_generate_elfXX rather
|
||||
than some fields.
|
||||
|
||||
This allows easier extension of this function without having too long of
|
||||
arguments list.
|
||||
---
|
||||
include/grub/util/mkimage.h | 8 ++++----
|
||||
util/grub-mkimagexx.c | 35 ++++++++++++++++++-----------------
|
||||
util/mkimage.c | 4 ++--
|
||||
3 files changed, 24 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/include/grub/util/mkimage.h b/include/grub/util/mkimage.h
|
||||
index 1a18708a8..b3a5ca132 100644
|
||||
--- a/include/grub/util/mkimage.h
|
||||
+++ b/include/grub/util/mkimage.h
|
||||
@@ -51,13 +51,13 @@ grub_mkimage_load_image64 (const char *kernel_path,
|
||||
void
|
||||
grub_mkimage_generate_elf32 (const struct grub_install_image_target_desc *image_target,
|
||||
int note, char **core_img, size_t *core_size,
|
||||
- Elf32_Addr target_addr, grub_size_t align,
|
||||
- size_t kernel_size, size_t bss_size);
|
||||
+ Elf32_Addr target_addr,
|
||||
+ struct grub_mkimage_layout *layout);
|
||||
void
|
||||
grub_mkimage_generate_elf64 (const struct grub_install_image_target_desc *image_target,
|
||||
int note, char **core_img, size_t *core_size,
|
||||
- Elf64_Addr target_addr, grub_size_t align,
|
||||
- size_t kernel_size, size_t bss_size);
|
||||
+ Elf64_Addr target_addr,
|
||||
+ struct grub_mkimage_layout *layout);
|
||||
|
||||
struct grub_install_image_target_desc
|
||||
{
|
||||
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||
index e63f148e4..3fab93e20 100644
|
||||
--- a/util/grub-mkimagexx.c
|
||||
+++ b/util/grub-mkimagexx.c
|
||||
@@ -185,8 +185,8 @@ grub_arm_reloc_jump24 (grub_uint32_t *target, Elf32_Addr sym_addr)
|
||||
void
|
||||
SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc *image_target,
|
||||
int note, char **core_img, size_t *core_size,
|
||||
- Elf_Addr target_addr, grub_size_t align,
|
||||
- size_t kernel_size, size_t bss_size)
|
||||
+ Elf_Addr target_addr,
|
||||
+ struct grub_mkimage_layout *layout)
|
||||
{
|
||||
char *elf_img;
|
||||
size_t program_size;
|
||||
@@ -214,7 +214,7 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
footer_size += XEN_NOTE_SIZE;
|
||||
}
|
||||
header_size = ALIGN_UP (sizeof (*ehdr) + phnum * sizeof (*phdr)
|
||||
- + shnum * sizeof (*shdr) + string_size, align);
|
||||
+ + shnum * sizeof (*shdr) + string_size, layout->align);
|
||||
|
||||
program_size = ALIGN_ADDR (*core_size);
|
||||
|
||||
@@ -258,7 +258,8 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
ehdr->e_entry = grub_host_to_target32 (target_addr);
|
||||
phdr->p_vaddr = grub_host_to_target32 (target_addr);
|
||||
phdr->p_paddr = grub_host_to_target32 (target_addr);
|
||||
- phdr->p_align = grub_host_to_target32 (align > image_target->link_align ? align : image_target->link_align);
|
||||
+ phdr->p_align = grub_host_to_target32 (layout->align > image_target->link_align ?
|
||||
+ layout->align : image_target->link_align);
|
||||
if (image_target->id == IMAGE_LOONGSON_ELF)
|
||||
ehdr->e_flags = grub_host_to_target32 (0x1000 | EF_MIPS_NOREORDER
|
||||
| EF_MIPS_PIC | EF_MIPS_CPIC);
|
||||
@@ -272,27 +273,27 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
else
|
||||
{
|
||||
grub_uint32_t target_addr_mods;
|
||||
- phdr->p_filesz = grub_host_to_target32 (kernel_size);
|
||||
- phdr->p_memsz = grub_host_to_target32 (kernel_size + bss_size);
|
||||
+ phdr->p_filesz = grub_host_to_target32 (layout->kernel_size);
|
||||
+ phdr->p_memsz = grub_host_to_target32 (layout->kernel_size + layout->bss_size);
|
||||
|
||||
phdr++;
|
||||
phdr->p_type = grub_host_to_target32 (PT_GNU_STACK);
|
||||
- phdr->p_offset = grub_host_to_target32 (header_size + kernel_size);
|
||||
+ phdr->p_offset = grub_host_to_target32 (header_size + layout->kernel_size);
|
||||
phdr->p_paddr = phdr->p_vaddr = phdr->p_filesz = phdr->p_memsz = 0;
|
||||
phdr->p_flags = grub_host_to_target32 (PF_R | PF_W | PF_X);
|
||||
phdr->p_align = grub_host_to_target32 (image_target->link_align);
|
||||
|
||||
phdr++;
|
||||
phdr->p_type = grub_host_to_target32 (PT_LOAD);
|
||||
- phdr->p_offset = grub_host_to_target32 (header_size + kernel_size);
|
||||
+ phdr->p_offset = grub_host_to_target32 (header_size + layout->kernel_size);
|
||||
phdr->p_flags = grub_host_to_target32 (PF_R | PF_W | PF_X);
|
||||
phdr->p_filesz = phdr->p_memsz
|
||||
- = grub_host_to_target32 (*core_size - kernel_size);
|
||||
+ = grub_host_to_target32 (*core_size - layout->kernel_size);
|
||||
|
||||
if (image_target->id == IMAGE_COREBOOT)
|
||||
target_addr_mods = GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR;
|
||||
else
|
||||
- target_addr_mods = ALIGN_UP (target_addr + kernel_size + bss_size
|
||||
+ target_addr_mods = ALIGN_UP (target_addr + layout->kernel_size + layout->bss_size
|
||||
+ image_target->mod_gap,
|
||||
image_target->mod_align);
|
||||
phdr->p_vaddr = grub_host_to_target_addr (target_addr_mods);
|
||||
@@ -434,7 +435,7 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
shdr->sh_size = grub_host_to_target32 (string_size);
|
||||
shdr->sh_link = grub_host_to_target32 (0);
|
||||
shdr->sh_info = grub_host_to_target32 (0);
|
||||
- shdr->sh_addralign = grub_host_to_target32 (align);
|
||||
+ shdr->sh_addralign = grub_host_to_target32 (layout->align);
|
||||
shdr->sh_entsize = grub_host_to_target32 (0);
|
||||
shdr++;
|
||||
|
||||
@@ -445,10 +446,10 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
shdr->sh_type = grub_host_to_target32 (SHT_PROGBITS);
|
||||
shdr->sh_addr = grub_host_to_target_addr (target_addr);
|
||||
shdr->sh_offset = grub_host_to_target_addr (header_size);
|
||||
- shdr->sh_size = grub_host_to_target32 (kernel_size);
|
||||
+ shdr->sh_size = grub_host_to_target32 (layout->kernel_size);
|
||||
shdr->sh_link = grub_host_to_target32 (0);
|
||||
shdr->sh_info = grub_host_to_target32 (0);
|
||||
- shdr->sh_addralign = grub_host_to_target32 (align);
|
||||
+ shdr->sh_addralign = grub_host_to_target32 (layout->align);
|
||||
shdr->sh_entsize = grub_host_to_target32 (0);
|
||||
shdr++;
|
||||
|
||||
@@ -456,9 +457,9 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
shdr->sh_name = grub_host_to_target32 (ptr - str_start);
|
||||
ptr += sizeof ("mods");
|
||||
shdr->sh_type = grub_host_to_target32 (SHT_PROGBITS);
|
||||
- shdr->sh_addr = grub_host_to_target_addr (target_addr + kernel_size);
|
||||
- shdr->sh_offset = grub_host_to_target_addr (header_size + kernel_size);
|
||||
- shdr->sh_size = grub_host_to_target32 (*core_size - kernel_size);
|
||||
+ shdr->sh_addr = grub_host_to_target_addr (target_addr + layout->kernel_size);
|
||||
+ shdr->sh_offset = grub_host_to_target_addr (header_size + layout->kernel_size);
|
||||
+ shdr->sh_size = grub_host_to_target32 (*core_size - layout->kernel_size);
|
||||
shdr->sh_link = grub_host_to_target32 (0);
|
||||
shdr->sh_info = grub_host_to_target32 (0);
|
||||
shdr->sh_addralign = grub_host_to_target32 (image_target->voidp_sizeof);
|
||||
@@ -471,7 +472,7 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
shdr->sh_name = grub_host_to_target32 (ptr - str_start);
|
||||
ptr += sizeof (".xen");
|
||||
shdr->sh_type = grub_host_to_target32 (SHT_PROGBITS);
|
||||
- shdr->sh_addr = grub_host_to_target_addr (target_addr + kernel_size);
|
||||
+ shdr->sh_addr = grub_host_to_target_addr (target_addr + layout->kernel_size);
|
||||
shdr->sh_offset = grub_host_to_target_addr (program_size + header_size);
|
||||
shdr->sh_size = grub_host_to_target32 (XEN_NOTE_SIZE);
|
||||
shdr->sh_link = grub_host_to_target32 (0);
|
||||
diff --git a/util/mkimage.c b/util/mkimage.c
|
||||
index 9ad4cfe42..528166c87 100644
|
||||
--- a/util/mkimage.c
|
||||
+++ b/util/mkimage.c
|
||||
@@ -1638,10 +1638,10 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
target_addr = image_target->link_addr;
|
||||
if (image_target->voidp_sizeof == 4)
|
||||
grub_mkimage_generate_elf32 (image_target, note, &core_img, &core_size,
|
||||
- target_addr, layout.align, layout.kernel_size, layout.bss_size);
|
||||
+ target_addr, &layout);
|
||||
else
|
||||
grub_mkimage_generate_elf64 (image_target, note, &core_img, &core_size,
|
||||
- target_addr, layout.align, layout.kernel_size, layout.bss_size);
|
||||
+ target_addr, &layout);
|
||||
}
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,23 +1,26 @@
|
|||
From bcb1f1a6a5530ecbc4b674e61acbb406592714c6 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Date: Wed, 19 Sep 2012 21:22:55 -0300
|
||||
Subject: [PATCH 082/194] Add fw_path variable (revised)
|
||||
Subject: [PATCH] Add fw_path variable (revised)
|
||||
|
||||
This patch makes grub look for its config file on efi where the app was
|
||||
found. It was originally written by Matthew Garrett, and adapted to fix the
|
||||
"No modules are loaded on grub2 network boot" issue:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=857936
|
||||
|
||||
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/kern/main.c | 13 ++++++-------
|
||||
grub-core/normal/main.c | 25 ++++++++++++++++++++++++-
|
||||
2 files changed, 30 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 9cad0c448..8ab7794c4 100644
|
||||
index 731c07c2901..463dafdba02 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -127,16 +127,15 @@ grub_set_prefix_and_root (void)
|
||||
@@ -128,16 +128,15 @@ grub_set_prefix_and_root (void)
|
||||
|
||||
grub_machine_get_bootlocation (&fwdevice, &fwpath);
|
||||
|
||||
|
|
@ -41,10 +44,10 @@ index 9cad0c448..8ab7794c4 100644
|
|||
}
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 249e19bc7..759c475c4 100644
|
||||
index d3f53d93d87..08f48c71df1 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -338,7 +338,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -339,7 +339,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
/* Guess the config filename. It is necessary to make CONFIG static,
|
||||
so that it won't get broken by longjmp. */
|
||||
char *config;
|
||||
|
|
@ -59,7 +62,7 @@ index 249e19bc7..759c475c4 100644
|
|||
+ {
|
||||
+ grub_file_t file;
|
||||
+
|
||||
+ file = grub_file_open (config);
|
||||
+ file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
+ if (file)
|
||||
+ {
|
||||
+ grub_file_close (file);
|
||||
|
|
@ -76,6 +79,3 @@ index 249e19bc7..759c475c4 100644
|
|||
|
||||
prefix = grub_env_get ("prefix");
|
||||
if (prefix)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,404 +0,0 @@
|
|||
From d08c9685149e7788001ac9a209baa1d84c3628e0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 17:47:57 +0200
|
||||
Subject: [PATCH 015/194] Refactor arm-uboot code to make it genereic.
|
||||
|
||||
arm-coreboot startup code can be very similar to arm-uboot but current code has
|
||||
U-Boot specific references. So split U-Boot part from generic part.
|
||||
---
|
||||
grub-core/Makefile.core.def | 4 +-
|
||||
grub-core/kern/arm/{uboot => }/startup.S | 64 ++++------------------------
|
||||
grub-core/kern/arm/uboot/init.c | 70 ++++++++++++++++++++++++++++++
|
||||
grub-core/kern/arm/uboot/uboot.S | 73 ++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/uboot/init.c | 16 -------
|
||||
grub-core/kern/uboot/uboot.c | 35 ---------------
|
||||
include/grub/arm/startup.h | 16 +++++++
|
||||
7 files changed, 170 insertions(+), 108 deletions(-)
|
||||
rename grub-core/kern/arm/{uboot => }/startup.S (77%)
|
||||
create mode 100644 grub-core/kern/arm/uboot/init.c
|
||||
create mode 100644 grub-core/kern/arm/uboot/uboot.S
|
||||
create mode 100644 include/grub/arm/startup.h
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 8dcd0e5a9..fb59a7b1d 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -105,7 +105,7 @@ kernel = {
|
||||
mips_startup = kern/mips/startup.S;
|
||||
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
|
||||
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
|
||||
- arm_uboot_startup = kern/arm/uboot/startup.S;
|
||||
+ arm_uboot_startup = kern/arm/startup.S;
|
||||
arm_efi_startup = kern/arm/efi/startup.S;
|
||||
arm64_efi_startup = kern/arm64/efi/startup.S;
|
||||
|
||||
@@ -149,6 +149,8 @@ kernel = {
|
||||
uboot = kern/uboot/init.c;
|
||||
uboot = kern/uboot/hw.c;
|
||||
uboot = term/uboot/console.c;
|
||||
+ arm_uboot = kern/arm/uboot/init.c;
|
||||
+ arm_uboot = kern/arm/uboot/uboot.S;
|
||||
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
diff --git a/grub-core/kern/arm/uboot/startup.S b/grub-core/kern/arm/startup.S
|
||||
similarity index 77%
|
||||
rename from grub-core/kern/arm/uboot/startup.S
|
||||
rename to grub-core/kern/arm/startup.S
|
||||
index 5efaae16e..640837cba 100644
|
||||
--- a/grub-core/kern/arm/uboot/startup.S
|
||||
+++ b/grub-core/kern/arm/startup.S
|
||||
@@ -86,7 +86,7 @@ FUNCTION(codestart)
|
||||
@ Stack pointer used as start address for signature probing
|
||||
mov r12, sp
|
||||
adr sp, entry_state
|
||||
- push {r1-r12,lr} @ store U-Boot context (sp in r12)
|
||||
+ push {r0-r12,lr} @ store U-Boot context (sp in r12)
|
||||
|
||||
adr r1, _start
|
||||
ldr r0, bss_start_ptr @ src
|
||||
@@ -153,69 +153,21 @@ reloc_done:
|
||||
|
||||
b EXT_C(grub_main)
|
||||
|
||||
- /*
|
||||
- * uboot_syscall():
|
||||
- * This function is effectively a veneer, so it cannot
|
||||
- * modify the stack or corrupt any registers other than
|
||||
- * r12 (ip). Furthermore it needs to restore r8 for
|
||||
- * U-Boot (Global Data Pointer) and preserve it for Grub.
|
||||
- */
|
||||
-FUNCTION(grub_uboot_syscall)
|
||||
- str r8, transition_space
|
||||
- str lr, transition_space + 4
|
||||
- str r9, transition_space + 8
|
||||
-
|
||||
- ldr r8, gd_backup
|
||||
- ldr r9, gd_backup + 4
|
||||
-
|
||||
- bl do_syscall
|
||||
-
|
||||
- ldr r8, transition_space
|
||||
- ldr lr, transition_space + 4
|
||||
- ldr r9, transition_space + 8
|
||||
-
|
||||
- bx lr
|
||||
-do_syscall:
|
||||
-
|
||||
- ldr ip, grub_uboot_syscall_ptr
|
||||
- bx ip
|
||||
-
|
||||
-FUNCTION(grub_uboot_return)
|
||||
- adr sp, entry_state_end
|
||||
- pop {r4-r12, lr}
|
||||
- mov sp, r12
|
||||
- bx lr
|
||||
-
|
||||
-
|
||||
.align 3
|
||||
-@ U-boot context stack space
|
||||
-entry_state_end:
|
||||
-VARIABLE(grub_uboot_machine_type)
|
||||
+@ U-boot/coreboot context stack space
|
||||
+VARIABLE(grub_arm_saved_registers)
|
||||
+ .long 0 @ r0
|
||||
.long 0 @ r1
|
||||
-VARIABLE(grub_uboot_boot_data)
|
||||
.long 0 @ r2
|
||||
.long 0 @ r3
|
||||
.long 0 @ r4
|
||||
.long 0 @ r5
|
||||
.long 0 @ r6
|
||||
.long 0 @ r7
|
||||
-gd_backup:
|
||||
- .long 0 @ r8 - U-Boot global data pointer up to 2013-09-21
|
||||
- .long 0 @ r9 - U-Boot global data pointer 2013-09-21 onwards
|
||||
+ .long 0 @ r8
|
||||
+ .long 0 @ r9
|
||||
.long 0 @ r10
|
||||
.long 0 @ r11
|
||||
-VARIABLE(grub_uboot_search_hint)@ U-Boot stack pointer -
|
||||
- .long 0 @ also API signature address hint.
|
||||
- .long 0 @ lr
|
||||
-entry_state: @ backup for U-Boot context
|
||||
-
|
||||
-@ GRUB context stack space
|
||||
-transition_space:
|
||||
- .long 0 @ r8
|
||||
+ .long 0 @ sp
|
||||
.long 0 @ lr
|
||||
- .long 0 @ r9
|
||||
-
|
||||
-VARIABLE(grub_uboot_syscall_ptr)
|
||||
- .long 0 @
|
||||
-
|
||||
- END
|
||||
+entry_state:
|
||||
diff --git a/grub-core/kern/arm/uboot/init.c b/grub-core/kern/arm/uboot/init.c
|
||||
new file mode 100644
|
||||
index 000000000..2a6aa3fdd
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/uboot/init.c
|
||||
@@ -0,0 +1,70 @@
|
||||
+/* init.c - generic U-Boot initialization and finalization */
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2016 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/uboot/uboot.h>
|
||||
+#include <grub/arm/startup.h>
|
||||
+#include <grub/uboot/api_public.h>
|
||||
+
|
||||
+extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
+
|
||||
+grub_uint32_t
|
||||
+grub_uboot_get_machine_type (void)
|
||||
+{
|
||||
+ return grub_arm_saved_registers.r[1];
|
||||
+}
|
||||
+
|
||||
+grub_addr_t
|
||||
+grub_uboot_get_boot_data (void)
|
||||
+{
|
||||
+ return grub_arm_saved_registers.r[2];
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+grub_uboot_api_init (void)
|
||||
+{
|
||||
+ struct api_signature *start, *end;
|
||||
+ struct api_signature *p;
|
||||
+ grub_addr_t grub_uboot_search_hint = grub_arm_saved_registers.sp;
|
||||
+ if (grub_uboot_search_hint)
|
||||
+ {
|
||||
+ /* Extended search range to work around Trim Slice U-Boot issue */
|
||||
+ start = (struct api_signature *) ((grub_uboot_search_hint & ~0x000fffff)
|
||||
+ - 0x00500000);
|
||||
+ end =
|
||||
+ (struct api_signature *) ((grub_addr_t) start + UBOOT_API_SEARCH_LEN -
|
||||
+ API_SIG_MAGLEN + 0x00500000);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ start = 0;
|
||||
+ end = (struct api_signature *) (256 * 1024 * 1024);
|
||||
+ }
|
||||
+
|
||||
+ /* Structure alignment is (at least) 8 bytes */
|
||||
+ for (p = start; p < end; p = (void *) ((grub_addr_t) p + 8))
|
||||
+ {
|
||||
+ if (grub_memcmp (&(p->magic), API_SIG_MAGIC, API_SIG_MAGLEN) == 0)
|
||||
+ {
|
||||
+ grub_uboot_syscall_ptr = p->syscall;
|
||||
+ return p->version;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/uboot/uboot.S b/grub-core/kern/arm/uboot/uboot.S
|
||||
new file mode 100644
|
||||
index 000000000..d128775f1
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/uboot/uboot.S
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * 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/offsets.h>
|
||||
+#include <grub/symbol.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+
|
||||
+ /*
|
||||
+ * uboot_syscall():
|
||||
+ * This function is effectively a veneer, so it cannot
|
||||
+ * modify the stack or corrupt any registers other than
|
||||
+ * r12 (ip). Furthermore it needs to restore r8 for
|
||||
+ * U-Boot (Global Data Pointer) and preserve it for Grub.
|
||||
+ */
|
||||
+FUNCTION(grub_uboot_syscall)
|
||||
+ str r8, transition_space
|
||||
+ str lr, transition_space + 4
|
||||
+ str r9, transition_space + 8
|
||||
+
|
||||
+ ldr ip, saved_registers_ptr
|
||||
+ ldr r8, [ip, #4 * 8]
|
||||
+ ldr r9, [ip, #4 * 9]
|
||||
+
|
||||
+ bl do_syscall
|
||||
+
|
||||
+ ldr r8, transition_space
|
||||
+ ldr lr, transition_space + 4
|
||||
+ ldr r9, transition_space + 8
|
||||
+
|
||||
+ bx lr
|
||||
+do_syscall:
|
||||
+
|
||||
+ ldr ip, grub_uboot_syscall_ptr
|
||||
+ bx ip
|
||||
+
|
||||
+FUNCTION(grub_uboot_return)
|
||||
+ ldr ip, saved_registers_ptr
|
||||
+ ldr sp, [ip, #4 * 4]
|
||||
+ pop {r4-r12, lr}
|
||||
+ mov sp, r12
|
||||
+ bx lr
|
||||
+
|
||||
+
|
||||
+ .align 3
|
||||
+
|
||||
+@ GRUB context stack space
|
||||
+transition_space:
|
||||
+ .long 0 @ r8
|
||||
+ .long 0 @ lr
|
||||
+ .long 0 @ r9
|
||||
+
|
||||
+saved_registers_ptr:
|
||||
+ .long EXT_C(grub_arm_saved_registers)
|
||||
+
|
||||
+VARIABLE(grub_uboot_syscall_ptr)
|
||||
+ .long 0 @
|
||||
+
|
||||
+ END
|
||||
diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
|
||||
index 5dcc106ed..3e338645c 100644
|
||||
--- a/grub-core/kern/uboot/init.c
|
||||
+++ b/grub-core/kern/uboot/init.c
|
||||
@@ -36,30 +36,14 @@
|
||||
extern char __bss_start[];
|
||||
extern char _end[];
|
||||
extern grub_size_t grub_total_module_size;
|
||||
-extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
static unsigned long timer_start;
|
||||
|
||||
-extern grub_uint32_t grub_uboot_machine_type;
|
||||
-extern grub_addr_t grub_uboot_boot_data;
|
||||
-
|
||||
void
|
||||
grub_exit (void)
|
||||
{
|
||||
grub_uboot_return (0);
|
||||
}
|
||||
|
||||
-grub_uint32_t
|
||||
-grub_uboot_get_machine_type (void)
|
||||
-{
|
||||
- return grub_uboot_machine_type;
|
||||
-}
|
||||
-
|
||||
-grub_addr_t
|
||||
-grub_uboot_get_boot_data (void)
|
||||
-{
|
||||
- return grub_uboot_boot_data;
|
||||
-}
|
||||
-
|
||||
static grub_uint64_t
|
||||
uboot_timer_ms (void)
|
||||
{
|
||||
diff --git a/grub-core/kern/uboot/uboot.c b/grub-core/kern/uboot/uboot.c
|
||||
index 6800a4beb..cf0168e62 100644
|
||||
--- a/grub-core/kern/uboot/uboot.c
|
||||
+++ b/grub-core/kern/uboot/uboot.c
|
||||
@@ -39,48 +39,13 @@
|
||||
* returns: 0 if the call not found, 1 if serviced
|
||||
*/
|
||||
|
||||
-extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
extern int grub_uboot_syscall (int, int *, ...);
|
||||
-extern grub_addr_t grub_uboot_search_hint;
|
||||
|
||||
static struct sys_info uboot_sys_info;
|
||||
static struct mem_region uboot_mem_info[5];
|
||||
static struct device_info * devices;
|
||||
static int num_devices;
|
||||
|
||||
-int
|
||||
-grub_uboot_api_init (void)
|
||||
-{
|
||||
- struct api_signature *start, *end;
|
||||
- struct api_signature *p;
|
||||
-
|
||||
- if (grub_uboot_search_hint)
|
||||
- {
|
||||
- /* Extended search range to work around Trim Slice U-Boot issue */
|
||||
- start = (struct api_signature *) ((grub_uboot_search_hint & ~0x000fffff)
|
||||
- - 0x00500000);
|
||||
- end =
|
||||
- (struct api_signature *) ((grub_addr_t) start + UBOOT_API_SEARCH_LEN -
|
||||
- API_SIG_MAGLEN + 0x00500000);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- start = 0;
|
||||
- end = (struct api_signature *) (256 * 1024 * 1024);
|
||||
- }
|
||||
-
|
||||
- /* Structure alignment is (at least) 8 bytes */
|
||||
- for (p = start; p < end; p = (void *) ((grub_addr_t) p + 8))
|
||||
- {
|
||||
- if (grub_memcmp (&(p->magic), API_SIG_MAGIC, API_SIG_MAGLEN) == 0)
|
||||
- {
|
||||
- grub_uboot_syscall_ptr = p->syscall;
|
||||
- return p->version;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
|
||||
/*
|
||||
* All functions below are wrappers around the grub_uboot_syscall() function
|
||||
diff --git a/include/grub/arm/startup.h b/include/grub/arm/startup.h
|
||||
new file mode 100644
|
||||
index 000000000..9afb6c57c
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm/startup.h
|
||||
@@ -0,0 +1,16 @@
|
||||
+#ifndef GRUB_STARTUP_CPU_HEADER
|
||||
+#define GRUB_STARTUP_CPU_HEADER
|
||||
+
|
||||
+struct grub_arm_startup_registers
|
||||
+{
|
||||
+ /* registers 0-11 */
|
||||
+ /* for U-boot r[1] is machine type */
|
||||
+ /* for U-boot r[2] is boot data */
|
||||
+ grub_uint32_t r[12];
|
||||
+ grub_uint32_t sp;
|
||||
+ grub_uint32_t lr;
|
||||
+};
|
||||
+
|
||||
+extern struct grub_arm_startup_registers grub_arm_saved_registers;
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,20 +1,22 @@
|
|||
From cc8be4cafeb5a0af779afe5d2856da434c165612 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 1 Oct 2012 13:24:37 -0400
|
||||
Subject: [PATCH 086/194] Pass "\x[[:hex:]][[:hex:]]" straight through
|
||||
unmolested.
|
||||
Subject: [PATCH] Pass "\x[[:hex:]][[:hex:]]" straight through unmolested.
|
||||
|
||||
Don't munge raw spaces when we're doing our cmdline escaping (#923374)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/commands/wildcard.c | 16 +++++++++++++++-
|
||||
grub-core/lib/cmdline.c | 34 ++++++++++++++++++++++++++++++++--
|
||||
grub-core/lib/cmdline.c | 25 +++++++++++++++++++++++--
|
||||
grub-core/script/execute.c | 43 +++++++++++++++++++++++++++++++++++++------
|
||||
3 files changed, 84 insertions(+), 9 deletions(-)
|
||||
3 files changed, 75 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c
|
||||
index 9b4e72766..02c46f9fd 100644
|
||||
index ed65865050a..5455242c352 100644
|
||||
--- a/grub-core/commands/wildcard.c
|
||||
+++ b/grub-core/commands/wildcard.c
|
||||
@@ -462,6 +462,12 @@ check_file (const char *dir, const char *basename)
|
||||
@@ -488,6 +488,12 @@ check_file (const char *dir, const char *basename)
|
||||
return ctx.found;
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +29,7 @@ index 9b4e72766..02c46f9fd 100644
|
|||
static void
|
||||
unescape (char *out, const char *in, const char *end)
|
||||
{
|
||||
@@ -470,7 +476,15 @@ unescape (char *out, const char *in, const char *end)
|
||||
@@ -496,7 +502,15 @@ unescape (char *out, const char *in, const char *end)
|
||||
|
||||
for (optr = out, iptr = in; iptr < end;)
|
||||
{
|
||||
|
|
@ -45,7 +47,7 @@ index 9b4e72766..02c46f9fd 100644
|
|||
*optr++ = iptr[1];
|
||||
iptr += 2;
|
||||
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
|
||||
index d5e10ee87..0a5b2afb9 100644
|
||||
index ed0b149dca5..8e2294d8ff6 100644
|
||||
--- a/grub-core/lib/cmdline.c
|
||||
+++ b/grub-core/lib/cmdline.c
|
||||
@@ -20,6 +20,12 @@
|
||||
|
|
@ -76,21 +78,12 @@ index d5e10ee87..0a5b2afb9 100644
|
|||
size++;
|
||||
else if (*c == ' ')
|
||||
space = 1;
|
||||
@@ -85,7 +97,25 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
||||
@@ -86,7 +98,16 @@ grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
||||
|
||||
while (*c)
|
||||
{
|
||||
- if (*c == '\\' || *c == '\'' || *c == '"')
|
||||
+ if (*c == ' ')
|
||||
+ {
|
||||
+ *buf++ = '\\';
|
||||
+ *buf++ = 'x';
|
||||
+ *buf++ = '2';
|
||||
+ *buf++ = '0';
|
||||
+ c++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if (*c == '\\' && *(c+1) == 'x' &&
|
||||
+ if (*c == '\\' && *(c+1) == 'x' &&
|
||||
+ is_hex(*(c+2)) && is_hex(*(c+3)))
|
||||
+ {
|
||||
+ *buf++ = *c++;
|
||||
|
|
@ -104,10 +97,10 @@ index d5e10ee87..0a5b2afb9 100644
|
|||
|
||||
*buf++ = *c;
|
||||
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
|
||||
index ab78ca87f..cf6cd6601 100644
|
||||
index dab8fd2aeb0..c19b4bf700e 100644
|
||||
--- a/grub-core/script/execute.c
|
||||
+++ b/grub-core/script/execute.c
|
||||
@@ -55,6 +55,12 @@ static struct grub_script_scope *scope = 0;
|
||||
@@ -56,6 +56,12 @@ static struct grub_script_scope *scope = 0;
|
||||
/* Wildcard translator for GRUB script. */
|
||||
struct grub_script_wildcard_translator *grub_wildcard_translator;
|
||||
|
||||
|
|
@ -120,7 +113,7 @@ index ab78ca87f..cf6cd6601 100644
|
|||
static char*
|
||||
wildcard_escape (const char *s)
|
||||
{
|
||||
@@ -71,7 +77,15 @@ wildcard_escape (const char *s)
|
||||
@@ -72,7 +78,15 @@ wildcard_escape (const char *s)
|
||||
i = 0;
|
||||
while ((ch = *s++))
|
||||
{
|
||||
|
|
@ -137,7 +130,7 @@ index ab78ca87f..cf6cd6601 100644
|
|||
p[i++] = '\\';
|
||||
p[i++] = ch;
|
||||
}
|
||||
@@ -95,7 +109,14 @@ wildcard_unescape (const char *s)
|
||||
@@ -96,7 +110,14 @@ wildcard_unescape (const char *s)
|
||||
i = 0;
|
||||
while ((ch = *s++))
|
||||
{
|
||||
|
|
@ -153,7 +146,7 @@ index ab78ca87f..cf6cd6601 100644
|
|||
p[i++] = *s++;
|
||||
else
|
||||
p[i++] = ch;
|
||||
@@ -397,10 +418,20 @@ parse_string (const char *str,
|
||||
@@ -398,10 +419,20 @@ parse_string (const char *str,
|
||||
switch (*ptr)
|
||||
{
|
||||
case '\\':
|
||||
|
|
@ -178,6 +171,3 @@ index ab78ca87f..cf6cd6601 100644
|
|||
break;
|
||||
case '$':
|
||||
if (escaped)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,344 +0,0 @@
|
|||
From 461bfab7b7e47fd0a76bf6076a438af1b7e2184a Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 19:06:22 +0200
|
||||
Subject: [PATCH 016/194] coreboot: Split parts that are platform-independent.
|
||||
|
||||
We currently assume that coreboot is always i386, it's no longer the case,
|
||||
so split i386-coreboot parts from generic coreboot code.
|
||||
---
|
||||
grub-core/Makefile.am | 2 +-
|
||||
grub-core/Makefile.core.def | 6 +-
|
||||
grub-core/commands/i386/coreboot/cb_timestamps.c | 2 +-
|
||||
grub-core/commands/i386/coreboot/cbls.c | 2 +-
|
||||
grub-core/kern/coreboot/cbtable.c | 70 ++++++++++++++++++++++++
|
||||
grub-core/kern/{i386 => }/coreboot/mmap.c | 6 +-
|
||||
grub-core/kern/i386/coreboot/cbtable.c | 53 +++---------------
|
||||
grub-core/term/i386/coreboot/cbmemc.c | 2 +-
|
||||
grub-core/video/{i386 => }/coreboot/cbfb.c | 2 +-
|
||||
include/grub/{i386 => }/coreboot/lbio.h | 9 +++
|
||||
10 files changed, 99 insertions(+), 55 deletions(-)
|
||||
create mode 100644 grub-core/kern/coreboot/cbtable.c
|
||||
rename grub-core/kern/{i386 => }/coreboot/mmap.c (97%)
|
||||
rename grub-core/video/{i386 => }/coreboot/cbfb.c (99%)
|
||||
rename include/grub/{i386 => }/coreboot/lbio.h (93%)
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 809a8aa26..781d0ffbf 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -112,7 +112,7 @@ endif
|
||||
|
||||
if COND_i386_coreboot
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/coreboot/lbio.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/coreboot/lbio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index fb59a7b1d..45ed0fa6b 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -166,7 +166,7 @@ kernel = {
|
||||
i386_multiboot = kern/i386/coreboot/init.c;
|
||||
i386_qemu = kern/i386/qemu/init.c;
|
||||
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
|
||||
- i386_coreboot = video/i386/coreboot/cbfb.c;
|
||||
+ i386_coreboot = video/coreboot/cbfb.c;
|
||||
|
||||
efi = disk/efi/efidisk.c;
|
||||
efi = kern/efi/efi.c;
|
||||
@@ -227,8 +227,9 @@ kernel = {
|
||||
i386_qemu = kern/vga_init.c;
|
||||
i386_qemu = kern/i386/qemu/mmap.c;
|
||||
|
||||
- i386_coreboot = kern/i386/coreboot/mmap.c;
|
||||
+ i386_coreboot = kern/coreboot/mmap.c;
|
||||
i386_coreboot = kern/i386/coreboot/cbtable.c;
|
||||
+ i386_coreboot = kern/coreboot/cbtable.c;
|
||||
|
||||
i386_multiboot = kern/i386/multiboot_mmap.c;
|
||||
|
||||
@@ -643,6 +644,7 @@ module = {
|
||||
module = {
|
||||
name = cbtable;
|
||||
common = kern/i386/coreboot/cbtable.c;
|
||||
+ common = kern/coreboot/cbtable.c;
|
||||
enable = i386_pc;
|
||||
enable = i386_efi;
|
||||
enable = i386_qemu;
|
||||
diff --git a/grub-core/commands/i386/coreboot/cb_timestamps.c b/grub-core/commands/i386/coreboot/cb_timestamps.c
|
||||
index e72f38d6e..e97ea6bed 100644
|
||||
--- a/grub-core/commands/i386/coreboot/cb_timestamps.c
|
||||
+++ b/grub-core/commands/i386/coreboot/cb_timestamps.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
-#include <grub/i386/coreboot/lbio.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/i386/tsc.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
diff --git a/grub-core/commands/i386/coreboot/cbls.c b/grub-core/commands/i386/coreboot/cbls.c
|
||||
index e0a10596f..102291f42 100644
|
||||
--- a/grub-core/commands/i386/coreboot/cbls.c
|
||||
+++ b/grub-core/commands/i386/coreboot/cbls.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
-#include <grub/i386/coreboot/lbio.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/i386/tsc.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
diff --git a/grub-core/kern/coreboot/cbtable.c b/grub-core/kern/coreboot/cbtable.c
|
||||
new file mode 100644
|
||||
index 000000000..996d3f407
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/coreboot/cbtable.c
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2007,2008,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/i386/coreboot/memory.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/dl.h>
|
||||
+
|
||||
+/* Helper for grub_linuxbios_table_iterate. */
|
||||
+int
|
||||
+grub_linuxbios_check_signature (grub_linuxbios_table_header_t tbl_header)
|
||||
+{
|
||||
+ if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+grub_err_t
|
||||
+grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t,
|
||||
+ void *),
|
||||
+ void *hook_data)
|
||||
+{
|
||||
+ grub_linuxbios_table_header_t table_header = grub_linuxbios_get_tables ();
|
||||
+ grub_linuxbios_table_item_t table_item;
|
||||
+
|
||||
+ if (!table_header)
|
||||
+ return 0;
|
||||
+
|
||||
+signature_found:
|
||||
+
|
||||
+ table_item =
|
||||
+ (grub_linuxbios_table_item_t) ((char *) table_header +
|
||||
+ table_header->header_size);
|
||||
+ for (; table_item < (grub_linuxbios_table_item_t) ((char *) table_header
|
||||
+ + table_header->header_size
|
||||
+ + table_header->table_size);
|
||||
+ table_item = (grub_linuxbios_table_item_t) ((char *) table_item + table_item->size))
|
||||
+ {
|
||||
+ if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
|
||||
+ && grub_linuxbios_check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
+ *(grub_uint64_t *) (table_item + 1)))
|
||||
+ {
|
||||
+ table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
+ *(grub_uint64_t *) (table_item + 1);
|
||||
+ goto signature_found;
|
||||
+ }
|
||||
+ if (hook (table_item, hook_data))
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/grub-core/kern/i386/coreboot/mmap.c b/grub-core/kern/coreboot/mmap.c
|
||||
similarity index 97%
|
||||
rename from grub-core/kern/i386/coreboot/mmap.c
|
||||
rename to grub-core/kern/coreboot/mmap.c
|
||||
index 4d29f6b7d..caf8f7cef 100644
|
||||
--- a/grub-core/kern/i386/coreboot/mmap.c
|
||||
+++ b/grub-core/kern/coreboot/mmap.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <grub/machine/memory.h>
|
||||
-#include <grub/machine/lbio.h>
|
||||
+#include <grub/memory.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
@@ -49,6 +49,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
|
||||
{
|
||||
grub_uint64_t start = mem_region->addr;
|
||||
grub_uint64_t end = mem_region->addr + mem_region->size;
|
||||
+#ifdef __i386__
|
||||
/* Mark region 0xa0000 - 0x100000 as reserved. */
|
||||
if (start < 0x100000 && end >= 0xa0000
|
||||
&& mem_region->type == GRUB_MACHINE_MEMORY_AVAILABLE)
|
||||
@@ -75,6 +76,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
|
||||
if (end <= start)
|
||||
continue;
|
||||
}
|
||||
+#endif
|
||||
if (ctx->hook (start, end - start,
|
||||
/* Multiboot mmaps match with the coreboot mmap
|
||||
definition. Therefore, we can just pass type
|
||||
diff --git a/grub-core/kern/i386/coreboot/cbtable.c b/grub-core/kern/i386/coreboot/cbtable.c
|
||||
index 1669bc0ca..34a2b59be 100644
|
||||
--- a/grub-core/kern/i386/coreboot/cbtable.c
|
||||
+++ b/grub-core/kern/i386/coreboot/cbtable.c
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <grub/i386/coreboot/memory.h>
|
||||
-#include <grub/i386/coreboot/lbio.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
@@ -25,59 +25,20 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
-/* Helper for grub_linuxbios_table_iterate. */
|
||||
-static int
|
||||
-check_signature (grub_linuxbios_table_header_t tbl_header)
|
||||
-{
|
||||
- if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
|
||||
- return 1;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-grub_err_t
|
||||
-grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t,
|
||||
- void *),
|
||||
- void *hook_data)
|
||||
+grub_linuxbios_table_header_t
|
||||
+grub_linuxbios_get_tables (void)
|
||||
{
|
||||
grub_linuxbios_table_header_t table_header;
|
||||
- grub_linuxbios_table_item_t table_item;
|
||||
-
|
||||
/* Assuming table_header is aligned to its size (8 bytes). */
|
||||
-
|
||||
for (table_header = (grub_linuxbios_table_header_t) 0x500;
|
||||
table_header < (grub_linuxbios_table_header_t) 0x1000; table_header++)
|
||||
- if (check_signature (table_header))
|
||||
- goto signature_found;
|
||||
+ if (grub_linuxbios_check_signature (table_header))
|
||||
+ return table_header;
|
||||
|
||||
for (table_header = (grub_linuxbios_table_header_t) 0xf0000;
|
||||
table_header < (grub_linuxbios_table_header_t) 0x100000; table_header++)
|
||||
- if (check_signature (table_header))
|
||||
- goto signature_found;
|
||||
-
|
||||
- return 0;
|
||||
-
|
||||
-signature_found:
|
||||
-
|
||||
- table_item =
|
||||
- (grub_linuxbios_table_item_t) ((char *) table_header +
|
||||
- table_header->header_size);
|
||||
- for (; table_item < (grub_linuxbios_table_item_t) ((char *) table_header
|
||||
- + table_header->header_size
|
||||
- + table_header->table_size);
|
||||
- table_item = (grub_linuxbios_table_item_t) ((char *) table_item + table_item->size))
|
||||
- {
|
||||
- if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
|
||||
- && check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
- *(grub_uint64_t *) (table_item + 1)))
|
||||
- {
|
||||
- table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
- *(grub_uint64_t *) (table_item + 1);
|
||||
- goto signature_found;
|
||||
- }
|
||||
- if (hook (table_item, hook_data))
|
||||
- return 1;
|
||||
- }
|
||||
+ if (grub_linuxbios_check_signature (table_header))
|
||||
+ return table_header;
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/grub-core/term/i386/coreboot/cbmemc.c b/grub-core/term/i386/coreboot/cbmemc.c
|
||||
index 25e64a05c..129248c7f 100644
|
||||
--- a/grub-core/term/i386/coreboot/cbmemc.c
|
||||
+++ b/grub-core/term/i386/coreboot/cbmemc.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <grub/time.h>
|
||||
#include <grub/terminfo.h>
|
||||
#include <grub/dl.h>
|
||||
-#include <grub/i386/coreboot/lbio.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/normal.h>
|
||||
|
||||
diff --git a/grub-core/video/i386/coreboot/cbfb.c b/grub-core/video/coreboot/cbfb.c
|
||||
similarity index 99%
|
||||
rename from grub-core/video/i386/coreboot/cbfb.c
|
||||
rename to grub-core/video/coreboot/cbfb.c
|
||||
index dede0c37e..9af81fa5b 100644
|
||||
--- a/grub-core/video/i386/coreboot/cbfb.c
|
||||
+++ b/grub-core/video/coreboot/cbfb.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <grub/mm.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/video_fb.h>
|
||||
-#include <grub/machine/lbio.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
#include <grub/machine/console.h>
|
||||
|
||||
struct grub_linuxbios_table_framebuffer *grub_video_coreboot_fbtable;
|
||||
diff --git a/include/grub/i386/coreboot/lbio.h b/include/grub/coreboot/lbio.h
|
||||
similarity index 93%
|
||||
rename from include/grub/i386/coreboot/lbio.h
|
||||
rename to include/grub/coreboot/lbio.h
|
||||
index 1c3fa6f19..5076d36c7 100644
|
||||
--- a/include/grub/i386/coreboot/lbio.h
|
||||
+++ b/include/grub/coreboot/lbio.h
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef _GRUB_MACHINE_LBIO_HEADER
|
||||
#define _GRUB_MACHINE_LBIO_HEADER 1
|
||||
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/err.h>
|
||||
+
|
||||
struct grub_linuxbios_table_header
|
||||
{
|
||||
grub_uint8_t signature[4];
|
||||
@@ -102,4 +105,10 @@ EXPORT_FUNC(grub_linuxbios_table_iterate) (int (*hook) (grub_linuxbios_table_ite
|
||||
void *),
|
||||
void *hook_data);
|
||||
|
||||
+grub_linuxbios_table_header_t
|
||||
+grub_linuxbios_get_tables (void);
|
||||
+
|
||||
+int
|
||||
+grub_linuxbios_check_signature (grub_linuxbios_table_header_t tbl_header);
|
||||
+
|
||||
#endif
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 1daa716c7017f1858de117a20a31da66815435c5 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 19:31:55 +0200
|
||||
Subject: [PATCH 017/194] Rename uboot/halt.c to dummy/halt.c.
|
||||
|
||||
It's not U-Boot specific and it's a stub.
|
||||
---
|
||||
grub-core/Makefile.core.def | 2 +-
|
||||
grub-core/lib/{uboot => dummy}/halt.c | 0
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
rename grub-core/lib/{uboot => dummy}/halt.c (100%)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 45ed0fa6b..2a38bd4bc 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -841,7 +841,7 @@ module = {
|
||||
efi = lib/efi/halt.c;
|
||||
ieee1275 = lib/ieee1275/halt.c;
|
||||
emu = lib/emu/halt.c;
|
||||
- uboot = lib/uboot/halt.c;
|
||||
+ uboot = lib/dummy/halt.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/lib/uboot/halt.c b/grub-core/lib/dummy/halt.c
|
||||
similarity index 100%
|
||||
rename from grub-core/lib/uboot/halt.c
|
||||
rename to grub-core/lib/dummy/halt.c
|
||||
--
|
||||
2.13.5
|
||||
|
||||
1609
0017-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch
Normal file
1609
0017-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch
Normal file
File diff suppressed because it is too large
Load diff
68
0018-Add-devicetree-loading.patch
Normal file
68
0018-Add-devicetree-loading.patch
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 14 Jan 2014 13:12:23 -0500
|
||||
Subject: [PATCH] Add devicetree loading
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
|
||||
Switch to use APM Mustang device tree, for hardware testing.
|
||||
|
||||
Signed-off-by: David A. Marlin <d.marlin@redhat.com>
|
||||
|
||||
Use the default device tree from the grub default file
|
||||
|
||||
instead of hardcoding a value.
|
||||
|
||||
Signed-off-by: David A. Marlin <dmarlin@redhat.com>
|
||||
---
|
||||
util/grub-mkconfig.in | 3 ++-
|
||||
util/grub.d/10_linux.in | 15 +++++++++++++++
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 7516a015be0..7b355115dd4 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -252,7 +252,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_ENABLE_CRYPTODISK \
|
||||
GRUB_BADRAM \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
- GRUB_DISABLE_SUBMENU
|
||||
+ GRUB_DISABLE_SUBMENU \
|
||||
+ GRUB_DEFAULT_DTB
|
||||
|
||||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index cc393be7eda..00d4b220ccb 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -155,6 +155,13 @@ EOF
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
echo '$(echo "$message" | grub_quote)'
|
||||
initrd $(echo $initrd_path)
|
||||
+EOF
|
||||
+ fi
|
||||
+ if test -n "${fdt}" ; then
|
||||
+ message="$(gettext_printf "Loading fdt ...")"
|
||||
+ sed "s/^/$submenu_indentation/" << EOF
|
||||
+ echo '$(echo "$message" | grub_quote)'
|
||||
+ devicetree ${rel_dirname}/${fdt}
|
||||
EOF
|
||||
fi
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
@@ -250,6 +257,14 @@ for linux in ${reverse_sorted_list}; do
|
||||
gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
|
||||
fi
|
||||
|
||||
+ fdt=
|
||||
+ for i in "dtb-${version}" "dtb-${alt_version}"; do
|
||||
+ if test -f "${dirname}/${i}/${GRUB_DEFAULT_DTB}" ; then
|
||||
+ fdt="${i}/${GRUB_DEFAULT_DTB}"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
config=
|
||||
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
|
||||
if test -e "${i}" ; then
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
From 9808c3ef956c6472a96790b60cf74f4eaa742010 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 19:37:29 +0200
|
||||
Subject: [PATCH 018/194] Rename uboot/datetime to dummy/datetime.
|
||||
|
||||
It's just a stub and is not UBoot-specific.
|
||||
---
|
||||
grub-core/Makefile.core.def | 2 +-
|
||||
grub-core/lib/{uboot => dummy}/datetime.c | 5 ++---
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
rename grub-core/lib/{uboot => dummy}/datetime.c (91%)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 2a38bd4bc..6540dc951 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1552,7 +1552,7 @@ module = {
|
||||
name = datetime;
|
||||
cmos = lib/cmos_datetime.c;
|
||||
efi = lib/efi/datetime.c;
|
||||
- uboot = lib/uboot/datetime.c;
|
||||
+ uboot = lib/dummy/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/datetime.c;
|
||||
powerpc_ieee1275 = lib/ieee1275/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/cmos.c;
|
||||
diff --git a/grub-core/lib/uboot/datetime.c b/grub-core/lib/dummy/datetime.c
|
||||
similarity index 91%
|
||||
rename from grub-core/lib/uboot/datetime.c
|
||||
rename to grub-core/lib/dummy/datetime.c
|
||||
index 4be716928..cf693fc6b 100644
|
||||
--- a/grub-core/lib/uboot/datetime.c
|
||||
+++ b/grub-core/lib/dummy/datetime.c
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/symbol.h>
|
||||
-#include <grub/uboot/uboot.h>
|
||||
#include <grub/datetime.h>
|
||||
#include <grub/dl.h>
|
||||
|
||||
@@ -30,12 +29,12 @@ grub_err_t
|
||||
grub_get_datetime (struct grub_datetime *datetime __attribute__ ((unused)))
|
||||
{
|
||||
return grub_error (GRUB_ERR_INVALID_COMMAND,
|
||||
- "can\'t get datetime using U-Boot");
|
||||
+ "can\'t get datetime on this machine");
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_set_datetime (struct grub_datetime * datetime __attribute__ ((unused)))
|
||||
{
|
||||
return grub_error (GRUB_ERR_INVALID_COMMAND,
|
||||
- "can\'t set datetime using U-Boot");
|
||||
+ "can\'t set datetime on this machine");
|
||||
}
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From cc60fb5b7693dabcf100c910d42b3ffe1816597f Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 28 Oct 2013 10:09:27 -0400
|
||||
Subject: [PATCH 100/194] Enable pager by default. (#985860)
|
||||
Subject: [PATCH] Enable pager by default. (#985860)
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
|
|
@ -9,7 +9,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 93a90233e..858b526c9 100644
|
||||
index 6a316a5ba77..c2d8b093762 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -43,6 +43,8 @@ if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_
|
||||
|
|
@ -21,6 +21,3 @@ index 93a90233e..858b526c9 100644
|
|||
if [ -s \$prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,827 +0,0 @@
|
|||
From 24e37a885269bdec9b27babf1da0bba3692d55c0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 20:53:28 +0200
|
||||
Subject: [PATCH 019/194] arm-coreboot: Start new port.
|
||||
|
||||
---
|
||||
configure.ac | 2 +
|
||||
gentpl.py | 8 ++-
|
||||
grub-core/Makefile.am | 10 +++
|
||||
grub-core/Makefile.core.def | 18 ++++-
|
||||
grub-core/kern/arm/coreboot/cbtable.c | 40 +++++++++++
|
||||
grub-core/kern/arm/coreboot/coreboot.S | 44 ++++++++++++
|
||||
grub-core/kern/arm/coreboot/init.c | 127 +++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/arm/coreboot/timer.c | 65 +++++++++++++++++
|
||||
grub-core/kern/arm/startup.S | 4 ++
|
||||
grub-core/kern/coreboot/cbtable.c | 2 +
|
||||
grub-core/lib/dummy/reboot.c | 32 +++++++++
|
||||
grub-core/loader/arm/linux.c | 3 +
|
||||
include/grub/arm/coreboot/console.h | 29 ++++++++
|
||||
include/grub/arm/coreboot/kernel.h | 44 ++++++++++++
|
||||
include/grub/offsets.h | 6 ++
|
||||
util/grub-mkimagexx.c | 19 +++--
|
||||
util/mkimage.c | 41 ++++++++++-
|
||||
17 files changed, 482 insertions(+), 12 deletions(-)
|
||||
create mode 100644 grub-core/kern/arm/coreboot/cbtable.c
|
||||
create mode 100644 grub-core/kern/arm/coreboot/coreboot.S
|
||||
create mode 100644 grub-core/kern/arm/coreboot/init.c
|
||||
create mode 100644 grub-core/kern/arm/coreboot/timer.c
|
||||
create mode 100644 grub-core/lib/dummy/reboot.c
|
||||
create mode 100644 include/grub/arm/coreboot/console.h
|
||||
create mode 100644 include/grub/arm/coreboot/kernel.h
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ee2c86537..571f7a0b5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -167,6 +167,7 @@ case "$target_cpu"-"$platform" in
|
||||
mipsel-fuloong) platform=loongson ;;
|
||||
mipsel-loongson) ;;
|
||||
arm-uboot) ;;
|
||||
+ arm-coreboot) ;;
|
||||
arm-efi) ;;
|
||||
arm64-efi) ;;
|
||||
*-emu) ;;
|
||||
@@ -1918,6 +1919,7 @@ AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel])
|
||||
AM_CONDITIONAL([COND_mipseb], [test x$target_cpu = xmips])
|
||||
AM_CONDITIONAL([COND_arm], [test x$target_cpu = xarm ])
|
||||
AM_CONDITIONAL([COND_arm_uboot], [test x$target_cpu = xarm -a x$platform = xuboot])
|
||||
+AM_CONDITIONAL([COND_arm_coreboot], [test x$target_cpu = xarm -a x$platform = xcoreboot])
|
||||
AM_CONDITIONAL([COND_arm_efi], [test x$target_cpu = xarm -a x$platform = xefi])
|
||||
AM_CONDITIONAL([COND_arm64], [test x$target_cpu = xarm64 ])
|
||||
AM_CONDITIONAL([COND_arm64_efi], [test x$target_cpu = xarm64 -a x$platform = xefi])
|
||||
diff --git a/gentpl.py b/gentpl.py
|
||||
index f08bcc404..ed268178b 100644
|
||||
--- a/gentpl.py
|
||||
+++ b/gentpl.py
|
||||
@@ -31,7 +31,8 @@ GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
|
||||
"i386_xen", "x86_64_xen",
|
||||
"mips_loongson", "sparc64_ieee1275",
|
||||
"powerpc_ieee1275", "mips_arc", "ia64_efi",
|
||||
- "mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi" ]
|
||||
+ "mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
|
||||
+ "arm_coreboot"]
|
||||
|
||||
GROUPS = {}
|
||||
|
||||
@@ -44,7 +45,7 @@ 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["arm"] = [ "arm_uboot", "arm_efi", "arm_coreboot" ]
|
||||
GROUPS["arm64"] = [ "arm64_efi" ]
|
||||
|
||||
# Groups based on firmware
|
||||
@@ -52,6 +53,7 @@ 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" ]
|
||||
+GROUPS["coreboot"] = [ "i386_coreboot", "arm_coreboot" ]
|
||||
|
||||
# emu is a special case so many core functionality isn't needed on this platform
|
||||
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
|
||||
@@ -64,7 +66,7 @@ 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["videoinkernel"] = ["mips_loongson", "i386_coreboot", "arm_coreboot" ]
|
||||
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
|
||||
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 781d0ffbf..bec058554 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -239,6 +239,16 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
endif
|
||||
|
||||
+if COND_arm_coreboot
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/coreboot/kernel.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
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 6540dc951..411dca46b 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -92,6 +92,8 @@ kernel = {
|
||||
emu_cppflags = '$(CPPFLAGS_GNULIB)';
|
||||
arm_uboot_ldflags = '-Wl,-r,-d';
|
||||
arm_uboot_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
|
||||
+ arm_coreboot_ldflags = '-Wl,-r,-d';
|
||||
+ arm_coreboot_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
|
||||
|
||||
i386_pc_startup = kern/i386/pc/startup.S;
|
||||
i386_efi_startup = kern/i386/efi/startup.S;
|
||||
@@ -106,6 +108,7 @@ kernel = {
|
||||
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
|
||||
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
|
||||
arm_uboot_startup = kern/arm/startup.S;
|
||||
+ arm_coreboot_startup = kern/arm/startup.S;
|
||||
arm_efi_startup = kern/arm/efi/startup.S;
|
||||
arm64_efi_startup = kern/arm64/efi/startup.S;
|
||||
|
||||
@@ -152,6 +155,10 @@ kernel = {
|
||||
arm_uboot = kern/arm/uboot/init.c;
|
||||
arm_uboot = kern/arm/uboot/uboot.S;
|
||||
|
||||
+ arm_coreboot = kern/arm/coreboot/init.c;
|
||||
+ arm_coreboot = kern/arm/coreboot/timer.c;
|
||||
+ arm_coreboot = kern/arm/coreboot/coreboot.S;
|
||||
+
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
terminfoinkernel = commands/extcmd.c;
|
||||
@@ -166,7 +173,7 @@ kernel = {
|
||||
i386_multiboot = kern/i386/coreboot/init.c;
|
||||
i386_qemu = kern/i386/qemu/init.c;
|
||||
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
|
||||
- i386_coreboot = video/coreboot/cbfb.c;
|
||||
+ coreboot = video/coreboot/cbfb.c;
|
||||
|
||||
efi = disk/efi/efidisk.c;
|
||||
efi = kern/efi/efi.c;
|
||||
@@ -227,9 +234,10 @@ kernel = {
|
||||
i386_qemu = kern/vga_init.c;
|
||||
i386_qemu = kern/i386/qemu/mmap.c;
|
||||
|
||||
- i386_coreboot = kern/coreboot/mmap.c;
|
||||
+ coreboot = kern/coreboot/mmap.c;
|
||||
i386_coreboot = kern/i386/coreboot/cbtable.c;
|
||||
- i386_coreboot = kern/coreboot/cbtable.c;
|
||||
+ coreboot = kern/coreboot/cbtable.c;
|
||||
+ arm_coreboot = kern/arm/coreboot/cbtable.c;
|
||||
|
||||
i386_multiboot = kern/i386/multiboot_mmap.c;
|
||||
|
||||
@@ -758,6 +766,7 @@ module = {
|
||||
enable = arm_efi;
|
||||
enable = arm64_efi;
|
||||
enable = arm_uboot;
|
||||
+ enable = arm_coreboot;
|
||||
};
|
||||
|
||||
module = {
|
||||
@@ -842,6 +851,7 @@ module = {
|
||||
ieee1275 = lib/ieee1275/halt.c;
|
||||
emu = lib/emu/halt.c;
|
||||
uboot = lib/dummy/halt.c;
|
||||
+ arm_coreboot = lib/dummy/halt.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
@@ -859,6 +869,7 @@ module = {
|
||||
mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
|
||||
xen = lib/xen/reboot.c;
|
||||
uboot = lib/uboot/reboot.c;
|
||||
+ arm_coreboot = lib/dummy/reboot.c;
|
||||
common = commands/reboot.c;
|
||||
};
|
||||
|
||||
@@ -1553,6 +1564,7 @@ module = {
|
||||
cmos = lib/cmos_datetime.c;
|
||||
efi = lib/efi/datetime.c;
|
||||
uboot = lib/dummy/datetime.c;
|
||||
+ arm_coreboot = lib/dummy/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/datetime.c;
|
||||
powerpc_ieee1275 = lib/ieee1275/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/cmos.c;
|
||||
diff --git a/grub-core/kern/arm/coreboot/cbtable.c b/grub-core/kern/arm/coreboot/cbtable.c
|
||||
new file mode 100644
|
||||
index 000000000..8a655bb5c
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/coreboot/cbtable.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2007,2008,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/coreboot/lbio.h>
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/dl.h>
|
||||
+#include <grub/arm/startup.h>
|
||||
+
|
||||
+GRUB_MOD_LICENSE ("GPLv3+");
|
||||
+
|
||||
+#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
+
|
||||
+grub_linuxbios_table_header_t
|
||||
+grub_linuxbios_get_tables (void)
|
||||
+{
|
||||
+ grub_linuxbios_table_header_t table_header
|
||||
+ = (grub_linuxbios_table_header_t) grub_arm_saved_registers.r[0];
|
||||
+
|
||||
+ if (!grub_linuxbios_check_signature (table_header))
|
||||
+ return 0;
|
||||
+
|
||||
+ return table_header;
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/coreboot/coreboot.S b/grub-core/kern/arm/coreboot/coreboot.S
|
||||
new file mode 100644
|
||||
index 000000000..a1104526c
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/coreboot/coreboot.S
|
||||
@@ -0,0 +1,44 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2016 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>
|
||||
+
|
||||
+ .file "coreboot.S"
|
||||
+ .text
|
||||
+ .syntax unified
|
||||
+#if !defined (__thumb2__)
|
||||
+ .arch armv7a
|
||||
+ .arm
|
||||
+#else
|
||||
+ .arch armv7
|
||||
+ .thumb
|
||||
+#endif
|
||||
+
|
||||
+FUNCTION(grub_arm_pfr1)
|
||||
+ mrc p15, 0, r0, c0, c1, 1
|
||||
+ bx lr
|
||||
+
|
||||
+FUNCTION(grub_armv7_get_timer_value)
|
||||
+ isb
|
||||
+ mrrc p15, 1, r0, r1, c14
|
||||
+ bx lr
|
||||
+
|
||||
+FUNCTION(grub_armv7_get_timer_frequency)
|
||||
+ mrc p15, 0, r0, c14, c0, 0
|
||||
+ bx lr
|
||||
+
|
||||
diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c
|
||||
new file mode 100644
|
||||
index 000000000..51ecaceb0
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/coreboot/init.c
|
||||
@@ -0,0 +1,127 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,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/kernel.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/memory.h>
|
||||
+#include <grub/machine/console.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+#include <grub/offsets.h>
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/dl.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/loader.h>
|
||||
+#include <grub/env.h>
|
||||
+#include <grub/cache.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/symbol.h>
|
||||
+#include <grub/video.h>
|
||||
+#include <grub/coreboot/lbio.h>
|
||||
+
|
||||
+extern grub_uint8_t _start[];
|
||||
+extern grub_uint8_t _end[];
|
||||
+extern grub_uint8_t _edata[];
|
||||
+grub_addr_t start_of_ram = ~(grub_addr_t)0;
|
||||
+
|
||||
+void __attribute__ ((noreturn))
|
||||
+grub_exit (void)
|
||||
+{
|
||||
+ /* We can't use grub_fatal() in this function. This would create an infinite
|
||||
+ loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
+ while (1)
|
||||
+ grub_cpu_idle ();
|
||||
+}
|
||||
+
|
||||
+static grub_uint64_t modend;
|
||||
+static int have_memory = 0;
|
||||
+
|
||||
+/* Helper for grub_machine_init. */
|
||||
+static int
|
||||
+heap_init (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
|
||||
+ void *data __attribute__ ((unused)))
|
||||
+{
|
||||
+ grub_uint64_t begin = addr, end = addr + size;
|
||||
+
|
||||
+#if GRUB_CPU_SIZEOF_VOID_P == 4
|
||||
+ /* Restrict ourselves to 32-bit memory space. */
|
||||
+ if (begin > GRUB_ULONG_MAX)
|
||||
+ return 0;
|
||||
+ if (end > GRUB_ULONG_MAX)
|
||||
+ end = GRUB_ULONG_MAX;
|
||||
+#endif
|
||||
+
|
||||
+ if (start_of_ram > begin)
|
||||
+ start_of_ram = begin;
|
||||
+
|
||||
+ if (type != GRUB_MEMORY_AVAILABLE)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (modend && begin < modend)
|
||||
+ {
|
||||
+ if (begin < (grub_addr_t)_start)
|
||||
+ {
|
||||
+ grub_mm_init_region ((void *) (grub_addr_t) begin, (grub_size_t) ((grub_addr_t)_start - begin));
|
||||
+ have_memory = 1;
|
||||
+ }
|
||||
+ begin = modend;
|
||||
+ }
|
||||
+
|
||||
+ /* Avoid DMA problems. */
|
||||
+ if (end >= 0xfe000000)
|
||||
+ end = 0xfe000000;
|
||||
+
|
||||
+ if (end <= begin)
|
||||
+ return 0;
|
||||
+
|
||||
+ grub_mm_init_region ((void *) (grub_addr_t) begin, (grub_size_t) (end - begin));
|
||||
+
|
||||
+ have_memory = 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_machine_init (void)
|
||||
+{
|
||||
+ modend = grub_modules_get_end ();
|
||||
+
|
||||
+ grub_video_coreboot_fb_early_init ();
|
||||
+
|
||||
+ grub_machine_mmap_iterate (heap_init, NULL);
|
||||
+ if (!have_memory)
|
||||
+ grub_fatal ("No memory found");
|
||||
+
|
||||
+ grub_video_coreboot_fb_late_init ();
|
||||
+
|
||||
+ grub_font_init ();
|
||||
+ grub_gfxterm_init ();
|
||||
+
|
||||
+ grub_machine_timer_init ();
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_machine_get_bootlocation (char **device __attribute__ ((unused)),
|
||||
+ char **path __attribute__ ((unused)))
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_machine_fini (int flags __attribute__ ((unused)))
|
||||
+{
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/coreboot/timer.c b/grub-core/kern/arm/coreboot/timer.c
|
||||
new file mode 100644
|
||||
index 000000000..ebefb99d5
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/coreboot/timer.c
|
||||
@@ -0,0 +1,65 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2016 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/mm.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/misc.h>
|
||||
+
|
||||
+grub_uint64_t
|
||||
+grub_armv7_get_timer_value(void);
|
||||
+
|
||||
+grub_uint32_t
|
||||
+grub_armv7_get_timer_frequency(void);
|
||||
+
|
||||
+grub_uint32_t
|
||||
+grub_arm_pfr1(void);
|
||||
+
|
||||
+static int have_timer = 0;
|
||||
+static grub_uint32_t timer_frequency_in_khz;
|
||||
+
|
||||
+static grub_uint64_t
|
||||
+generic_get_time_ms (void)
|
||||
+{
|
||||
+ return grub_divmod64 (grub_armv7_get_timer_value(), timer_frequency_in_khz, 0);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+try_generic_timer (void)
|
||||
+{
|
||||
+ if (((grub_arm_pfr1 () >> 16) & 0xf) != 1)
|
||||
+ return 0;
|
||||
+ grub_printf ("freq = %x\n", grub_armv7_get_timer_frequency());
|
||||
+ timer_frequency_in_khz = 0x016e3600 / 1000; //grub_armv7_get_timer_frequency() / 1000;
|
||||
+ if (timer_frequency_in_khz == 0)
|
||||
+ return 0;
|
||||
+ grub_install_get_time_ms (generic_get_time_ms);
|
||||
+ have_timer = 1;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_machine_timer_init (void)
|
||||
+{
|
||||
+ if (!have_timer)
|
||||
+ try_generic_timer ();
|
||||
+ if (!have_timer)
|
||||
+ grub_fatal ("No timer found");
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/startup.S b/grub-core/kern/arm/startup.S
|
||||
index 640837cba..3946fe8e1 100644
|
||||
--- a/grub-core/kern/arm/startup.S
|
||||
+++ b/grub-core/kern/arm/startup.S
|
||||
@@ -24,6 +24,7 @@
|
||||
* GRUB is called from U-Boot as a Linux Kernel type image, which
|
||||
* means among other things that it always enters in ARM state.
|
||||
*
|
||||
+ * coreboot starts in ARM mode as well.
|
||||
*
|
||||
* Overview of GRUB image layout:
|
||||
*
|
||||
@@ -127,6 +128,8 @@ reloc_done:
|
||||
|
||||
str r1, EXT_C(grub_modbase)
|
||||
|
||||
+ /* Coreboot already places modules at right place. */
|
||||
+#ifndef GRUB_MACHINE_COREBOOT
|
||||
add r1, r1, r2
|
||||
add r0, r0, r2
|
||||
sub r1, r1, #4
|
||||
@@ -136,6 +139,7 @@ reloc_done:
|
||||
str r3, [r1], #-4 @ *dst-- = r3
|
||||
subs r2, #4 @ remaining -= 4
|
||||
bne 1b @ while remaining != 0
|
||||
+#endif
|
||||
|
||||
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
||||
@ region before continuing
|
||||
diff --git a/grub-core/kern/coreboot/cbtable.c b/grub-core/kern/coreboot/cbtable.c
|
||||
index 996d3f407..aec63dbd1 100644
|
||||
--- a/grub-core/kern/coreboot/cbtable.c
|
||||
+++ b/grub-core/kern/coreboot/cbtable.c
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/dl.h>
|
||||
|
||||
+#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
+
|
||||
/* Helper for grub_linuxbios_table_iterate. */
|
||||
int
|
||||
grub_linuxbios_check_signature (grub_linuxbios_table_header_t tbl_header)
|
||||
diff --git a/grub-core/lib/dummy/reboot.c b/grub-core/lib/dummy/reboot.c
|
||||
new file mode 100644
|
||||
index 000000000..b8cbed8f8
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/dummy/reboot.c
|
||||
@@ -0,0 +1,32 @@
|
||||
+/*
|
||||
+ * 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/misc.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/kernel.h>
|
||||
+#include <grub/loader.h>
|
||||
+
|
||||
+void
|
||||
+grub_reboot (void)
|
||||
+{
|
||||
+ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
||||
+
|
||||
+ /* Just stop here */
|
||||
+
|
||||
+ while (1);
|
||||
+}
|
||||
diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
|
||||
index 5b39f02bb..01374ee78 100644
|
||||
--- a/grub-core/loader/arm/linux.c
|
||||
+++ b/grub-core/loader/arm/linux.c
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
+#ifndef GRUB_MACHINE_COREBOOT
|
||||
+
|
||||
static grub_dl_t my_mod;
|
||||
|
||||
static grub_addr_t initrd_start;
|
||||
@@ -527,3 +529,4 @@ GRUB_MOD_FINI (linux)
|
||||
grub_unregister_command (cmd_initrd);
|
||||
grub_unregister_command (cmd_devicetree);
|
||||
}
|
||||
+#endif
|
||||
diff --git a/include/grub/arm/coreboot/console.h b/include/grub/arm/coreboot/console.h
|
||||
new file mode 100644
|
||||
index 000000000..13a14b783
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm/coreboot/console.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ * 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/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_MACHINE_CONSOLE_HEADER
|
||||
+#define GRUB_MACHINE_CONSOLE_HEADER 1
|
||||
+
|
||||
+void grub_video_coreboot_fb_init (void);
|
||||
+void grub_video_coreboot_fb_early_init (void);
|
||||
+void grub_video_coreboot_fb_late_init (void);
|
||||
+void grub_video_coreboot_fb_fini (void);
|
||||
+
|
||||
+extern struct grub_linuxbios_table_framebuffer *grub_video_coreboot_fbtable;
|
||||
+
|
||||
+#endif /* ! GRUB_MACHINE_CONSOLE_HEADER */
|
||||
diff --git a/include/grub/arm/coreboot/kernel.h b/include/grub/arm/coreboot/kernel.h
|
||||
new file mode 100644
|
||||
index 000000000..09cd7fe32
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm/coreboot/kernel.h
|
||||
@@ -0,0 +1,44 @@
|
||||
+/*
|
||||
+ * 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/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_KERNEL_MACHINE_HEADER
|
||||
+#define GRUB_KERNEL_MACHINE_HEADER 1
|
||||
+
|
||||
+#ifndef ASM_FILE
|
||||
+
|
||||
+#include <grub/symbol.h>
|
||||
+#include <grub/types.h>
|
||||
+
|
||||
+struct grub_fdt_board
|
||||
+{
|
||||
+ const char *vendor, *part;
|
||||
+ const grub_uint8_t *dtb;
|
||||
+ grub_size_t dtb_size;
|
||||
+};
|
||||
+
|
||||
+extern struct grub_fdt_board grub_fdt_boards[];
|
||||
+void grub_machine_timer_init (void);
|
||||
+void grub_pl050_init (void);
|
||||
+void
|
||||
+grub_cros_init (void);
|
||||
+extern grub_addr_t EXPORT_VAR (start_of_ram);
|
||||
+#endif /* ! ASM_FILE */
|
||||
+
|
||||
+#define GRUB_KERNEL_MACHINE_STACK_SIZE GRUB_KERNEL_ARM_STACK_SIZE
|
||||
+
|
||||
+#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
||||
diff --git a/include/grub/offsets.h b/include/grub/offsets.h
|
||||
index c88c86d4d..bf0689fc9 100644
|
||||
--- a/include/grub/offsets.h
|
||||
+++ b/include/grub/offsets.h
|
||||
@@ -122,6 +122,12 @@
|
||||
#define GRUB_KERNEL_ARM_UBOOT_MOD_ALIGN 0x8
|
||||
#define GRUB_KERNEL_ARM_UBOOT_TOTAL_MODULE_SIZE 0x4
|
||||
|
||||
+#define GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN 0x8
|
||||
+#define GRUB_KERNEL_ARM_COREBOOT_TOTAL_MODULE_SIZE 0x4
|
||||
+
|
||||
+#define GRUB_KERNEL_ARM_STACK_SIZE 0x40000
|
||||
+#define GRUB_KERNEL_ARM_COREBOOT_MOD_GAP (GRUB_KERNEL_ARM_STACK_SIZE + 1024)
|
||||
+
|
||||
/* Minimal gap between _end and the start of the modules. It's a hack
|
||||
for PowerMac to prevent "CLAIM failed" error. The real fix is to
|
||||
rewrite grub-mkimage to generate valid ELF files. */
|
||||
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||
index 3fab93e20..a2bb05439 100644
|
||||
--- a/util/grub-mkimagexx.c
|
||||
+++ b/util/grub-mkimagexx.c
|
||||
@@ -87,7 +87,8 @@ struct fixup_block_list
|
||||
static int
|
||||
is_relocatable (const struct grub_install_image_target_desc *image_target)
|
||||
{
|
||||
- return image_target->id == IMAGE_EFI || image_target->id == IMAGE_UBOOT;
|
||||
+ return image_target->id == IMAGE_EFI || image_target->id == IMAGE_UBOOT
|
||||
+ || (image_target->id == IMAGE_COREBOOT && image_target->elf_target == EM_ARM);
|
||||
}
|
||||
|
||||
#ifdef MKIMAGE_ELF32
|
||||
@@ -274,7 +275,10 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
{
|
||||
grub_uint32_t target_addr_mods;
|
||||
phdr->p_filesz = grub_host_to_target32 (layout->kernel_size);
|
||||
- phdr->p_memsz = grub_host_to_target32 (layout->kernel_size + layout->bss_size);
|
||||
+ if (image_target->id == IMAGE_COREBOOT && image_target->elf_target == EM_ARM)
|
||||
+ phdr->p_memsz = grub_host_to_target32 (layout->kernel_size);
|
||||
+ else
|
||||
+ phdr->p_memsz = grub_host_to_target32 (layout->kernel_size + layout->bss_size);
|
||||
|
||||
phdr++;
|
||||
phdr->p_type = grub_host_to_target32 (PT_GNU_STACK);
|
||||
@@ -290,8 +294,12 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc
|
||||
phdr->p_filesz = phdr->p_memsz
|
||||
= grub_host_to_target32 (*core_size - layout->kernel_size);
|
||||
|
||||
- if (image_target->id == IMAGE_COREBOOT)
|
||||
+ if (image_target->id == IMAGE_COREBOOT && image_target->elf_target == EM_386)
|
||||
target_addr_mods = GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR;
|
||||
+ else if (image_target->id == IMAGE_COREBOOT && image_target->elf_target == EM_ARM)
|
||||
+ target_addr_mods = ALIGN_UP (target_addr + layout->end
|
||||
+ + image_target->mod_gap,
|
||||
+ image_target->mod_align);
|
||||
else
|
||||
target_addr_mods = ALIGN_UP (target_addr + layout->kernel_size + layout->bss_size
|
||||
+ image_target->mod_gap,
|
||||
@@ -1876,7 +1884,7 @@ SUFFIX (locate_sections) (Elf_Ehdr *e, const char *kernel_path,
|
||||
Platforms other than EFI and U-boot shouldn't have .bss in
|
||||
their binaries as we build with -Wl,-Ttext.
|
||||
*/
|
||||
- if (image_target->id != IMAGE_UBOOT)
|
||||
+ if (image_target->id == IMAGE_EFI || !is_relocatable (image_target))
|
||||
layout->kernel_size = layout->end;
|
||||
|
||||
return section_addresses;
|
||||
@@ -1979,6 +1987,7 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path,
|
||||
if (image_target->id == IMAGE_SPARC64_AOUT
|
||||
|| image_target->id == IMAGE_SPARC64_RAW
|
||||
|| image_target->id == IMAGE_UBOOT
|
||||
+ || image_target->id == IMAGE_COREBOOT
|
||||
|| image_target->id == IMAGE_SPARC64_CDCORE)
|
||||
layout->kernel_size = ALIGN_UP (layout->kernel_size, image_target->mod_align);
|
||||
|
||||
@@ -2084,7 +2093,7 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path,
|
||||
Platforms other than EFI and U-boot shouldn't have .bss in
|
||||
their binaries as we build with -Wl,-Ttext.
|
||||
*/
|
||||
- || (SUFFIX (is_bss_section) (s, image_target) && (image_target->id != IMAGE_UBOOT))
|
||||
+ || (SUFFIX (is_bss_section) (s, image_target) && (image_target->id == IMAGE_EFI || !is_relocatable (image_target)))
|
||||
|| SUFFIX (is_text_section) (s, image_target))
|
||||
{
|
||||
if (grub_target_to_host32 (s->sh_type) == SHT_NOBITS)
|
||||
diff --git a/util/mkimage.c b/util/mkimage.c
|
||||
index 528166c87..6aa77ed73 100644
|
||||
--- a/util/mkimage.c
|
||||
+++ b/util/mkimage.c
|
||||
@@ -533,6 +533,45 @@ static const struct grub_install_image_target_desc image_targets[] =
|
||||
.mod_align = GRUB_KERNEL_ARM_UBOOT_MOD_ALIGN,
|
||||
.link_align = 4
|
||||
},
|
||||
+ /* For coreboot versions that don't support self-relocating images. */
|
||||
+ {
|
||||
+ .dirname = "arm-coreboot-vexpress",
|
||||
+ .names = { "arm-coreboot-vexpress", NULL },
|
||||
+ .voidp_sizeof = 4,
|
||||
+ .bigendian = 0,
|
||||
+ .id = IMAGE_COREBOOT,
|
||||
+ .flags = PLATFORM_FLAGS_NONE,
|
||||
+ .total_module_size = GRUB_KERNEL_ARM_COREBOOT_TOTAL_MODULE_SIZE,
|
||||
+ .decompressor_compressed_size = TARGET_NO_FIELD,
|
||||
+ .decompressor_uncompressed_size = TARGET_NO_FIELD,
|
||||
+ .decompressor_uncompressed_addr = TARGET_NO_FIELD,
|
||||
+ .section_align = GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN,
|
||||
+ .vaddr_offset = 0,
|
||||
+ .elf_target = EM_ARM,
|
||||
+ .mod_gap = GRUB_KERNEL_ARM_COREBOOT_MOD_GAP,
|
||||
+ .mod_align = GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN,
|
||||
+ .link_align = 4,
|
||||
+ .link_addr = 0x62000000,
|
||||
+ },
|
||||
+ {
|
||||
+ .dirname = "arm-coreboot-veyron",
|
||||
+ .names = { "arm-coreboot-veyron", NULL },
|
||||
+ .voidp_sizeof = 4,
|
||||
+ .bigendian = 0,
|
||||
+ .id = IMAGE_COREBOOT,
|
||||
+ .flags = PLATFORM_FLAGS_NONE,
|
||||
+ .total_module_size = GRUB_KERNEL_ARM_COREBOOT_TOTAL_MODULE_SIZE,
|
||||
+ .decompressor_compressed_size = TARGET_NO_FIELD,
|
||||
+ .decompressor_uncompressed_size = TARGET_NO_FIELD,
|
||||
+ .decompressor_uncompressed_addr = TARGET_NO_FIELD,
|
||||
+ .section_align = GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN,
|
||||
+ .vaddr_offset = 0,
|
||||
+ .elf_target = EM_ARM,
|
||||
+ .mod_gap = GRUB_KERNEL_ARM_COREBOOT_MOD_GAP,
|
||||
+ .mod_align = GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN,
|
||||
+ .link_align = 4,
|
||||
+ .link_addr = 0x43000000,
|
||||
+ },
|
||||
{
|
||||
.dirname = "arm-efi",
|
||||
.names = { "arm-efi", NULL },
|
||||
@@ -1033,7 +1072,7 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
/* fallthrough */
|
||||
case IMAGE_COREBOOT:
|
||||
case IMAGE_QEMU:
|
||||
- if (layout.kernel_size + layout.bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000)
|
||||
+ if (image_target->elf_target != EM_ARM && layout.kernel_size + layout.bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000)
|
||||
grub_util_error (_("kernel image is too big (0x%x > 0x%x)"),
|
||||
(unsigned) layout.kernel_size + (unsigned) layout.bss_size
|
||||
+ GRUB_KERNEL_I386_PC_LINK_ADDR,
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,851 +0,0 @@
|
|||
From fcbb723d4b1f7ad4687191562621dd0eb25f4d9e Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 21:19:59 +0200
|
||||
Subject: [PATCH 020/194] Add support for device-tree-based drivers.
|
||||
|
||||
---
|
||||
conf/Makefile.common | 4 +-
|
||||
grub-core/Makefile.am | 10 ++
|
||||
grub-core/Makefile.core.def | 2 +
|
||||
grub-core/bus/fdt.c | 255 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/arm/coreboot/init.c | 20 +++
|
||||
grub-core/lib/fdt.c | 142 +++++++++++++++------
|
||||
include/grub/fdt.h | 23 ++--
|
||||
include/grub/fdtbus.h | 73 +++++++++++
|
||||
include/grub/kernel.h | 3 +-
|
||||
include/grub/util/install.h | 2 +-
|
||||
util/grub-install-common.c | 2 +-
|
||||
util/grub-mkimage.c | 11 +-
|
||||
util/mkimage.c | 24 +++-
|
||||
13 files changed, 519 insertions(+), 52 deletions(-)
|
||||
create mode 100644 grub-core/bus/fdt.c
|
||||
create mode 100644 include/grub/fdtbus.h
|
||||
|
||||
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
||||
index 11296b550..311da61c6 100644
|
||||
--- a/conf/Makefile.common
|
||||
+++ b/conf/Makefile.common
|
||||
@@ -86,9 +86,11 @@ CPPFLAGS_TERMINAL_LIST += '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST
|
||||
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_FDT_LIST := '-Dgrub_fdtbus_register(...)=FDT_DRIVER_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
|
||||
$(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
|
||||
- $(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST)
|
||||
+ $(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST) \
|
||||
+ $(CPPFLAGS_FDT_LIST)
|
||||
|
||||
# Define these variables to calm down automake
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index bec058554..fc6ca3051 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -368,6 +368,16 @@ terminal.lst: $(MARKER_FILES)
|
||||
platform_DATA += terminal.lst
|
||||
CLEANFILES += terminal.lst
|
||||
|
||||
+fdt.lst: $(MARKER_FILES)
|
||||
+ (for pp in $^; do \
|
||||
+ b=`basename $$pp .marker`; \
|
||||
+ sed -n \
|
||||
+ -e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
|
||||
+ -e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
|
||||
+ done) | sort -u > $@
|
||||
+platform_DATA += fdt.lst
|
||||
+CLEANFILES += fdt.lst
|
||||
+
|
||||
parttool.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 411dca46b..77d0b019e 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -158,6 +158,8 @@ kernel = {
|
||||
arm_coreboot = kern/arm/coreboot/init.c;
|
||||
arm_coreboot = kern/arm/coreboot/timer.c;
|
||||
arm_coreboot = kern/arm/coreboot/coreboot.S;
|
||||
+ arm_coreboot = lib/fdt.c;
|
||||
+ arm_coreboot = bus/fdt.c;
|
||||
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
diff --git a/grub-core/bus/fdt.c b/grub-core/bus/fdt.c
|
||||
new file mode 100644
|
||||
index 000000000..6fb077000
|
||||
--- /dev/null
|
||||
+++ b/grub-core/bus/fdt.c
|
||||
@@ -0,0 +1,255 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2016 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/fdtbus.h>
|
||||
+#include <grub/fdt.h>
|
||||
+#include <grub/term.h>
|
||||
+
|
||||
+static const void *dtb;
|
||||
+static grub_size_t root_address_cells, root_size_cells;
|
||||
+/* Pointer to this symbol signals invalid mapping. */
|
||||
+char grub_fdtbus_invalid_mapping[1];
|
||||
+
|
||||
+struct grub_fdtbus_dev
|
||||
+{
|
||||
+ struct grub_fdtbus_dev *next;
|
||||
+ struct grub_fdtbus_dev *parent;
|
||||
+ int node;
|
||||
+ struct grub_fdtbus_driver *driver;
|
||||
+};
|
||||
+
|
||||
+struct grub_fdtbus_dev *devs;
|
||||
+struct grub_fdtbus_driver *drivers;
|
||||
+
|
||||
+static int
|
||||
+is_compatible (struct grub_fdtbus_driver *driver,
|
||||
+ int node)
|
||||
+{
|
||||
+ grub_size_t compatible_size;
|
||||
+ const char *compatible = grub_fdt_get_prop (dtb, node, "compatible",
|
||||
+ &compatible_size);
|
||||
+ const char *compatible_end = compatible + compatible_size;
|
||||
+ while (compatible < compatible_end)
|
||||
+ {
|
||||
+ if (grub_strcmp (driver->compatible, compatible) == 0)
|
||||
+ return 1;
|
||||
+ compatible += grub_strlen (compatible) + 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+fdtbus_scan (struct grub_fdtbus_dev *parent)
|
||||
+{
|
||||
+ int node;
|
||||
+ for (node = grub_fdt_first_node (dtb, parent ? parent->node : 0); node >= 0;
|
||||
+ node = grub_fdt_next_node (dtb, node))
|
||||
+ {
|
||||
+ struct grub_fdtbus_dev *dev;
|
||||
+ struct grub_fdtbus_driver *driver;
|
||||
+ dev = grub_zalloc (sizeof (*dev));
|
||||
+ if (!dev)
|
||||
+ {
|
||||
+ grub_print_error ();
|
||||
+ return;
|
||||
+ }
|
||||
+ dev->node = node;
|
||||
+ dev->next = devs;
|
||||
+ dev->parent = parent;
|
||||
+ devs = dev;
|
||||
+ FOR_LIST_ELEMENTS(driver, drivers)
|
||||
+ if (!dev->driver && is_compatible (driver, node))
|
||||
+ {
|
||||
+ if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
+ {
|
||||
+ dev->driver = driver;
|
||||
+ break;
|
||||
+ }
|
||||
+ grub_print_error ();
|
||||
+ }
|
||||
+ fdtbus_scan (dev);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_fdtbus_register (struct grub_fdtbus_driver *driver)
|
||||
+{
|
||||
+ struct grub_fdtbus_dev *dev;
|
||||
+ grub_list_push (GRUB_AS_LIST_P (&drivers),
|
||||
+ GRUB_AS_LIST (driver));
|
||||
+ for (dev = devs; dev; dev = dev->next)
|
||||
+ if (!dev->driver && is_compatible (driver, dev->node))
|
||||
+ {
|
||||
+ if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
+ dev->driver = driver;
|
||||
+ grub_print_error ();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_fdtbus_unregister (struct grub_fdtbus_driver *driver)
|
||||
+{
|
||||
+ grub_list_remove (GRUB_AS_LIST (driver));
|
||||
+ struct grub_fdtbus_dev *dev;
|
||||
+ for (dev = devs; dev; dev = dev->next)
|
||||
+ if (dev->driver == driver)
|
||||
+ {
|
||||
+ if (driver->detach)
|
||||
+ driver->detach(dev);
|
||||
+ dev->driver = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_fdtbus_init (const void *dtb_in, grub_size_t size)
|
||||
+{
|
||||
+ if (!dtb_in || grub_fdt_check_header (dtb_in, size) < 0)
|
||||
+ grub_fatal ("invalid FDT");
|
||||
+ dtb = dtb_in;
|
||||
+ const grub_uint32_t *prop = grub_fdt_get_prop (dtb, 0, "#address-cells", 0);
|
||||
+ if (prop)
|
||||
+ root_address_cells = grub_be_to_cpu32 (*prop);
|
||||
+ else
|
||||
+ root_address_cells = 1;
|
||||
+
|
||||
+ prop = grub_fdt_get_prop (dtb, 0, "#size-cells", 0);
|
||||
+ if (prop)
|
||||
+ root_size_cells = grub_be_to_cpu32 (*prop);
|
||||
+ else
|
||||
+ root_size_cells = 1;
|
||||
+
|
||||
+ fdtbus_scan (0);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+get_address_cells (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ const grub_uint32_t *prop;
|
||||
+ if (!dev)
|
||||
+ return root_address_cells;
|
||||
+ prop = grub_fdt_get_prop (dtb, dev->node, "#address-cells", 0);
|
||||
+ if (prop)
|
||||
+ return grub_be_to_cpu32 (*prop);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+get_size_cells (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ const grub_uint32_t *prop;
|
||||
+ if (!dev)
|
||||
+ return root_size_cells;
|
||||
+ prop = grub_fdt_get_prop (dtb, dev->node, "#size-cells", 0);
|
||||
+ if (prop)
|
||||
+ return grub_be_to_cpu32 (*prop);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static grub_uint64_t
|
||||
+get64 (const grub_uint32_t *reg, grub_size_t cells)
|
||||
+{
|
||||
+ grub_uint64_t val = 0;
|
||||
+ if (cells >= 1)
|
||||
+ val = grub_be_to_cpu32 (reg[cells - 1]);
|
||||
+ if (cells >= 2)
|
||||
+ val |= ((grub_uint64_t) grub_be_to_cpu32 (reg[cells - 2])) << 32;
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static volatile void *
|
||||
+translate (const struct grub_fdtbus_dev *dev, const grub_uint32_t *reg)
|
||||
+{
|
||||
+ volatile void *ret;
|
||||
+ const grub_uint32_t *ranges;
|
||||
+ grub_size_t ranges_size, cells_per_mapping;
|
||||
+ grub_size_t parent_address_cells, child_address_cells, child_size_cells;
|
||||
+ grub_size_t nmappings, i;
|
||||
+ if (dev == 0)
|
||||
+ {
|
||||
+ grub_uint64_t val;
|
||||
+ val = get64 (reg, root_address_cells);
|
||||
+ if (sizeof (void *) == 4 && (val >> 32))
|
||||
+ return grub_fdtbus_invalid_mapping;
|
||||
+ return (void *) (grub_addr_t) val;
|
||||
+ }
|
||||
+ ranges = grub_fdt_get_prop (dtb, dev->node, "ranges", &ranges_size);
|
||||
+ if (!ranges)
|
||||
+ return grub_fdtbus_invalid_mapping;
|
||||
+ if (ranges_size == 0)
|
||||
+ return translate (dev->parent, reg);
|
||||
+ parent_address_cells = get_address_cells (dev->parent);
|
||||
+ child_address_cells = get_address_cells (dev);
|
||||
+ child_size_cells = get_size_cells (dev);
|
||||
+ cells_per_mapping = parent_address_cells + child_address_cells + child_size_cells;
|
||||
+ nmappings = ranges_size / 4 / cells_per_mapping;
|
||||
+ for (i = 0; i < nmappings; i++)
|
||||
+ {
|
||||
+ const grub_uint32_t *child_addr = &ranges[i * cells_per_mapping];
|
||||
+ const grub_uint32_t *parent_addr = child_addr + child_address_cells;
|
||||
+ grub_uint64_t child_size = get64 (parent_addr + parent_address_cells, child_size_cells);
|
||||
+
|
||||
+ if (child_address_cells > 2 && grub_memcmp (reg, child_addr, (child_address_cells - 2) * 4) != 0)
|
||||
+ continue;
|
||||
+ if (get64 (reg, child_address_cells) < get64 (child_addr, child_address_cells))
|
||||
+ continue;
|
||||
+
|
||||
+ grub_uint64_t offset = get64 (reg, child_address_cells) - get64 (child_addr, child_address_cells);
|
||||
+ if (offset >= child_size)
|
||||
+ continue;
|
||||
+
|
||||
+ ret = translate (dev->parent, parent_addr);
|
||||
+ if (grub_fdtbus_is_mapping_valid (ret))
|
||||
+ ret = (volatile char *) ret + offset;
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return grub_fdtbus_invalid_mapping;
|
||||
+}
|
||||
+
|
||||
+volatile void *
|
||||
+grub_fdtbus_map_reg (const struct grub_fdtbus_dev *dev, int regno, grub_size_t *size)
|
||||
+{
|
||||
+ grub_size_t address_cells, size_cells;
|
||||
+ address_cells = get_address_cells (dev->parent);
|
||||
+ size_cells = get_size_cells (dev->parent);
|
||||
+ const grub_uint32_t *reg = grub_fdt_get_prop (dtb, dev->node, "reg", 0);
|
||||
+ if (size && size_cells)
|
||||
+ *size = reg[(address_cells + size_cells) * regno + address_cells];
|
||||
+ if (size && !size_cells)
|
||||
+ *size = 0;
|
||||
+ return translate (dev->parent, reg + (address_cells + size_cells) * regno);
|
||||
+}
|
||||
+
|
||||
+const char *
|
||||
+grub_fdtbus_get_name (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ return grub_fdt_get_nodename (dtb, dev->node);
|
||||
+}
|
||||
+
|
||||
+const void *
|
||||
+grub_fdtbus_get_prop (const struct grub_fdtbus_dev *dev,
|
||||
+ const char *name,
|
||||
+ grub_uint32_t *len)
|
||||
+{
|
||||
+ return grub_fdt_get_prop (dtb, dev->node, name, len);
|
||||
+}
|
||||
+
|
||||
+const void *
|
||||
+grub_fdtbus_get_fdt (void)
|
||||
+{
|
||||
+ return dtb;
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c
|
||||
index 51ecaceb0..aec75c672 100644
|
||||
--- a/grub-core/kern/arm/coreboot/init.c
|
||||
+++ b/grub-core/kern/arm/coreboot/init.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
|
||||
extern grub_uint8_t _start[];
|
||||
extern grub_uint8_t _end[];
|
||||
@@ -99,6 +100,10 @@ heap_init (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
|
||||
void
|
||||
grub_machine_init (void)
|
||||
{
|
||||
+ struct grub_module_header *header;
|
||||
+ void *dtb = 0;
|
||||
+ grub_size_t dtb_size = 0;
|
||||
+
|
||||
modend = grub_modules_get_end ();
|
||||
|
||||
grub_video_coreboot_fb_early_init ();
|
||||
@@ -112,6 +117,21 @@ grub_machine_init (void)
|
||||
grub_font_init ();
|
||||
grub_gfxterm_init ();
|
||||
|
||||
+ FOR_MODULES (header)
|
||||
+ if (header->type == OBJ_TYPE_DTB)
|
||||
+ {
|
||||
+ char *dtb_orig_addr, *dtb_copy;
|
||||
+ dtb_orig_addr = (char *) header + sizeof (struct grub_module_header);
|
||||
+
|
||||
+ dtb_size = header->size - sizeof (struct grub_module_header);
|
||||
+ dtb = dtb_copy = grub_malloc (dtb_size);
|
||||
+ grub_memmove (dtb_copy, dtb_orig_addr, dtb_size);
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!dtb)
|
||||
+ grub_fatal ("No DTB found");
|
||||
+ grub_fdtbus_init (dtb, dtb_size);
|
||||
+
|
||||
grub_machine_timer_init ();
|
||||
}
|
||||
|
||||
diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
|
||||
index b5d520f20..bdc630244 100644
|
||||
--- a/grub-core/lib/fdt.c
|
||||
+++ b/grub-core/lib/fdt.c
|
||||
@@ -102,13 +102,13 @@ static grub_uint32_t *get_next_node (const void *fdt, char *node_name)
|
||||
static int get_mem_rsvmap_size (const void *fdt)
|
||||
{
|
||||
int size = 0;
|
||||
- grub_uint64_t *ptr = (void *) ((grub_addr_t) fdt
|
||||
- + grub_fdt_get_off_mem_rsvmap (fdt));
|
||||
+ grub_unaligned_uint64_t *ptr = (void *) ((grub_addr_t) fdt
|
||||
+ + grub_fdt_get_off_mem_rsvmap (fdt));
|
||||
|
||||
do
|
||||
{
|
||||
size += 2 * sizeof(*ptr);
|
||||
- if (!*ptr && !*(ptr + 1))
|
||||
+ if (!ptr[0].val && !ptr[1].val)
|
||||
return size;
|
||||
ptr += 2;
|
||||
} while ((grub_addr_t) ptr <= (grub_addr_t) fdt + grub_fdt_get_totalsize (fdt)
|
||||
@@ -229,7 +229,7 @@ static int rearrange_blocks (void *fdt, unsigned int clearance)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static grub_uint32_t *find_prop (void *fdt, unsigned int nodeoffset,
|
||||
+static grub_uint32_t *find_prop (const void *fdt, unsigned int nodeoffset,
|
||||
const char *name)
|
||||
{
|
||||
grub_uint32_t *prop = (void *) ((grub_addr_t) fdt
|
||||
@@ -268,9 +268,9 @@ static grub_uint32_t *find_prop (void *fdt, unsigned int nodeoffset,
|
||||
the size allocated for the FDT; if this function is called before the other
|
||||
functions in this file and returns success, the other functions are
|
||||
guaranteed not to access memory locations outside the allocated memory. */
|
||||
-int grub_fdt_check_header_nosize (void *fdt)
|
||||
+int grub_fdt_check_header_nosize (const void *fdt)
|
||||
{
|
||||
- if (((grub_addr_t) fdt & 0x7) || (grub_fdt_get_magic (fdt) != FDT_MAGIC)
|
||||
+ if (((grub_addr_t) fdt & 0x3) || (grub_fdt_get_magic (fdt) != FDT_MAGIC)
|
||||
|| (grub_fdt_get_version (fdt) < FDT_SUPPORTED_VERSION)
|
||||
|| (grub_fdt_get_last_comp_version (fdt) > FDT_SUPPORTED_VERSION)
|
||||
|| (grub_fdt_get_off_dt_struct (fdt) & 0x00000003)
|
||||
@@ -286,7 +286,7 @@ int grub_fdt_check_header_nosize (void *fdt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int grub_fdt_check_header (void *fdt, unsigned int size)
|
||||
+int grub_fdt_check_header (const void *fdt, unsigned int size)
|
||||
{
|
||||
if (size < sizeof (grub_fdt_header_t)
|
||||
|| (grub_fdt_get_totalsize (fdt) > size)
|
||||
@@ -295,41 +295,29 @@ int grub_fdt_check_header (void *fdt, unsigned int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Find a direct sub-node of a given parent node. */
|
||||
-int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
- const char *name)
|
||||
+static const grub_uint32_t *
|
||||
+advance_token (const void *fdt, const grub_uint32_t *token, const grub_uint32_t *end, int skip_current)
|
||||
{
|
||||
- grub_uint32_t *token, *end;
|
||||
- char *node_name;
|
||||
-
|
||||
- if (parentoffset & 0x3)
|
||||
- return -1;
|
||||
- token = (void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
- + parentoffset);
|
||||
- end = (void *) struct_end (fdt);
|
||||
- if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
- return -1;
|
||||
- SKIP_NODE_NAME(node_name, token, end);
|
||||
- while (token < end)
|
||||
+ for (; token < end; skip_current = 0)
|
||||
{
|
||||
- switch (grub_be_to_cpu32(*token))
|
||||
+ switch (grub_be_to_cpu32 (*token))
|
||||
{
|
||||
case FDT_BEGIN_NODE:
|
||||
- node_name = (char *) (token + 1);
|
||||
- if (node_name + grub_strlen (name) >= (char *) end)
|
||||
- return -1;
|
||||
- if (!grub_strcmp (node_name, name))
|
||||
- return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
- - grub_fdt_get_off_dt_struct (fdt));
|
||||
- token = get_next_node (fdt, node_name);
|
||||
- if (!token)
|
||||
- return -1;
|
||||
- break;
|
||||
+ if (skip_current)
|
||||
+ {
|
||||
+ token = get_next_node (fdt, (char *) (token + 1));
|
||||
+ continue;
|
||||
+ }
|
||||
+ char *ptr;
|
||||
+ for (ptr = (char *) (token + 1); *ptr && ptr < (char *) end; ptr++);
|
||||
+ if (ptr >= (char *) end)
|
||||
+ return 0;
|
||||
+ return token;
|
||||
case FDT_PROP:
|
||||
/* Skip property token and following data (len, nameoff and property
|
||||
value). */
|
||||
if (token >= end - 1)
|
||||
- return -1;
|
||||
+ return 0;
|
||||
token += prop_entry_size(grub_be_to_cpu32(*(token + 1)))
|
||||
/ sizeof(*token);
|
||||
break;
|
||||
@@ -337,10 +325,74 @@ int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
token++;
|
||||
break;
|
||||
default:
|
||||
- return -1;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
- return -1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int grub_fdt_next_node (const void *fdt, unsigned int currentoffset)
|
||||
+{
|
||||
+ const grub_uint32_t *token = (const grub_uint32_t *) fdt + (currentoffset + grub_fdt_get_off_dt_struct (fdt)) / 4;
|
||||
+ token = advance_token (fdt, token, (const void *) struct_end (fdt), 1);
|
||||
+ if (!token)
|
||||
+ return -1;
|
||||
+ return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
+ - grub_fdt_get_off_dt_struct (fdt));
|
||||
+}
|
||||
+
|
||||
+int grub_fdt_first_node (const void *fdt, unsigned int parentoffset)
|
||||
+{
|
||||
+ const grub_uint32_t *token, *end;
|
||||
+ char *node_name;
|
||||
+
|
||||
+ if (parentoffset & 0x3)
|
||||
+ return -1;
|
||||
+ token = (const void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
+ + parentoffset);
|
||||
+ end = (const void *) struct_end (fdt);
|
||||
+ if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
+ return -1;
|
||||
+ SKIP_NODE_NAME(node_name, token, end);
|
||||
+ token = advance_token (fdt, token, end, 0);
|
||||
+ if (!token)
|
||||
+ return -1;
|
||||
+ return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
+ - grub_fdt_get_off_dt_struct (fdt));
|
||||
+}
|
||||
+
|
||||
+/* Find a direct sub-node of a given parent node. */
|
||||
+int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
+ const char *name)
|
||||
+{
|
||||
+ const grub_uint32_t *token, *end;
|
||||
+ const char *node_name;
|
||||
+ int skip_current = 0;
|
||||
+
|
||||
+ if (parentoffset & 0x3)
|
||||
+ return -1;
|
||||
+ token = (const void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
+ + parentoffset);
|
||||
+ end = (const void *) struct_end (fdt);
|
||||
+ if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
+ return -1;
|
||||
+ SKIP_NODE_NAME(node_name, token, end);
|
||||
+ while (1) {
|
||||
+ token = advance_token (fdt, token, end, skip_current);
|
||||
+ if (!token)
|
||||
+ return -1;
|
||||
+ skip_current = 1;
|
||||
+ node_name = (const char *) token + 4;
|
||||
+ if (grub_strcmp (node_name, name) == 0)
|
||||
+ return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
+ - grub_fdt_get_off_dt_struct (fdt));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+const char *
|
||||
+grub_fdt_get_nodename (const void *fdt, unsigned int nodeoffset)
|
||||
+{
|
||||
+ return (const char *) fdt + grub_fdt_get_off_dt_struct(fdt) + nodeoffset + 4;
|
||||
}
|
||||
|
||||
int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
@@ -359,6 +411,24 @@ int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
return add_subnode (fdt, parentoffset, name);
|
||||
}
|
||||
|
||||
+const void *
|
||||
+grub_fdt_get_prop (const void *fdt, unsigned int nodeoffset, const char *name,
|
||||
+ grub_uint32_t *len)
|
||||
+{
|
||||
+ grub_uint32_t *prop;
|
||||
+ if ((nodeoffset >= grub_fdt_get_size_dt_struct (fdt)) || (nodeoffset & 0x3)
|
||||
+ || (grub_be_to_cpu32(*(grub_uint32_t *) ((grub_addr_t) fdt
|
||||
+ + grub_fdt_get_off_dt_struct (fdt) + nodeoffset))
|
||||
+ != FDT_BEGIN_NODE))
|
||||
+ return 0;
|
||||
+ prop = find_prop (fdt, nodeoffset, name);
|
||||
+ if (!prop)
|
||||
+ return 0;
|
||||
+ if (len)
|
||||
+ *len = grub_be_to_cpu32 (*(prop + 1));
|
||||
+ return prop + 3;
|
||||
+}
|
||||
+
|
||||
int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
const void *val, grub_uint32_t len)
|
||||
{
|
||||
diff --git a/include/grub/fdt.h b/include/grub/fdt.h
|
||||
index fdfca75bf..75525fa31 100644
|
||||
--- a/include/grub/fdt.h
|
||||
+++ b/include/grub/fdt.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#define GRUB_FDT_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
+#include <grub/symbol.h>
|
||||
|
||||
#define FDT_MAGIC 0xD00DFEED
|
||||
|
||||
@@ -95,16 +96,22 @@ struct grub_fdt_empty_tree {
|
||||
#define grub_fdt_set_size_dt_struct(fdt, value) \
|
||||
grub_fdt_set_header(fdt, size_dt_struct, value)
|
||||
|
||||
-int grub_fdt_create_empty_tree (void *fdt, unsigned int size);
|
||||
-int grub_fdt_check_header (void *fdt, unsigned int size);
|
||||
-int grub_fdt_check_header_nosize (void *fdt);
|
||||
-int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
- const char *name);
|
||||
-int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
+int EXPORT_FUNC(grub_fdt_create_empty_tree) (void *fdt, unsigned int size);
|
||||
+int EXPORT_FUNC(grub_fdt_check_header) (const void *fdt, unsigned int size);
|
||||
+int EXPORT_FUNC(grub_fdt_check_header_nosize) (const void *fdt);
|
||||
+int EXPORT_FUNC(grub_fdt_find_subnode) (const void *fdt, unsigned int parentoffset,
|
||||
+ const char *name);
|
||||
+int EXPORT_FUNC(grub_fdt_first_node) (const void *fdt, unsigned int parentoffset);
|
||||
+int EXPORT_FUNC(grub_fdt_next_node) (const void *fdt, unsigned int currentoffset);
|
||||
+int EXPORT_FUNC(grub_fdt_add_subnode) (void *fdt, unsigned int parentoffset,
|
||||
const char *name);
|
||||
+const char *
|
||||
+EXPORT_FUNC(grub_fdt_get_nodename) (const void *fdt, unsigned int nodeoffset);
|
||||
+const void *EXPORT_FUNC(grub_fdt_get_prop) (const void *fdt, unsigned int nodeoffset, const char *name,
|
||||
+ grub_uint32_t *len);
|
||||
|
||||
-int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
- const void *val, grub_uint32_t len);
|
||||
+int EXPORT_FUNC(grub_fdt_set_prop) (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
+ const void *val, grub_uint32_t len);
|
||||
#define grub_fdt_set_prop32(fdt, nodeoffset, name, val) \
|
||||
({ \
|
||||
grub_uint32_t _val = grub_cpu_to_be32(val); \
|
||||
diff --git a/include/grub/fdtbus.h b/include/grub/fdtbus.h
|
||||
new file mode 100644
|
||||
index 000000000..985837e55
|
||||
--- /dev/null
|
||||
+++ b/include/grub/fdtbus.h
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 2016 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/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_FDTBUS_HEADER
|
||||
+#define GRUB_FDTBUS_HEADER 1
|
||||
+
|
||||
+#include <grub/fdt.h>
|
||||
+#include <grub/err.h>
|
||||
+
|
||||
+struct grub_fdtbus_dev;
|
||||
+
|
||||
+struct grub_fdtbus_driver
|
||||
+{
|
||||
+ struct grub_fdtbus_driver *next;
|
||||
+ struct grub_fdtbus_driver **prev;
|
||||
+
|
||||
+ const char *compatible;
|
||||
+
|
||||
+ grub_err_t (*attach) (const struct grub_fdtbus_dev *dev);
|
||||
+ void (*detach) (const struct grub_fdtbus_dev *dev);
|
||||
+};
|
||||
+
|
||||
+extern char EXPORT_VAR(grub_fdtbus_invalid_mapping)[1];
|
||||
+
|
||||
+static inline int
|
||||
+grub_fdtbus_is_mapping_valid (volatile void *m)
|
||||
+{
|
||||
+ return m != grub_fdtbus_invalid_mapping;
|
||||
+}
|
||||
+
|
||||
+volatile void *
|
||||
+EXPORT_FUNC(grub_fdtbus_map_reg) (const struct grub_fdtbus_dev *dev, int reg, grub_size_t *size);
|
||||
+
|
||||
+const void *
|
||||
+EXPORT_FUNC(grub_fdtbus_get_fdt) (void);
|
||||
+
|
||||
+const char *
|
||||
+EXPORT_FUNC(grub_fdtbus_get_name) (const struct grub_fdtbus_dev *dev);
|
||||
+
|
||||
+const void *
|
||||
+EXPORT_FUNC(grub_fdtbus_get_prop) (const struct grub_fdtbus_dev *dev,
|
||||
+ const char *name,
|
||||
+ grub_uint32_t *len);
|
||||
+
|
||||
+void
|
||||
+EXPORT_FUNC(grub_fdtbus_register) (struct grub_fdtbus_driver *driver);
|
||||
+
|
||||
+void
|
||||
+EXPORT_FUNC(grub_fdtbus_unregister) (struct grub_fdtbus_driver *driver);
|
||||
+
|
||||
+/* Must be called before any register(). */
|
||||
+/* dtb is assumed to be unfreeable and must remain
|
||||
+ valid for lifetime of GRUB.
|
||||
+ */
|
||||
+void
|
||||
+grub_fdtbus_init (const void *dtb, grub_size_t size);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/grub/kernel.h b/include/grub/kernel.h
|
||||
index 20ddf2da2..ecd88ca72 100644
|
||||
--- a/include/grub/kernel.h
|
||||
+++ b/include/grub/kernel.h
|
||||
@@ -28,7 +28,8 @@ enum
|
||||
OBJ_TYPE_MEMDISK,
|
||||
OBJ_TYPE_CONFIG,
|
||||
OBJ_TYPE_PREFIX,
|
||||
- OBJ_TYPE_PUBKEY
|
||||
+ OBJ_TYPE_PUBKEY,
|
||||
+ OBJ_TYPE_DTB
|
||||
};
|
||||
|
||||
/* The module header. */
|
||||
diff --git a/include/grub/util/install.h b/include/grub/util/install.h
|
||||
index 5ca4811cd..6abd288c3 100644
|
||||
--- a/include/grub/util/install.h
|
||||
+++ b/include/grub/util/install.h
|
||||
@@ -176,7 +176,7 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
char *config_path,
|
||||
const struct grub_install_image_target_desc *image_target,
|
||||
int note,
|
||||
- grub_compression_t comp);
|
||||
+ grub_compression_t comp, const char *dtb_file);
|
||||
|
||||
const struct grub_install_image_target_desc *
|
||||
grub_install_get_image_target (const char *arg);
|
||||
diff --git a/util/grub-install-common.c b/util/grub-install-common.c
|
||||
index 452b230da..8539ff348 100644
|
||||
--- a/util/grub-install-common.c
|
||||
+++ b/util/grub-install-common.c
|
||||
@@ -499,7 +499,7 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix,
|
||||
grub_install_generate_image (dir, prefix, fp, outname,
|
||||
modules.entries, memdisk_path,
|
||||
pubkeys, npubkeys, config_path, tgt,
|
||||
- note, compression);
|
||||
+ note, compression, 0);
|
||||
while (dc--)
|
||||
grub_install_pop_module ();
|
||||
}
|
||||
diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c
|
||||
index aba19d21b..98d24cc06 100644
|
||||
--- a/util/grub-mkimage.c
|
||||
+++ b/util/grub-mkimage.c
|
||||
@@ -71,6 +71,7 @@ static struct argp_option options[] = {
|
||||
N_("embed FILE as a memdisk image\n"
|
||||
"Implies `-p (memdisk)/boot/grub' and overrides any prefix supplied previously,"
|
||||
" but the prefix itself can be overridden by later options"), 0},
|
||||
+ {"dtb", 'D', N_("FILE"), 0, N_("embed FILE as a device tree (DTB)\n"), 0},
|
||||
/* TRANSLATORS: "embed" is a verb (command description). "*/
|
||||
{"config", 'c', N_("FILE"), 0, N_("embed FILE as an early config"), 0},
|
||||
/* TRANSLATORS: "embed" is a verb (command description). "*/
|
||||
@@ -117,6 +118,7 @@ struct arguments
|
||||
char *dir;
|
||||
char *prefix;
|
||||
char *memdisk;
|
||||
+ char *dtb;
|
||||
char **pubkeys;
|
||||
size_t npubkeys;
|
||||
char *font;
|
||||
@@ -176,6 +178,13 @@ argp_parser (int key, char *arg, struct argp_state *state)
|
||||
arguments->prefix = xstrdup ("(memdisk)/boot/grub");
|
||||
break;
|
||||
|
||||
+ case 'D':
|
||||
+ if (arguments->dtb)
|
||||
+ free (arguments->dtb);
|
||||
+
|
||||
+ arguments->dtb = xstrdup (arg);
|
||||
+ break;
|
||||
+
|
||||
case 'k':
|
||||
arguments->pubkeys = xrealloc (arguments->pubkeys,
|
||||
sizeof (arguments->pubkeys[0])
|
||||
@@ -300,7 +309,7 @@ main (int argc, char *argv[])
|
||||
arguments.memdisk, arguments.pubkeys,
|
||||
arguments.npubkeys, arguments.config,
|
||||
arguments.image_target, arguments.note,
|
||||
- arguments.comp);
|
||||
+ arguments.comp, arguments.dtb);
|
||||
|
||||
grub_util_file_sync (fp);
|
||||
fclose (fp);
|
||||
diff --git a/util/mkimage.c b/util/mkimage.c
|
||||
index 6aa77ed73..e22d82afa 100644
|
||||
--- a/util/mkimage.c
|
||||
+++ b/util/mkimage.c
|
||||
@@ -777,13 +777,12 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
char *memdisk_path, char **pubkey_paths,
|
||||
size_t npubkeys, char *config_path,
|
||||
const struct grub_install_image_target_desc *image_target,
|
||||
- int note,
|
||||
- grub_compression_t comp)
|
||||
+ int note, grub_compression_t comp, const char *dtb_path)
|
||||
{
|
||||
char *kernel_img, *core_img;
|
||||
size_t total_module_size, core_size;
|
||||
size_t memdisk_size = 0, config_size = 0;
|
||||
- size_t prefix_size = 0;
|
||||
+ size_t prefix_size = 0, dtb_size = 0;
|
||||
char *kernel_path;
|
||||
size_t offset;
|
||||
struct grub_util_path_list *path_list, *p;
|
||||
@@ -828,6 +827,12 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
total_module_size += memdisk_size + sizeof (struct grub_module_header);
|
||||
}
|
||||
|
||||
+ if (dtb_path)
|
||||
+ {
|
||||
+ dtb_size = ALIGN_UP(grub_util_get_image_size (dtb_path), 4);
|
||||
+ total_module_size += dtb_size + sizeof (struct grub_module_header);
|
||||
+ }
|
||||
+
|
||||
if (config_path)
|
||||
{
|
||||
config_size = ALIGN_ADDR (grub_util_get_image_size (config_path) + 1);
|
||||
@@ -950,6 +955,19 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
offset += memdisk_size;
|
||||
}
|
||||
|
||||
+ if (dtb_path)
|
||||
+ {
|
||||
+ struct grub_module_header *header;
|
||||
+
|
||||
+ header = (struct grub_module_header *) (kernel_img + offset);
|
||||
+ header->type = grub_host_to_target32 (OBJ_TYPE_DTB);
|
||||
+ header->size = grub_host_to_target32 (dtb_size + sizeof (*header));
|
||||
+ offset += sizeof (*header);
|
||||
+
|
||||
+ grub_util_load_image (dtb_path, kernel_img + offset);
|
||||
+ offset += dtb_size;
|
||||
+ }
|
||||
+
|
||||
if (config_path)
|
||||
{
|
||||
struct grub_module_header *header;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
85
0020-Don-t-say-GNU-Linux-in-generated-menus.patch
Normal file
85
0020-Don-t-say-GNU-Linux-in-generated-menus.patch
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 14 Mar 2011 14:27:42 -0400
|
||||
Subject: [PATCH] Don't say "GNU/Linux" in generated menus.
|
||||
|
||||
[rharwood: say it even less]
|
||||
---
|
||||
grub-core/normal/main.c | 2 +-
|
||||
tests/util/grub-shell-tester.in | 2 +-
|
||||
tests/util/grub-shell.in | 2 +-
|
||||
util/grub.d/10_linux.in | 4 ++--
|
||||
util/grub.d/20_linux_xen.in | 4 ++--
|
||||
5 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 1317279c081..568c2adfa16 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -218,7 +218,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
|
||||
grub_term_cls (term);
|
||||
|
||||
- msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
|
||||
+ msg_formatted = grub_xasprintf (_("GRUB version %s"), PACKAGE_VERSION);
|
||||
if (!msg_formatted)
|
||||
return;
|
||||
|
||||
diff --git a/tests/util/grub-shell-tester.in b/tests/util/grub-shell-tester.in
|
||||
index 8a87109b152..9a4319d4f4f 100644
|
||||
--- a/tests/util/grub-shell-tester.in
|
||||
+++ b/tests/util/grub-shell-tester.in
|
||||
@@ -56,7 +56,7 @@ for option in "$@"; do
|
||||
usage
|
||||
exit 0 ;;
|
||||
-v | --version)
|
||||
- echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
||||
+ echo "$0 (GRUB ${PACKAGE_VERSION})"
|
||||
exit 0 ;;
|
||||
--modules=*)
|
||||
ms=`echo "$option" | sed -e 's/--modules=//'`
|
||||
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
|
||||
index 496e1bab33c..e0570c88e15 100644
|
||||
--- a/tests/util/grub-shell.in
|
||||
+++ b/tests/util/grub-shell.in
|
||||
@@ -243,7 +243,7 @@ for option in "$@"; do
|
||||
usage
|
||||
exit 0 ;;
|
||||
-v | --version)
|
||||
- echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
||||
+ echo "$0 (GRUB ${PACKAGE_VERSION})"
|
||||
exit 0 ;;
|
||||
--trim)
|
||||
trim=1 ;;
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 00d4b220ccb..901745707f1 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
CLASS="--class gnu-linux --class gnu --class os"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
- OS=GNU/Linux
|
||||
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
else
|
||||
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
+ OS="${GRUB_DISTRIBUTOR}"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
fi
|
||||
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index 94dd8be1342..98ee5bc58dc 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
CLASS="--class gnu-linux --class gnu --class os --class xen"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
- OS=GNU/Linux
|
||||
+ OS="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
else
|
||||
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
+ OS="${GRUB_DISTRIBUTOR}"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
fi
|
||||
|
||||
|
|
@ -1,25 +1,23 @@
|
|||
From 0464db837a67b88a761f100391b135a70b7054eb Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
||||
Date: Mon, 13 Jan 2014 21:50:59 -0500
|
||||
Subject: [PATCH 105/194] Add .eh_frame to list of relocations stripped
|
||||
Subject: [PATCH] Add .eh_frame to list of relocations stripped
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
conf/Makefile.common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
||||
index 311da61c6..044ab3abe 100644
|
||||
index b8f216f6cd3..ece9ed8a1bf 100644
|
||||
--- a/conf/Makefile.common
|
||||
+++ b/conf/Makefile.common
|
||||
@@ -38,7 +38,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
@@ -41,7 +41,7 @@ CFLAGS_KERNEL = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
LDFLAGS_KERNEL = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC)
|
||||
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
|
||||
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||
-STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx
|
||||
+STRIPFLAGS_KERNEL = -R .eh_frame -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version -R .MIPS.abiflags -R .ARM.exidx
|
||||
|
||||
CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding
|
||||
LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
|
||||
--
|
||||
2.13.5
|
||||
|
||||
if !COND_emu
|
||||
if COND_HAVE_ASM_USCORE
|
||||
LDFLAGS_KERNEL += -Wl,--defsym=_malloc=_grub_malloc -Wl,--defsym=_free=_grub_free
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
From 5a865b37866ee8cd64c080bc6fb1e537f8e2b3c6 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 21:26:36 +0200
|
||||
Subject: [PATCH 021/194] arm-coreboot: Support for vexpress timer.
|
||||
|
||||
---
|
||||
grub-core/kern/arm/coreboot/timer.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 36 insertions(+)
|
||||
|
||||
diff --git a/grub-core/kern/arm/coreboot/timer.c b/grub-core/kern/arm/coreboot/timer.c
|
||||
index ebefb99d5..d97b844f8 100644
|
||||
--- a/grub-core/kern/arm/coreboot/timer.c
|
||||
+++ b/grub-core/kern/arm/coreboot/timer.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/time.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
grub_uint64_t
|
||||
@@ -33,6 +34,39 @@ grub_uint32_t
|
||||
grub_arm_pfr1(void);
|
||||
|
||||
static int have_timer = 0;
|
||||
+static volatile grub_uint32_t *sp804_regs;
|
||||
+
|
||||
+static grub_uint64_t
|
||||
+sp804_get_time_ms (void)
|
||||
+{
|
||||
+ static grub_uint32_t high, last_low;
|
||||
+ grub_uint32_t low = ~sp804_regs[1];
|
||||
+ if (last_low > low)
|
||||
+ high++;
|
||||
+ last_low = low;
|
||||
+ return grub_divmod64 ((((grub_uint64_t) high) << 32) | low,
|
||||
+ 1000, 0);
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
+sp804_attach(const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ if (have_timer)
|
||||
+ return GRUB_ERR_NONE;
|
||||
+ sp804_regs = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+ if (!grub_fdtbus_is_mapping_valid (sp804_regs))
|
||||
+ return grub_error (GRUB_ERR_IO, "could not map sp804: %p", sp804_regs);
|
||||
+ grub_install_get_time_ms (sp804_get_time_ms);
|
||||
+ have_timer = 1;
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+struct grub_fdtbus_driver sp804 =
|
||||
+{
|
||||
+ .compatible = "arm,sp804",
|
||||
+ .attach = sp804_attach
|
||||
+};
|
||||
+
|
||||
static grub_uint32_t timer_frequency_in_khz;
|
||||
|
||||
static grub_uint64_t
|
||||
@@ -58,6 +92,8 @@ try_generic_timer (void)
|
||||
void
|
||||
grub_machine_timer_init (void)
|
||||
{
|
||||
+ grub_fdtbus_register (&sp804);
|
||||
+
|
||||
if (!have_timer)
|
||||
try_generic_timer ();
|
||||
if (!have_timer)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 2df38f07986a91d2a06cb3e432f9121d9f678f89 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 11 Feb 2014 11:14:50 -0500
|
||||
Subject: [PATCH 109/194] Don't require a password to boot entries generated by
|
||||
Subject: [PATCH] Don't require a password to boot entries generated by
|
||||
grub-mkconfig.
|
||||
|
||||
When we set a password, we just want that to mean you can't /edit/ an entry.
|
||||
|
|
@ -14,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 452a9f69d..79a747ebd 100644
|
||||
index 901745707f1..9c31a94decb 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -26,7 +26,7 @@ datarootdir="@datarootdir@"
|
||||
|
|
@ -26,6 +26,3 @@ index 452a9f69d..79a747ebd 100644
|
|||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
From ac6b41b89fbb82a3ba843a7ed19115d81432b604 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 21:29:48 +0200
|
||||
Subject: [PATCH 022/194] arm-coreboot: Export FDT routines.
|
||||
|
||||
We need to use them from modules as well.
|
||||
---
|
||||
grub-core/Makefile.am | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index fc6ca3051..147e6959c 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -246,7 +246,9 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdt.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/coreboot/kernel.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdtbus.h
|
||||
endif
|
||||
|
||||
if COND_arm_efi
|
||||
--
|
||||
2.13.5
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,7 @@
|
|||
From acf4cfa6d1691a9476b36949af7e296080c88d25 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
||||
Date: Wed, 19 Feb 2014 15:58:43 -0500
|
||||
Subject: [PATCH 112/194] use fw_path prefix when fallback searching for grub
|
||||
config
|
||||
Subject: [PATCH] use fw_path prefix when fallback searching for grub config
|
||||
|
||||
When PXE booting via UEFI firmware, grub was searching for grub.cfg
|
||||
in the fw_path directory where the grub application was found. If
|
||||
|
|
@ -18,10 +17,10 @@ Signed-off-by: Mark Salter <msalter@redhat.com>
|
|||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 0ce59fdc3..a3713efcd 100644
|
||||
index 568c2adfa16..0b2bbee19c3 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -343,7 +343,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -347,7 +347,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
char *config;
|
||||
const char *prefix, *fw_path;
|
||||
|
||||
|
|
@ -30,7 +29,7 @@ index 0ce59fdc3..a3713efcd 100644
|
|||
if (fw_path)
|
||||
{
|
||||
config = grub_xasprintf ("%s/grub.cfg", fw_path);
|
||||
@@ -366,7 +366,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
@@ -370,7 +370,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -40,6 +39,3 @@ index 0ce59fdc3..a3713efcd 100644
|
|||
if (prefix)
|
||||
{
|
||||
grub_size_t config_len;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
127
0024-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch
Normal file
127
0024-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2019 17:33:22 +0200
|
||||
Subject: [PATCH] Try mac/guid/etc before grub.cfg on tftp config files.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/normal/main.c | 97 ++++++++++++++++++++++++++-----------------------
|
||||
1 file changed, 51 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 0b2bbee19c3..4c89892fa70 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -345,61 +345,66 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
/* Guess the config filename. It is necessary to make CONFIG static,
|
||||
so that it won't get broken by longjmp. */
|
||||
char *config;
|
||||
- const char *prefix, *fw_path;
|
||||
-
|
||||
- prefix = fw_path = grub_env_get ("fw_path");
|
||||
- if (fw_path)
|
||||
- {
|
||||
- config = grub_xasprintf ("%s/grub.cfg", fw_path);
|
||||
- if (config)
|
||||
- {
|
||||
- grub_file_t file;
|
||||
-
|
||||
- file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
- if (file)
|
||||
- {
|
||||
- grub_file_close (file);
|
||||
- grub_enter_normal_mode (config);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Ignore all errors. */
|
||||
- grub_errno = 0;
|
||||
- }
|
||||
- grub_free (config);
|
||||
- }
|
||||
- }
|
||||
+ const char *prefix;
|
||||
+ const char *net_search_cfg;
|
||||
+ int disable_net_search = 0;
|
||||
|
||||
+ prefix = grub_env_get ("fw_path");
|
||||
if (! prefix)
|
||||
prefix = grub_env_get ("prefix");
|
||||
+
|
||||
+ net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
+ if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
+ disable_net_search = 1;
|
||||
+
|
||||
if (prefix)
|
||||
{
|
||||
- grub_size_t config_len;
|
||||
- int disable_net_search = 0;
|
||||
- const char *net_search_cfg;
|
||||
-
|
||||
- config_len = grub_strlen (prefix) +
|
||||
- sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
- config = grub_malloc (config_len);
|
||||
-
|
||||
- if (!config)
|
||||
- goto quit;
|
||||
-
|
||||
- grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
-
|
||||
- net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
- if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
- disable_net_search = 1;
|
||||
-
|
||||
if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
!disable_net_search)
|
||||
- grub_net_search_config_file (config);
|
||||
+ {
|
||||
+ grub_size_t config_len;
|
||||
+ config_len = grub_strlen (prefix) +
|
||||
+ sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
+ config = grub_malloc (config_len);
|
||||
|
||||
- grub_enter_normal_mode (config);
|
||||
- grub_free (config);
|
||||
- }
|
||||
+ if (! config)
|
||||
+ goto quit;
|
||||
+
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+
|
||||
+ grub_net_search_configfile (config);
|
||||
+
|
||||
+ grub_enter_normal_mode (config);
|
||||
+ grub_free (config);
|
||||
+ config = NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (!config)
|
||||
+ {
|
||||
+ config = grub_xasprintf ("%s/grub.cfg", prefix);
|
||||
+ if (config)
|
||||
+ {
|
||||
+ grub_file_t file;
|
||||
+
|
||||
+ file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
+ if (file)
|
||||
+ {
|
||||
+ grub_file_close (file);
|
||||
+ grub_enter_normal_mode (config);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Ignore all errors. */
|
||||
+ grub_errno = 0;
|
||||
+ }
|
||||
+ grub_free (config);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- grub_enter_normal_mode (0);
|
||||
+ {
|
||||
+ grub_enter_normal_mode (0);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
grub_enter_normal_mode (argv[0]);
|
||||
|
|
@ -1,249 +0,0 @@
|
|||
From 848bed9d92cf20e9f25db4c69a20efad23996ca0 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 21:42:37 +0200
|
||||
Subject: [PATCH 024/194] arm_coreboot: Support keyboard for vexpress.
|
||||
|
||||
---
|
||||
grub-core/Makefile.am | 1 +
|
||||
grub-core/Makefile.core.def | 3 +
|
||||
grub-core/kern/arm/coreboot/init.c | 1 +
|
||||
grub-core/term/arm/pl050.c | 189 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 194 insertions(+)
|
||||
create mode 100644 grub-core/term/arm/pl050.c
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index 147e6959c..a2aaf9f54 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -240,6 +240,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
endif
|
||||
|
||||
if COND_arm_coreboot
|
||||
+KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 6ade6e950..6be6e7f61 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -160,6 +160,9 @@ kernel = {
|
||||
arm_coreboot = kern/arm/coreboot/coreboot.S;
|
||||
arm_coreboot = lib/fdt.c;
|
||||
arm_coreboot = bus/fdt.c;
|
||||
+ arm_coreboot = term/ps2.c;
|
||||
+ arm_coreboot = term/arm/pl050.c;
|
||||
+ arm_coreboot = commands/keylayouts.c;
|
||||
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c
|
||||
index aec75c672..a06ccb72f 100644
|
||||
--- a/grub-core/kern/arm/coreboot/init.c
|
||||
+++ b/grub-core/kern/arm/coreboot/init.c
|
||||
@@ -133,6 +133,7 @@ grub_machine_init (void)
|
||||
grub_fdtbus_init (dtb, dtb_size);
|
||||
|
||||
grub_machine_timer_init ();
|
||||
+ grub_pl050_init ();
|
||||
}
|
||||
|
||||
void
|
||||
diff --git a/grub-core/term/arm/pl050.c b/grub-core/term/arm/pl050.c
|
||||
new file mode 100644
|
||||
index 000000000..e4cda3056
|
||||
--- /dev/null
|
||||
+++ b/grub-core/term/arm/pl050.c
|
||||
@@ -0,0 +1,189 @@
|
||||
+/*
|
||||
+ * 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 <grub/ps2.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+#include <grub/at_keyboard.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/term.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/ps2.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+
|
||||
+static volatile grub_uint32_t *pl050_regs;
|
||||
+
|
||||
+struct grub_ps2_state ps2_state;
|
||||
+
|
||||
+static void
|
||||
+keyboard_controller_wait_until_ready (void)
|
||||
+{
|
||||
+ while (! (pl050_regs[1] & 0x40));
|
||||
+}
|
||||
+
|
||||
+static grub_uint8_t
|
||||
+wait_ack (void)
|
||||
+{
|
||||
+ grub_uint64_t endtime;
|
||||
+ grub_uint8_t ack;
|
||||
+
|
||||
+ endtime = grub_get_time_ms () + 20;
|
||||
+ do
|
||||
+ ack = pl050_regs[2];
|
||||
+ while (ack != GRUB_AT_ACK && ack != GRUB_AT_NACK
|
||||
+ && grub_get_time_ms () < endtime);
|
||||
+ return ack;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+write_mode (int mode)
|
||||
+{
|
||||
+ unsigned i;
|
||||
+ for (i = 0; i < GRUB_AT_TRIES; i++)
|
||||
+ {
|
||||
+ grub_uint8_t ack;
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ pl050_regs[2] = 0xf0;
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ pl050_regs[2] = mode;
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ ack = wait_ack ();
|
||||
+ if (ack == GRUB_AT_NACK)
|
||||
+ continue;
|
||||
+ if (ack == GRUB_AT_ACK)
|
||||
+ break;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return (i != GRUB_AT_TRIES);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+query_mode (void)
|
||||
+{
|
||||
+ grub_uint8_t ret;
|
||||
+ int e;
|
||||
+
|
||||
+ e = write_mode (0);
|
||||
+ if (!e)
|
||||
+ return 0;
|
||||
+
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+
|
||||
+ do
|
||||
+ ret = pl050_regs[2];
|
||||
+ while (ret == GRUB_AT_ACK);
|
||||
+
|
||||
+ /* QEMU translates the set even in no-translate mode. */
|
||||
+ if (ret == 0x43 || ret == 1)
|
||||
+ return 1;
|
||||
+ if (ret == 0x41 || ret == 2)
|
||||
+ return 2;
|
||||
+ if (ret == 0x3f || ret == 3)
|
||||
+ return 3;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+set_scancodes (void)
|
||||
+{
|
||||
+ write_mode (2);
|
||||
+ ps2_state.current_set = query_mode ();
|
||||
+ grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
+ if (ps2_state.current_set == 2)
|
||||
+ return;
|
||||
+
|
||||
+ write_mode (1);
|
||||
+ ps2_state.current_set = query_mode ();
|
||||
+ grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
+ if (ps2_state.current_set == 1)
|
||||
+ return;
|
||||
+ grub_dprintf ("atkeyb", "no supported scancode set found\n");
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+keyboard_controller_led (grub_uint8_t leds)
|
||||
+{
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ pl050_regs[2] = 0xed;
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ pl050_regs[2] = leds & 0x7;
|
||||
+}
|
||||
+
|
||||
+/* If there is a character pending, return it;
|
||||
+ otherwise return GRUB_TERM_NO_KEY. */
|
||||
+static int
|
||||
+grub_pl050_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
+{
|
||||
+ grub_uint8_t at_key;
|
||||
+ int ret;
|
||||
+ grub_uint8_t old_led;
|
||||
+
|
||||
+ if (!(pl050_regs[1] & 0x10))
|
||||
+ return -1;
|
||||
+ at_key = pl050_regs[2];
|
||||
+ old_led = ps2_state.led_status;
|
||||
+
|
||||
+ ret = grub_ps2_process_incoming_byte (&ps2_state, at_key);
|
||||
+ if (old_led != ps2_state.led_status)
|
||||
+ keyboard_controller_led (ps2_state.led_status);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct grub_term_input grub_pl050_keyboard_term =
|
||||
+ {
|
||||
+ .name = "pl050_keyboard",
|
||||
+ .getkey = grub_pl050_keyboard_getkey
|
||||
+ };
|
||||
+
|
||||
+static grub_err_t
|
||||
+pl050_attach(const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ const grub_uint32_t *reg;
|
||||
+ reg = grub_fdtbus_get_prop (dev, "reg", 0);
|
||||
+
|
||||
+ /* Mouse. Nothing to do. */
|
||||
+ if (grub_be_to_cpu32 (*reg) == 0x7000)
|
||||
+ return 0;
|
||||
+
|
||||
+ pl050_regs = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+
|
||||
+ if (!grub_fdtbus_is_mapping_valid (pl050_regs))
|
||||
+ return grub_error (GRUB_ERR_IO, "could not map pl050");
|
||||
+
|
||||
+ ps2_state.at_keyboard_status = 0;
|
||||
+ set_scancodes ();
|
||||
+ keyboard_controller_led (ps2_state.led_status);
|
||||
+
|
||||
+ grub_term_register_input ("pl050_keyboard", &grub_pl050_keyboard_term);
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+struct grub_fdtbus_driver pl050 =
|
||||
+{
|
||||
+ .compatible = "arm,pl050",
|
||||
+ .attach = pl050_attach
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+grub_pl050_init (void)
|
||||
+{
|
||||
+ grub_fdtbus_register (&pl050);
|
||||
+}
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
From 7ca8e2b9e23a3588654d53a8e84bb22743896f80 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 4 Sep 2014 14:23:23 -0400
|
||||
Subject: [PATCH 121/194] Generate OS and CLASS in 10_linux from
|
||||
/etc/os-release
|
||||
Subject: [PATCH] Generate OS and CLASS in 10_linux from /etc/os-release
|
||||
|
||||
This makes us use pretty names in the titles we generate in
|
||||
grub2-mkconfig when GRUB_DISTRIBUTOR isn't set.
|
||||
|
|
@ -15,7 +14,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index a9692a0c2..c6627268c 100644
|
||||
index 9c31a94decb..b7809091b36 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -29,7 +29,8 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
|
@ -28,6 +27,3 @@ index a9692a0c2..c6627268c 100644
|
|||
else
|
||||
OS="${GRUB_DISTRIBUTOR}"
|
||||
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
From 3edabad8fefb112cc4b2d43be6e97d43c909ceee Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 21:59:48 +0200
|
||||
Subject: [PATCH 025/194] arm_coreboot: Support grub-mkstandalone.
|
||||
|
||||
---
|
||||
include/grub/util/install.h | 6 +++++-
|
||||
util/grub-install-common.c | 12 ++++++++++--
|
||||
util/grub-install.c | 7 +++++++
|
||||
3 files changed, 22 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/include/grub/util/install.h b/include/grub/util/install.h
|
||||
index 6abd288c3..5910b0c09 100644
|
||||
--- a/include/grub/util/install.h
|
||||
+++ b/include/grub/util/install.h
|
||||
@@ -29,6 +29,8 @@
|
||||
#define GRUB_INSTALL_OPTIONS \
|
||||
{ "modules", GRUB_INSTALL_OPTIONS_MODULES, N_("MODULES"), \
|
||||
0, N_("pre-load specified modules MODULES"), 1 }, \
|
||||
+ { "dtb", GRUB_INSTALL_OPTIONS_DTB, N_("FILE"), \
|
||||
+ 0, N_("embed a specific DTB"), 1 }, \
|
||||
{ "install-modules", GRUB_INSTALL_OPTIONS_INSTALL_MODULES, \
|
||||
N_("MODULES"), 0, \
|
||||
N_("install only MODULES and their dependencies [default=all]"), 1 }, \
|
||||
@@ -99,6 +101,7 @@ enum grub_install_plat
|
||||
GRUB_INSTALL_PLATFORM_I386_XEN,
|
||||
GRUB_INSTALL_PLATFORM_X86_64_XEN,
|
||||
GRUB_INSTALL_PLATFORM_ARM64_EFI,
|
||||
+ GRUB_INSTALL_PLATFORM_ARM_COREBOOT,
|
||||
GRUB_INSTALL_PLATFORM_MAX
|
||||
};
|
||||
|
||||
@@ -115,7 +118,8 @@ enum grub_install_options {
|
||||
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY,
|
||||
GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY,
|
||||
GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE,
|
||||
- GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS
|
||||
+ GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS,
|
||||
+ GRUB_INSTALL_OPTIONS_DTB
|
||||
};
|
||||
|
||||
extern char *grub_install_source_directory;
|
||||
diff --git a/util/grub-install-common.c b/util/grub-install-common.c
|
||||
index 8539ff348..9e3e358c9 100644
|
||||
--- a/util/grub-install-common.c
|
||||
+++ b/util/grub-install-common.c
|
||||
@@ -73,6 +73,7 @@ grub_install_help_filter (int key, const char *text,
|
||||
|
||||
static int (*compress_func) (const char *src, const char *dest) = NULL;
|
||||
char *grub_install_copy_buffer;
|
||||
+static char *dtb;
|
||||
|
||||
int
|
||||
grub_install_copy_file (const char *src,
|
||||
@@ -364,6 +365,11 @@ grub_install_parse (int key, char *arg)
|
||||
case GRUB_INSTALL_OPTIONS_INSTALL_FONTS:
|
||||
handle_install_list (&install_fonts, arg, 0);
|
||||
return 1;
|
||||
+ case GRUB_INSTALL_OPTIONS_DTB:
|
||||
+ if (dtb)
|
||||
+ free (dtb);
|
||||
+ dtb = xstrdup (arg);
|
||||
+ return 1;
|
||||
case GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS:
|
||||
if (strcmp (arg, "no") == 0
|
||||
|| strcmp (arg, "none") == 0)
|
||||
@@ -486,9 +492,10 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix,
|
||||
|
||||
grub_util_info ("grub-mkimage --directory '%s' --prefix '%s'"
|
||||
" --output '%s' "
|
||||
+ " --dtb '%s' "
|
||||
"--format '%s' --compression '%s' %s %s\n",
|
||||
dir, prefix,
|
||||
- outname, mkimage_target,
|
||||
+ outname, dtb ? : "", mkimage_target,
|
||||
compnames[compression], note ? "--note" : "", s);
|
||||
free (s);
|
||||
|
||||
@@ -499,7 +506,7 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix,
|
||||
grub_install_generate_image (dir, prefix, fp, outname,
|
||||
modules.entries, memdisk_path,
|
||||
pubkeys, npubkeys, config_path, tgt,
|
||||
- note, compression, 0);
|
||||
+ note, compression, dtb);
|
||||
while (dc--)
|
||||
grub_install_pop_module ();
|
||||
}
|
||||
@@ -666,6 +673,7 @@ static struct
|
||||
[GRUB_INSTALL_PLATFORM_ARM_EFI] = { "arm", "efi" },
|
||||
[GRUB_INSTALL_PLATFORM_ARM64_EFI] = { "arm64", "efi" },
|
||||
[GRUB_INSTALL_PLATFORM_ARM_UBOOT] = { "arm", "uboot" },
|
||||
+ [GRUB_INSTALL_PLATFORM_ARM_COREBOOT] = { "arm", "coreboot" },
|
||||
};
|
||||
|
||||
char *
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 9074d3e9e..75e3e5ba6 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -486,6 +486,7 @@ have_bootdev (enum grub_install_plat pl)
|
||||
|
||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||
@@ -911,6 +912,7 @@ main (int argc, char *argv[])
|
||||
|
||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
@@ -946,6 +948,7 @@ main (int argc, char *argv[])
|
||||
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
@@ -1448,6 +1451,7 @@ main (int argc, char *argv[])
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
|
||||
case GRUB_INSTALL_PLATFORM_I386_QEMU:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||
@@ -1542,6 +1546,7 @@ main (int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
|
||||
case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
|
||||
@@ -1629,6 +1634,7 @@ main (int argc, char *argv[])
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_PC:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
||||
@@ -1889,6 +1895,7 @@ main (int argc, char *argv[])
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
|
||||
case GRUB_INSTALL_PLATFORM_I386_COREBOOT:
|
||||
+ case GRUB_INSTALL_PLATFORM_ARM_COREBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_I386_MULTIBOOT:
|
||||
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
|
||||
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
|
||||
--
|
||||
2.13.5
|
||||
|
||||
225
0026-Try-prefix-if-fw_path-doesn-t-work.patch
Normal file
225
0026-Try-prefix-if-fw_path-doesn-t-work.patch
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2019 10:35:16 +0200
|
||||
Subject: [PATCH] Try $prefix if $fw_path doesn't work.
|
||||
|
||||
Related: rhbz#1148652
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/kern/ieee1275/init.c | 34 ++++++-----
|
||||
grub-core/net/net.c | 2 +-
|
||||
grub-core/normal/main.c | 134 ++++++++++++++++++++---------------------
|
||||
3 files changed, 85 insertions(+), 85 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
|
||||
index 50c65b2f6e5..51c1e1c9d9f 100644
|
||||
--- a/grub-core/kern/ieee1275/init.c
|
||||
+++ b/grub-core/kern/ieee1275/init.c
|
||||
@@ -170,23 +170,25 @@ grub_machine_get_bootlocation (char **device, char **path)
|
||||
grub_free (canon);
|
||||
}
|
||||
else
|
||||
- *device = grub_ieee1275_encode_devname (bootpath);
|
||||
+ {
|
||||
+ filename = grub_ieee1275_get_filename (bootpath);
|
||||
+ if (filename)
|
||||
+ {
|
||||
+ char *lastslash = grub_strrchr (filename, '\\');
|
||||
+
|
||||
+ /* Truncate at last directory. */
|
||||
+ if (lastslash)
|
||||
+ {
|
||||
+ *lastslash = '\0';
|
||||
+ grub_translate_ieee1275_path (filename);
|
||||
+
|
||||
+ *path = filename;
|
||||
+ }
|
||||
+ }
|
||||
+ *device = grub_ieee1275_encode_devname (bootpath);
|
||||
+ }
|
||||
+
|
||||
grub_free (type);
|
||||
-
|
||||
- filename = grub_ieee1275_get_filename (bootpath);
|
||||
- if (filename)
|
||||
- {
|
||||
- char *lastslash = grub_strrchr (filename, '\\');
|
||||
-
|
||||
- /* Truncate at last directory. */
|
||||
- if (lastslash)
|
||||
- {
|
||||
- *lastslash = '\0';
|
||||
- grub_translate_ieee1275_path (filename);
|
||||
-
|
||||
- *path = filename;
|
||||
- }
|
||||
- }
|
||||
grub_free (bootpath);
|
||||
}
|
||||
|
||||
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
||||
index 8cad4fb6d4d..54451cea2a7 100644
|
||||
--- a/grub-core/net/net.c
|
||||
+++ b/grub-core/net/net.c
|
||||
@@ -2005,7 +2005,7 @@ grub_net_search_config_file (char *config)
|
||||
/* Remove the remaining minus sign at the end. */
|
||||
config[config_len] = '\0';
|
||||
|
||||
- return GRUB_ERR_NONE;
|
||||
+ return GRUB_ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
static struct grub_preboot *fini_hnd;
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 4c89892fa70..3463f444f74 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -335,81 +335,79 @@ grub_enter_normal_mode (const char *config)
|
||||
grub_boot_time ("Exiting normal mode");
|
||||
}
|
||||
|
||||
+static grub_err_t
|
||||
+grub_try_normal (const char *variable)
|
||||
+{
|
||||
+ char *config;
|
||||
+ const char *prefix;
|
||||
+ grub_err_t err = GRUB_ERR_FILE_NOT_FOUND;
|
||||
+ const char *net_search_cfg;
|
||||
+ int disable_net_search = 0;
|
||||
+
|
||||
+ prefix = grub_env_get (variable);
|
||||
+ if (!prefix)
|
||||
+ return GRUB_ERR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
+ if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
+ disable_net_search = 1;
|
||||
+
|
||||
+ if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
+ !disable_net_search)
|
||||
+ {
|
||||
+ grub_size_t config_len;
|
||||
+ config_len = grub_strlen (prefix) +
|
||||
+ sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
+ config = grub_malloc (config_len);
|
||||
+
|
||||
+ if (! config)
|
||||
+ return GRUB_ERR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
+ err = grub_net_search_config_file (config);
|
||||
+ }
|
||||
+
|
||||
+ if (err != GRUB_ERR_NONE)
|
||||
+ {
|
||||
+ config = grub_xasprintf ("%s/grub.cfg", prefix);
|
||||
+ if (config)
|
||||
+ {
|
||||
+ grub_file_t file;
|
||||
+ file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
+ if (file)
|
||||
+ {
|
||||
+ grub_file_close (file);
|
||||
+ err = GRUB_ERR_NONE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (err == GRUB_ERR_NONE)
|
||||
+ grub_enter_normal_mode (config);
|
||||
+
|
||||
+ grub_errno = 0;
|
||||
+ grub_free (config);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
/* Enter normal mode from rescue mode. */
|
||||
static grub_err_t
|
||||
grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
- if (argc == 0)
|
||||
- {
|
||||
- /* Guess the config filename. It is necessary to make CONFIG static,
|
||||
- so that it won't get broken by longjmp. */
|
||||
- char *config;
|
||||
- const char *prefix;
|
||||
- const char *net_search_cfg;
|
||||
- int disable_net_search = 0;
|
||||
-
|
||||
- prefix = grub_env_get ("fw_path");
|
||||
- if (! prefix)
|
||||
- prefix = grub_env_get ("prefix");
|
||||
-
|
||||
- net_search_cfg = grub_env_get ("feature_net_search_cfg");
|
||||
- if (net_search_cfg && net_search_cfg[0] == 'n')
|
||||
- disable_net_search = 1;
|
||||
-
|
||||
- if (prefix)
|
||||
- {
|
||||
- if (grub_strncmp (prefix + 1, "tftp", sizeof ("tftp") - 1) == 0 &&
|
||||
- !disable_net_search)
|
||||
- {
|
||||
- grub_size_t config_len;
|
||||
- config_len = grub_strlen (prefix) +
|
||||
- sizeof ("/grub.cfg-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
|
||||
- config = grub_malloc (config_len);
|
||||
-
|
||||
- if (! config)
|
||||
- goto quit;
|
||||
-
|
||||
- grub_snprintf (config, config_len, "%s/grub.cfg", prefix);
|
||||
-
|
||||
- grub_net_search_configfile (config);
|
||||
-
|
||||
- grub_enter_normal_mode (config);
|
||||
- grub_free (config);
|
||||
- config = NULL;
|
||||
- }
|
||||
-
|
||||
- if (!config)
|
||||
- {
|
||||
- config = grub_xasprintf ("%s/grub.cfg", prefix);
|
||||
- if (config)
|
||||
- {
|
||||
- grub_file_t file;
|
||||
-
|
||||
- file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||
- if (file)
|
||||
- {
|
||||
- grub_file_close (file);
|
||||
- grub_enter_normal_mode (config);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Ignore all errors. */
|
||||
- grub_errno = 0;
|
||||
- }
|
||||
- grub_free (config);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- grub_enter_normal_mode (0);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
+ if (argc)
|
||||
grub_enter_normal_mode (argv[0]);
|
||||
+ else
|
||||
+ {
|
||||
+ /* Guess the config filename. */
|
||||
+ grub_err_t err;
|
||||
+ err = grub_try_normal ("fw_path");
|
||||
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
|
||||
+ err = grub_try_normal ("prefix");
|
||||
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
|
||||
+ grub_enter_normal_mode (0);
|
||||
+ }
|
||||
|
||||
-quit:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,302 +0,0 @@
|
|||
From 656c3b0d7fbe23f0e1ab561c8faa4ac4a37364d1 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 22:00:06 +0200
|
||||
Subject: [PATCH 026/194] arm_coreboot: Support loading linux images.
|
||||
|
||||
---
|
||||
grub-core/loader/arm/linux.c | 132 ++++++++++++++++++++++---------------------
|
||||
include/grub/arm/linux.h | 16 ++++++
|
||||
2 files changed, 83 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
|
||||
index 01374ee78..260cbf068 100644
|
||||
--- a/grub-core/loader/arm/linux.c
|
||||
+++ b/grub-core/loader/arm/linux.c
|
||||
@@ -31,8 +31,6 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
-#ifndef GRUB_MACHINE_COREBOOT
|
||||
-
|
||||
static grub_dl_t my_mod;
|
||||
|
||||
static grub_addr_t initrd_start;
|
||||
@@ -44,7 +42,7 @@ static grub_size_t linux_size;
|
||||
static char *linux_args;
|
||||
|
||||
static grub_uint32_t machine_type;
|
||||
-static void *fdt_addr;
|
||||
+static const void *current_fdt;
|
||||
|
||||
typedef void (*kernel_entry_t) (int, unsigned long, void *);
|
||||
|
||||
@@ -56,9 +54,9 @@ typedef void (*kernel_entry_t) (int, unsigned long, void *);
|
||||
#define LINUX_FDT_PHYS_OFFSET (LINUX_INITRD_PHYS_OFFSET - 0x10000)
|
||||
|
||||
static grub_size_t
|
||||
-get_atag_size (grub_uint32_t *atag)
|
||||
+get_atag_size (const grub_uint32_t *atag)
|
||||
{
|
||||
- grub_uint32_t *atag0 = atag;
|
||||
+ const grub_uint32_t *atag0 = atag;
|
||||
while (atag[0] && atag[1])
|
||||
atag += atag[0];
|
||||
return atag - atag0;
|
||||
@@ -70,10 +68,11 @@ get_atag_size (grub_uint32_t *atag)
|
||||
* Merges in command line parameters and sets up initrd addresses.
|
||||
*/
|
||||
static grub_err_t
|
||||
-linux_prepare_atag (void)
|
||||
+linux_prepare_atag (void *target_atag)
|
||||
{
|
||||
- grub_uint32_t *atag_orig = (grub_uint32_t *) fdt_addr;
|
||||
- grub_uint32_t *tmp_atag, *from, *to;
|
||||
+ const grub_uint32_t *atag_orig = (const grub_uint32_t *) current_fdt;
|
||||
+ grub_uint32_t *tmp_atag, *to;
|
||||
+ const grub_uint32_t *from;
|
||||
grub_size_t tmp_size;
|
||||
grub_size_t arg_size = grub_strlen (linux_args);
|
||||
char *cmdline_orig = NULL;
|
||||
@@ -144,7 +143,7 @@ linux_prepare_atag (void)
|
||||
to += 2;
|
||||
|
||||
/* Copy updated FDT to its launch location */
|
||||
- grub_memcpy (atag_orig, tmp_atag, sizeof (grub_uint32_t) * (to - tmp_atag));
|
||||
+ grub_memcpy (target_atag, tmp_atag, sizeof (grub_uint32_t) * (to - tmp_atag));
|
||||
grub_free (tmp_atag);
|
||||
|
||||
grub_dprintf ("loader", "ATAG updated for Linux boot\n");
|
||||
@@ -158,19 +157,19 @@ linux_prepare_atag (void)
|
||||
* Merges in command line parameters and sets up initrd addresses.
|
||||
*/
|
||||
static grub_err_t
|
||||
-linux_prepare_fdt (void)
|
||||
+linux_prepare_fdt (void *target_fdt)
|
||||
{
|
||||
int node;
|
||||
int retval;
|
||||
int tmp_size;
|
||||
void *tmp_fdt;
|
||||
|
||||
- tmp_size = grub_fdt_get_totalsize (fdt_addr) + 0x100 + grub_strlen (linux_args);
|
||||
+ tmp_size = grub_fdt_get_totalsize (current_fdt) + 0x100 + grub_strlen (linux_args);
|
||||
tmp_fdt = grub_malloc (tmp_size);
|
||||
if (!tmp_fdt)
|
||||
return grub_errno;
|
||||
|
||||
- grub_memcpy (tmp_fdt, fdt_addr, grub_fdt_get_totalsize (fdt_addr));
|
||||
+ grub_memcpy (tmp_fdt, current_fdt, grub_fdt_get_totalsize (current_fdt));
|
||||
grub_fdt_set_totalsize (tmp_fdt, tmp_size);
|
||||
|
||||
/* Find or create '/chosen' node */
|
||||
@@ -211,7 +210,7 @@ linux_prepare_fdt (void)
|
||||
}
|
||||
|
||||
/* Copy updated FDT to its launch location */
|
||||
- grub_memcpy (fdt_addr, tmp_fdt, tmp_size);
|
||||
+ grub_memcpy (target_fdt, tmp_fdt, tmp_size);
|
||||
grub_free (tmp_fdt);
|
||||
|
||||
grub_dprintf ("loader", "FDT updated for Linux boot\n");
|
||||
@@ -228,16 +227,17 @@ linux_boot (void)
|
||||
{
|
||||
kernel_entry_t linuxmain;
|
||||
int fdt_valid, atag_valid;
|
||||
+ void *target_fdt = 0;
|
||||
|
||||
- fdt_valid = (fdt_addr && grub_fdt_check_header_nosize (fdt_addr) == 0);
|
||||
- atag_valid = ((((grub_uint16_t *) fdt_addr)[3] & ~3) == 0x5440
|
||||
- && *((grub_uint32_t *) fdt_addr));
|
||||
+ fdt_valid = (current_fdt && grub_fdt_check_header_nosize (current_fdt) == 0);
|
||||
+ atag_valid = ((((const grub_uint16_t *) current_fdt)[3] & ~3) == 0x5440
|
||||
+ && *((const grub_uint32_t *) current_fdt));
|
||||
grub_dprintf ("loader", "atag: %p, %x, %x, %s, %s\n",
|
||||
- fdt_addr,
|
||||
- ((grub_uint16_t *) fdt_addr)[3],
|
||||
- *((grub_uint32_t *) fdt_addr),
|
||||
- (char *) fdt_addr,
|
||||
- (char *) fdt_addr + 1);
|
||||
+ current_fdt,
|
||||
+ ((const grub_uint16_t *) current_fdt)[3],
|
||||
+ *((const grub_uint32_t *) current_fdt),
|
||||
+ (const char *) current_fdt,
|
||||
+ (const char *) current_fdt + 1);
|
||||
|
||||
if (!fdt_valid && machine_type == GRUB_ARM_MACHINE_TYPE_FDT)
|
||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
@@ -247,23 +247,40 @@ linux_boot (void)
|
||||
|
||||
grub_dprintf ("loader", "Kernel at: 0x%x\n", linux_addr);
|
||||
|
||||
+ if (fdt_valid || atag_valid)
|
||||
+ {
|
||||
+#ifdef GRUB_MACHINE_EFI
|
||||
+ grub_size_t size;
|
||||
+ if (fdt_valid)
|
||||
+ size = grub_fdt_get_totalsize (fdt_addr);
|
||||
+ else
|
||||
+ size = 4 * get_atag_size (atag_orig);
|
||||
+ size += grub_strlen (linux_args) + 256;
|
||||
+ target_fdt = grub_efi_allocate_loader_memory (LINUX_FDT_PHYS_OFFSET, size);
|
||||
+ if (!fdt_addr)
|
||||
+ return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
+#else
|
||||
+ target_fdt = (void *) LINUX_FDT_ADDRESS;
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
if (fdt_valid)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
- err = linux_prepare_fdt ();
|
||||
+ err = linux_prepare_fdt (target_fdt);
|
||||
if (err)
|
||||
return err;
|
||||
- grub_dprintf ("loader", "FDT @ 0x%p\n", fdt_addr);
|
||||
+ grub_dprintf ("loader", "FDT @ %p\n", target_fdt);
|
||||
}
|
||||
else if (atag_valid)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
- err = linux_prepare_atag ();
|
||||
+ err = linux_prepare_atag (target_fdt);
|
||||
if (err)
|
||||
return err;
|
||||
- grub_dprintf ("loader", "ATAG @ 0x%p\n", fdt_addr);
|
||||
+ grub_dprintf ("loader", "ATAG @ %p\n", target_fdt);
|
||||
}
|
||||
|
||||
grub_dprintf ("loader", "Jumping to Linux...\n");
|
||||
@@ -287,7 +304,7 @@ linux_boot (void)
|
||||
|
||||
grub_arm_disable_caches_mmu ();
|
||||
|
||||
- linuxmain (0, machine_type, fdt_addr);
|
||||
+ linuxmain (0, machine_type, target_fdt);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_OS, "Linux call returned");
|
||||
}
|
||||
@@ -446,11 +463,26 @@ fail:
|
||||
static grub_err_t
|
||||
load_dtb (grub_file_t dtb, int size)
|
||||
{
|
||||
- if ((grub_file_read (dtb, fdt_addr, size) != size)
|
||||
- || (grub_fdt_check_header (fdt_addr, size) != 0))
|
||||
- return grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree"));
|
||||
+ void *new_fdt = grub_zalloc (size);
|
||||
+ if (!new_fdt)
|
||||
+ return grub_errno;
|
||||
+ grub_dprintf ("loader", "Loading device tree to %p\n",
|
||||
+ new_fdt);
|
||||
+ if ((grub_file_read (dtb, new_fdt, size) != size)
|
||||
+ || (grub_fdt_check_header (new_fdt, size) != 0))
|
||||
+ {
|
||||
+ grub_free (new_fdt);
|
||||
+ return grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree"));
|
||||
+ }
|
||||
+
|
||||
+ grub_fdt_set_totalsize (new_fdt, size);
|
||||
+ current_fdt = new_fdt;
|
||||
+ /*
|
||||
+ * We've successfully loaded an FDT, so any machine type passed
|
||||
+ * from firmware is now obsolete.
|
||||
+ */
|
||||
+ machine_type = GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
|
||||
- grub_fdt_set_totalsize (fdt_addr, size);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
@@ -466,42 +498,13 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
dtb = grub_file_open (argv[0]);
|
||||
if (!dtb)
|
||||
- goto out;
|
||||
+ return grub_errno;
|
||||
|
||||
size = grub_file_size (dtb);
|
||||
if (size == 0)
|
||||
- {
|
||||
- grub_error (GRUB_ERR_BAD_OS, "empty file");
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
-#ifdef GRUB_MACHINE_EFI
|
||||
- fdt_addr = grub_efi_allocate_loader_memory (LINUX_FDT_PHYS_OFFSET, size);
|
||||
- if (!fdt_addr)
|
||||
- {
|
||||
- grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
- goto out;
|
||||
- }
|
||||
-#else
|
||||
- fdt_addr = (void *) LINUX_FDT_ADDRESS;
|
||||
-#endif
|
||||
-
|
||||
- grub_dprintf ("loader", "Loading device tree to 0x%08x\n",
|
||||
- (grub_addr_t) fdt_addr);
|
||||
- load_dtb (dtb, size);
|
||||
- if (grub_errno != GRUB_ERR_NONE)
|
||||
- {
|
||||
- fdt_addr = NULL;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * We've successfully loaded an FDT, so any machine type passed
|
||||
- * from firmware is now obsolete.
|
||||
- */
|
||||
- machine_type = GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
-
|
||||
- out:
|
||||
+ grub_error (GRUB_ERR_BAD_OS, "empty file");
|
||||
+ else
|
||||
+ load_dtb (dtb, size);
|
||||
grub_file_close (dtb);
|
||||
|
||||
return grub_errno;
|
||||
@@ -519,7 +522,7 @@ GRUB_MOD_INIT (linux)
|
||||
/* TRANSLATORS: DTB stands for device tree blob. */
|
||||
0, N_("Load DTB file."));
|
||||
my_mod = mod;
|
||||
- fdt_addr = (void *) grub_arm_firmware_get_boot_data ();
|
||||
+ current_fdt = grub_arm_firmware_get_boot_data ();
|
||||
machine_type = grub_arm_firmware_get_machine_type ();
|
||||
}
|
||||
|
||||
@@ -529,4 +532,3 @@ GRUB_MOD_FINI (linux)
|
||||
grub_unregister_command (cmd_initrd);
|
||||
grub_unregister_command (cmd_devicetree);
|
||||
}
|
||||
-#endif
|
||||
diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h
|
||||
index a66caad13..f217f8281 100644
|
||||
--- a/include/grub/arm/linux.h
|
||||
+++ b/include/grub/arm/linux.h
|
||||
@@ -46,6 +46,22 @@ grub_arm_firmware_get_machine_type (void)
|
||||
{
|
||||
return GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
}
|
||||
+#elif defined (GRUB_MACHINE_COREBOOT)
|
||||
+#include <grub/fdtbus.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+# define LINUX_ADDRESS (start_of_ram + 0x8000)
|
||||
+# define LINUX_INITRD_ADDRESS (start_of_ram + 0x02000000)
|
||||
+# define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000)
|
||||
+static inline const void *
|
||||
+grub_arm_firmware_get_boot_data (void)
|
||||
+{
|
||||
+ return grub_fdtbus_get_fdt ();
|
||||
+}
|
||||
+static inline grub_uint32_t
|
||||
+grub_arm_firmware_get_machine_type (void)
|
||||
+{
|
||||
+ return GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
+}
|
||||
#endif
|
||||
|
||||
#define FDT_ADDITIONAL_ENTRIES_SIZE 0x300
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,46 +1,64 @@
|
|||
From 12fd265ed00dcbe26e423800fc6b7058f48163db Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 28 Apr 2015 11:15:03 -0400
|
||||
Subject: [PATCH 129/194] Make grub2-mkconfig construct titles that look like
|
||||
the ones we want elsewhere.
|
||||
Subject: [PATCH] Make grub2-mkconfig construct titles that look like the ones
|
||||
we want elsewhere.
|
||||
|
||||
Resolves: rhbz#1215839
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
util/grub.d/10_linux.in | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
util/grub.d/10_linux.in | 34 +++++++++++++++++++++++++++-------
|
||||
1 file changed, 27 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index c6627268c..121524185 100644
|
||||
index b7809091b36..993c53ad92e 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -68,6 +68,15 @@ case x"$GRUB_FS" in
|
||||
@@ -80,6 +80,32 @@ case x"$GRUB_FS" in
|
||||
;;
|
||||
esac
|
||||
|
||||
+mktitle ()
|
||||
+{
|
||||
+ local OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
|
||||
+ local OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
|
||||
+ local title_type
|
||||
+ local version
|
||||
+ local OS_NAME
|
||||
+ local OS_VERS
|
||||
+
|
||||
+ local titlestr="${OS_NAME} (%s) ${OS_VERS}"
|
||||
+ echo -n ${titlestr}
|
||||
+ title_type=$1 && shift
|
||||
+ version=$1 && shift
|
||||
+
|
||||
+ OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
|
||||
+ OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
|
||||
+
|
||||
+ case $title_type in
|
||||
+ recovery)
|
||||
+ title=$(printf '%s (%s) %s (recovery mode)' \
|
||||
+ "${OS_NAME}" "${version}" "${OS_VERS}")
|
||||
+ ;;
|
||||
+ *)
|
||||
+ title=$(printf '%s (%s) %s' \
|
||||
+ "${OS_NAME}" "${version}" "${OS_VERS}")
|
||||
+ ;;
|
||||
+ esac
|
||||
+ echo -n ${title}
|
||||
+}
|
||||
+
|
||||
title_correction_code=
|
||||
|
||||
linux_entry ()
|
||||
@@ -98,15 +107,14 @@ linux_entry ()
|
||||
@@ -93,17 +119,11 @@ linux_entry ()
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
fi
|
||||
if [ x$type != xsimple ] ; then
|
||||
case $type in
|
||||
recovery)
|
||||
- case $type in
|
||||
- recovery)
|
||||
- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
|
||||
+ title="$(printf "$(mktitle) (recovery mode)" "${version}")" ;;
|
||||
*)
|
||||
- *)
|
||||
- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
|
||||
+ title="$(printf "$(mktitle)" "${version}")" ;;
|
||||
esac
|
||||
- esac
|
||||
+ title=$(mktitle "$type" "$version")
|
||||
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
|
||||
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
|
||||
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
|
||||
|
|
@ -49,6 +67,3 @@ index c6627268c..121524185 100644
|
|||
fi
|
||||
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
else
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,292 +0,0 @@
|
|||
From 265292f2b0da0eb414c409871ba0f94a99ec33c1 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 22:06:04 +0200
|
||||
Subject: [PATCH 027/194] arm_coreboot: Support DMA.
|
||||
|
||||
This is needed to support USB and some other busses.
|
||||
---
|
||||
grub-core/Makefile.am | 1 +
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/kern/arm/cache.c | 34 ++++++++++++++++++++++
|
||||
grub-core/kern/arm/cache_armv7.S | 12 ++++++++
|
||||
grub-core/kern/arm/coreboot/dma.c | 59 +++++++++++++++++++++++++++++++++++++++
|
||||
include/grub/cache.h | 7 ++---
|
||||
include/grub/dma.h | 44 +++++++++++++++++++++++++++++
|
||||
include/grub/pci.h | 22 +--------------
|
||||
8 files changed, 155 insertions(+), 25 deletions(-)
|
||||
create mode 100644 grub-core/kern/arm/coreboot/dma.c
|
||||
create mode 100644 include/grub/dma.h
|
||||
|
||||
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
|
||||
index a2aaf9f54..104513847 100644
|
||||
--- a/grub-core/Makefile.am
|
||||
+++ b/grub-core/Makefile.am
|
||||
@@ -248,6 +248,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdt.h
|
||||
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dma.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/coreboot/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdtbus.h
|
||||
endif
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 6be6e7f61..e4f253a20 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -163,6 +163,7 @@ kernel = {
|
||||
arm_coreboot = term/ps2.c;
|
||||
arm_coreboot = term/arm/pl050.c;
|
||||
arm_coreboot = commands/keylayouts.c;
|
||||
+ arm_coreboot = kern/arm/coreboot/dma.c;
|
||||
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
diff --git a/grub-core/kern/arm/cache.c b/grub-core/kern/arm/cache.c
|
||||
index 34154ccdb..af1c4bbf5 100644
|
||||
--- a/grub-core/kern/arm/cache.c
|
||||
+++ b/grub-core/kern/arm/cache.c
|
||||
@@ -29,6 +29,8 @@ void grub_arm_clean_dcache_range_armv6 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_clean_dcache_range_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
+void grub_arm_clean_dcache_range_poc_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
+ grub_addr_t dlinesz);
|
||||
void grub_arm_invalidate_icache_range_armv6 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_invalidate_icache_range_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
@@ -253,6 +255,38 @@ grub_arch_sync_caches (void *address, grub_size_t len)
|
||||
}
|
||||
|
||||
void
|
||||
+grub_arch_sync_dma_caches (volatile void *address, grub_size_t len)
|
||||
+{
|
||||
+ grub_addr_t start = (grub_addr_t) address;
|
||||
+ grub_addr_t end = start + len;
|
||||
+
|
||||
+ if (type == ARCH_UNKNOWN)
|
||||
+ probe_caches ();
|
||||
+ start = ALIGN_DOWN (start, grub_arch_cache_max_linesz);
|
||||
+ end = ALIGN_UP (end, grub_arch_cache_max_linesz);
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case ARCH_ARMV6:
|
||||
+ grub_arm_clean_dcache_range_armv6 (start, end, grub_arch_cache_dlinesz);
|
||||
+ grub_arm_invalidate_icache_range_armv6 (start, end,
|
||||
+ grub_arch_cache_ilinesz);
|
||||
+ break;
|
||||
+ case ARCH_ARMV5_WRITE_THROUGH:
|
||||
+ case ARCH_ARMV6_UNIFIED:
|
||||
+ grub_arm_clean_dcache_range_armv6 (start, end, grub_arch_cache_dlinesz);
|
||||
+ break;
|
||||
+ case ARCH_ARMV7:
|
||||
+ grub_arm_clean_dcache_range_poc_armv7 (start, end, grub_arch_cache_dlinesz);
|
||||
+ grub_arm_invalidate_icache_range_armv7 (start, end,
|
||||
+ grub_arch_cache_ilinesz);
|
||||
+ break;
|
||||
+ /* Pacify GCC. */
|
||||
+ case ARCH_UNKNOWN:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
grub_arm_disable_caches_mmu (void)
|
||||
{
|
||||
if (type == ARCH_UNKNOWN)
|
||||
diff --git a/grub-core/kern/arm/cache_armv7.S b/grub-core/kern/arm/cache_armv7.S
|
||||
index 1ef2754af..5ae76a3d8 100644
|
||||
--- a/grub-core/kern/arm/cache_armv7.S
|
||||
+++ b/grub-core/kern/arm/cache_armv7.S
|
||||
@@ -33,6 +33,18 @@
|
||||
# define ISB isb
|
||||
#define ARMV7 1
|
||||
|
||||
+FUNCTION(grub_arm_clean_dcache_range_poc_armv7)
|
||||
+ DSB
|
||||
+ @ Clean data cache for range to point-of-coherence
|
||||
+1: cmp r0, r1
|
||||
+ bge 2f
|
||||
+ mcr p15, 0, r0, c7, c14, 1 @ DCCMVAC
|
||||
+ add r0, r0, r2 @ Next line
|
||||
+ b 1b
|
||||
+2: DSB
|
||||
+ bx lr
|
||||
+
|
||||
+
|
||||
@ r0 - CLIDR
|
||||
@ r1 - LoC
|
||||
@ r2 - current level
|
||||
diff --git a/grub-core/kern/arm/coreboot/dma.c b/grub-core/kern/arm/coreboot/dma.c
|
||||
new file mode 100644
|
||||
index 000000000..2c2a62789
|
||||
--- /dev/null
|
||||
+++ b/grub-core/kern/arm/coreboot/dma.c
|
||||
@@ -0,0 +1,59 @@
|
||||
+/*
|
||||
+ * 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/dl.h>
|
||||
+#include <grub/dma.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/mm_private.h>
|
||||
+#include <grub/cache.h>
|
||||
+
|
||||
+struct grub_pci_dma_chunk *
|
||||
+grub_memalign_dma32 (grub_size_t align, grub_size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ if (align < 64)
|
||||
+ align = 64;
|
||||
+ size = ALIGN_UP (size, align);
|
||||
+ ret = grub_memalign (align, size);
|
||||
+ if (!ret)
|
||||
+ return 0;
|
||||
+ grub_arch_sync_dma_caches (ret, size);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_dma_free (struct grub_pci_dma_chunk *ch)
|
||||
+{
|
||||
+ grub_size_t size = (((struct grub_mm_header *) ch) - 1)->size * GRUB_MM_ALIGN;
|
||||
+ grub_arch_sync_dma_caches (ch, size);
|
||||
+ grub_free (ch);
|
||||
+}
|
||||
+
|
||||
+volatile void *
|
||||
+grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
|
||||
+{
|
||||
+ return (void *) ch;
|
||||
+}
|
||||
+
|
||||
+grub_uint32_t
|
||||
+grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
|
||||
+{
|
||||
+ return (grub_uint32_t) (grub_addr_t) ch;
|
||||
+}
|
||||
+
|
||||
diff --git a/include/grub/cache.h b/include/grub/cache.h
|
||||
index fc669dfd1..1c98ce270 100644
|
||||
--- a/include/grub/cache.h
|
||||
+++ b/include/grub/cache.h
|
||||
@@ -34,15 +34,14 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef GRUB_MACHINE_EMU
|
||||
-#ifdef _mips
|
||||
-void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address,
|
||||
- grub_size_t len);
|
||||
-#else
|
||||
+#if defined (__i386__) || defined (__x86_64__)
|
||||
static inline void
|
||||
grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)),
|
||||
grub_size_t len __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
+#else
|
||||
+void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address, grub_size_t len);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
diff --git a/include/grub/dma.h b/include/grub/dma.h
|
||||
new file mode 100644
|
||||
index 000000000..19992ebc1
|
||||
--- /dev/null
|
||||
+++ b/include/grub/dma.h
|
||||
@@ -0,0 +1,44 @@
|
||||
+/*
|
||||
+ * 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/>.
|
||||
+ */
|
||||
+
|
||||
+#ifndef GRUB_DMA_H
|
||||
+#define GRUB_DMA_H 1
|
||||
+
|
||||
+struct grub_pci_dma_chunk;
|
||||
+
|
||||
+struct grub_pci_dma_chunk *EXPORT_FUNC(grub_memalign_dma32) (grub_size_t align,
|
||||
+ grub_size_t size);
|
||||
+void EXPORT_FUNC(grub_dma_free) (struct grub_pci_dma_chunk *ch);
|
||||
+volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
|
||||
+grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
|
||||
+
|
||||
+static inline void *
|
||||
+grub_dma_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk)
|
||||
+{
|
||||
+ return ((grub_uint8_t *) grub_dma_get_virt (chunk)
|
||||
+ + (phys - grub_dma_get_phys (chunk)));
|
||||
+}
|
||||
+
|
||||
+static inline grub_uint32_t
|
||||
+grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
|
||||
+{
|
||||
+ return (((grub_uint8_t *) virt - (grub_uint8_t *) grub_dma_get_virt (chunk))
|
||||
+ + grub_dma_get_phys (chunk));
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/grub/pci.h b/include/grub/pci.h
|
||||
index 70d9a0513..262c89b74 100644
|
||||
--- a/include/grub/pci.h
|
||||
+++ b/include/grub/pci.h
|
||||
@@ -142,27 +142,7 @@ grub_pci_address_t EXPORT_FUNC(grub_pci_make_address) (grub_pci_device_t dev,
|
||||
void EXPORT_FUNC(grub_pci_iterate) (grub_pci_iteratefunc_t hook,
|
||||
void *hook_data);
|
||||
|
||||
-struct grub_pci_dma_chunk;
|
||||
-
|
||||
-struct grub_pci_dma_chunk *EXPORT_FUNC(grub_memalign_dma32) (grub_size_t align,
|
||||
- grub_size_t size);
|
||||
-void EXPORT_FUNC(grub_dma_free) (struct grub_pci_dma_chunk *ch);
|
||||
-volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
|
||||
-grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
|
||||
-
|
||||
-static inline void *
|
||||
-grub_dma_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk)
|
||||
-{
|
||||
- return ((grub_uint8_t *) grub_dma_get_virt (chunk)
|
||||
- + (phys - grub_dma_get_phys (chunk)));
|
||||
-}
|
||||
-
|
||||
-static inline grub_uint32_t
|
||||
-grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
|
||||
-{
|
||||
- return (((grub_uint8_t *) virt - (grub_uint8_t *) grub_dma_get_virt (chunk))
|
||||
- + grub_dma_get_phys (chunk));
|
||||
-}
|
||||
+#include <grub/dma.h>
|
||||
|
||||
grub_uint8_t
|
||||
EXPORT_FUNC (grub_pci_find_capability) (grub_pci_device_t dev, grub_uint8_t cap);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,87 +1,89 @@
|
|||
From dda4c69e2fb3c12f838866740eb04142975df9a3 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marshall <rmarshall@redhat.com>
|
||||
Date: Thu, 25 Jun 2015 11:13:11 -0400
|
||||
Subject: [PATCH 130/194] Add friendly grub2 password config tool (#985962)
|
||||
Subject: [PATCH] Add friendly grub2 password config tool (#985962)
|
||||
|
||||
Provided a tool for users to reset the grub2 root user password
|
||||
without having to alter the grub.cfg. The hashed password now
|
||||
lives in a root-only-readable configuration file.
|
||||
|
||||
Resolves: rhbz#985962
|
||||
|
||||
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
|
||||
[pjones: fix the efidir in grub-setpassword and rename tool]
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
[luto: fix grub-setpassword -o's output path]
|
||||
Signed-off-by: Andy Lutomirski <luto@kernel.org>
|
||||
[rharwood: migrate man page to h2m, context]
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
.gitignore | 2 +
|
||||
Makefile.util.def | 13 +++++
|
||||
configure.ac | 1 +
|
||||
util/grub-mkconfig.in | 2 +
|
||||
util/grub-setpassword.8 | 28 +++++++++++
|
||||
util/grub-setpassword.in | 123 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
util/grub.d/01_users.in | 11 +++++
|
||||
7 files changed, 180 insertions(+)
|
||||
create mode 100644 util/grub-setpassword.8
|
||||
create mode 100644 util/grub-setpassword.in
|
||||
configure.ac | 1 +
|
||||
Makefile.util.def | 13 +++++
|
||||
docs/man/grub-set-password.h2m | 2 +
|
||||
util/grub-mkconfig.in | 2 +
|
||||
util/grub-set-password.in | 128 +++++++++++++++++++++++++++++++++++++++++
|
||||
util/grub.d/01_users.in | 11 ++++
|
||||
6 files changed, 157 insertions(+)
|
||||
create mode 100644 docs/man/grub-set-password.h2m
|
||||
create mode 100644 util/grub-set-password.in
|
||||
create mode 100644 util/grub.d/01_users.in
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 1c8537129..387e3554c 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -107,6 +107,8 @@ grub-*.tar.*
|
||||
/grub*-script-check.1
|
||||
/grub*-set-default
|
||||
/grub*-set-default.8
|
||||
+/grub*-setsetpassword
|
||||
+/grub*-setsetpassword.8
|
||||
/grub*-shell
|
||||
/grub*-shell-tester
|
||||
/grub*-sparc64-setup
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ae3a49321ad..493e336ec6c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -77,6 +77,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
grub_TRANSFORM([grub-mkrescue])
|
||||
grub_TRANSFORM([grub-probe])
|
||||
grub_TRANSFORM([grub-reboot])
|
||||
+grub_TRANSFORM([grub-set-password])
|
||||
grub_TRANSFORM([grub-script-check])
|
||||
grub_TRANSFORM([grub-set-default])
|
||||
grub_TRANSFORM([grub-sparc64-setup])
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index d846b81b5..226c46b2d 100644
|
||||
index 09bfcadd976..95884956a68 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -440,6 +440,12 @@ script = {
|
||||
@@ -455,6 +455,12 @@ script = {
|
||||
installdir = grubconf;
|
||||
};
|
||||
|
||||
script = {
|
||||
+script = {
|
||||
+ name = '01_users';
|
||||
+ common = util/grub.d/01_users.in;
|
||||
+ installdir = grubconf;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
script = {
|
||||
name = '10_windows';
|
||||
common = util/grub.d/10_windows.in;
|
||||
installdir = grubconf;
|
||||
@@ -722,6 +728,13 @@ script = {
|
||||
@@ -733,6 +739,13 @@ script = {
|
||||
installdir = sbin;
|
||||
};
|
||||
|
||||
script = {
|
||||
+ name = grub-setpassword;
|
||||
+ common = util/grub-setpassword.in;
|
||||
+script = {
|
||||
+ name = grub-set-password;
|
||||
+ common = util/grub-set-password.in;
|
||||
+ mansection = 8;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
script = {
|
||||
name = grub-mkconfig_lib;
|
||||
common = util/grub-mkconfig_lib.in;
|
||||
installdir = noinst;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 49427cbf9..196084004 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -65,6 +65,7 @@ grub_TRANSFORM([grub-mkrelpath])
|
||||
grub_TRANSFORM([grub-mkrescue])
|
||||
grub_TRANSFORM([grub-probe])
|
||||
grub_TRANSFORM([grub-reboot])
|
||||
+grub_TRANSFORM([grub-setpassword])
|
||||
grub_TRANSFORM([grub-rpm-sort])
|
||||
grub_TRANSFORM([grub-script-check])
|
||||
grub_TRANSFORM([grub-set-default])
|
||||
diff --git a/docs/man/grub-set-password.h2m b/docs/man/grub-set-password.h2m
|
||||
new file mode 100644
|
||||
index 00000000000..10ee82f4d52
|
||||
--- /dev/null
|
||||
+++ b/docs/man/grub-set-password.h2m
|
||||
@@ -0,0 +1,2 @@
|
||||
+[NAME]
|
||||
+grub-set-password \- generate the user.cfg file containing the hashed grub bootloader password
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index 9d595ac05..fb8724708 100644
|
||||
index 7b355115dd4..5f2824d4f58 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -263,6 +263,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
|
||||
@@ -280,6 +280,8 @@ for i in "${grub_mkconfig_dir}"/* ; do
|
||||
*~) ;;
|
||||
# emacsen autosave files. FIXME: support other editors
|
||||
*/\#*\#) ;;
|
||||
|
|
@ -90,50 +92,17 @@ index 9d595ac05..fb8724708 100644
|
|||
*)
|
||||
if grub_file_is_not_garbage "$i" && test -x "$i" ; then
|
||||
echo
|
||||
diff --git a/util/grub-setpassword.8 b/util/grub-setpassword.8
|
||||
diff --git a/util/grub-set-password.in b/util/grub-set-password.in
|
||||
new file mode 100644
|
||||
index 000000000..49200a848
|
||||
index 00000000000..5ebf50576d6
|
||||
--- /dev/null
|
||||
+++ b/util/grub-setpassword.8
|
||||
@@ -0,0 +1,28 @@
|
||||
+.TH GRUB-SETPASSWORD 3 "Thu Jun 25 2015"
|
||||
+.SH NAME
|
||||
+\fBgrub-setpassword\fR \(em Generate the user.cfg file containing the hashed grub bootloader password.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+\fBgrub-setpassword\fR [OPTION]
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+\fBgrub-setpassword\fR outputs the user.cfg file which contains the hashed GRUB bootloader password. This utility only supports configurations where there is a single root user.
|
||||
+
|
||||
+The file has the format:
|
||||
+GRUB2_PASSWORD=<\fIhashed password\fR>.
|
||||
+
|
||||
+.SH OPTIONS
|
||||
+.TP
|
||||
+-h, --help
|
||||
+Display program usage and exit.
|
||||
+.TP
|
||||
+-v, --version
|
||||
+Display the current version.
|
||||
+.TP
|
||||
+-o, --output[=\fIDIRECTORY PATH\fR]
|
||||
+Choose the file path to which user.cfg will be written.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
+
|
||||
+.BR "info grub2-mkpasswd-pbkdf2"
|
||||
diff --git a/util/grub-setpassword.in b/util/grub-setpassword.in
|
||||
new file mode 100644
|
||||
index 000000000..dd76f00fc
|
||||
--- /dev/null
|
||||
+++ b/util/grub-setpassword.in
|
||||
@@ -0,0 +1,123 @@
|
||||
+++ b/util/grub-set-password.in
|
||||
@@ -0,0 +1,128 @@
|
||||
+#!/bin/sh -e
|
||||
+
|
||||
+EFIDIR=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/')
|
||||
+if [ -d /sys/firmware/efi/efivars/ ]; then
|
||||
+ grubdir=`echo "/@bootdirname@/efi/EFI/redhat/" | sed 's,//*,/,g'`
|
||||
+ grubdir=`echo "/@bootdirname@/efi/EFI/${EFIDIR}/" | sed 's,//*,/,g'`
|
||||
+else
|
||||
+ grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
|
||||
+fi
|
||||
|
|
@ -148,15 +117,14 @@ index 000000000..dd76f00fc
|
|||
+# Print the usage.
|
||||
+usage () {
|
||||
+ cat <<EOF
|
||||
+Usage: $0 [OPTION] [SOURCE]
|
||||
+Run GRUB script in a Qemu instance.
|
||||
+
|
||||
+ -h, --help print this message and exit
|
||||
+ -v, --version print the version information and exit
|
||||
+ -o, --output_path choose a custom output path for user.cfg
|
||||
+
|
||||
+Usage: $0 [OPTION]
|
||||
+$0 prompts the user to set a password on the grub bootloader. The password
|
||||
+is written to a file named user.cfg.
|
||||
+is written to a file named user.cfg which lives in the GRUB directory
|
||||
+located by default at ${grubdir}.
|
||||
+
|
||||
+ -h, --help print this message and exit
|
||||
+ -v, --version print the version information and exit
|
||||
+ -o, --output_path <DIRECTORY> put user.cfg in a user-selected directory
|
||||
+
|
||||
+Report bugs at https://bugzilla.redhat.com.
|
||||
+EOF
|
||||
|
|
@ -237,7 +205,7 @@ index 000000000..dd76f00fc
|
|||
+ P1="$1" && shift
|
||||
+
|
||||
+ ( echo ${P0} ; echo ${P1} ) | \
|
||||
+ ${grub_mkpasswd} | \
|
||||
+ LC_ALL=C ${grub_mkpasswd} | \
|
||||
+ grep -v '[eE]nter password:' | \
|
||||
+ sed -e "s/PBKDF2 hash of your password is //"
|
||||
+}
|
||||
|
|
@ -250,12 +218,17 @@ index 000000000..dd76f00fc
|
|||
+
|
||||
+# on the ESP, these will fail to set the permissions, but it's okay because
|
||||
+# the directory is protected.
|
||||
+install -m 0600 /dev/null "${grubdir}/user.cfg" 2>/dev/null || :
|
||||
+chmod 0600 "${grubdir}/user.cfg" 2>/dev/null || :
|
||||
+echo "GRUB2_PASSWORD=${MYPASS}" > "${grubdir}/user.cfg"
|
||||
+install -m 0600 /dev/null "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
|
||||
+chmod 0600 "${OUTPUT_PATH}/user.cfg" 2>/dev/null || :
|
||||
+echo "GRUB2_PASSWORD=${MYPASS}" > "${OUTPUT_PATH}/user.cfg"
|
||||
+
|
||||
+if ! grep -q "^### BEGIN /etc/grub.d/01_users ###$" "${OUTPUT_PATH}/grub.cfg"; then
|
||||
+ echo "WARNING: The current configuration lacks password support!"
|
||||
+ echo "Update your configuration with @grub_mkconfig@ to support this feature."
|
||||
+fi
|
||||
diff --git a/util/grub.d/01_users.in b/util/grub.d/01_users.in
|
||||
new file mode 100644
|
||||
index 000000000..db2f44bfb
|
||||
index 00000000000..db2f44bfb78
|
||||
--- /dev/null
|
||||
+++ b/util/grub.d/01_users.in
|
||||
@@ -0,0 +1,11 @@
|
||||
|
|
@ -270,6 +243,3 @@ index 000000000..db2f44bfb
|
|||
+ fi
|
||||
+fi
|
||||
+EOF
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,571 +0,0 @@
|
|||
From 058df7b5a9cc7aaa9872eaa916b715544a8f9840 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 22:10:26 +0200
|
||||
Subject: [PATCH 028/194] ehci: Split core code from PCI part.
|
||||
|
||||
On ARM often EHCI is present without PCI and just declared in device
|
||||
tree. So splitcore from PCI part.
|
||||
---
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/bus/usb/ehci-pci.c | 208 +++++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/bus/usb/ehci.c | 201 +++--------------------------------------
|
||||
3 files changed, 223 insertions(+), 187 deletions(-)
|
||||
create mode 100644 grub-core/bus/usb/ehci-pci.c
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index e4f253a20..4745eb4d9 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -593,6 +593,7 @@ module = {
|
||||
module = {
|
||||
name = ehci;
|
||||
common = bus/usb/ehci.c;
|
||||
+ pci = bus/usb/ehci-pci.c;
|
||||
enable = pci;
|
||||
};
|
||||
|
||||
diff --git a/grub-core/bus/usb/ehci-pci.c b/grub-core/bus/usb/ehci-pci.c
|
||||
new file mode 100644
|
||||
index 000000000..65e6cb574
|
||||
--- /dev/null
|
||||
+++ b/grub-core/bus/usb/ehci-pci.c
|
||||
@@ -0,0 +1,208 @@
|
||||
+/* ehci.c - EHCI Support. */
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 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 <grub/pci.h>
|
||||
+#include <grub/cpu/pci.h>
|
||||
+#include <grub/cs5536.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/usb.h>
|
||||
+
|
||||
+#define GRUB_EHCI_PCI_SBRN_REG 0x60
|
||||
+#define GRUB_EHCI_ADDR_MEM_MASK (~0xff)
|
||||
+
|
||||
+/* USBLEGSUP bits and related OS OWNED byte offset */
|
||||
+enum
|
||||
+{
|
||||
+ GRUB_EHCI_BIOS_OWNED = (1 << 16),
|
||||
+ GRUB_EHCI_OS_OWNED = (1 << 24)
|
||||
+};
|
||||
+
|
||||
+/* PCI iteration function... */
|
||||
+static int
|
||||
+grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
+ void *data __attribute__ ((unused)))
|
||||
+{
|
||||
+ volatile grub_uint32_t *regs;
|
||||
+ grub_uint32_t base, base_h;
|
||||
+ grub_uint32_t eecp_offset;
|
||||
+ grub_uint32_t usblegsup = 0;
|
||||
+ grub_uint64_t maxtime;
|
||||
+ grub_uint32_t interf;
|
||||
+ grub_uint32_t subclass;
|
||||
+ grub_uint32_t class;
|
||||
+ grub_uint8_t release;
|
||||
+ grub_uint32_t class_code;
|
||||
+
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: begin\n");
|
||||
+
|
||||
+ if (pciid == GRUB_CS5536_PCIID)
|
||||
+ {
|
||||
+ grub_uint64_t basereg;
|
||||
+
|
||||
+ basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE);
|
||||
+ if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
|
||||
+ {
|
||||
+ /* Shouldn't happen. */
|
||||
+ grub_dprintf ("ehci", "No EHCI address is assigned\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ base = (basereg & GRUB_CS5536_MSR_USB_BASE_ADDR_MASK);
|
||||
+ basereg |= GRUB_CS5536_MSR_USB_BASE_BUS_MASTER;
|
||||
+ basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_ENABLED;
|
||||
+ basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_STATUS;
|
||||
+ basereg &= ~GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE;
|
||||
+ grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE, basereg);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ grub_pci_address_t addr;
|
||||
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
|
||||
+ class_code = grub_pci_read (addr) >> 8;
|
||||
+ interf = class_code & 0xFF;
|
||||
+ subclass = (class_code >> 8) & 0xFF;
|
||||
+ class = class_code >> 16;
|
||||
+
|
||||
+ /* If this is not an EHCI controller, just return. */
|
||||
+ if (class != 0x0c || subclass != 0x03 || interf != 0x20)
|
||||
+ return 0;
|
||||
+
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: class OK\n");
|
||||
+
|
||||
+ /* Check Serial Bus Release Number */
|
||||
+ addr = grub_pci_make_address (dev, GRUB_EHCI_PCI_SBRN_REG);
|
||||
+ release = grub_pci_read_byte (addr);
|
||||
+ if (release != 0x20)
|
||||
+ {
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: Wrong SBRN: %0x\n",
|
||||
+ release);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: bus rev. num. OK\n");
|
||||
+
|
||||
+ /* Determine EHCI EHCC registers base address. */
|
||||
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
|
||||
+ base = grub_pci_read (addr);
|
||||
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1);
|
||||
+ base_h = grub_pci_read (addr);
|
||||
+ /* Stop if registers are mapped above 4G - GRUB does not currently
|
||||
+ * work with registers mapped above 4G */
|
||||
+ if (((base & GRUB_PCI_ADDR_MEM_TYPE_MASK) != GRUB_PCI_ADDR_MEM_TYPE_32)
|
||||
+ && (base_h != 0))
|
||||
+ {
|
||||
+ grub_dprintf ("ehci",
|
||||
+ "EHCI grub_ehci_pci_iter: registers above 4G are not supported\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ base &= GRUB_PCI_ADDR_MEM_MASK;
|
||||
+ if (!base)
|
||||
+ {
|
||||
+ grub_dprintf ("ehci",
|
||||
+ "EHCI: EHCI is not mapped\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
|
||||
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
|
||||
+ grub_pci_write_word(addr,
|
||||
+ GRUB_PCI_COMMAND_MEM_ENABLED
|
||||
+ | GRUB_PCI_COMMAND_BUS_MASTER
|
||||
+ | grub_pci_read_word(addr));
|
||||
+
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n");
|
||||
+ }
|
||||
+
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of EHCC: %08x\n",
|
||||
+ (base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
+
|
||||
+ regs = grub_pci_device_map_range (dev,
|
||||
+ (base & GRUB_EHCI_ADDR_MEM_MASK),
|
||||
+ 0x100);
|
||||
+
|
||||
+ /* Is there EECP ? */
|
||||
+ eecp_offset = (grub_le_to_cpu32 (regs[2]) >> 8) & 0xff;
|
||||
+
|
||||
+ /* Determine and change ownership. */
|
||||
+ /* EECP offset valid in HCCPARAMS */
|
||||
+ /* Ownership can be changed via EECP only */
|
||||
+ if (pciid != GRUB_CS5536_PCIID && eecp_offset >= 0x40)
|
||||
+ {
|
||||
+ grub_pci_address_t pciaddr_eecp;
|
||||
+ pciaddr_eecp = grub_pci_make_address (dev, eecp_offset);
|
||||
+
|
||||
+ usblegsup = grub_pci_read (pciaddr_eecp);
|
||||
+ if (usblegsup & GRUB_EHCI_BIOS_OWNED)
|
||||
+ {
|
||||
+ grub_boot_time ("Taking ownership of EHCI controller");
|
||||
+ grub_dprintf ("ehci",
|
||||
+ "EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n");
|
||||
+ /* Ownership change - set OS_OWNED bit */
|
||||
+ grub_pci_write (pciaddr_eecp, usblegsup | GRUB_EHCI_OS_OWNED);
|
||||
+ /* Ensure PCI register is written */
|
||||
+ grub_pci_read (pciaddr_eecp);
|
||||
+
|
||||
+ /* Wait for finish of ownership change, EHCI specification
|
||||
+ * doesn't say how long it can take... */
|
||||
+ maxtime = grub_get_time_ms () + 1000;
|
||||
+ while ((grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
+ && (grub_get_time_ms () < maxtime));
|
||||
+ if (grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
+ {
|
||||
+ grub_dprintf ("ehci",
|
||||
+ "EHCI grub_ehci_pci_iter: EHCI change ownership timeout");
|
||||
+ /* Change ownership in "hard way" - reset BIOS ownership */
|
||||
+ grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
+ /* Ensure PCI register is written */
|
||||
+ grub_pci_read (pciaddr_eecp);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (usblegsup & GRUB_EHCI_OS_OWNED)
|
||||
+ /* XXX: What to do in this case - nothing ? Can it happen ? */
|
||||
+ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: OS\n");
|
||||
+ else
|
||||
+ {
|
||||
+ grub_dprintf ("ehci",
|
||||
+ "EHCI grub_ehci_pci_iter: EHCI owned by: NONE\n");
|
||||
+ /* XXX: What to do in this case ? Can it happen ?
|
||||
+ * Is code below correct ? */
|
||||
+ /* Ownership change - set OS_OWNED bit */
|
||||
+ grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
+ /* Ensure PCI register is written */
|
||||
+ grub_pci_read (pciaddr_eecp);
|
||||
+ }
|
||||
+
|
||||
+ /* Disable SMI, just to be sure. */
|
||||
+ pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4);
|
||||
+ grub_pci_write (pciaddr_eecp, 0);
|
||||
+ /* Ensure PCI register is written */
|
||||
+ grub_pci_read (pciaddr_eecp);
|
||||
+ }
|
||||
+
|
||||
+ grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n");
|
||||
+
|
||||
+ grub_ehci_init_device (regs);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+grub_ehci_pci_scan (void)
|
||||
+{
|
||||
+ grub_pci_iterate (grub_ehci_pci_iter, NULL);
|
||||
+}
|
||||
diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
|
||||
index 5f4297bb2..c772e7654 100644
|
||||
--- a/grub-core/bus/usb/ehci.c
|
||||
+++ b/grub-core/bus/usb/ehci.c
|
||||
@@ -22,13 +22,10 @@
|
||||
#include <grub/usb.h>
|
||||
#include <grub/usbtrans.h>
|
||||
#include <grub/misc.h>
|
||||
-#include <grub/pci.h>
|
||||
-#include <grub/cpu/pci.h>
|
||||
-#include <grub/cpu/io.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/loader.h>
|
||||
-#include <grub/cs5536.h>
|
||||
#include <grub/disk.h>
|
||||
+#include <grub/dma.h>
|
||||
#include <grub/cache.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
@@ -39,8 +36,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
* - is not supporting interrupt transfers
|
||||
*/
|
||||
|
||||
-#define GRUB_EHCI_PCI_SBRN_REG 0x60
|
||||
-
|
||||
/* Capability registers offsets */
|
||||
enum
|
||||
{
|
||||
@@ -54,7 +49,6 @@ enum
|
||||
#define GRUB_EHCI_EECP_MASK (0xff << 8)
|
||||
#define GRUB_EHCI_EECP_SHIFT 8
|
||||
|
||||
-#define GRUB_EHCI_ADDR_MEM_MASK (~0xff)
|
||||
#define GRUB_EHCI_POINTER_MASK (~0x1f)
|
||||
|
||||
/* Capability register SPARAMS bits */
|
||||
@@ -85,13 +79,6 @@ enum
|
||||
|
||||
#define GRUB_EHCI_QH_EMPTY 1
|
||||
|
||||
-/* USBLEGSUP bits and related OS OWNED byte offset */
|
||||
-enum
|
||||
-{
|
||||
- GRUB_EHCI_BIOS_OWNED = (1 << 16),
|
||||
- GRUB_EHCI_OS_OWNED = (1 << 24)
|
||||
-};
|
||||
-
|
||||
/* Operational registers offsets */
|
||||
enum
|
||||
{
|
||||
@@ -455,9 +442,10 @@ grub_ehci_reset (struct grub_ehci *e)
|
||||
|
||||
sync_all_caches (e);
|
||||
|
||||
+ grub_dprintf ("ehci", "reset\n");
|
||||
+
|
||||
grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND,
|
||||
- GRUB_EHCI_CMD_HC_RESET
|
||||
- | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
+ GRUB_EHCI_CMD_HC_RESET);
|
||||
/* Ensure command is written */
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND);
|
||||
/* XXX: How long time could take reset of HC ? */
|
||||
@@ -473,116 +461,24 @@ grub_ehci_reset (struct grub_ehci *e)
|
||||
}
|
||||
|
||||
/* PCI iteration function... */
|
||||
-static int
|
||||
-grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
- void *data __attribute__ ((unused)))
|
||||
+void
|
||||
+grub_ehci_init_device (volatile void *regs)
|
||||
{
|
||||
- grub_uint8_t release;
|
||||
- grub_uint32_t class_code;
|
||||
- grub_uint32_t interf;
|
||||
- grub_uint32_t subclass;
|
||||
- grub_uint32_t class;
|
||||
- grub_uint32_t base, base_h;
|
||||
struct grub_ehci *e;
|
||||
- grub_uint32_t eecp_offset;
|
||||
grub_uint32_t fp;
|
||||
int i;
|
||||
- grub_uint32_t usblegsup = 0;
|
||||
- grub_uint64_t maxtime;
|
||||
grub_uint32_t n_ports;
|
||||
grub_uint8_t caplen;
|
||||
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: begin\n");
|
||||
-
|
||||
- if (pciid == GRUB_CS5536_PCIID)
|
||||
- {
|
||||
- grub_uint64_t basereg;
|
||||
-
|
||||
- basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE);
|
||||
- if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
|
||||
- {
|
||||
- /* Shouldn't happen. */
|
||||
- grub_dprintf ("ehci", "No EHCI address is assigned\n");
|
||||
- return 0;
|
||||
- }
|
||||
- base = (basereg & GRUB_CS5536_MSR_USB_BASE_ADDR_MASK);
|
||||
- basereg |= GRUB_CS5536_MSR_USB_BASE_BUS_MASTER;
|
||||
- basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_ENABLED;
|
||||
- basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_STATUS;
|
||||
- basereg &= ~GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE;
|
||||
- grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE, basereg);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- grub_pci_address_t addr;
|
||||
- addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
|
||||
- class_code = grub_pci_read (addr) >> 8;
|
||||
- interf = class_code & 0xFF;
|
||||
- subclass = (class_code >> 8) & 0xFF;
|
||||
- class = class_code >> 16;
|
||||
-
|
||||
- /* If this is not an EHCI controller, just return. */
|
||||
- if (class != 0x0c || subclass != 0x03 || interf != 0x20)
|
||||
- return 0;
|
||||
-
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: class OK\n");
|
||||
-
|
||||
- /* Check Serial Bus Release Number */
|
||||
- addr = grub_pci_make_address (dev, GRUB_EHCI_PCI_SBRN_REG);
|
||||
- release = grub_pci_read_byte (addr);
|
||||
- if (release != 0x20)
|
||||
- {
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: Wrong SBRN: %0x\n",
|
||||
- release);
|
||||
- return 0;
|
||||
- }
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: bus rev. num. OK\n");
|
||||
-
|
||||
- /* Determine EHCI EHCC registers base address. */
|
||||
- addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
|
||||
- base = grub_pci_read (addr);
|
||||
- addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1);
|
||||
- base_h = grub_pci_read (addr);
|
||||
- /* Stop if registers are mapped above 4G - GRUB does not currently
|
||||
- * work with registers mapped above 4G */
|
||||
- if (((base & GRUB_PCI_ADDR_MEM_TYPE_MASK) != GRUB_PCI_ADDR_MEM_TYPE_32)
|
||||
- && (base_h != 0))
|
||||
- {
|
||||
- grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: registers above 4G are not supported\n");
|
||||
- return 0;
|
||||
- }
|
||||
- base &= GRUB_PCI_ADDR_MEM_MASK;
|
||||
- if (!base)
|
||||
- {
|
||||
- grub_dprintf ("ehci",
|
||||
- "EHCI: EHCI is not mapped\n");
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- /* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
|
||||
- addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
|
||||
- grub_pci_write_word(addr,
|
||||
- GRUB_PCI_COMMAND_MEM_ENABLED
|
||||
- | GRUB_PCI_COMMAND_BUS_MASTER
|
||||
- | grub_pci_read_word(addr));
|
||||
-
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n");
|
||||
- }
|
||||
-
|
||||
/* Allocate memory for the controller and fill basic values. */
|
||||
e = grub_zalloc (sizeof (*e));
|
||||
if (!e)
|
||||
- return 1;
|
||||
+ return;
|
||||
e->framelist_chunk = NULL;
|
||||
e->td_chunk = NULL;
|
||||
e->qh_chunk = NULL;
|
||||
- e->iobase_ehcc = grub_pci_device_map_range (dev,
|
||||
- (base & GRUB_EHCI_ADDR_MEM_MASK),
|
||||
- 0x100);
|
||||
+ e->iobase_ehcc = regs;
|
||||
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of EHCC: %08x\n",
|
||||
- (base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CAPLEN: %02x\n",
|
||||
grub_ehci_ehcc_read8 (e, GRUB_EHCI_EHCC_CAPLEN));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: VERSION: %04x\n",
|
||||
@@ -598,7 +494,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
if (caplen & (sizeof (grub_uint32_t) - 1))
|
||||
{
|
||||
grub_dprintf ("ehci", "Unaligned caplen\n");
|
||||
- return 0;
|
||||
+ return;
|
||||
}
|
||||
e->iobase = ((volatile grub_uint32_t *) e->iobase_ehcc
|
||||
+ (caplen / sizeof (grub_uint32_t)));
|
||||
@@ -609,7 +505,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
- (base & GRUB_EHCI_ADDR_MEM_MASK) + caplen);
|
||||
+ (grub_addr_t) e->iobase_ehcc + caplen);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -625,10 +521,6 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
|
||||
|
||||
- /* Is there EECP ? */
|
||||
- eecp_offset = (grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_CPARAMS)
|
||||
- & GRUB_EHCI_EECP_MASK) >> GRUB_EHCI_EECP_SHIFT;
|
||||
-
|
||||
/* Check format of data structures requested by EHCI */
|
||||
/* XXX: In fact it is not used at any place, it is prepared for future
|
||||
* This implementation uses 32-bits pointers only */
|
||||
@@ -732,65 +624,6 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: QH/TD init. OK\n");
|
||||
|
||||
- /* Determine and change ownership. */
|
||||
- /* EECP offset valid in HCCPARAMS */
|
||||
- /* Ownership can be changed via EECP only */
|
||||
- if (pciid != GRUB_CS5536_PCIID && eecp_offset >= 0x40)
|
||||
- {
|
||||
- grub_pci_address_t pciaddr_eecp;
|
||||
- pciaddr_eecp = grub_pci_make_address (dev, eecp_offset);
|
||||
-
|
||||
- usblegsup = grub_pci_read (pciaddr_eecp);
|
||||
- if (usblegsup & GRUB_EHCI_BIOS_OWNED)
|
||||
- {
|
||||
- grub_boot_time ("Taking ownership of EHCI controller");
|
||||
- grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n");
|
||||
- /* Ownership change - set OS_OWNED bit */
|
||||
- grub_pci_write (pciaddr_eecp, usblegsup | GRUB_EHCI_OS_OWNED);
|
||||
- /* Ensure PCI register is written */
|
||||
- grub_pci_read (pciaddr_eecp);
|
||||
-
|
||||
- /* Wait for finish of ownership change, EHCI specification
|
||||
- * doesn't say how long it can take... */
|
||||
- maxtime = grub_get_time_ms () + 1000;
|
||||
- while ((grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
- && (grub_get_time_ms () < maxtime));
|
||||
- if (grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
- {
|
||||
- grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: EHCI change ownership timeout");
|
||||
- /* Change ownership in "hard way" - reset BIOS ownership */
|
||||
- grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
- /* Ensure PCI register is written */
|
||||
- grub_pci_read (pciaddr_eecp);
|
||||
- }
|
||||
- }
|
||||
- else if (usblegsup & GRUB_EHCI_OS_OWNED)
|
||||
- /* XXX: What to do in this case - nothing ? Can it happen ? */
|
||||
- grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: OS\n");
|
||||
- else
|
||||
- {
|
||||
- grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: EHCI owned by: NONE\n");
|
||||
- /* XXX: What to do in this case ? Can it happen ?
|
||||
- * Is code below correct ? */
|
||||
- /* Ownership change - set OS_OWNED bit */
|
||||
- grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
- /* Ensure PCI register is written */
|
||||
- grub_pci_read (pciaddr_eecp);
|
||||
- }
|
||||
-
|
||||
- /* Disable SMI, just to be sure. */
|
||||
- pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4);
|
||||
- grub_pci_write (pciaddr_eecp, 0);
|
||||
- /* Ensure PCI register is written */
|
||||
- grub_pci_read (pciaddr_eecp);
|
||||
-
|
||||
- }
|
||||
-
|
||||
- grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n");
|
||||
-
|
||||
/* Now we can setup EHCI (maybe...) */
|
||||
|
||||
/* Check if EHCI is halted and halt it if not */
|
||||
@@ -864,7 +697,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
- (base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
+ (grub_addr_t) regs);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -880,7 +713,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
|
||||
|
||||
- return 0;
|
||||
+ return;
|
||||
|
||||
fail:
|
||||
if (e)
|
||||
@@ -894,7 +727,7 @@ fail:
|
||||
}
|
||||
grub_free (e);
|
||||
|
||||
- return 0;
|
||||
+ return;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1891,12 +1724,6 @@ grub_ehci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
|
||||
}
|
||||
}
|
||||
|
||||
-static void
|
||||
-grub_ehci_inithw (void)
|
||||
-{
|
||||
- grub_pci_iterate (grub_ehci_pci_iter, NULL);
|
||||
-}
|
||||
-
|
||||
static grub_err_t
|
||||
grub_ehci_restore_hw (void)
|
||||
{
|
||||
@@ -1997,7 +1824,7 @@ GRUB_MOD_INIT (ehci)
|
||||
grub_stop_disk_firmware ();
|
||||
|
||||
grub_boot_time ("Initing EHCI hardware");
|
||||
- grub_ehci_inithw ();
|
||||
+ grub_ehci_pci_scan ();
|
||||
grub_boot_time ("Registering EHCI driver");
|
||||
grub_usb_controller_dev_register (&usb_controller);
|
||||
grub_boot_time ("EHCI driver registered");
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
From d11ced1e1fb93676942e51618eb53c140f541890 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 8 May 2017 22:14:28 +0200
|
||||
Subject: [PATCH 029/194] arm_coreboot: Support EHCI.
|
||||
|
||||
---
|
||||
gentpl.py | 2 +-
|
||||
grub-core/Makefile.core.def | 2 ++
|
||||
grub-core/bus/usb/ehci-fdt.c | 45 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/bus/usb/usbtrans.c | 2 +-
|
||||
include/grub/usb.h | 4 ++++
|
||||
5 files changed, 53 insertions(+), 2 deletions(-)
|
||||
create mode 100644 grub-core/bus/usb/ehci-fdt.c
|
||||
|
||||
diff --git a/gentpl.py b/gentpl.py
|
||||
index ed268178b..da67965a4 100644
|
||||
--- a/gentpl.py
|
||||
+++ b/gentpl.py
|
||||
@@ -63,7 +63,7 @@ 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"]
|
||||
+GROUPS["usb"] = GROUPS["pci"] + ["arm_coreboot"]
|
||||
|
||||
# If gfxterm is main output console integrate it into kernel
|
||||
GROUPS["videoinkernel"] = ["mips_loongson", "i386_coreboot", "arm_coreboot" ]
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 4745eb4d9..5ce506597 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -593,8 +593,10 @@ module = {
|
||||
module = {
|
||||
name = ehci;
|
||||
common = bus/usb/ehci.c;
|
||||
+ arm_coreboot = bus/usb/ehci-fdt.c;
|
||||
pci = bus/usb/ehci-pci.c;
|
||||
enable = pci;
|
||||
+ enable = arm_coreboot;
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/bus/usb/ehci-fdt.c b/grub-core/bus/usb/ehci-fdt.c
|
||||
new file mode 100644
|
||||
index 000000000..29b50bdd5
|
||||
--- /dev/null
|
||||
+++ b/grub-core/bus/usb/ehci-fdt.c
|
||||
@@ -0,0 +1,45 @@
|
||||
+/* ehci.c - EHCI Support. */
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ * Copyright (C) 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 <grub/misc.h>
|
||||
+#include <grub/mm.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/usb.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+
|
||||
+static grub_err_t
|
||||
+ehci_attach(const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ grub_dprintf ("ehci", "Found generic-ehci\n");
|
||||
+
|
||||
+ grub_ehci_init_device (grub_fdtbus_map_reg (dev, 0, 0));
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+struct grub_fdtbus_driver ehci =
|
||||
+{
|
||||
+ .compatible = "generic-ehci",
|
||||
+ .attach = ehci_attach
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+grub_ehci_pci_scan (void)
|
||||
+{
|
||||
+ grub_fdtbus_register (&ehci);
|
||||
+}
|
||||
diff --git a/grub-core/bus/usb/usbtrans.c b/grub-core/bus/usb/usbtrans.c
|
||||
index 9266e4931..85f081fff 100644
|
||||
--- a/grub-core/bus/usb/usbtrans.c
|
||||
+++ b/grub-core/bus/usb/usbtrans.c
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
-#include <grub/pci.h>
|
||||
+#include <grub/dma.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/usb.h>
|
||||
diff --git a/include/grub/usb.h b/include/grub/usb.h
|
||||
index 11d96481f..512ae1dd0 100644
|
||||
--- a/include/grub/usb.h
|
||||
+++ b/include/grub/usb.h
|
||||
@@ -321,5 +321,9 @@ grub_usb_err_t
|
||||
grub_usb_check_transfer (grub_usb_transfer_t trans, grub_size_t *actual);
|
||||
void
|
||||
grub_usb_cancel_transfer (grub_usb_transfer_t trans);
|
||||
+void
|
||||
+grub_ehci_init_device (volatile void *regs);
|
||||
+void
|
||||
+grub_ehci_pci_scan (void);
|
||||
|
||||
#endif /* GRUB_USB_H */
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From bb693d96ccfdd5a2bd79ae67325c75b81679fae7 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Josef Bacik <jbacik@fb.com>
|
||||
Date: Wed, 12 Aug 2015 08:57:55 -0700
|
||||
Subject: [PATCH 134/194] tcp: add window scaling support
|
||||
Subject: [PATCH] tcp: add window scaling support
|
||||
|
||||
Sometimes we have to provision boxes across regions, such as California to
|
||||
Sweden. The http server has a 10 minute timeout, so if we can't get our 250mb
|
||||
|
|
@ -17,7 +17,7 @@ Signed-off-by: Josef Bacik <jbacik@fb.com>
|
|||
1 file changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/tcp.c b/grub-core/net/tcp.c
|
||||
index e8ad34b84..7d4b82262 100644
|
||||
index 93dee0caa1b..902ab7e8ae6 100644
|
||||
--- a/grub-core/net/tcp.c
|
||||
+++ b/grub-core/net/tcp.c
|
||||
@@ -106,6 +106,18 @@ struct tcphdr
|
||||
|
|
@ -39,7 +39,7 @@ index e8ad34b84..7d4b82262 100644
|
|||
struct tcp_pseudohdr
|
||||
{
|
||||
grub_uint32_t src;
|
||||
@@ -566,7 +578,7 @@ grub_net_tcp_open (char *server,
|
||||
@@ -571,7 +583,7 @@ grub_net_tcp_open (char *server,
|
||||
grub_net_tcp_socket_t socket;
|
||||
static grub_uint16_t in_port = 21550;
|
||||
struct grub_net_buff *nb;
|
||||
|
|
@ -48,7 +48,7 @@ index e8ad34b84..7d4b82262 100644
|
|||
int i;
|
||||
grub_uint8_t *nbd;
|
||||
grub_net_link_level_address_t ll_target_addr;
|
||||
@@ -635,20 +647,24 @@ grub_net_tcp_open (char *server,
|
||||
@@ -640,20 +652,24 @@ grub_net_tcp_open (char *server,
|
||||
}
|
||||
|
||||
tcph = (void *) nb->data;
|
||||
|
|
@ -85,6 +85,3 @@ index e8ad34b84..7d4b82262 100644
|
|||
|
||||
tcp_socket_register (socket);
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 4f8471532d454b2db96434c28bf7105ed69e0f4d Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 08:39:40 +0200
|
||||
Subject: [PATCH 030/194] Fix bug on FDT nodes with compatible property
|
||||
|
||||
---
|
||||
grub-core/bus/fdt.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/grub-core/bus/fdt.c b/grub-core/bus/fdt.c
|
||||
index 6fb077000..34d535457 100644
|
||||
--- a/grub-core/bus/fdt.c
|
||||
+++ b/grub-core/bus/fdt.c
|
||||
@@ -43,6 +43,8 @@ is_compatible (struct grub_fdtbus_driver *driver,
|
||||
grub_size_t compatible_size;
|
||||
const char *compatible = grub_fdt_get_prop (dtb, node, "compatible",
|
||||
&compatible_size);
|
||||
+ if (!compatible)
|
||||
+ return 0;
|
||||
const char *compatible_end = compatible + compatible_size;
|
||||
while (compatible < compatible_end)
|
||||
{
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,33 +1,25 @@
|
|||
From f809be3900ca1d95892f00d0c5dc8b975b510ef6 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 8 Jun 2016 21:03:37 -0400
|
||||
Subject: [PATCH 146/194] efinet and bootp: add support for dhcpv6
|
||||
Date: Tue, 9 Jul 2019 11:47:37 +0200
|
||||
Subject: [PATCH] efinet and bootp: add support for dhcpv6
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/net/bootp.c | 174 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/net/drivers/efi/efinet.c | 55 ++++++++++--
|
||||
grub-core/net/bootp.c | 173 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/net/drivers/efi/efinet.c | 84 +++++++++++++-----
|
||||
grub-core/net/net.c | 72 +++++++++++++++
|
||||
grub-core/net/tftp.c | 4 +
|
||||
grub-core/net/tftp.c | 3 +
|
||||
include/grub/efi/api.h | 129 +++++++++++++++++++++++++--
|
||||
include/grub/net.h | 60 +++++++++++++
|
||||
6 files changed, 480 insertions(+), 14 deletions(-)
|
||||
6 files changed, 491 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
|
||||
index f03eeab2f..da3e45446 100644
|
||||
index abe45ef7bf6..02d2c2614cb 100644
|
||||
--- a/grub-core/net/bootp.c
|
||||
+++ b/grub-core/net/bootp.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <grub/net/ip.h>
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/net/udp.h>
|
||||
+#include <grub/net/url.h>
|
||||
#include <grub/datetime.h>
|
||||
@@ -905,6 +905,179 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
||||
|
||||
static char *
|
||||
@@ -349,6 +350,179 @@ grub_net_configure_by_dhcp_ack (const char *name,
|
||||
return inter;
|
||||
}
|
||||
static grub_command_t cmd_getdhcp, cmd_bootp, cmd_dhcp;
|
||||
|
||||
+struct grub_net_network_level_interface *
|
||||
+grub_net_configure_by_dhcpv6_ack (const char *name,
|
||||
|
|
@ -203,19 +195,18 @@ index f03eeab2f..da3e45446 100644
|
|||
+
|
||||
+
|
||||
void
|
||||
grub_net_process_dhcp (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card)
|
||||
grub_bootp_init (void)
|
||||
{
|
||||
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
|
||||
index a3ce4c67c..329024b6f 100644
|
||||
index 3ea25cf9894..2af8742f904 100644
|
||||
--- a/grub-core/net/drivers/efi/efinet.c
|
||||
+++ b/grub-core/net/drivers/efi/efinet.c
|
||||
@@ -18,11 +18,15 @@
|
||||
@@ -18,11 +18,14 @@
|
||||
|
||||
#include <grub/net/netbuff.h>
|
||||
#include <grub/dl.h>
|
||||
+#include <grub/env.h>
|
||||
#include <grub/net.h>
|
||||
+#include <grub/net/url.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/efi/api.h>
|
||||
#include <grub/efi/efi.h>
|
||||
|
|
@ -225,25 +216,22 @@ index a3ce4c67c..329024b6f 100644
|
|||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -409,7 +413,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -346,7 +349,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
char **path)
|
||||
{
|
||||
struct grub_net_card *card;
|
||||
- grub_efi_device_path_t *dp;
|
||||
+ grub_efi_device_path_t *dp, *ldp = NULL;
|
||||
|
||||
dp = grub_efi_get_device_path (hnd);
|
||||
if (! dp)
|
||||
@@ -420,16 +424,22 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
struct grub_net_network_level_interface *inter;
|
||||
grub_efi_device_path_t *vlan_dp;
|
||||
grub_efi_uint16_t vlan_dp_len;
|
||||
@@ -361,14 +364,19 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
grub_efi_device_path_t *cdp;
|
||||
struct grub_efi_pxe *pxe;
|
||||
struct grub_efi_pxe_mode *pxe_mode;
|
||||
+
|
||||
if (card->driver != &efidriver)
|
||||
continue;
|
||||
+
|
||||
if (hnd != card->efi_handle)
|
||||
continue;
|
||||
+
|
||||
cdp = grub_efi_get_device_path (card->efi_handle);
|
||||
if (! cdp)
|
||||
|
|
@ -258,7 +246,7 @@ index a3ce4c67c..329024b6f 100644
|
|||
int match;
|
||||
|
||||
/* EDK2 UEFI PXE driver creates pseudo devices with type IPv4/IPv6
|
||||
@@ -438,7 +448,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -377,7 +385,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
devices. We skip them when enumerating cards, so here we need to
|
||||
find matching MAC device.
|
||||
*/
|
||||
|
|
@ -266,7 +254,7 @@ index a3ce4c67c..329024b6f 100644
|
|||
if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) != GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE
|
||||
|| (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE
|
||||
&& GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE))
|
||||
@@ -455,16 +464,46 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
@@ -394,41 +401,70 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
|
||||
if (!match)
|
||||
continue;
|
||||
}
|
||||
|
|
@ -277,11 +265,6 @@ index a3ce4c67c..329024b6f 100644
|
|||
continue;
|
||||
+
|
||||
pxe_mode = pxe->mode;
|
||||
- grub_net_configure_by_dhcp_ack (card->name, card, 0,
|
||||
- (struct grub_net_bootp_packet *)
|
||||
- &pxe_mode->dhcp_ack,
|
||||
- sizeof (pxe_mode->dhcp_ack),
|
||||
- 1, device, path);
|
||||
+ if (pxe_mode->using_ipv6)
|
||||
+ {
|
||||
+ grub_net_link_level_address_t hwaddr;
|
||||
|
|
@ -293,41 +276,86 @@ index a3ce4c67c..329024b6f 100644
|
|||
+ pxe_mode->dhcp_ack_received ? "" : " cannot continue");
|
||||
+ if (!pxe_mode->dhcp_ack_received)
|
||||
+ continue;
|
||||
+
|
||||
|
||||
- inter = grub_net_configure_by_dhcp_ack (card->name, card, 0,
|
||||
- (struct grub_net_bootp_packet *)
|
||||
- &pxe_mode->dhcp_ack,
|
||||
- sizeof (pxe_mode->dhcp_ack),
|
||||
- 1, device, path);
|
||||
+ hwaddr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
|
||||
+ grub_memcpy (hwaddr.mac,
|
||||
+ card->efi_net->mode->current_address,
|
||||
+ sizeof (hwaddr.mac));
|
||||
+
|
||||
+ intf = grub_net_configure_by_dhcpv6_ack (card->name, card, 0, &hwaddr,
|
||||
|
||||
- if (inter != NULL)
|
||||
+ inter = grub_net_configure_by_dhcpv6_ack (card->name, card, 0, &hwaddr,
|
||||
+ (const struct grub_net_dhcpv6_packet *)&pxe_mode->dhcp_ack.dhcpv6,
|
||||
+ 1, device, path);
|
||||
+ if (intf && device && path)
|
||||
+ if (inter && device && path)
|
||||
+ grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
{
|
||||
- /*
|
||||
- * Search the device path for any VLAN subtype and use it
|
||||
- * to configure the interface.
|
||||
- */
|
||||
- vlan_dp = dp;
|
||||
+ grub_dprintf ("efinet", "using ipv4 and dhcp\n");
|
||||
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
|
||||
+ (struct grub_net_bootp_packet *)
|
||||
+ &pxe_mode->dhcp_ack,
|
||||
+ sizeof (pxe_mode->dhcp_ack),
|
||||
+ 1, device, path);
|
||||
+ inter = grub_net_configure_by_dhcp_ack (card->name, card, 0,
|
||||
+ (struct grub_net_bootp_packet *)
|
||||
+ &pxe_mode->dhcp_ack,
|
||||
+ sizeof (pxe_mode->dhcp_ack),
|
||||
+ 1, device, path);
|
||||
|
||||
- while (!GRUB_EFI_END_ENTIRE_DEVICE_PATH (vlan_dp))
|
||||
+ grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path);
|
||||
+ }
|
||||
return;
|
||||
+ if (inter != NULL)
|
||||
{
|
||||
- if (GRUB_EFI_DEVICE_PATH_TYPE (vlan_dp) == GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE &&
|
||||
- GRUB_EFI_DEVICE_PATH_SUBTYPE (vlan_dp) == GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE)
|
||||
+ /*
|
||||
+ * Search the device path for any VLAN subtype and use it
|
||||
+ * to configure the interface.
|
||||
+ */
|
||||
+ vlan_dp = dp;
|
||||
+
|
||||
+ while (!GRUB_EFI_END_ENTIRE_DEVICE_PATH (vlan_dp))
|
||||
{
|
||||
- vlan = (grub_efi_vlan_device_path_t *) vlan_dp;
|
||||
- inter->vlantag = vlan->vlan_id;
|
||||
- break;
|
||||
+ if (GRUB_EFI_DEVICE_PATH_TYPE (vlan_dp) == GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE &&
|
||||
+ GRUB_EFI_DEVICE_PATH_SUBTYPE (vlan_dp) == GRUB_EFI_VLAN_DEVICE_PATH_SUBTYPE)
|
||||
+ {
|
||||
+ vlan = (grub_efi_vlan_device_path_t *) vlan_dp;
|
||||
+ inter->vlantag = vlan->vlan_id;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ vlan_dp_len = GRUB_EFI_DEVICE_PATH_LENGTH (vlan_dp);
|
||||
+ vlan_dp = (grub_efi_device_path_t *) ((grub_efi_uint8_t *) vlan_dp + vlan_dp_len);
|
||||
}
|
||||
-
|
||||
- vlan_dp_len = GRUB_EFI_DEVICE_PATH_LENGTH (vlan_dp);
|
||||
- vlan_dp = (grub_efi_device_path_t *) ((grub_efi_uint8_t *) vlan_dp + vlan_dp_len);
|
||||
}
|
||||
+ return;
|
||||
}
|
||||
- return;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
||||
index 16d2ce06d..4be228d95 100644
|
||||
index 54451cea2a7..20c55257647 100644
|
||||
--- a/grub-core/net/net.c
|
||||
+++ b/grub-core/net/net.c
|
||||
@@ -955,6 +955,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
|
||||
@@ -984,6 +984,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
|
||||
grub_net_network_level_interfaces = inter;
|
||||
}
|
||||
|
||||
+int
|
||||
+grub_ipv6_get_masksize (grub_uint16_t be_mask[8])
|
||||
+grub_ipv6_get_masksize (grub_uint16_t *be_mask)
|
||||
+{
|
||||
+ grub_uint8_t *mask;
|
||||
+ grub_uint16_t mask16[8];
|
||||
|
|
@ -402,38 +430,36 @@ index 16d2ce06d..4be228d95 100644
|
|||
grub_err_t
|
||||
grub_net_add_ipv4_local (struct grub_net_network_level_interface *inter,
|
||||
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
|
||||
index 7d90bf66e..1157524fc 100644
|
||||
index 409b1d09bcd..f300a9d4007 100644
|
||||
--- a/grub-core/net/tftp.c
|
||||
+++ b/grub-core/net/tftp.c
|
||||
@@ -379,19 +379,23 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
return grub_errno;
|
||||
}
|
||||
@@ -359,6 +359,7 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
file->not_easily_seekable = 1;
|
||||
file->data = data;
|
||||
|
||||
+ grub_dprintf("tftp", "resolving address for %s\n", file->device->net->server);
|
||||
err = grub_net_resolve_address (file->device->net->server, &addr);
|
||||
if (err)
|
||||
{
|
||||
+ grub_dprintf("tftp", "Address resolution failed: %d\n", err);
|
||||
destroy_pq (data);
|
||||
grub_free (data);
|
||||
@@ -369,11 +370,13 @@ tftp_open (struct grub_file *file, const char *filename)
|
||||
return err;
|
||||
}
|
||||
|
||||
+ grub_dprintf("tftp", "opening connection\n");
|
||||
data->sock = grub_net_udp_open (addr,
|
||||
TFTP_SERVER_PORT, tftp_receive,
|
||||
port ? port : TFTP_SERVER_PORT, tftp_receive,
|
||||
file);
|
||||
if (!data->sock)
|
||||
{
|
||||
+ grub_dprintf("tftp", "connection failed\n");
|
||||
destroy_pq (data);
|
||||
grub_free (data);
|
||||
return grub_errno;
|
||||
}
|
||||
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
||||
index 97b9aa7a4..02488ec35 100644
|
||||
index d44d00ad7d5..c6d702831f7 100644
|
||||
--- a/include/grub/efi/api.h
|
||||
+++ b/include/grub/efi/api.h
|
||||
@@ -572,10 +572,16 @@ typedef void *grub_efi_handle_t;
|
||||
@@ -637,10 +637,16 @@ typedef void *grub_efi_handle_t;
|
||||
typedef void *grub_efi_event_t;
|
||||
typedef grub_efi_uint64_t grub_efi_lba_t;
|
||||
typedef grub_efi_uintn_t grub_efi_tpl_t;
|
||||
|
|
@ -454,7 +480,7 @@ index 97b9aa7a4..02488ec35 100644
|
|||
typedef grub_efi_uint64_t grub_efi_physical_address_t;
|
||||
typedef grub_efi_uint64_t grub_efi_virtual_address_t;
|
||||
|
||||
@@ -1454,16 +1460,127 @@ struct grub_efi_simple_text_output_interface
|
||||
@@ -1521,16 +1527,127 @@ struct grub_efi_simple_text_output_interface
|
||||
};
|
||||
typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output_interface_t;
|
||||
|
||||
|
|
@ -585,10 +611,10 @@ index 97b9aa7a4..02488ec35 100644
|
|||
|
||||
typedef struct grub_efi_pxe
|
||||
diff --git a/include/grub/net.h b/include/grub/net.h
|
||||
index 50d62ab0c..f8f3ec13a 100644
|
||||
index 844e501c128..bf8430a6364 100644
|
||||
--- a/include/grub/net.h
|
||||
+++ b/include/grub/net.h
|
||||
@@ -442,6 +442,51 @@ struct grub_net_bootp_packet
|
||||
@@ -450,6 +450,51 @@ struct grub_net_bootp_packet
|
||||
grub_uint8_t vendor[0];
|
||||
} GRUB_PACKED;
|
||||
|
||||
|
|
@ -640,7 +666,7 @@ index 50d62ab0c..f8f3ec13a 100644
|
|||
#define GRUB_NET_BOOTP_RFC1048_MAGIC_0 0x63
|
||||
#define GRUB_NET_BOOTP_RFC1048_MAGIC_1 0x82
|
||||
#define GRUB_NET_BOOTP_RFC1048_MAGIC_2 0x53
|
||||
@@ -470,6 +515,21 @@ grub_net_configure_by_dhcp_ack (const char *name,
|
||||
@@ -485,6 +530,21 @@ grub_net_configure_by_dhcp_ack (const char *name,
|
||||
grub_size_t size,
|
||||
int is_def, char **device, char **path);
|
||||
|
||||
|
|
@ -662,6 +688,3 @@ index 50d62ab0c..f8f3ec13a 100644
|
|||
grub_err_t
|
||||
grub_net_add_ipv4_local (struct grub_net_network_level_interface *inf,
|
||||
int mask);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
1366
0031-bootp-New-net_bootp6-command.patch
Normal file
1366
0031-bootp-New-net_bootp6-command.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,134 +0,0 @@
|
|||
From c4313c812dc14e82a774b580b5e34d40e7f3fae6 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 08:40:29 +0200
|
||||
Subject: [PATCH 031/194] fdtbus: Add ability to send/receive messages on
|
||||
parent busses.
|
||||
|
||||
---
|
||||
grub-core/bus/fdt.c | 35 +++++++++++++++++------------------
|
||||
include/grub/fdtbus.h | 18 +++++++++++++++++-
|
||||
2 files changed, 34 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/grub-core/bus/fdt.c b/grub-core/bus/fdt.c
|
||||
index 34d535457..135da497b 100644
|
||||
--- a/grub-core/bus/fdt.c
|
||||
+++ b/grub-core/bus/fdt.c
|
||||
@@ -25,30 +25,22 @@ static grub_size_t root_address_cells, root_size_cells;
|
||||
/* Pointer to this symbol signals invalid mapping. */
|
||||
char grub_fdtbus_invalid_mapping[1];
|
||||
|
||||
-struct grub_fdtbus_dev
|
||||
-{
|
||||
- struct grub_fdtbus_dev *next;
|
||||
- struct grub_fdtbus_dev *parent;
|
||||
- int node;
|
||||
- struct grub_fdtbus_driver *driver;
|
||||
-};
|
||||
-
|
||||
struct grub_fdtbus_dev *devs;
|
||||
struct grub_fdtbus_driver *drivers;
|
||||
|
||||
-static int
|
||||
-is_compatible (struct grub_fdtbus_driver *driver,
|
||||
- int node)
|
||||
+int
|
||||
+grub_fdtbus_is_compatible (const char *compat_string,
|
||||
+ const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
grub_size_t compatible_size;
|
||||
- const char *compatible = grub_fdt_get_prop (dtb, node, "compatible",
|
||||
+ const char *compatible = grub_fdt_get_prop (dtb, dev->node, "compatible",
|
||||
&compatible_size);
|
||||
if (!compatible)
|
||||
return 0;
|
||||
const char *compatible_end = compatible + compatible_size;
|
||||
while (compatible < compatible_end)
|
||||
{
|
||||
- if (grub_strcmp (driver->compatible, compatible) == 0)
|
||||
+ if (grub_strcmp (compat_string, compatible) == 0)
|
||||
return 1;
|
||||
compatible += grub_strlen (compatible) + 1;
|
||||
}
|
||||
@@ -75,10 +67,12 @@ fdtbus_scan (struct grub_fdtbus_dev *parent)
|
||||
dev->parent = parent;
|
||||
devs = dev;
|
||||
FOR_LIST_ELEMENTS(driver, drivers)
|
||||
- if (!dev->driver && is_compatible (driver, node))
|
||||
+ if (!dev->driver && grub_fdtbus_is_compatible (driver->compatible, dev))
|
||||
{
|
||||
- if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
+ grub_dprintf ("fdtbus", "Attaching %s\n", driver->compatible);
|
||||
+ if (driver->attach (dev) == GRUB_ERR_NONE)
|
||||
{
|
||||
+ grub_dprintf ("fdtbus", "Attached %s\n", driver->compatible);
|
||||
dev->driver = driver;
|
||||
break;
|
||||
}
|
||||
@@ -92,13 +86,18 @@ void
|
||||
grub_fdtbus_register (struct grub_fdtbus_driver *driver)
|
||||
{
|
||||
struct grub_fdtbus_dev *dev;
|
||||
+ grub_dprintf ("fdtbus", "Registering %s\n", driver->compatible);
|
||||
grub_list_push (GRUB_AS_LIST_P (&drivers),
|
||||
GRUB_AS_LIST (driver));
|
||||
for (dev = devs; dev; dev = dev->next)
|
||||
- if (!dev->driver && is_compatible (driver, dev->node))
|
||||
+ if (!dev->driver && grub_fdtbus_is_compatible (driver->compatible, dev))
|
||||
{
|
||||
- if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
- dev->driver = driver;
|
||||
+ grub_dprintf ("fdtbus", "Attaching %s (%p)\n", driver->compatible, dev);
|
||||
+ if (driver->attach (dev) == GRUB_ERR_NONE)
|
||||
+ {
|
||||
+ grub_dprintf ("fdtbus", "Attached %s\n", driver->compatible);
|
||||
+ dev->driver = driver;
|
||||
+ }
|
||||
grub_print_error ();
|
||||
}
|
||||
}
|
||||
diff --git a/include/grub/fdtbus.h b/include/grub/fdtbus.h
|
||||
index 985837e55..f519c40ec 100644
|
||||
--- a/include/grub/fdtbus.h
|
||||
+++ b/include/grub/fdtbus.h
|
||||
@@ -22,7 +22,13 @@
|
||||
#include <grub/fdt.h>
|
||||
#include <grub/err.h>
|
||||
|
||||
-struct grub_fdtbus_dev;
|
||||
+struct grub_fdtbus_dev
|
||||
+{
|
||||
+ struct grub_fdtbus_dev *next;
|
||||
+ struct grub_fdtbus_dev *parent;
|
||||
+ int node;
|
||||
+ struct grub_fdtbus_driver *driver;
|
||||
+};
|
||||
|
||||
struct grub_fdtbus_driver
|
||||
{
|
||||
@@ -33,6 +39,12 @@ struct grub_fdtbus_driver
|
||||
|
||||
grub_err_t (*attach) (const struct grub_fdtbus_dev *dev);
|
||||
void (*detach) (const struct grub_fdtbus_dev *dev);
|
||||
+
|
||||
+ /* Message bus operations. */
|
||||
+ grub_err_t (*send) (const struct grub_fdtbus_dev *dev, const void *data, grub_size_t sz);
|
||||
+ grub_err_t (*receive) (const struct grub_fdtbus_dev *dev, void *data, grub_size_t sz);
|
||||
+ grub_err_t (*start) (const struct grub_fdtbus_dev *dev);
|
||||
+ void (*stop) (const struct grub_fdtbus_dev *dev);
|
||||
};
|
||||
|
||||
extern char EXPORT_VAR(grub_fdtbus_invalid_mapping)[1];
|
||||
@@ -63,6 +75,10 @@ EXPORT_FUNC(grub_fdtbus_register) (struct grub_fdtbus_driver *driver);
|
||||
void
|
||||
EXPORT_FUNC(grub_fdtbus_unregister) (struct grub_fdtbus_driver *driver);
|
||||
|
||||
+int
|
||||
+EXPORT_FUNC(grub_fdtbus_is_compatible) (const char *compat_string,
|
||||
+ const struct grub_fdtbus_dev *dev);
|
||||
+
|
||||
/* Must be called before any register(). */
|
||||
/* dtb is assumed to be unfreeable and must remain
|
||||
valid for lifetime of GRUB.
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From a037c9021bf1b24299a521d0c40643600ddc437e Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 23 Jun 2016 11:01:39 -0400
|
||||
Subject: [PATCH 147/194] Add grub-get-kernel-settings and use it in 10_linux
|
||||
Subject: [PATCH] Add grub-get-kernel-settings and use it in 10_linux
|
||||
|
||||
This patch adds grub-get-kernel-settings, which reads the system kernel
|
||||
installation configuration from /etc/sysconfig/kernel, and outputs
|
||||
|
|
@ -10,55 +10,24 @@ variables are then used by 10_linux to choose whether or not to create
|
|||
debug stanzas.
|
||||
|
||||
Resolves: rhbz#1226325
|
||||
[rharwood: migrate man page to h2m]
|
||||
---
|
||||
.gitignore | 2 +
|
||||
Makefile.util.def | 7 +++
|
||||
configure.ac | 2 +
|
||||
util/bash-completion.d/grub-completion.bash.in | 22 ++++++++
|
||||
util/grub-get-kernel-settings.3 | 20 +++++++
|
||||
util/grub-get-kernel-settings.in | 78 ++++++++++++++++++++++++++
|
||||
configure.ac | 1 +
|
||||
Makefile.util.def | 7 ++
|
||||
docs/man/grub-get-kernel-settings.h2m | 2 +
|
||||
util/bash-completion.d/grub-completion.bash.in | 22 +++++++
|
||||
util/grub-get-kernel-settings.in | 88 ++++++++++++++++++++++++++
|
||||
util/grub-mkconfig.in | 3 +
|
||||
util/grub.d/10_linux.in | 23 ++++++--
|
||||
8 files changed, 152 insertions(+), 5 deletions(-)
|
||||
create mode 100644 util/grub-get-kernel-settings.3
|
||||
util/grub.d/10_linux.in | 23 +++++--
|
||||
7 files changed, 141 insertions(+), 5 deletions(-)
|
||||
create mode 100644 docs/man/grub-get-kernel-settings.h2m
|
||||
create mode 100644 util/grub-get-kernel-settings.in
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 387e3554c..9f258735a 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -64,6 +64,8 @@ grub-*.tar.*
|
||||
/grub*-fs-tester
|
||||
/grub*-fstest
|
||||
/grub*-fstest.1
|
||||
+/grub*-get-kernel-settings
|
||||
+/grub*-get-kernel-settings.3
|
||||
/grub*-glue-efi
|
||||
/grub*-glue-efi.1
|
||||
/grub*-install
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 226c46b2d..ed27351eb 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -714,6 +714,13 @@ script = {
|
||||
};
|
||||
|
||||
script = {
|
||||
+ name = grub-get-kernel-settings;
|
||||
+ common = util/grub-get-kernel-settings.in;
|
||||
+ mansection = 3;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
+script = {
|
||||
name = grub-set-default;
|
||||
common = util/grub-set-default.in;
|
||||
mansection = 8;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3c4b9a19b..40be70019 100644
|
||||
index 493e336ec6c..3602b4ab62b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -58,6 +58,7 @@ grub_TRANSFORM([grub-install])
|
||||
@@ -70,6 +70,7 @@ grub_TRANSFORM([grub-install])
|
||||
grub_TRANSFORM([grub-mkconfig])
|
||||
grub_TRANSFORM([grub-mkfont])
|
||||
grub_TRANSFORM([grub-mkimage])
|
||||
|
|
@ -66,22 +35,41 @@ index 3c4b9a19b..40be70019 100644
|
|||
grub_TRANSFORM([grub-glue-efi])
|
||||
grub_TRANSFORM([grub-mklayout])
|
||||
grub_TRANSFORM([grub-mkpasswd-pbkdf2])
|
||||
@@ -75,6 +76,7 @@ grub_TRANSFORM([grub-file])
|
||||
grub_TRANSFORM([grub-bios-setup.3])
|
||||
grub_TRANSFORM([grub-editenv.1])
|
||||
grub_TRANSFORM([grub-fstest.3])
|
||||
+grub_TRANSFORM([grub-get-kernel-settings.3])
|
||||
grub_TRANSFORM([grub-glue-efi.3])
|
||||
grub_TRANSFORM([grub-install.1])
|
||||
grub_TRANSFORM([grub-kbdcomp.3])
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 95884956a68..84a17ef5cfa 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -725,6 +725,13 @@ script = {
|
||||
installdir = sbin;
|
||||
};
|
||||
|
||||
+script = {
|
||||
+ name = grub-get-kernel-settings;
|
||||
+ common = util/grub-get-kernel-settings.in;
|
||||
+ mansection = 3;
|
||||
+ installdir = sbin;
|
||||
+};
|
||||
+
|
||||
script = {
|
||||
name = grub-set-default;
|
||||
common = util/grub-set-default.in;
|
||||
diff --git a/docs/man/grub-get-kernel-settings.h2m b/docs/man/grub-get-kernel-settings.h2m
|
||||
new file mode 100644
|
||||
index 00000000000..b8051f01f3a
|
||||
--- /dev/null
|
||||
+++ b/docs/man/grub-get-kernel-settings.h2m
|
||||
@@ -0,0 +1,2 @@
|
||||
+[NAME]
|
||||
+grub-get-kernel-settings \- Evaluate the system's kernel installation settings for use while making a grub configuration file
|
||||
diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
|
||||
index 44bf135b9..5c4acd496 100644
|
||||
index 213ce1e57cf..da7fca5efac 100644
|
||||
--- a/util/bash-completion.d/grub-completion.bash.in
|
||||
+++ b/util/bash-completion.d/grub-completion.bash.in
|
||||
@@ -265,6 +265,28 @@ unset __grub_sparc64_setup_program
|
||||
@@ -275,6 +275,28 @@ have ${__grub_sparc64_setup_program} && \
|
||||
unset __grub_sparc64_setup_program
|
||||
|
||||
|
||||
#
|
||||
+#
|
||||
+# grub-get-kernel-settings
|
||||
+#
|
||||
+_grub_get_kernel_settings () {
|
||||
|
|
@ -103,42 +91,15 @@ index 44bf135b9..5c4acd496 100644
|
|||
+unset __grub_get_kernel_settings_program
|
||||
+
|
||||
+
|
||||
+#
|
||||
#
|
||||
# grub-install
|
||||
#
|
||||
_grub_install () {
|
||||
diff --git a/util/grub-get-kernel-settings.3 b/util/grub-get-kernel-settings.3
|
||||
new file mode 100644
|
||||
index 000000000..ba33330e2
|
||||
--- /dev/null
|
||||
+++ b/util/grub-get-kernel-settings.3
|
||||
@@ -0,0 +1,20 @@
|
||||
+.TH GRUB-GET-KERNEL-SETTINGS 3 "Thu Jun 25 2015"
|
||||
+.SH NAME
|
||||
+\fBgrub-get-kernel-settings\fR \(em Evaluate the system's kernel installation settings for use while making a grub configuration file.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+\fBgrub-get-kernel-settings\fR [OPTION]
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+\fBgrub-get-kernel-settings\fR reads the kernel installation settings on the host system, and emits a set of grub settings suitable for use when creating a grub configuration file.
|
||||
+
|
||||
+.SH OPTIONS
|
||||
+.TP
|
||||
+-h, --help
|
||||
+Display program usage and exit.
|
||||
+.TP
|
||||
+-v, --version
|
||||
+Display the current version.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.BR "info grub"
|
||||
diff --git a/util/grub-get-kernel-settings.in b/util/grub-get-kernel-settings.in
|
||||
new file mode 100644
|
||||
index 000000000..120462198
|
||||
index 00000000000..7e87dfccc0e
|
||||
--- /dev/null
|
||||
+++ b/util/grub-get-kernel-settings.in
|
||||
@@ -0,0 +1,78 @@
|
||||
@@ -0,0 +1,88 @@
|
||||
+#!/bin/sh
|
||||
+set -e
|
||||
+
|
||||
|
|
@ -217,8 +178,18 @@ index 000000000..120462198
|
|||
+ echo GRUB_LINUX_DEBUG_TITLE_POSTFIX=\" with debugging\"
|
||||
+ echo export GRUB_LINUX_DEBUG_TITLE_POSTFIX
|
||||
+fi
|
||||
+if [ "$DEFAULTDEBUG" = "yes" ]; then
|
||||
+ echo GRUB_DEFAULT_TO_DEBUG=true
|
||||
+else
|
||||
+ echo GRUB_DEFAULT_TO_DEBUG=false
|
||||
+fi
|
||||
+echo export GRUB_DEFAULT_TO_DEBUG
|
||||
+if [ "$UPDATEDEFAULT" = "yes" ]; then
|
||||
+ echo GRUB_UPDATE_DEFAULT_KERNEL=true
|
||||
+ echo export GRUB_UPDATE_DEFAULT_KERNEL
|
||||
+fi
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index fb8724708..e32de5ef3 100644
|
||||
index 5f2824d4f58..28e92515795 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -45,6 +45,7 @@ grub_probe="${sbindir}/@grub_probe@"
|
||||
|
|
@ -229,20 +200,20 @@ index fb8724708..e32de5ef3 100644
|
|||
|
||||
export TEXTDOMAIN=@PACKAGE@
|
||||
export TEXTDOMAINDIR="@localedir@"
|
||||
@@ -151,6 +152,8 @@ if test -f ${sysconfdir}/default/grub ; then
|
||||
@@ -158,6 +159,8 @@ if test -f ${sysconfdir}/default/grub ; then
|
||||
. ${sysconfdir}/default/grub
|
||||
fi
|
||||
|
||||
+eval "$("${grub_get_kernel_settings}")" || true
|
||||
+
|
||||
if [ "x$GRUB_DISABLE_UUID" != "xtrue" -a -z "$GRUB_DEVICE_UUID" ]; then
|
||||
GRUB_DEVICE_UUID="$GRUB_DEVICE_UUID_GENERATED"
|
||||
fi
|
||||
if [ "x${GRUB_DISABLE_UUID}" = "xtrue" ]; then
|
||||
if [ -z "${GRUB_DISABLE_LINUX_UUID}" ]; then
|
||||
GRUB_DISABLE_LINUX_UUID="true"
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index 584ad1f46..c9bf223f2 100644
|
||||
index 993c53ad92e..e8ab4082f87 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -101,7 +101,8 @@ linux_entry ()
|
||||
@@ -113,7 +113,8 @@ linux_entry ()
|
||||
os="$1"
|
||||
version="$2"
|
||||
type="$3"
|
||||
|
|
@ -250,9 +221,9 @@ index 584ad1f46..c9bf223f2 100644
|
|||
+ isdebug="$4"
|
||||
+ args="$5"
|
||||
|
||||
sixteenbit=""
|
||||
linuxefi="linux"
|
||||
@@ -128,6 +129,9 @@ linux_entry ()
|
||||
if [ -z "$boot_device_id" ]; then
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
@@ -125,6 +126,9 @@ linux_entry ()
|
||||
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
|
||||
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
|
||||
fi
|
||||
|
|
@ -262,7 +233,7 @@ index 584ad1f46..c9bf223f2 100644
|
|||
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
else
|
||||
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
@@ -285,11 +289,15 @@ while [ "x$list" != "x" ] ; do
|
||||
@@ -320,11 +324,15 @@ for linux in ${reverse_sorted_list}; do
|
||||
fi
|
||||
|
||||
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
|
||||
|
|
@ -280,7 +251,7 @@ index 584ad1f46..c9bf223f2 100644
|
|||
if [ -z "$boot_device_id" ]; then
|
||||
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
|
||||
fi
|
||||
@@ -298,10 +306,15 @@ while [ "x$list" != "x" ] ; do
|
||||
@@ -333,10 +341,15 @@ for linux in ${reverse_sorted_list}; do
|
||||
is_top_level=false
|
||||
fi
|
||||
|
||||
|
|
@ -295,9 +266,6 @@ index 584ad1f46..c9bf223f2 100644
|
|||
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||
- linux_entry "${OS}" "${version}" recovery \
|
||||
+ linux_entry "${OS}" "${version}" recovery standard \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
"${GRUB_CMDLINE_LINUX_RECOVERY} ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
done
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
From b0b1b81a11f8bae8ab9e8edd87ac3f4f7949d03b Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 08:42:14 +0200
|
||||
Subject: [PATCH 032/194] rk3288_spi: Add SPI driver
|
||||
|
||||
---
|
||||
grub-core/Makefile.core.def | 1 +
|
||||
grub-core/bus/spi/rk3288_spi.c | 103 +++++++++++++++++++++++++++++++++++++
|
||||
grub-core/kern/arm/coreboot/init.c | 2 +
|
||||
include/grub/arm/coreboot/kernel.h | 4 +-
|
||||
4 files changed, 108 insertions(+), 2 deletions(-)
|
||||
create mode 100644 grub-core/bus/spi/rk3288_spi.c
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 5ce506597..d2239f171 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -162,6 +162,7 @@ kernel = {
|
||||
arm_coreboot = bus/fdt.c;
|
||||
arm_coreboot = term/ps2.c;
|
||||
arm_coreboot = term/arm/pl050.c;
|
||||
+ arm_coreboot = bus/spi/rk3288_spi.c;
|
||||
arm_coreboot = commands/keylayouts.c;
|
||||
arm_coreboot = kern/arm/coreboot/dma.c;
|
||||
|
||||
diff --git a/grub-core/bus/spi/rk3288_spi.c b/grub-core/bus/spi/rk3288_spi.c
|
||||
new file mode 100644
|
||||
index 000000000..aacb79ffe
|
||||
--- /dev/null
|
||||
+++ b/grub-core/bus/spi/rk3288_spi.c
|
||||
@@ -0,0 +1,103 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Google Inc.
|
||||
+ * Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * This is based on depthcharge code.
|
||||
+ *
|
||||
+ * 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/mm.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+
|
||||
+static grub_err_t
|
||||
+spi_send (const struct grub_fdtbus_dev *dev, const void *data, grub_size_t sz)
|
||||
+{
|
||||
+ const grub_uint8_t *ptr = data, *end = ptr + sz;
|
||||
+ volatile grub_uint32_t *spi = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+ spi[2] = 0;
|
||||
+ spi[1] = sz - 1;
|
||||
+ spi[0] = ((1 << 18) | spi[0]) & ~(1 << 19);
|
||||
+ spi[2] = 1;
|
||||
+ while (ptr < end)
|
||||
+ {
|
||||
+ while (spi[9] & 2);
|
||||
+ spi[256] = *ptr++;
|
||||
+ }
|
||||
+ while (spi[9] & 1);
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
+spi_receive (const struct grub_fdtbus_dev *dev, void *data, grub_size_t sz)
|
||||
+{
|
||||
+ grub_uint8_t *ptr = data, *end = ptr + sz;
|
||||
+ volatile grub_uint32_t *spi = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+ spi[2] = 0;
|
||||
+ spi[1] = sz - 1;
|
||||
+ spi[0] = ((1 << 19) | spi[0]) & ~(1 << 18);
|
||||
+ spi[2] = 1;
|
||||
+ while (ptr < end)
|
||||
+ {
|
||||
+ while (spi[9] & 8);
|
||||
+ *ptr++ = spi[512];
|
||||
+ }
|
||||
+ while (spi[9] & 1);
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
+spi_start (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ volatile grub_uint32_t *spi = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+ spi[3] = 1;
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+spi_stop (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ volatile grub_uint32_t *spi = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
+ spi[3] = 0;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
+spi_attach(const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ if (!grub_fdtbus_is_mapping_valid (grub_fdtbus_map_reg (dev, 0, 0)))
|
||||
+ return GRUB_ERR_IO;
|
||||
+
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static struct grub_fdtbus_driver spi =
|
||||
+{
|
||||
+ .compatible = "rockchip,rk3288-spi",
|
||||
+ .attach = spi_attach,
|
||||
+ .send = spi_send,
|
||||
+ .receive = spi_receive,
|
||||
+ .start = spi_start,
|
||||
+ .stop = spi_stop,
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+grub_rk3288_spi_init (void)
|
||||
+{
|
||||
+ grub_fdtbus_register (&spi);
|
||||
+}
|
||||
diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c
|
||||
index a06ccb72f..0126ff638 100644
|
||||
--- a/grub-core/kern/arm/coreboot/init.c
|
||||
+++ b/grub-core/kern/arm/coreboot/init.c
|
||||
@@ -132,6 +132,8 @@ grub_machine_init (void)
|
||||
grub_fatal ("No DTB found");
|
||||
grub_fdtbus_init (dtb, dtb_size);
|
||||
|
||||
+ grub_rk3288_spi_init ();
|
||||
+
|
||||
grub_machine_timer_init ();
|
||||
grub_pl050_init ();
|
||||
}
|
||||
diff --git a/include/grub/arm/coreboot/kernel.h b/include/grub/arm/coreboot/kernel.h
|
||||
index 09cd7fe32..269505342 100644
|
||||
--- a/include/grub/arm/coreboot/kernel.h
|
||||
+++ b/include/grub/arm/coreboot/kernel.h
|
||||
@@ -34,8 +34,8 @@ struct grub_fdt_board
|
||||
extern struct grub_fdt_board grub_fdt_boards[];
|
||||
void grub_machine_timer_init (void);
|
||||
void grub_pl050_init (void);
|
||||
-void
|
||||
-grub_cros_init (void);
|
||||
+void grub_cros_init (void);
|
||||
+void grub_rk3288_spi_init (void);
|
||||
extern grub_addr_t EXPORT_VAR (start_of_ram);
|
||||
#endif /* ! ASM_FILE */
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
From 482aef96798dec0896902dace1b1be71b1a12455 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 27 Jan 2016 09:22:42 -0500
|
||||
Subject: [PATCH 155/194] Make grub_fatal() also backtrace.
|
||||
Subject: [PATCH] Make grub_fatal() also backtrace.
|
||||
|
||||
---
|
||||
grub-core/Makefile.core.def | 3 ++
|
||||
grub-core/kern/misc.c | 8 +++++-
|
||||
grub-core/kern/misc.c | 6 ++++
|
||||
grub-core/lib/arm64/backtrace.c | 62 +++++++++++++++++++++++++++++++++++++++++
|
||||
grub-core/lib/backtrace.c | 2 ++
|
||||
grub-core/lib/i386/backtrace.c | 14 +++++++++-
|
||||
5 files changed, 87 insertions(+), 2 deletions(-)
|
||||
5 files changed, 86 insertions(+), 1 deletion(-)
|
||||
create mode 100644 grub-core/lib/arm64/backtrace.c
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 75a7ab344..3a5d450f3 100644
|
||||
index 47c0fc755a2..63f053b3add 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -175,6 +175,9 @@ kernel = {
|
||||
@@ -199,6 +199,9 @@ kernel = {
|
||||
|
||||
softdiv = lib/division.c;
|
||||
|
||||
|
|
@ -25,21 +25,21 @@ index 75a7ab344..3a5d450f3 100644
|
|||
+
|
||||
i386 = kern/i386/dl.c;
|
||||
i386_xen = kern/i386/dl.c;
|
||||
|
||||
i386_xen_pvh = kern/i386/dl.c;
|
||||
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
|
||||
index f1fab7000..5ce89a40c 100644
|
||||
index 11037dc0227..465a8e74ea7 100644
|
||||
--- a/grub-core/kern/misc.c
|
||||
+++ b/grub-core/kern/misc.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <grub/term.h>
|
||||
#include <grub/env.h>
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/charset.h>
|
||||
+#include <grub/backtrace.h>
|
||||
|
||||
union printf_arg
|
||||
{
|
||||
@@ -1101,8 +1102,13 @@ grub_xasprintf (const char *fmt, ...)
|
||||
static void __attribute__ ((noreturn))
|
||||
@@ -1301,6 +1302,11 @@ grub_printf_fmt_check (const char *fmt, const char *fmt_expected)
|
||||
void __attribute__ ((noreturn))
|
||||
grub_abort (void)
|
||||
{
|
||||
+#ifndef GRUB_UTIL
|
||||
|
|
@ -48,14 +48,11 @@ index f1fab7000..5ce89a40c 100644
|
|||
+#endif
|
||||
+#endif
|
||||
grub_printf ("\nAborted.");
|
||||
-
|
||||
+
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
if (grub_term_inputs)
|
||||
#endif
|
||||
diff --git a/grub-core/lib/arm64/backtrace.c b/grub-core/lib/arm64/backtrace.c
|
||||
new file mode 100644
|
||||
index 000000000..1079b5380
|
||||
index 00000000000..1079b5380e1
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/arm64/backtrace.c
|
||||
@@ -0,0 +1,62 @@
|
||||
|
|
@ -122,7 +119,7 @@ index 000000000..1079b5380
|
|||
+}
|
||||
+
|
||||
diff --git a/grub-core/lib/backtrace.c b/grub-core/lib/backtrace.c
|
||||
index 825a8800e..c0ad6ab8b 100644
|
||||
index 825a8800e25..c0ad6ab8be1 100644
|
||||
--- a/grub-core/lib/backtrace.c
|
||||
+++ b/grub-core/lib/backtrace.c
|
||||
@@ -29,6 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
|
@ -142,7 +139,7 @@ index 825a8800e..c0ad6ab8b 100644
|
|||
}
|
||||
|
||||
diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c
|
||||
index c3e03c727..c67273db3 100644
|
||||
index c3e03c7275c..c67273db3ae 100644
|
||||
--- a/grub-core/lib/i386/backtrace.c
|
||||
+++ b/grub-core/lib/i386/backtrace.c
|
||||
@@ -15,11 +15,23 @@
|
||||
|
|
@ -170,6 +167,3 @@ index c3e03c727..c67273db3 100644
|
|||
#include <grub/mm.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/backtrace.h>
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,419 +0,0 @@
|
|||
From 5c3fd1b135bd73c8e3467b9b635b25ca4d360a19 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 08:47:34 +0200
|
||||
Subject: [PATCH 033/194] arm_coreboot: Add Chromebook keyboard driver.
|
||||
|
||||
---
|
||||
grub-core/term/arm/cros.c | 125 +++++++++++++++++++++++
|
||||
grub-core/term/arm/cros_ec.c | 238 +++++++++++++++++++++++++++++++++++++++++++
|
||||
include/grub/arm/cros_ec.h | 21 ++++
|
||||
3 files changed, 384 insertions(+)
|
||||
create mode 100644 grub-core/term/arm/cros.c
|
||||
create mode 100644 grub-core/term/arm/cros_ec.c
|
||||
create mode 100644 include/grub/arm/cros_ec.h
|
||||
|
||||
diff --git a/grub-core/term/arm/cros.c b/grub-core/term/arm/cros.c
|
||||
new file mode 100644
|
||||
index 000000000..1ff9f8ccf
|
||||
--- /dev/null
|
||||
+++ b/grub-core/term/arm/cros.c
|
||||
@@ -0,0 +1,125 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Google Inc.
|
||||
+ * Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * This is based on depthcharge code.
|
||||
+ *
|
||||
+ * 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/ps2.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+#include <grub/err.h>
|
||||
+#include <grub/machine/kernel.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/term.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+#include <grub/arm/cros_ec.h>
|
||||
+
|
||||
+struct grub_ps2_state ps2_state;
|
||||
+
|
||||
+struct grub_cros_ec_keyscan old_scan;
|
||||
+
|
||||
+static const struct grub_fdtbus_dev *cros_ec;
|
||||
+
|
||||
+static grub_uint8_t map_code[GRUB_CROS_EC_KEYSCAN_COLS][GRUB_CROS_EC_KEYSCAN_ROWS];
|
||||
+
|
||||
+static grub_uint8_t e0_translate[16] =
|
||||
+ {
|
||||
+ 0x1c, 0x1d, 0x35, 0x00,
|
||||
+ 0x38, 0x00, 0x47, 0x48,
|
||||
+ 0x49, 0x4b, 0x4d, 0x4f,
|
||||
+ 0x50, 0x51, 0x52, 0x53,
|
||||
+ };
|
||||
+
|
||||
+/* If there is a character pending, return it;
|
||||
+ otherwise return GRUB_TERM_NO_KEY. */
|
||||
+static int
|
||||
+grub_cros_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
+{
|
||||
+ struct grub_cros_ec_keyscan scan;
|
||||
+ int i, j;
|
||||
+ if (grub_cros_ec_scan_keyboard (cros_ec, &scan) < 0)
|
||||
+ return GRUB_TERM_NO_KEY;
|
||||
+ for (i = 0; i < GRUB_CROS_EC_KEYSCAN_COLS; i++)
|
||||
+ if (scan.data[i] ^ old_scan.data[i])
|
||||
+ for (j = 0; j < GRUB_CROS_EC_KEYSCAN_ROWS; j++)
|
||||
+ if ((scan.data[i] ^ old_scan.data[i]) & (1 << j))
|
||||
+ {
|
||||
+ grub_uint8_t code = map_code[i][j];
|
||||
+ int ret;
|
||||
+ grub_uint8_t brk = 0;
|
||||
+ if (!(scan.data[i] & (1 << j)))
|
||||
+ brk = 0x80;
|
||||
+ grub_dprintf ("cros_keyboard", "key <%d, %d> code %x\n", i, j, code);
|
||||
+ if (code < 0x60)
|
||||
+ ret = grub_ps2_process_incoming_byte (&ps2_state, code | brk);
|
||||
+ else if (code >= 0x60 && code < 0x70 && e0_translate[code - 0x60])
|
||||
+ {
|
||||
+ grub_ps2_process_incoming_byte (&ps2_state, 0xe0);
|
||||
+ ret = grub_ps2_process_incoming_byte (&ps2_state, e0_translate[code - 0x60] | brk);
|
||||
+ }
|
||||
+ else
|
||||
+ ret = GRUB_TERM_NO_KEY;
|
||||
+ old_scan.data[i] ^= (1 << j);
|
||||
+ if (ret != GRUB_TERM_NO_KEY)
|
||||
+ return ret;
|
||||
+ }
|
||||
+ return GRUB_TERM_NO_KEY;
|
||||
+}
|
||||
+
|
||||
+static struct grub_term_input grub_cros_keyboard_term =
|
||||
+ {
|
||||
+ .name = "cros_keyboard",
|
||||
+ .getkey = grub_cros_keyboard_getkey
|
||||
+ };
|
||||
+
|
||||
+static grub_err_t
|
||||
+cros_attach (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ grub_size_t keymap_size, i;
|
||||
+ const grub_uint8_t *keymap = grub_fdtbus_get_prop (dev, "linux,keymap", &keymap_size);
|
||||
+
|
||||
+ if (!dev->parent || !grub_cros_ec_validate (dev->parent))
|
||||
+ return GRUB_ERR_IO;
|
||||
+
|
||||
+ if (keymap)
|
||||
+ {
|
||||
+ for (i = 0; i + 3 < keymap_size; i += 4)
|
||||
+ if (keymap[i+1] < GRUB_CROS_EC_KEYSCAN_COLS && keymap[i] < GRUB_CROS_EC_KEYSCAN_ROWS
|
||||
+ && keymap[i+2] == 0 && keymap[i+3] < 0x80)
|
||||
+ map_code[keymap[i+1]][keymap[i]] = keymap[i+3];
|
||||
+ }
|
||||
+
|
||||
+ cros_ec = dev->parent;
|
||||
+ ps2_state.current_set = 1;
|
||||
+ ps2_state.at_keyboard_status = 0;
|
||||
+ grub_term_register_input ("cros_keyboard", &grub_cros_keyboard_term);
|
||||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static struct grub_fdtbus_driver cros =
|
||||
+{
|
||||
+ .compatible = "google,cros-ec-keyb",
|
||||
+ .attach = cros_attach
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+grub_cros_init (void)
|
||||
+{
|
||||
+ grub_fdtbus_register (&cros);
|
||||
+}
|
||||
diff --git a/grub-core/term/arm/cros_ec.c b/grub-core/term/arm/cros_ec.c
|
||||
new file mode 100644
|
||||
index 000000000..f4144818b
|
||||
--- /dev/null
|
||||
+++ b/grub-core/term/arm/cros_ec.c
|
||||
@@ -0,0 +1,238 @@
|
||||
+/*
|
||||
+ * GRUB -- GRand Unified Bootloader
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Google Inc.
|
||||
+ * Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
+ *
|
||||
+ * This is based on depthcharge code.
|
||||
+ *
|
||||
+ * 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/mm.h>
|
||||
+#include <grub/time.h>
|
||||
+#include <grub/misc.h>
|
||||
+#include <grub/arm/cros_ec.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+
|
||||
+static const grub_uint64_t FRAMING_TIMEOUT_MS = 300;
|
||||
+
|
||||
+static const grub_uint8_t EC_FRAMING_BYTE = 0xec;
|
||||
+
|
||||
+#define EC_CMD_MKBP_STATE 0x60
|
||||
+#define EC_CMD_VERSION0 0xdc
|
||||
+
|
||||
+static grub_uint64_t last_transfer;
|
||||
+
|
||||
+static void
|
||||
+stop_bus (const struct grub_fdtbus_dev *spi)
|
||||
+{
|
||||
+ spi->driver->stop (spi);
|
||||
+ last_transfer = grub_get_time_ms ();
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+wait_for_frame (const struct grub_fdtbus_dev *spi)
|
||||
+{
|
||||
+ grub_uint64_t start = grub_get_time_ms ();
|
||||
+ grub_uint8_t byte;
|
||||
+ do
|
||||
+ {
|
||||
+ if (spi->driver->receive (spi, &byte, 1))
|
||||
+ return -1;
|
||||
+ if (byte != EC_FRAMING_BYTE &&
|
||||
+ grub_get_time_ms () - start > FRAMING_TIMEOUT_MS)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Timeout waiting for framing byte.\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+ while (byte != EC_FRAMING_BYTE);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Calculate a simple 8-bit checksum of a data block
|
||||
+ *
|
||||
+ * @param data Data block to checksum
|
||||
+ * @param size Size of data block in bytes
|
||||
+ * @return checksum value (0 to 255)
|
||||
+ */
|
||||
+static grub_uint8_t
|
||||
+cros_ec_calc_checksum (const void *data, int size)
|
||||
+{
|
||||
+ grub_uint8_t csum;
|
||||
+ const grub_uint8_t *bytes = data;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = csum = 0; i < size; i++)
|
||||
+ csum += bytes[i];
|
||||
+ return csum & 0xff;
|
||||
+}
|
||||
+
|
||||
+enum
|
||||
+{
|
||||
+ /* response, arglen */
|
||||
+ CROS_EC_SPI_IN_HDR_SIZE = 2,
|
||||
+ /* version, cmd, arglen */
|
||||
+ CROS_EC_SPI_OUT_HDR_SIZE = 3
|
||||
+};
|
||||
+
|
||||
+static grub_uint8_t busbuf[256];
|
||||
+#define MSG_BYTES ((int)sizeof (busbuf))
|
||||
+
|
||||
+static int
|
||||
+ec_command (const struct grub_fdtbus_dev *dev, int cmd, int cmd_version,
|
||||
+ const void *dout, int dout_len, void *din, int din_len)
|
||||
+{
|
||||
+ const struct grub_fdtbus_dev *spi = dev->parent;
|
||||
+ grub_uint8_t *bytes;
|
||||
+
|
||||
+ /* Header + data + checksum. */
|
||||
+ grub_uint32_t out_bytes = CROS_EC_SPI_OUT_HDR_SIZE + dout_len + 1;
|
||||
+ grub_uint32_t in_bytes = CROS_EC_SPI_IN_HDR_SIZE + din_len + 1;
|
||||
+
|
||||
+ /*
|
||||
+ * Sanity-check I/O sizes given transaction overhead in internal
|
||||
+ * buffers.
|
||||
+ */
|
||||
+ if (out_bytes > MSG_BYTES)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Cannot send %d bytes\n", dout_len);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (in_bytes > MSG_BYTES)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Cannot receive %d bytes\n", din_len);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Prepare the output. */
|
||||
+ bytes = busbuf;
|
||||
+ *bytes++ = EC_CMD_VERSION0 + cmd_version;
|
||||
+ *bytes++ = cmd;
|
||||
+ *bytes++ = dout_len;
|
||||
+ grub_memcpy (bytes, dout, dout_len);
|
||||
+ bytes += dout_len;
|
||||
+
|
||||
+ *bytes++ = cros_ec_calc_checksum (busbuf,
|
||||
+ CROS_EC_SPI_OUT_HDR_SIZE + dout_len);
|
||||
+
|
||||
+ /* Depthcharge uses 200 us here but GRUB timer resolution is only 1ms,
|
||||
+ decrease this when we increase timer resolution. */
|
||||
+ while (grub_get_time_ms () - last_transfer < 1)
|
||||
+ ;
|
||||
+
|
||||
+ if (spi->driver->start (spi))
|
||||
+ return -1;
|
||||
+
|
||||
+ /* Allow EC to ramp up clock after being awoken. */
|
||||
+ /* Depthcharge only waits 100 us here but GRUB timer resolution is only 1ms,
|
||||
+ decrease this when we increase timer resolution. */
|
||||
+ grub_millisleep (1);
|
||||
+
|
||||
+ if (spi->driver->send (spi, busbuf, out_bytes))
|
||||
+ {
|
||||
+ stop_bus (spi);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Wait until the EC is ready. */
|
||||
+ if (wait_for_frame (spi))
|
||||
+ {
|
||||
+ stop_bus (spi);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Read the response code and the data length. */
|
||||
+ bytes = busbuf;
|
||||
+ if (spi->driver->receive (spi, bytes, 2))
|
||||
+ {
|
||||
+ stop_bus (spi);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ grub_uint8_t result = *bytes++;
|
||||
+ grub_uint8_t length = *bytes++;
|
||||
+
|
||||
+ /* Make sure there's enough room for the data. */
|
||||
+ if (CROS_EC_SPI_IN_HDR_SIZE + length + 1 > MSG_BYTES)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Received length %#02x too large\n", length);
|
||||
+ stop_bus (spi);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* Read the data and the checksum, and finish up. */
|
||||
+ if (spi->driver->receive (spi, bytes, length + 1))
|
||||
+ {
|
||||
+ stop_bus (spi);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ bytes += length;
|
||||
+ int expected = *bytes++;
|
||||
+ stop_bus (spi);
|
||||
+
|
||||
+ /* Check the integrity of the response. */
|
||||
+ if (result != 0)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Received bad result code %d\n", result);
|
||||
+ return -result;
|
||||
+ }
|
||||
+
|
||||
+ int csum = cros_ec_calc_checksum (busbuf,
|
||||
+ CROS_EC_SPI_IN_HDR_SIZE + length);
|
||||
+
|
||||
+ if (csum != expected)
|
||||
+ {
|
||||
+ grub_dprintf ("cros", "Invalid checksum rx %#02x, calced %#02x\n",
|
||||
+ expected, csum);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ /* If the caller wants the response, copy it out for them. */
|
||||
+ if (length < din_len)
|
||||
+ din_len = length;
|
||||
+ if (din)
|
||||
+ {
|
||||
+ grub_memcpy (din, (grub_uint8_t *) busbuf + CROS_EC_SPI_IN_HDR_SIZE, din_len);
|
||||
+ }
|
||||
+
|
||||
+ return din_len;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+grub_cros_ec_scan_keyboard (const struct grub_fdtbus_dev *dev, struct grub_cros_ec_keyscan *scan)
|
||||
+{
|
||||
+ if (ec_command (dev, EC_CMD_MKBP_STATE, 0, NULL, 0, scan,
|
||||
+ sizeof (*scan)) < (int) sizeof (*scan))
|
||||
+ return -1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+grub_cros_ec_validate (const struct grub_fdtbus_dev *dev)
|
||||
+{
|
||||
+ if (!grub_fdtbus_is_compatible("google,cros-ec-spi", dev))
|
||||
+ return 0;
|
||||
+ if (!dev->parent)
|
||||
+ return 0;
|
||||
+ if (!dev->parent->driver)
|
||||
+ return 0;
|
||||
+ if (!dev->parent->driver->send
|
||||
+ || !dev->parent->driver->receive)
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
diff --git a/include/grub/arm/cros_ec.h b/include/grub/arm/cros_ec.h
|
||||
new file mode 100644
|
||||
index 000000000..45a372572
|
||||
--- /dev/null
|
||||
+++ b/include/grub/arm/cros_ec.h
|
||||
@@ -0,0 +1,21 @@
|
||||
+#ifndef GRUB_ARM_CROS_EC_H
|
||||
+#define GRUB_ARM_CROS_EC_H 1
|
||||
+
|
||||
+#include <grub/types.h>
|
||||
+#include <grub/fdtbus.h>
|
||||
+
|
||||
+#define GRUB_CROS_EC_KEYSCAN_COLS 13
|
||||
+#define GRUB_CROS_EC_KEYSCAN_ROWS 8
|
||||
+
|
||||
+struct grub_cros_ec_keyscan {
|
||||
+ grub_uint8_t data[GRUB_CROS_EC_KEYSCAN_COLS];
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+grub_cros_ec_scan_keyboard (const struct grub_fdtbus_dev *dev,
|
||||
+ struct grub_cros_ec_keyscan *scan);
|
||||
+
|
||||
+int
|
||||
+grub_cros_ec_validate (const struct grub_fdtbus_dev *dev);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 497e06f02e9576c9cbfd560e8fb25567aaff6e4e Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Fri, 6 May 2016 18:43:08 -0400
|
||||
Subject: [PATCH 172/194] Make our info pages say "grub2" where appropriate.
|
||||
Date: Tue, 9 Jul 2019 12:59:58 +0200
|
||||
Subject: [PATCH] Make our info pages say "grub2" where appropriate.
|
||||
|
||||
This needs to be hooked up to --program-transform=, but I haven't had
|
||||
time.
|
||||
|
|
@ -9,11 +9,11 @@ time.
|
|||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
docs/grub-dev.texi | 4 +-
|
||||
docs/grub.texi | 318 ++++++++++++++++++++++++++---------------------------
|
||||
2 files changed, 161 insertions(+), 161 deletions(-)
|
||||
docs/grub.texi | 357 ++++++++++++++++++++++++++++-------------------------
|
||||
2 files changed, 189 insertions(+), 172 deletions(-)
|
||||
|
||||
diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
|
||||
index a9f4de631..3ce827ab7 100644
|
||||
index 1276c59302a..04c6678cb6b 100644
|
||||
--- a/docs/grub-dev.texi
|
||||
+++ b/docs/grub-dev.texi
|
||||
@@ -1,7 +1,7 @@
|
||||
|
|
@ -35,7 +35,7 @@ index a9f4de631..3ce827ab7 100644
|
|||
|
||||
@setchapternewpage odd
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index 15a90b26e..f28c4cd52 100644
|
||||
index 974bc0ddb07..c30701b4e1f 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -1,7 +1,7 @@
|
||||
|
|
@ -72,31 +72,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end direntry
|
||||
|
||||
@setchapternewpage odd
|
||||
@@ -103,15 +103,15 @@ This edition documents version @value{VERSION}.
|
||||
* Platform-specific operations:: Platform-specific operations
|
||||
* Supported kernels:: The list of supported kernels
|
||||
* Troubleshooting:: Error messages produced by GRUB
|
||||
-* Invoking grub-install:: How to use the GRUB installer
|
||||
-* Invoking grub-mkconfig:: Generate a GRUB configuration file
|
||||
-* Invoking grub-mkpasswd-pbkdf2::
|
||||
+* Invoking grub2-install:: How to use the GRUB installer
|
||||
+* Invoking grub2-mkconfig:: Generate a GRUB configuration file
|
||||
+* Invoking grub2-mkpasswd-pbkdf2::
|
||||
Generate GRUB password hashes
|
||||
-* Invoking grub-mkrelpath:: Make system path relative to its root
|
||||
-* Invoking grub-mkrescue:: Make a GRUB rescue image
|
||||
-* Invoking grub-mount:: Mount a file system using GRUB
|
||||
-* Invoking grub-probe:: Probe device information for GRUB
|
||||
-* Invoking grub-script-check:: Check GRUB script file for syntax errors
|
||||
+* Invoking grub2-mkrelpath:: Make system path relative to its root
|
||||
+* Invoking grub2-mkrescue:: Make a GRUB rescue image
|
||||
+* Invoking grub2-mount:: Mount a file system using GRUB
|
||||
+* Invoking grub2-probe:: Probe device information for GRUB
|
||||
+* Invoking grub2-script-check:: Check GRUB script file for syntax errors
|
||||
* Obtaining and Building GRUB:: How to obtain and build GRUB
|
||||
* Reporting bugs:: Where you should send a bug report
|
||||
* Future:: Some future plans on GRUB
|
||||
@@ -230,7 +230,7 @@ surprising.
|
||||
@@ -223,7 +223,7 @@ surprising.
|
||||
|
||||
@item
|
||||
@file{grub.cfg} is typically automatically generated by
|
||||
|
|
@ -105,7 +81,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
easier to handle versioned kernel upgrades.
|
||||
|
||||
@item
|
||||
@@ -244,7 +244,7 @@ scripting language: variables, conditionals, and loops are available.
|
||||
@@ -237,7 +237,7 @@ scripting language: variables, conditionals, and loops are available.
|
||||
@item
|
||||
A small amount of persistent storage is available across reboots, using the
|
||||
@command{save_env} and @command{load_env} commands in GRUB and the
|
||||
|
|
@ -114,7 +90,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
(@pxref{Environment block}).
|
||||
|
||||
@item
|
||||
@@ -548,7 +548,7 @@ On OS which have device nodes similar to Unix-like OS GRUB tools use the
|
||||
@@ -542,7 +542,7 @@ On OS which have device nodes similar to Unix-like OS GRUB tools use the
|
||||
OS name. E.g. for GNU/Linux:
|
||||
|
||||
@example
|
||||
|
|
@ -123,7 +99,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
On AROS we use another syntax. For volumes:
|
||||
@@ -571,7 +571,7 @@ For disks we use syntax:
|
||||
@@ -565,7 +565,7 @@ For disks we use syntax:
|
||||
E.g.
|
||||
|
||||
@example
|
||||
|
|
@ -132,7 +108,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
On Windows we use UNC path. For volumes it's typically
|
||||
@@ -598,7 +598,7 @@ For disks it's
|
||||
@@ -592,7 +592,7 @@ For disks it's
|
||||
E.g.
|
||||
|
||||
@example
|
||||
|
|
@ -141,7 +117,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
Beware that you may need to further escape the backslashes depending on your
|
||||
@@ -608,7 +608,7 @@ When compiled with cygwin support then cygwin drive names are automatically
|
||||
@@ -602,7 +602,7 @@ When compiled with cygwin support then cygwin drive names are automatically
|
||||
when needed. E.g.
|
||||
|
||||
@example
|
||||
|
|
@ -150,7 +126,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
@node Installation
|
||||
@@ -621,7 +621,7 @@ from the source tarball, or as a package for your OS.
|
||||
@@ -615,7 +615,7 @@ from the source tarball, or as a package for your OS.
|
||||
|
||||
After you have done that, you need to install the boot loader on a
|
||||
drive (floppy or hard disk) by using the utility
|
||||
|
|
@ -159,7 +135,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
GRUB comes with boot images, which are normally put in the directory
|
||||
@file{/usr/lib/grub/<cpu>-<platform>} (for BIOS-based machines
|
||||
@@ -632,22 +632,22 @@ loader needs to find them (usually @file{/boot}) will be called
|
||||
@@ -626,22 +626,22 @@ loader needs to find them (usually @file{/boot}) will be called
|
||||
the @dfn{boot directory}.
|
||||
|
||||
@menu
|
||||
|
|
@ -187,7 +163,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
The usage is basically very simple. You only need to specify one
|
||||
argument to the program, namely, where to install the boot loader. The
|
||||
@@ -656,13 +656,13 @@ For example, under Linux the following will install GRUB into the MBR
|
||||
@@ -650,13 +650,13 @@ For example, under Linux the following will install GRUB into the MBR
|
||||
of the first IDE disk:
|
||||
|
||||
@example
|
||||
|
|
@ -203,7 +179,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
But all the above examples assume that GRUB should put images under
|
||||
@@ -676,7 +676,7 @@ boot floppy with a filesystem. Here is an example:
|
||||
@@ -670,7 +670,7 @@ boot floppy with a filesystem. Here is an example:
|
||||
# @kbd{mke2fs /dev/fd0}
|
||||
# @kbd{mount -t ext2 /dev/fd0 /mnt}
|
||||
# @kbd{mkdir /mnt/boot}
|
||||
|
|
@ -212,7 +188,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
# @kbd{umount /mnt}
|
||||
@end group
|
||||
@end example
|
||||
@@ -688,16 +688,16 @@ floppy instead of exposing the USB drive as a hard disk (they call it
|
||||
@@ -682,30 +682,37 @@ floppy instead of exposing the USB drive as a hard disk (they call it
|
||||
@example
|
||||
# @kbd{losetup /dev/loop0 /dev/sdb1}
|
||||
# @kbd{mount /dev/loop0 /mnt/usb}
|
||||
|
|
@ -223,17 +199,14 @@ index 15a90b26e..f28c4cd52 100644
|
|||
This install doesn't conflict with standard install as long as they are in
|
||||
separate directories.
|
||||
|
||||
-Note that @command{grub-install} is actually just a shell script and the
|
||||
-real task is done by other tools such as @command{grub-mkimage}. Therefore,
|
||||
+Note that @command{grub2-install} is actually just a shell script and the
|
||||
+real task is done by other tools such as @command{grub2-mkimage}. Therefore,
|
||||
you may run those commands directly to install GRUB, without using
|
||||
-@command{grub-install}. Don't do that, however, unless you are very familiar
|
||||
+you may run those commands directly to install GRUB, without using
|
||||
+@command{grub2-install}. Don't do that, however, unless you are very familiar
|
||||
with the internals of GRUB. Installing a boot loader on a running OS may be
|
||||
extremely dangerous.
|
||||
|
||||
@@ -705,20 +705,20 @@ On EFI systems for fixed disk install you have to mount EFI System Partition.
|
||||
+with the internals of GRUB. Installing a boot loader on a running OS may be
|
||||
+extremely dangerous.
|
||||
+
|
||||
On EFI systems for fixed disk install you have to mount EFI System Partition.
|
||||
If you mount it at @file{/boot/efi} then you don't need any special arguments:
|
||||
|
||||
@example
|
||||
|
|
@ -257,7 +230,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
@node Making a GRUB bootable CD-ROM
|
||||
@@ -738,10 +738,10 @@ usually also need to include a configuration file @file{grub.cfg} and some
|
||||
@@ -725,10 +732,10 @@ usually also need to include a configuration file @file{grub.cfg} and some
|
||||
other GRUB modules.
|
||||
|
||||
To make a simple generic GRUB rescue CD, you can use the
|
||||
|
|
@ -270,7 +243,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
You will often need to include other files in your image. To do this, first
|
||||
@@ -764,7 +764,7 @@ directory @file{iso/}.
|
||||
@@ -751,7 +758,7 @@ directory @file{iso/}.
|
||||
Finally, make the image:
|
||||
|
||||
@example
|
||||
|
|
@ -279,7 +252,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
This produces a file named @file{grub.iso}, which then can be burned
|
||||
@@ -780,7 +780,7 @@ storage devices.
|
||||
@@ -767,7 +774,7 @@ storage devices.
|
||||
@node Device map
|
||||
@section The map between BIOS drives and OS devices
|
||||
|
||||
|
|
@ -288,7 +261,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
etc.) read it to map BIOS drives to OS devices. This file consists of lines
|
||||
like this:
|
||||
|
||||
@@ -1223,23 +1223,23 @@ need to write the whole thing by hand.
|
||||
@@ -1269,23 +1276,23 @@ need to write the whole thing by hand.
|
||||
@node Simple configuration
|
||||
@section Simple configuration handling
|
||||
|
||||
|
|
@ -317,7 +290,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
valid POSIX shell input; normally, it will just be a sequence of
|
||||
@samp{KEY=value} lines, but if the value contains spaces or other special
|
||||
characters then it must be quoted. For example:
|
||||
@@ -1277,7 +1277,7 @@ works it's not recommended since titles often contain unstable device names
|
||||
@@ -1323,7 +1330,7 @@ works it's not recommended since titles often contain unstable device names
|
||||
and may be translated
|
||||
|
||||
If you set this to @samp{saved}, then the default menu entry will be that
|
||||
|
|
@ -326,7 +299,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
the environment block, which may not be available in all situations
|
||||
(@pxref{Environment block}).
|
||||
|
||||
@@ -1288,7 +1288,7 @@ If this option is set to @samp{true}, then, when an entry is selected, save
|
||||
@@ -1334,7 +1341,7 @@ If this option is set to @samp{true}, then, when an entry is selected, save
|
||||
it as a new default entry for use by future runs of GRUB. This is only
|
||||
useful if @samp{GRUB_DEFAULT=saved}; it is a separate option because
|
||||
@samp{GRUB_DEFAULT=saved} is useful without this option, in conjunction with
|
||||
|
|
@ -335,8 +308,8 @@ index 15a90b26e..f28c4cd52 100644
|
|||
This option relies on the environment block, which may not be available in
|
||||
all situations (@pxref{Environment block}).
|
||||
|
||||
@@ -1399,7 +1399,7 @@ The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
|
||||
and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
|
||||
@@ -1481,15 +1488,15 @@ intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode
|
||||
@end example
|
||||
|
||||
@item GRUB_DISABLE_LINUX_UUID
|
||||
-Normally, @command{grub-mkconfig} will generate menu entries that use
|
||||
|
|
@ -344,7 +317,17 @@ index 15a90b26e..f28c4cd52 100644
|
|||
universally-unique identifiers (UUIDs) to identify the root filesystem to
|
||||
the Linux kernel, using a @samp{root=UUID=...} kernel parameter. This is
|
||||
usually more reliable, but in some cases it may not be appropriate. To
|
||||
@@ -1410,7 +1410,7 @@ If this option is set to @samp{true}, disable the generation of recovery
|
||||
disable the use of UUIDs, set this option to @samp{true}.
|
||||
|
||||
@item GRUB_DISABLE_LINUX_PARTUUID
|
||||
-If @command{grub-mkconfig} cannot identify the root filesystem via its
|
||||
-universally-unique indentifier (UUID), @command{grub-mkconfig} can use the UUID
|
||||
+If @command{grub2-mkconfig} cannot identify the root filesystem via its
|
||||
+universally-unique indentifier (UUID), @command{grub2-mkconfig} can use the UUID
|
||||
of the partition containing the filesystem to identify the root filesystem to
|
||||
the Linux kernel via a @samp{root=PARTUUID=...} kernel parameter. This is not
|
||||
as reliable as using the filesystem UUID, but is more reliable than using the
|
||||
@@ -1503,7 +1510,7 @@ If this option is set to @samp{true}, disable the generation of recovery
|
||||
mode menu entries.
|
||||
|
||||
@item GRUB_DISABLE_UUID
|
||||
|
|
@ -353,7 +336,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
universally-unique identifiers (UUIDs) to identify various filesystems to
|
||||
search for files. This is usually more reliable, but in some cases it may
|
||||
not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@@ -1419,12 +1419,12 @@ not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@@ -1514,12 +1521,12 @@ not be appropriate. To disable this use of UUIDs, set this option to
|
||||
@item GRUB_VIDEO_BACKEND
|
||||
If graphical video support is required, either because the @samp{gfxterm}
|
||||
graphical terminal is in use or because @samp{GRUB_GFXPAYLOAD_LINUX} is set,
|
||||
|
|
@ -369,7 +352,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@item GRUB_GFXMODE
|
||||
Set the resolution used on the @samp{gfxterm} graphical terminal. Note that
|
||||
@@ -1456,7 +1456,7 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
@@ -1552,7 +1559,7 @@ boot sequence. If you have problems, set this option to @samp{text} and
|
||||
GRUB will tell Linux to boot in normal text mode.
|
||||
|
||||
@item GRUB_DISABLE_OS_PROBER
|
||||
|
|
@ -378,7 +361,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@command{os-prober} program, if installed, to discover other operating
|
||||
systems installed on the same system and generate appropriate menu entries
|
||||
for them. Set this option to @samp{true} to disable this.
|
||||
@@ -1466,7 +1466,7 @@ List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
@@ -1562,7 +1569,7 @@ List of space-separated FS UUIDs of filesystems to be ignored from os-prober
|
||||
output. For efi chainloaders it's <UUID>@@<EFI FILE>
|
||||
|
||||
@item GRUB_DISABLE_SUBMENU
|
||||
|
|
@ -387,7 +370,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
the kernel with highest version number and put all other found kernels
|
||||
or alternative menu entries for recovery mode in submenu. For entries returned
|
||||
by @command{os-prober} first entry will be put on top level and all others
|
||||
@@ -1474,11 +1474,11 @@ in submenu. If this option is set to @samp{y}, flat menu with all entries
|
||||
@@ -1570,11 +1577,11 @@ in submenu. If this option is set to @samp{true}, flat menu with all entries
|
||||
on top level will be generated instead. Changing this option will require
|
||||
changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
|
||||
and @samp{default} (@pxref{default}) environment variables as well as saved
|
||||
|
|
@ -402,7 +385,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
check for encrypted disks and generate additional commands needed to access
|
||||
them during boot. Note that in this case unattended boot is not possible
|
||||
because GRUB will wait for passphrase to unlock encrypted container.
|
||||
@@ -1537,7 +1537,7 @@ confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
@@ -1633,7 +1640,7 @@ confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
|
||||
@end table
|
||||
|
||||
|
|
@ -411,7 +394,48 @@ index 15a90b26e..f28c4cd52 100644
|
|||
edit the scripts in @file{/etc/grub.d} directly.
|
||||
@file{/etc/grub.d/40_custom} is particularly useful for adding entire custom
|
||||
menu entries; simply type the menu entries you want to add at the end of
|
||||
@@ -1752,7 +1752,7 @@ images as well.
|
||||
@@ -1641,14 +1648,14 @@ that file, making sure to leave at least the first two lines intact.
|
||||
|
||||
@node Root Identifcation Heuristics
|
||||
@section Root Identifcation Heuristics
|
||||
-If the target operating system uses the Linux kernel, @command{grub-mkconfig}
|
||||
+If the target operating system uses the Linux kernel, @command{grub2-mkconfig}
|
||||
attempts to identify the root file system via a heuristic algoirthm. This
|
||||
algorithm selects the identification method of the root file system by
|
||||
considering three factors. The first is if an initrd for the target operating
|
||||
system is also present. The second is @samp{GRUB_DISABLE_LINUX_UUID} and if set
|
||||
-to @samp{true}, prevents @command{grub-mkconfig} from identifying the root file
|
||||
+to @samp{true}, prevents @command{grub2-mkconfig} from identifying the root file
|
||||
system by its UUID. The third is @samp{GRUB_DISABLE_LINUX_PARTUUID} and if set
|
||||
-to @samp{true}, prevents @command{grub-mkconfig} from identifying the root file
|
||||
+to @samp{true}, prevents @command{grub2-mkconfig} from identifying the root file
|
||||
system via the UUID of its enclosing partition. If the variables are assigned
|
||||
any other value, that value is considered equivalent to @samp{false}. The
|
||||
variables are also considered to be set to @samp{false} if they are not set.
|
||||
@@ -1658,18 +1665,18 @@ filesystem to the initrd. Most initrd images determine the root file system by
|
||||
checking the Linux kernel's command-line for the @samp{root} key and use its
|
||||
value as the identification method of the root file system. To improve the
|
||||
reliability of booting, most initrd images also allow the root file system to be
|
||||
-identified by its UUID. Because of this behavior, the @command{grub-mkconfig}
|
||||
+identified by its UUID. Because of this behavior, the @command{grub2-mkconfig}
|
||||
command will set @samp{root} to @samp{root=UUID=...} to provide the initrd with
|
||||
the filesystem UUID of the root file system.
|
||||
|
||||
If no initrd is detected or @samp{GRUB_DISABLE_LINUX_UUID} is set to @samp{true}
|
||||
-then @command{grub-command} will identify the root filesystem by setting the
|
||||
+then @command{grub2-command} will identify the root filesystem by setting the
|
||||
kernel command-line variable @samp{root} to @samp{root=PARTUUID=...} unless
|
||||
@samp{GRUB_DISABLE_LINUX_PARTUUID} is also set to @samp{true}. If
|
||||
@samp{GRUB_DISABLE_LINUX_PARTUUID} is also set to @samp{true},
|
||||
-@command{grub-command} will identify by its Linux device name.
|
||||
+@command{grub2-command} will identify by its Linux device name.
|
||||
|
||||
-The following table summarizes the behavior of the @command{grub-mkconfig}
|
||||
+The following table summarizes the behavior of the @command{grub2-mkconfig}
|
||||
command.
|
||||
|
||||
@multitable {detected} {GRUB_DISABLE_LINUX_PARTUUID} {GRUB_DISABLE_LINUX_UUID} {Linux Root}
|
||||
@@ -1898,7 +1905,7 @@ images as well.
|
||||
Mount this partition on/mnt/boot and disable GRUB in all OSes and manually
|
||||
install self-compiled latest GRUB with:
|
||||
|
||||
|
|
@ -420,7 +444,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
In all the OSes install GRUB tools but disable installing GRUB in bootsector,
|
||||
so you'll have menu.lst and grub.cfg available for use. Also disable os-prober
|
||||
@@ -1762,20 +1762,20 @@ use by setting:
|
||||
@@ -1908,20 +1915,20 @@ use by setting:
|
||||
|
||||
in /etc/default/grub
|
||||
|
||||
|
|
@ -444,7 +468,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@}
|
||||
|
||||
menuentry "Windows XP" @{
|
||||
@@ -1838,15 +1838,15 @@ GRUB supports embedding a configuration file directly into the core image,
|
||||
@@ -1984,15 +1991,15 @@ GRUB supports embedding a configuration file directly into the core image,
|
||||
so that it is loaded before entering normal mode. This is useful, for
|
||||
example, when it is not straightforward to find the real configuration file,
|
||||
or when you need to debug problems with loading that file.
|
||||
|
|
@ -463,7 +487,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
After the embedded configuration file (if any) is executed, GRUB will load
|
||||
the @samp{normal} module (@pxref{normal}), which will then read the real
|
||||
@@ -1881,13 +1881,13 @@ included in the core image:
|
||||
@@ -2027,13 +2034,13 @@ included in the core image:
|
||||
@example
|
||||
@group
|
||||
search.fs_label grub root
|
||||
|
|
@ -481,7 +505,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
else
|
||||
echo "Could not find an example configuration file!"
|
||||
fi
|
||||
@@ -2411,7 +2411,7 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
|
||||
@@ -2557,7 +2564,7 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
@ -490,7 +514,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
server.
|
||||
|
||||
The grub.cfg file is placed in the same directory as the path output by
|
||||
@@ -2596,7 +2596,7 @@ team are:
|
||||
@@ -2760,7 +2767,7 @@ team are:
|
||||
@end table
|
||||
|
||||
To take full advantage of this function, install GRUB into the MBR
|
||||
|
|
@ -499,7 +523,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
If you have a laptop which has a similar feature and not in the above list
|
||||
could you figure your address and contribute?
|
||||
@@ -2657,7 +2657,7 @@ bytes.
|
||||
@@ -2821,7 +2828,7 @@ bytes.
|
||||
The sole function of @file{boot.img} is to read the first sector of the core
|
||||
image from a local disk and jump to it. Because of the size restriction,
|
||||
@file{boot.img} cannot understand any file system structure, so
|
||||
|
|
@ -508,7 +532,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
core image into @file{boot.img} when installing GRUB.
|
||||
|
||||
@item diskboot.img
|
||||
@@ -2687,7 +2687,7 @@ images.
|
||||
@@ -2851,7 +2858,7 @@ images.
|
||||
|
||||
@item core.img
|
||||
This is the core image of GRUB. It is built dynamically from the kernel
|
||||
|
|
@ -517,7 +541,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
program. Usually, it contains enough modules to access @file{/boot/grub},
|
||||
and loads everything else (including menu handling, the ability to load
|
||||
target operating systems, and so on) from the file system at run-time. The
|
||||
@@ -2739,7 +2739,7 @@ GRUB 2 has no single Stage 2 image. Instead, it loads modules from
|
||||
@@ -2903,7 +2910,7 @@ GRUB 2 has no single Stage 2 image. Instead, it loads modules from
|
||||
In GRUB 2, images for booting from CD-ROM drives are now constructed using
|
||||
@file{cdboot.img} and @file{core.img}, making sure that the core image
|
||||
contains the @samp{iso9660} module. It is usually best to use the
|
||||
|
|
@ -526,7 +550,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@item nbgrub
|
||||
There is as yet no equivalent for @file{nbgrub} in GRUB 2; it was used by
|
||||
@@ -2895,8 +2895,8 @@ There are two ways to specify files, by @dfn{absolute file name} and by
|
||||
@@ -3071,8 +3078,8 @@ There are two ways to specify files, by @dfn{absolute file name} and by
|
||||
|
||||
An absolute file name resembles a Unix absolute file name, using
|
||||
@samp{/} for the directory separator (not @samp{\} as in DOS). One
|
||||
|
|
@ -537,7 +561,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
disk. If you omit the device name in an absolute file name, GRUB uses
|
||||
GRUB's @dfn{root device} implicitly. So if you set the root device to,
|
||||
say, @samp{(hd1,1)} by the command @samp{set root=(hd1,1)} (@pxref{set}),
|
||||
@@ -2904,8 +2904,8 @@ then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}.
|
||||
@@ -3080,8 +3087,8 @@ then @code{/boot/kernel} is the same as @code{(hd1,1)/boot/kernel}.
|
||||
|
||||
On ZFS filesystem the first path component must be
|
||||
@var{volume}@samp{@@}[@var{snapshot}].
|
||||
|
|
@ -548,7 +572,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@samp{snap-129}. Trailing @samp{@@} after volume name is mandatory even if
|
||||
snapshot name is omitted.
|
||||
|
||||
@@ -3308,7 +3308,7 @@ The more recent release of Minix would then be identified as
|
||||
@@ -3500,7 +3507,7 @@ The more recent release of Minix would then be identified as
|
||||
@samp{other>minix>minix-3.4.0}.
|
||||
|
||||
This variable is often set by @samp{GRUB_DEFAULT} (@pxref{Simple
|
||||
|
|
@ -557,7 +581,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
|
||||
@node fallback
|
||||
@@ -3398,7 +3398,7 @@ If this variable is set, it names the language code that the
|
||||
@@ -3590,7 +3597,7 @@ If this variable is set, it names the language code that the
|
||||
example, French would be named as @samp{fr}, and Simplified Chinese as
|
||||
@samp{zh_CN}.
|
||||
|
||||
|
|
@ -566,7 +590,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
reasonable default for this variable based on the system locale.
|
||||
|
||||
|
||||
@@ -3406,10 +3406,10 @@ reasonable default for this variable based on the system locale.
|
||||
@@ -3598,10 +3605,10 @@ reasonable default for this variable based on the system locale.
|
||||
@subsection locale_dir
|
||||
|
||||
If this variable is set, it names the directory where translation files may
|
||||
|
|
@ -579,7 +603,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
default for this variable if internationalization is needed and any
|
||||
translation files are available.
|
||||
|
||||
@@ -3527,7 +3527,7 @@ input. The default is not to pause output.
|
||||
@@ -3738,7 +3745,7 @@ input. The default is not to pause output.
|
||||
|
||||
The location of the @samp{/boot/grub} directory as an absolute file name
|
||||
(@pxref{File name syntax}). This is normally set by GRUB at startup based
|
||||
|
|
@ -588,7 +612,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
dynamically loaded from this directory, so it must be set correctly in order
|
||||
for many parts of GRUB to work.
|
||||
|
||||
@@ -3618,17 +3618,17 @@ GRUB provides an ``environment block'' which can be used to save a small
|
||||
@@ -3850,17 +3857,17 @@ GRUB provides an ``environment block'' which can be used to save a small
|
||||
amount of state.
|
||||
|
||||
The environment block is a preallocated 1024-byte file, which normally lives
|
||||
|
|
@ -608,8 +632,8 @@ index 15a90b26e..f28c4cd52 100644
|
|||
+@command{grub2-mkconfig} uses this facility to implement
|
||||
@samp{GRUB_SAVEDEFAULT} (@pxref{Simple configuration}).
|
||||
|
||||
|
||||
@@ -4317,7 +4317,7 @@ Translate @var{string} into the current language.
|
||||
@node Modules
|
||||
@@ -4922,7 +4929,7 @@ Translate @var{string} into the current language.
|
||||
|
||||
The current language code is stored in the @samp{lang} variable in GRUB's
|
||||
environment (@pxref{lang}). Translation files in MO format are read from
|
||||
|
|
@ -618,7 +642,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end deffn
|
||||
|
||||
|
||||
@@ -4712,7 +4712,7 @@ Define a user named @var{user} with password @var{clear-password}.
|
||||
@@ -5274,7 +5281,7 @@ Define a user named @var{user} with password @var{clear-password}.
|
||||
|
||||
@deffn Command password_pbkdf2 user hashed-password
|
||||
Define a user named @var{user} with password hash @var{hashed-password}.
|
||||
|
|
@ -627,7 +651,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
to generate password hashes. @xref{Security}.
|
||||
@end deffn
|
||||
|
||||
@@ -5535,8 +5535,8 @@ The @samp{password} (@pxref{password}) and @samp{password_pbkdf2}
|
||||
@@ -6400,8 +6407,8 @@ The @samp{password} (@pxref{password}) and @samp{password_pbkdf2}
|
||||
which has an associated password. @samp{password} sets the password in
|
||||
plain text, requiring @file{grub.cfg} to be secure; @samp{password_pbkdf2}
|
||||
sets the password hashed using the Password-Based Key Derivation Function
|
||||
|
|
@ -638,7 +662,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
In order to enable authentication support, the @samp{superusers} environment
|
||||
variable must be set to a list of usernames, separated by any of spaces,
|
||||
@@ -5580,7 +5580,7 @@ menuentry "May be run by user1 or a superuser" --users user1 @{
|
||||
@@ -6446,7 +6453,7 @@ menuentry "May be run by user1 or a superuser" --users user1 @{
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
@ -647,28 +671,28 @@ index 15a90b26e..f28c4cd52 100644
|
|||
generating configuration files with authentication. You can use
|
||||
@file{/etc/grub.d/40_custom} to add simple superuser authentication, by
|
||||
adding @kbd{set superusers=} and @kbd{password} or @kbd{password_pbkdf2}
|
||||
@@ -5605,15 +5605,15 @@ verified with a public key currently trusted by GRUB
|
||||
validation fails, then file @file{foo} cannot be opened. This failure
|
||||
@@ -6472,8 +6479,18 @@ validation fails, then file @file{foo} cannot be opened. This failure
|
||||
may halt or otherwise impact the boot process.
|
||||
|
||||
-@comment Unfortunately --pubkey is not yet supported by grub-install,
|
||||
-@comment but we should not bring up internal detail grub-mkimage here
|
||||
An initial trusted public key can be embedded within the GRUB @file{core.img}
|
||||
-using the @code{--pubkey} option to @command{grub-install}
|
||||
-(@pxref{Invoking grub-install}).
|
||||
+using the @code{--pubkey} option to @command{grub2-install}
|
||||
+(@pxref{Invoking grub2-install}).
|
||||
+
|
||||
+@comment Unfortunately --pubkey is not yet supported by grub2-install,
|
||||
+@comment but we should not bring up internal detail grub2-mkimage here
|
||||
@comment in the user guide (as opposed to developer's manual).
|
||||
|
||||
@comment An initial trusted public key can be embedded within the GRUB
|
||||
@comment @file{core.img} using the @code{--pubkey} option to
|
||||
-@comment @command{grub-mkimage} (@pxref{Invoking grub-install}). Presently it
|
||||
-@comment is necessary to write a custom wrapper around @command{grub-mkimage}
|
||||
-@comment using the @code{--grub-mkimage} flag to @command{grub-install}.
|
||||
+@comment in the user guide (as opposed to developer's manual).
|
||||
+
|
||||
+@comment An initial trusted public key can be embedded within the GRUB
|
||||
+@comment @file{core.img} using the @code{--pubkey} option to
|
||||
+@comment @command{grub2-mkimage} (@pxref{Invoking grub2-install}). Presently it
|
||||
+@comment is necessary to write a custom wrapper around @command{grub2-mkimage}
|
||||
+@comment using the @code{--grub-mkimage} flag to @command{grub2-install}.
|
||||
|
||||
GRUB uses GPG-style detached signatures (meaning that a file
|
||||
@file{foo.sig} will be produced when file @file{foo} is signed), and
|
||||
@@ -5633,8 +5633,8 @@ gpg --detach-sign /path/to/file
|
||||
@@ -6493,8 +6510,8 @@ gpg --detach-sign /path/to/file
|
||||
For successful validation of all of GRUB's subcomponents and the
|
||||
loaded OS kernel, they must all be signed. One way to accomplish this
|
||||
is the following (after having already produced the desired
|
||||
|
|
@ -679,7 +703,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@example
|
||||
@group
|
||||
@@ -5656,7 +5656,7 @@ See also: @ref{check_signatures}, @ref{verify_detached}, @ref{trust},
|
||||
@@ -6516,7 +6533,7 @@ See also: @ref{check_signatures}, @ref{verify_detached}, @ref{trust},
|
||||
Note that internally signature enforcement is controlled by setting
|
||||
the environment variable @code{check_signatures} equal to
|
||||
@code{enforce}. Passing one or more @code{--pubkey} options to
|
||||
|
|
@ -688,7 +712,16 @@ index 15a90b26e..f28c4cd52 100644
|
|||
equal to @code{enforce} in @file{core.img} prior to processing any
|
||||
configuration files.
|
||||
|
||||
@@ -6013,10 +6013,10 @@ Required files are:
|
||||
@@ -6564,7 +6581,7 @@ UTF-8 strings as comma-separated values (CSV). See
|
||||
@uref{https://github.com/rhboot/shim/blob/main/SBAT.md} for more details.
|
||||
|
||||
To add a data section containing the SBAT information into the binary, the
|
||||
-@option{--sbat} option of @command{grub-mkimage} command should be used. The content
|
||||
+@option{--sbat} option of @command{grub2-mkimage} command should be used. The content
|
||||
of a CSV file, encoded with UTF-8, is copied as is to the .sbat data section into
|
||||
the generated EFI binary. The CSV file can be stored anywhere on the file system.
|
||||
|
||||
@@ -6975,10 +6992,10 @@ Required files are:
|
||||
|
||||
GRUB's normal start-up procedure involves setting the @samp{prefix}
|
||||
environment variable to a value set in the core image by
|
||||
|
|
@ -701,7 +734,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
things GRUB is supposed to do.
|
||||
|
||||
If, instead, you only get a rescue shell, this usually means that GRUB
|
||||
@@ -6042,8 +6042,8 @@ normal
|
||||
@@ -7004,8 +7021,8 @@ normal
|
||||
|
||||
However, any problem that leaves you in the rescue shell probably means that
|
||||
GRUB was not correctly installed. It may be more useful to try to reinstall
|
||||
|
|
@ -712,7 +745,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@itemize @bullet{}
|
||||
@item
|
||||
@@ -6055,7 +6055,7 @@ is usually better to use UUIDs or file system labels and avoid depending on
|
||||
@@ -7017,7 +7034,7 @@ is usually better to use UUIDs or file system labels and avoid depending on
|
||||
drive ordering entirely.
|
||||
|
||||
@item
|
||||
|
|
@ -721,14 +754,34 @@ index 15a90b26e..f28c4cd52 100644
|
|||
to a partition but GRUB has already been installed in the master boot
|
||||
record, then the GRUB installation in the partition will be ignored.
|
||||
|
||||
@@ -6075,21 +6075,21 @@ support has not yet been added to GRUB.
|
||||
@end itemize
|
||||
@@ -7052,33 +7069,33 @@ bootability on other machines.
|
||||
@chapter User-space utilities
|
||||
|
||||
@menu
|
||||
-* Invoking grub-install:: How to use the GRUB installer
|
||||
-* Invoking grub-mkconfig:: Generate a GRUB configuration file
|
||||
-* Invoking grub-mkpasswd-pbkdf2::
|
||||
+* Invoking grub2-install:: How to use the GRUB installer
|
||||
+* Invoking grub2-mkconfig:: Generate a GRUB configuration file
|
||||
+* Invoking grub2-mkpasswd-pbkdf2::
|
||||
Generate GRUB password hashes
|
||||
-* Invoking grub-mkrelpath:: Make system path relative to its root
|
||||
-* Invoking grub-mkrescue:: Make a GRUB rescue image
|
||||
-* Invoking grub-mount:: Mount a file system using GRUB
|
||||
-* Invoking grub-probe:: Probe device information for GRUB
|
||||
-* Invoking grub-script-check:: Check GRUB script file for syntax errors
|
||||
+* Invoking grub2-mkrelpath:: Make system path relative to its root
|
||||
+* Invoking grub2-mkrescue:: Make a GRUB rescue image
|
||||
+* Invoking grub2-mount:: Mount a file system using GRUB
|
||||
+* Invoking grub2-probe:: Probe device information for GRUB
|
||||
+* Invoking grub2-script-check:: Check GRUB script file for syntax errors
|
||||
@end menu
|
||||
|
||||
|
||||
-@node Invoking grub-install
|
||||
-@chapter Invoking grub-install
|
||||
-@section Invoking grub-install
|
||||
+@node Invoking grub2-install
|
||||
+@chapter Invoking grub2-install
|
||||
+@section Invoking grub2-install
|
||||
|
||||
-The program @command{grub-install} generates a GRUB core image using
|
||||
-@command{grub-mkimage} and installs it on your system. You must specify the
|
||||
|
|
@ -749,7 +802,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6105,13 +6105,13 @@ separate partition or a removable disk.
|
||||
@@ -7094,13 +7111,13 @@ separate partition or a removable disk.
|
||||
If this option is not specified then it defaults to @file{/boot}, so
|
||||
|
||||
@example
|
||||
|
|
@ -765,7 +818,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
@end example
|
||||
|
||||
Here is an example in which you have a separate @dfn{boot} partition which is
|
||||
@@ -6119,16 +6119,16 @@ mounted on
|
||||
@@ -7108,16 +7125,16 @@ mounted on
|
||||
@file{/mnt/boot}:
|
||||
|
||||
@example
|
||||
|
|
@ -785,14 +838,14 @@ index 15a90b26e..f28c4cd52 100644
|
|||
extra space in the bootloader embedding area for Reed-Solomon
|
||||
error-correcting codes. This enables GRUB to still boot successfully
|
||||
if some blocks are corrupted. The exact amount of protection offered
|
||||
@@ -6141,17 +6141,17 @@ installation}) where GRUB does not reside in any unpartitioned space
|
||||
@@ -7130,17 +7147,17 @@ installation}) where GRUB does not reside in any unpartitioned space
|
||||
outside of the MBR. Disable the Reed-Solomon codes with this option.
|
||||
@end table
|
||||
|
||||
-@node Invoking grub-mkconfig
|
||||
-@chapter Invoking grub-mkconfig
|
||||
-@section Invoking grub-mkconfig
|
||||
+@node Invoking grub2-mkconfig
|
||||
+@chapter Invoking grub2-mkconfig
|
||||
+@section Invoking grub2-mkconfig
|
||||
|
||||
-The program @command{grub-mkconfig} generates a configuration file for GRUB
|
||||
+The program @command{grub2-mkconfig} generates a configuration file for GRUB
|
||||
|
|
@ -800,7 +853,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@example
|
||||
-grub-mkconfig -o /boot/grub/grub.cfg
|
||||
+grub-mkconfig -o /boot/grub2/grub.cfg
|
||||
+grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
@end example
|
||||
|
||||
-@command{grub-mkconfig} accepts the following options:
|
||||
|
|
@ -808,21 +861,22 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6167,17 +6167,17 @@ it to standard output.
|
||||
@@ -7156,17 +7173,17 @@ it to standard output.
|
||||
@end table
|
||||
|
||||
|
||||
-@node Invoking grub-mkpasswd-pbkdf2
|
||||
-@chapter Invoking grub-mkpasswd-pbkdf2
|
||||
-@section Invoking grub-mkpasswd-pbkdf2
|
||||
+@node Invoking grub2-mkpasswd-pbkdf2
|
||||
+@chapter Invoking grub2-mkpasswd-pbkdf2
|
||||
+@section Invoking grub2-mkpasswd-pbkdf2
|
||||
|
||||
-The program @command{grub-mkpasswd-pbkdf2} generates password hashes for
|
||||
+The program @command{grub2-mkpasswd-pbkdf2} generates password hashes for
|
||||
GRUB (@pxref{Security}).
|
||||
|
||||
@example
|
||||
grub-mkpasswd-pbkdf2
|
||||
-grub-mkpasswd-pbkdf2
|
||||
+grub2-mkpasswd-pbkdf2
|
||||
@end example
|
||||
|
||||
-@command{grub-mkpasswd-pbkdf2} accepts the following options:
|
||||
|
|
@ -830,14 +884,14 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item -c @var{number}
|
||||
@@ -6195,23 +6195,23 @@ Length of the salt. Defaults to 64.
|
||||
@@ -7184,23 +7201,23 @@ Length of the salt. Defaults to 64.
|
||||
@end table
|
||||
|
||||
|
||||
-@node Invoking grub-mkrelpath
|
||||
-@chapter Invoking grub-mkrelpath
|
||||
-@section Invoking grub-mkrelpath
|
||||
+@node Invoking grub2-mkrelpath
|
||||
+@chapter Invoking grub2-mkrelpath
|
||||
+@section Invoking grub2-mkrelpath
|
||||
|
||||
-The program @command{grub-mkrelpath} makes a file system path relative to
|
||||
+The program @command{grub2-mkrelpath} makes a file system path relative to
|
||||
|
|
@ -860,21 +914,22 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6222,17 +6222,17 @@ Print the version number of GRUB and exit.
|
||||
@@ -7211,17 +7228,17 @@ Print the version number of GRUB and exit.
|
||||
@end table
|
||||
|
||||
|
||||
-@node Invoking grub-mkrescue
|
||||
-@chapter Invoking grub-mkrescue
|
||||
-@section Invoking grub-mkrescue
|
||||
+@node Invoking grub2-mkrescue
|
||||
+@chapter Invoking grub2-mkrescue
|
||||
+@section Invoking grub2-mkrescue
|
||||
|
||||
-The program @command{grub-mkrescue} generates a bootable GRUB rescue image
|
||||
+The program @command{grub2-mkrescue} generates a bootable GRUB rescue image
|
||||
(@pxref{Making a GRUB bootable CD-ROM}).
|
||||
|
||||
@example
|
||||
grub-mkrescue -o grub.iso
|
||||
-grub-mkrescue -o grub.iso
|
||||
+grub2-mkrescue -o grub.iso
|
||||
@end example
|
||||
|
||||
-All arguments not explicitly listed as @command{grub-mkrescue} options are
|
||||
|
|
@ -882,8 +937,12 @@ index 15a90b26e..f28c4cd52 100644
|
|||
passed on directly to @command{xorriso} in @command{mkisofs} emulation mode.
|
||||
Options passed to @command{xorriso} will normally be interpreted as
|
||||
@command{mkisofs} options; if the option @samp{--} is used, then anything
|
||||
@@ -6247,7 +6247,7 @@ mkdir -p disk/boot/grub
|
||||
grub-mkrescue -o grub.iso disk
|
||||
@@ -7233,10 +7250,10 @@ commonly used to add extra files to the image:
|
||||
@example
|
||||
mkdir -p disk/boot/grub
|
||||
@r{(add extra files to @file{disk/boot/grub})}
|
||||
-grub-mkrescue -o grub.iso disk
|
||||
+grub2-mkrescue -o grub.iso disk
|
||||
@end example
|
||||
|
||||
-@command{grub-mkrescue} accepts the following options:
|
||||
|
|
@ -891,7 +950,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item --help
|
||||
@@ -6275,15 +6275,15 @@ Use @var{file} as the @command{xorriso} program, rather than the built-in
|
||||
@@ -7264,15 +7281,15 @@ Use @var{file} as the @command{xorriso} program, rather than the built-in
|
||||
default.
|
||||
|
||||
@item --grub-mkimage=@var{file}
|
||||
|
|
@ -902,16 +961,16 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
|
||||
-@node Invoking grub-mount
|
||||
-@chapter Invoking grub-mount
|
||||
-@section Invoking grub-mount
|
||||
+@node Invoking grub2-mount
|
||||
+@chapter Invoking grub2-mount
|
||||
+@section Invoking grub2-mount
|
||||
|
||||
-The program @command{grub-mount} performs a read-only mount of any file
|
||||
+The program @command{grub2-mount} performs a read-only mount of any file
|
||||
system or file system image that GRUB understands, using GRUB's file system
|
||||
drivers via FUSE. (It is only available if FUSE development files were
|
||||
present when GRUB was built.) This has a number of uses:
|
||||
@@ -6315,13 +6315,13 @@ even if nobody has yet written a FUSE module specifically for that file
|
||||
@@ -7304,13 +7321,13 @@ even if nobody has yet written a FUSE module specifically for that file
|
||||
system type.
|
||||
@end itemize
|
||||
|
||||
|
|
@ -919,7 +978,8 @@ index 15a90b26e..f28c4cd52 100644
|
|||
+Using @command{grub2-mount} is normally as simple as:
|
||||
|
||||
@example
|
||||
grub-mount /dev/sda1 /mnt
|
||||
-grub-mount /dev/sda1 /mnt
|
||||
+grub2-mount /dev/sda1 /mnt
|
||||
@end example
|
||||
|
||||
-@command{grub-mount} must be given one or more images and a mount point as
|
||||
|
|
@ -927,7 +987,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
non-option arguments (if it is given more than one image, it will treat them
|
||||
as a RAID set), and also accepts the following options:
|
||||
|
||||
@@ -6343,13 +6343,13 @@ Show debugging output for conditions matching @var{string}.
|
||||
@@ -7332,13 +7349,13 @@ Show debugging output for conditions matching @var{string}.
|
||||
@item -K prompt|@var{file}
|
||||
@itemx --zfs-key=prompt|@var{file}
|
||||
Load a ZFS encryption key. If you use @samp{prompt} as the argument,
|
||||
|
|
@ -943,22 +1003,33 @@ index 15a90b26e..f28c4cd52 100644
|
|||
root of the supplied file system.
|
||||
|
||||
If @var{device} is just a number, then it will be treated as a partition
|
||||
@@ -6367,10 +6367,10 @@ Print verbose messages.
|
||||
@@ -7347,7 +7364,7 @@ an entire disk in @file{disk.img}, then you can use this command to mount
|
||||
its second partition:
|
||||
|
||||
@example
|
||||
-grub-mount -r 2 disk.img mount-point
|
||||
+grub2-mount -r 2 disk.img mount-point
|
||||
@end example
|
||||
|
||||
@item -v
|
||||
@@ -7356,18 +7373,18 @@ Print verbose messages.
|
||||
@end table
|
||||
|
||||
|
||||
-@node Invoking grub-probe
|
||||
-@chapter Invoking grub-probe
|
||||
-@section Invoking grub-probe
|
||||
+@node Invoking grub2-probe
|
||||
+@chapter Invoking grub2-probe
|
||||
+@section Invoking grub2-probe
|
||||
|
||||
-The program @command{grub-probe} probes device information for a given path
|
||||
+The program @command{grub2-probe} probes device information for a given path
|
||||
or device.
|
||||
|
||||
@example
|
||||
@@ -6378,7 +6378,7 @@ grub-probe --target=fs /boot/grub
|
||||
grub-probe --target=drive --device /dev/sda1
|
||||
-grub-probe --target=fs /boot/grub
|
||||
-grub-probe --target=drive --device /dev/sda1
|
||||
+grub2-probe --target=fs /boot/grub
|
||||
+grub2-probe --target=drive --device /dev/sda1
|
||||
@end example
|
||||
|
||||
-@command{grub-probe} must be given a path or device as a non-option
|
||||
|
|
@ -966,7 +1037,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
argument, and also accepts the following options:
|
||||
|
||||
@table @option
|
||||
@@ -6391,16 +6391,16 @@ Print the version number of GRUB and exit.
|
||||
@@ -7380,16 +7397,16 @@ Print the version number of GRUB and exit.
|
||||
@item -d
|
||||
@itemx --device
|
||||
If this option is given, then the non-option argument is a system device
|
||||
|
|
@ -986,14 +1057,14 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@item -t @var{target}
|
||||
@itemx --target=@var{target}
|
||||
@@ -6453,19 +6453,19 @@ Print verbose messages.
|
||||
@@ -7442,19 +7459,19 @@ Print verbose messages.
|
||||
@end table
|
||||
|
||||
|
||||
-@node Invoking grub-script-check
|
||||
-@chapter Invoking grub-script-check
|
||||
-@section Invoking grub-script-check
|
||||
+@node Invoking grub2-script-check
|
||||
+@chapter Invoking grub2-script-check
|
||||
+@section Invoking grub2-script-check
|
||||
|
||||
-The program @command{grub-script-check} takes a GRUB script file
|
||||
+The program @command{grub2-script-check} takes a GRUB script file
|
||||
|
|
@ -1003,7 +1074,7 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@example
|
||||
-grub-script-check /boot/grub/grub.cfg
|
||||
+grub-script-check /boot/grub2/grub.cfg
|
||||
+grub2-script-check /boot/grub2/grub.cfg
|
||||
@end example
|
||||
|
||||
-@command{grub-script-check} accepts the following options:
|
||||
|
|
@ -1011,6 +1082,3 @@ index 15a90b26e..f28c4cd52 100644
|
|||
|
||||
@table @option
|
||||
@item --help
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From c6eaa982d12e3cfc5465dda5ea372774188b6b81 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 09:02:15 +0200
|
||||
Subject: [PATCH 034/194] Missing parts of previous commit
|
||||
|
||||
---
|
||||
grub-core/Makefile.core.def | 2 ++
|
||||
grub-core/kern/arm/coreboot/init.c | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index d2239f171..1d86bd22e 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -162,6 +162,8 @@ kernel = {
|
||||
arm_coreboot = bus/fdt.c;
|
||||
arm_coreboot = term/ps2.c;
|
||||
arm_coreboot = term/arm/pl050.c;
|
||||
+ arm_coreboot = term/arm/cros.c;
|
||||
+ arm_coreboot = term/arm/cros_ec.c;
|
||||
arm_coreboot = bus/spi/rk3288_spi.c;
|
||||
arm_coreboot = commands/keylayouts.c;
|
||||
arm_coreboot = kern/arm/coreboot/dma.c;
|
||||
diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c
|
||||
index 0126ff638..8d8c5b829 100644
|
||||
--- a/grub-core/kern/arm/coreboot/init.c
|
||||
+++ b/grub-core/kern/arm/coreboot/init.c
|
||||
@@ -135,6 +135,7 @@ grub_machine_init (void)
|
||||
grub_rk3288_spi_init ();
|
||||
|
||||
grub_machine_timer_init ();
|
||||
+ grub_cros_init ();
|
||||
grub_pl050_init ();
|
||||
}
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
From 70b555a52a065b2beb91e6fc97a6b358c931b303 Mon Sep 17 00:00:00 2001
|
||||
From: Julius Werner <jwerner@chromium.org>
|
||||
Date: Tue, 9 May 2017 09:03:02 +0200
|
||||
Subject: [PATCH 035/194] coreboot: Changed cbmemc to support updated console
|
||||
format from coreboot.
|
||||
|
||||
---
|
||||
grub-core/term/i386/coreboot/cbmemc.c | 50 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 35 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/grub-core/term/i386/coreboot/cbmemc.c b/grub-core/term/i386/coreboot/cbmemc.c
|
||||
index 129248c7f..cea9b8431 100644
|
||||
--- a/grub-core/term/i386/coreboot/cbmemc.c
|
||||
+++ b/grub-core/term/i386/coreboot/cbmemc.c
|
||||
@@ -29,11 +29,14 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
+#define CURSOR_MASK ((1 << 28) - 1)
|
||||
+#define OVERFLOW (1 << 31)
|
||||
+
|
||||
struct grub_linuxbios_cbmemc
|
||||
{
|
||||
grub_uint32_t size;
|
||||
- grub_uint32_t pointer;
|
||||
- char data[0];
|
||||
+ grub_uint32_t cursor;
|
||||
+ char body[0];
|
||||
};
|
||||
|
||||
static struct grub_linuxbios_cbmemc *cbmemc;
|
||||
@@ -41,11 +44,20 @@ static struct grub_linuxbios_cbmemc *cbmemc;
|
||||
static void
|
||||
put (struct grub_term_output *term __attribute__ ((unused)), const int c)
|
||||
{
|
||||
+ grub_uint32_t flags, cursor;
|
||||
if (!cbmemc)
|
||||
return;
|
||||
- if (cbmemc->pointer < cbmemc->size)
|
||||
- cbmemc->data[cbmemc->pointer] = c;
|
||||
- cbmemc->pointer++;
|
||||
+ flags = cbmemc->cursor & ~CURSOR_MASK;
|
||||
+ cursor = cbmemc->cursor & CURSOR_MASK;
|
||||
+ if (cursor >= cbmemc->size)
|
||||
+ return;
|
||||
+ cbmemc->body[cursor++] = c;
|
||||
+ if (cursor >= cbmemc->size)
|
||||
+ {
|
||||
+ cursor = 0;
|
||||
+ flags |= OVERFLOW;
|
||||
+ }
|
||||
+ cbmemc->cursor = flags | cursor;
|
||||
}
|
||||
|
||||
struct grub_terminfo_output_state grub_cbmemc_terminfo_output =
|
||||
@@ -87,21 +99,29 @@ grub_cmd_cbmemc (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc __attribute__ ((unused)),
|
||||
char *argv[] __attribute__ ((unused)))
|
||||
{
|
||||
- grub_size_t len;
|
||||
- char *str;
|
||||
- struct grub_linuxbios_cbmemc *cbmemc_saved;
|
||||
+ grub_size_t size, cursor;
|
||||
+ struct grub_linuxbios_cbmemc *real_cbmemc;
|
||||
|
||||
if (!cbmemc)
|
||||
return grub_error (GRUB_ERR_IO, "no CBMEM console found");
|
||||
|
||||
- len = cbmemc->pointer;
|
||||
- if (len > cbmemc->size)
|
||||
- len = cbmemc->size;
|
||||
- str = cbmemc->data;
|
||||
- cbmemc_saved = cbmemc;
|
||||
+ real_cbmemc = cbmemc;
|
||||
cbmemc = 0;
|
||||
- grub_xnputs (str, len);
|
||||
- cbmemc = cbmemc_saved;
|
||||
+ cursor = real_cbmemc->cursor & CURSOR_MASK;
|
||||
+ if (!(real_cbmemc->cursor & OVERFLOW) && cursor < real_cbmemc->size)
|
||||
+ size = cursor;
|
||||
+ else
|
||||
+ size = real_cbmemc->size;
|
||||
+ if (real_cbmemc->cursor & OVERFLOW)
|
||||
+ {
|
||||
+ if (cursor > size)
|
||||
+ cursor = 0;
|
||||
+ grub_xnputs(real_cbmemc->body + cursor, size - cursor);
|
||||
+ grub_xnputs(real_cbmemc->body, cursor);
|
||||
+ }
|
||||
+ else
|
||||
+ grub_xnputs(real_cbmemc->body, size);
|
||||
+ cbmemc = real_cbmemc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
From ebfc7bb290eb5be7919107d93ee6d03f3030d599 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 24 May 2017 12:42:32 -0400
|
||||
Subject: [PATCH 174/194] macos: just build chainloader entries, don't try any
|
||||
xnu xnu.
|
||||
Subject: [PATCH] macos: just build chainloader entries, don't try any xnu xnu.
|
||||
|
||||
Since our bugs tell us that the xnu boot entries really just don't work
|
||||
most of the time, and they create piles of extra boot entries, because
|
||||
|
|
@ -21,7 +20,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 18 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
||||
index e40274fc0..d979de198 100644
|
||||
index f300e46fc6a..d7d423b2eaf 100644
|
||||
--- a/util/grub.d/30_os-prober.in
|
||||
+++ b/util/grub.d/30_os-prober.in
|
||||
@@ -42,68 +42,25 @@ if [ -z "${OSPROBED}" ] ; then
|
||||
|
|
@ -105,7 +104,7 @@ index e40274fc0..d979de198 100644
|
|||
}
|
||||
EOF
|
||||
}
|
||||
@@ -307,11 +264,12 @@ EOF
|
||||
@@ -296,11 +253,12 @@ EOF
|
||||
echo "$title_correction_code"
|
||||
;;
|
||||
macosx)
|
||||
|
|
@ -123,6 +122,3 @@ index e40274fc0..d979de198 100644
|
|||
;;
|
||||
hurd)
|
||||
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
From c4b8bec5fee4e30a165fd14a188cf3ab8eccd095 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Tue, 9 May 2017 14:27:52 +0200
|
||||
Subject: [PATCH 036/194] at_keyboard: Fix falco chromebook case.
|
||||
|
||||
EC is slow, so we need few delays for it to toggle the bits correctly.
|
||||
|
||||
Command to enable clock and keyboard were not sent.
|
||||
---
|
||||
grub-core/term/at_keyboard.c | 23 ++++++++++++++---------
|
||||
include/grub/at_keyboard.h | 2 ++
|
||||
2 files changed, 16 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/grub-core/term/at_keyboard.c b/grub-core/term/at_keyboard.c
|
||||
index 3ab4e205f..f0a986eb1 100644
|
||||
--- a/grub-core/term/at_keyboard.c
|
||||
+++ b/grub-core/term/at_keyboard.c
|
||||
@@ -40,6 +40,8 @@ grub_keyboard_controller_init (void);
|
||||
static void
|
||||
keyboard_controller_wait_until_ready (void)
|
||||
{
|
||||
+ /* 50 us would be enough but our current time resolution is 1ms. */
|
||||
+ grub_millisleep (1);
|
||||
while (! KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS)));
|
||||
}
|
||||
|
||||
@@ -50,10 +52,11 @@ wait_ack (void)
|
||||
grub_uint8_t ack;
|
||||
|
||||
endtime = grub_get_time_ms () + 20;
|
||||
- do
|
||||
+ do {
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
ack = grub_inb (KEYBOARD_REG_DATA);
|
||||
- while (ack != GRUB_AT_ACK && ack != GRUB_AT_NACK
|
||||
- && grub_get_time_ms () < endtime);
|
||||
+ } while (ack != GRUB_AT_ACK && ack != GRUB_AT_NACK
|
||||
+ && grub_get_time_ms () < endtime);
|
||||
return ack;
|
||||
}
|
||||
|
||||
@@ -135,12 +138,10 @@ query_mode (void)
|
||||
if (!e)
|
||||
return 0;
|
||||
|
||||
- keyboard_controller_wait_until_ready ();
|
||||
-
|
||||
- do
|
||||
+ do {
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
ret = grub_inb (KEYBOARD_REG_DATA);
|
||||
- while (ret == GRUB_AT_ACK);
|
||||
-
|
||||
+ } while (ret == GRUB_AT_ACK);
|
||||
/* QEMU translates the set even in no-translate mode. */
|
||||
if (ret == 0x43 || ret == 1)
|
||||
return 1;
|
||||
@@ -169,7 +170,11 @@ set_scancodes (void)
|
||||
#else
|
||||
|
||||
grub_keyboard_controller_write (grub_keyboard_controller_orig
|
||||
- & ~KEYBOARD_AT_TRANSLATE);
|
||||
+ & ~KEYBOARD_AT_TRANSLATE
|
||||
+ & ~KEYBOARD_AT_DISABLE);
|
||||
+
|
||||
+ keyboard_controller_wait_until_ready ();
|
||||
+ grub_outb (KEYBOARD_COMMAND_ENABLE, KEYBOARD_REG_DATA);
|
||||
|
||||
write_mode (2);
|
||||
ps2_state.current_set = query_mode ();
|
||||
diff --git a/include/grub/at_keyboard.h b/include/grub/at_keyboard.h
|
||||
index b031523eb..bcb4d9ba7 100644
|
||||
--- a/include/grub/at_keyboard.h
|
||||
+++ b/include/grub/at_keyboard.h
|
||||
@@ -23,9 +23,11 @@
|
||||
#define KEYBOARD_COMMAND_ISREADY(x) !((x) & 0x02)
|
||||
#define KEYBOARD_COMMAND_READ 0x20
|
||||
#define KEYBOARD_COMMAND_WRITE 0x60
|
||||
+#define KEYBOARD_COMMAND_ENABLE 0xf4
|
||||
#define KEYBOARD_COMMAND_REBOOT 0xfe
|
||||
|
||||
#define KEYBOARD_AT_TRANSLATE 0x40
|
||||
+#define KEYBOARD_AT_DISABLE 0x10
|
||||
|
||||
#define KEYBOARD_ISMAKE(x) !((x) & 0x80)
|
||||
#define KEYBOARD_ISREADY(x) ((x) & 0x01)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 6dc076ff0e9487566885473b9b65f56ef3e02a1b Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Date: Wed, 18 Dec 2013 09:57:04 +0000
|
||||
Subject: [PATCH 175/194] grub2/btrfs: Add ability to boot from subvolumes
|
||||
Date: Tue, 9 Jul 2019 13:39:45 +0200
|
||||
Subject: [PATCH] grub2/btrfs: Add ability to boot from subvolumes
|
||||
|
||||
This patch adds the ability to specify a different root on a btrfs
|
||||
filesystem too boot from other than the default one.
|
||||
|
|
@ -19,25 +19,25 @@ variable and loading the config file from the subvolume.
|
|||
|
||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 548 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
grub-core/fs/btrfs.c | 558 ++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
include/grub/btrfs.h | 1 +
|
||||
2 files changed, 531 insertions(+), 18 deletions(-)
|
||||
2 files changed, 536 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 4849c1ceb..38facf3cb 100644
|
||||
index ba0c583526d..f14fe9c1bda 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -29,6 +29,9 @@
|
||||
#include <minilzo.h>
|
||||
@@ -38,6 +38,9 @@
|
||||
#include <zstd.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/btrfs.h>
|
||||
+#include <grub/command.h>
|
||||
+#include <grub/env.h>
|
||||
+#include <grub/extcmd.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -64,9 +67,11 @@ struct grub_btrfs_superblock
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/diskfilter.h>
|
||||
#include <grub/safemath.h>
|
||||
@@ -79,9 +82,11 @@ struct grub_btrfs_superblock
|
||||
grub_uint64_t generation;
|
||||
grub_uint64_t root_tree;
|
||||
grub_uint64_t chunk_tree;
|
||||
|
|
@ -51,7 +51,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
struct grub_btrfs_device this_device;
|
||||
char label[0x100];
|
||||
grub_uint8_t dummy4[0x100];
|
||||
@@ -105,6 +110,7 @@ struct grub_btrfs_data
|
||||
@@ -121,6 +126,7 @@ struct grub_btrfs_data
|
||||
grub_uint64_t exttree;
|
||||
grub_size_t extsize;
|
||||
struct grub_btrfs_extent_data *extent;
|
||||
|
|
@ -59,7 +59,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
};
|
||||
|
||||
struct grub_btrfs_chunk_item
|
||||
@@ -171,6 +177,14 @@ struct grub_btrfs_leaf_descriptor
|
||||
@@ -191,6 +197,14 @@ struct grub_btrfs_leaf_descriptor
|
||||
} *data;
|
||||
};
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
struct grub_btrfs_time
|
||||
{
|
||||
grub_int64_t sec;
|
||||
@@ -215,6 +229,14 @@ struct grub_btrfs_extent_data
|
||||
@@ -236,6 +250,14 @@ struct grub_btrfs_extent_data
|
||||
|
||||
#define GRUB_BTRFS_OBJECT_ID_CHUNK 0x100
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
static grub_disk_addr_t superblock_sectors[] = { 64 * 2, 64 * 1024 * 2,
|
||||
256 * 1048576 * 2, 1048576ULL * 1048576ULL * 2
|
||||
};
|
||||
@@ -837,6 +859,62 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
||||
@@ -1252,6 +1274,62 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, grub_disk_addr_t addr,
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
static struct grub_btrfs_data *
|
||||
grub_btrfs_mount (grub_device_t dev)
|
||||
{
|
||||
@@ -872,6 +950,13 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1287,6 +1365,13 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
data->devices_attached[0].dev = dev;
|
||||
data->devices_attached[0].id = data->sblock.this_device.device_id;
|
||||
|
||||
|
|
@ -166,10 +166,11 @@ index 4849c1ceb..38facf3cb 100644
|
|||
return data;
|
||||
}
|
||||
|
||||
@@ -1233,6 +1318,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key,
|
||||
@@ -1784,6 +1869,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key,
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
+static grub_err_t
|
||||
+find_pathname(struct grub_btrfs_data *data, grub_uint64_t objectid,
|
||||
+ grub_uint64_t fs_root, const char *name, char **pathname)
|
||||
+{
|
||||
|
|
@ -254,11 +255,10 @@ index 4849c1ceb..38facf3cb 100644
|
|||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
static grub_err_t
|
||||
find_path (struct grub_btrfs_data *data,
|
||||
const char *path, struct grub_btrfs_key *key,
|
||||
grub_uint64_t *tree, grub_uint8_t *type)
|
||||
@@ -1250,14 +1420,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1802,14 +1972,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
char *origpath = NULL;
|
||||
unsigned symlinks_max = 32;
|
||||
|
||||
|
|
@ -289,15 +289,18 @@ index 4849c1ceb..38facf3cb 100644
|
|||
while (1)
|
||||
{
|
||||
while (path[0] == '/')
|
||||
@@ -1430,9 +1612,21 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1982,13 +2164,25 @@ find_path (struct grub_btrfs_data *data,
|
||||
path = path_alloc = tmp;
|
||||
if (path[0] == '/')
|
||||
{
|
||||
- err = get_root (data, key, tree, type);
|
||||
- if (err)
|
||||
- return err;
|
||||
+ if (data->fs_tree)
|
||||
+ {
|
||||
{
|
||||
- grub_free (direl);
|
||||
- grub_free (path_alloc);
|
||||
- grub_free (origpath);
|
||||
- return err;
|
||||
+ *type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
|
||||
+ *tree = data->fs_tree;
|
||||
+ /* This is a tree root, so everything starts at objectid 256 */
|
||||
|
|
@ -309,50 +312,59 @@ index 4849c1ceb..38facf3cb 100644
|
|||
+ {
|
||||
+ err = get_root (data, key, tree, type);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
+ {
|
||||
+ grub_free (direl);
|
||||
+ grub_free (path_alloc);
|
||||
+ grub_free (origpath);
|
||||
+ return err;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -1673,6 +1867,20 @@ grub_btrfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
@@ -2256,18 +2450,10 @@ grub_btrfs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
data->tree, file->offset, buf, len);
|
||||
}
|
||||
|
||||
-static grub_err_t
|
||||
-grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
+static char *
|
||||
+btrfs_unparse_uuid(struct grub_btrfs_data *data)
|
||||
+{
|
||||
{
|
||||
- struct grub_btrfs_data *data;
|
||||
-
|
||||
- *uuid = NULL;
|
||||
-
|
||||
- data = grub_btrfs_mount (device);
|
||||
- if (!data)
|
||||
- return grub_errno;
|
||||
-
|
||||
- *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
+ return grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[3]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[4]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
+ grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
@@ -2276,6 +2462,20 @@ grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
+}
|
||||
+
|
||||
static grub_err_t
|
||||
grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
{
|
||||
@@ -1684,15 +1892,7 @@ grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
if (!data)
|
||||
return grub_errno;
|
||||
|
||||
- *uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[0]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[1]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[2]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[3]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[4]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[5]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[6]),
|
||||
- grub_be_to_cpu16 (data->sblock.uuid[7]));
|
||||
+static grub_err_t
|
||||
+grub_btrfs_uuid (grub_device_t device, char **uuid)
|
||||
+{
|
||||
+ struct grub_btrfs_data *data;
|
||||
+
|
||||
+ *uuid = NULL;
|
||||
+
|
||||
+ data = grub_btrfs_mount (device);
|
||||
+ if (!data)
|
||||
+ return grub_errno;
|
||||
+
|
||||
+ *uuid = btrfs_unparse_uuid(data);
|
||||
|
||||
grub_btrfs_unmount (data);
|
||||
|
||||
@@ -1749,6 +1949,242 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)),
|
||||
@@ -2396,6 +2596,242 @@ grub_btrfs_embed (grub_device_t device __attribute__ ((unused)),
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -594,8 +606,8 @@ index 4849c1ceb..38facf3cb 100644
|
|||
+
|
||||
static struct grub_fs grub_btrfs_fs = {
|
||||
.name = "btrfs",
|
||||
.dir = grub_btrfs_dir,
|
||||
@@ -1764,12 +2200,88 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
.fs_dir = grub_btrfs_dir,
|
||||
@@ -2411,12 +2847,88 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -685,7 +697,7 @@ index 4849c1ceb..38facf3cb 100644
|
|||
+
|
||||
+// vim: si et sw=2:
|
||||
diff --git a/include/grub/btrfs.h b/include/grub/btrfs.h
|
||||
index 9d93fb6c1..234ad9767 100644
|
||||
index 9d93fb6c182..234ad976771 100644
|
||||
--- a/include/grub/btrfs.h
|
||||
+++ b/include/grub/btrfs.h
|
||||
@@ -29,6 +29,7 @@ enum
|
||||
|
|
@ -696,6 +708,3 @@ index 9d93fb6c1..234ad9767 100644
|
|||
GRUB_BTRFS_ITEM_TYPE_CHUNK = 0xe4
|
||||
};
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
40
0037-btrfs-fix-a-bad-null-check.patch
Normal file
40
0037-btrfs-fix-a-bad-null-check.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 8 Jan 2024 15:41:52 -0500
|
||||
Subject: [PATCH] btrfs: fix a bad null check
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
current gcc complains:
|
||||
|
||||
grub-core/fs/btrfs.c: In function ‘grub_cmd_btrfs_info’:
|
||||
grub-core/fs/btrfs.c:2745:7: error: the comparison will always evaluate as ‘true’ for the address of ‘label’ will never be NULL [-Werror=address]
|
||||
2745 | if (data->sblock.label)
|
||||
| ^~~~
|
||||
grub-core/fs/btrfs.c:92:8: note: ‘label’ declared here
|
||||
92 | char label[0x100];
|
||||
| ^~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Obviously this check should be on the first data byte instead of the
|
||||
symbol itself.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index f14fe9c1bda..8e2b1e9f7bc 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -2625,7 +2625,7 @@ grub_cmd_btrfs_info (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "failed to open fs");
|
||||
}
|
||||
|
||||
- if (data->sblock.label)
|
||||
+ if (data->sblock.label[0])
|
||||
grub_printf("Label: '%s' ", data->sblock.label);
|
||||
else
|
||||
grub_printf("Label: none ");
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
From bd4e40aadded7093908d786d03b4acf60b7b1707 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Snowberg <eric.snowberg@oracle.com>
|
||||
Date: Thu, 11 May 2017 18:42:23 -0700
|
||||
Subject: [PATCH 037/194] sparc64: Close cdboot ihandle
|
||||
|
||||
The ihandle is left open with a cd-core image. This will cause a delay
|
||||
booting grub from a virtual cdrom in a LDOM. It will also cause problems
|
||||
as Linux boots, since it expects the ihandle to be closed during init.
|
||||
|
||||
Orabug: 25911275
|
||||
|
||||
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
grub-core/boot/sparc64/ieee1275/boot.S | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/grub-core/boot/sparc64/ieee1275/boot.S b/grub-core/boot/sparc64/ieee1275/boot.S
|
||||
index 586efb401..9ea9b4e06 100644
|
||||
--- a/grub-core/boot/sparc64/ieee1275/boot.S
|
||||
+++ b/grub-core/boot/sparc64/ieee1275/boot.S
|
||||
@@ -69,6 +69,10 @@ prom_seek_name: .asciz "seek"
|
||||
prom_read_name: .asciz "read"
|
||||
prom_exit_name: .asciz "exit"
|
||||
grub_name: .asciz "GRUB "
|
||||
+#ifdef CDBOOT
|
||||
+prom_close_name: .asciz "close"
|
||||
+#endif
|
||||
+
|
||||
#define GRUB_NAME_LEN 5
|
||||
|
||||
.align 4
|
||||
@@ -213,6 +217,12 @@ bootpath_known:
|
||||
call prom_call_3_1_o1
|
||||
#ifdef CDBOOT
|
||||
LDUW_ABS(kernel_size, 0x00, %o3)
|
||||
+
|
||||
+ GET_ABS(prom_close_name, %o0)
|
||||
+ mov 1, %g1
|
||||
+ mov 0, %o5
|
||||
+ call prom_call
|
||||
+ mov BOOTDEV_REG, %o1
|
||||
#else
|
||||
mov 512, %o3
|
||||
#endif
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From ae5817f1dcbf0b99f7a849f56afe442165317840 Mon Sep 17 00:00:00 2001
|
||||
From: Julien Grall <julien.grall@linaro.org>
|
||||
Date: Fri, 19 Feb 2016 16:28:52 +0000
|
||||
Subject: [PATCH 038/194] arm64/xen_boot: Fix Xen boot using GRUB2 on AARCH64
|
||||
|
||||
Xen is currently crashing because of malformed compatible property for
|
||||
the boot module. This is because the property string is not
|
||||
null-terminated as requested by the ePAR spec.
|
||||
|
||||
Signed-off-by: Julien Grall <julien.grall@linaro.org>
|
||||
Tested-by: Fu Wei <fu.wei@linaro.org>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
grub-core/loader/arm64/xen_boot.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
|
||||
index a914eb8e2..8ae43d7e8 100644
|
||||
--- a/grub-core/loader/arm64/xen_boot.c
|
||||
+++ b/grub-core/loader/arm64/xen_boot.c
|
||||
@@ -156,7 +156,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)
|
||||
grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name);
|
||||
|
||||
retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible",
|
||||
- MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE) - 1);
|
||||
+ MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE));
|
||||
if (retval)
|
||||
return grub_error (GRUB_ERR_IO, "failed to update FDT");
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 28b70d9386749173ecfd3b153e6a8be36238405f Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Wed, 18 Dec 2013 09:57:04 +0000
|
||||
Subject: [PATCH 176/194] export btrfs_subvol and btrfs_subvolid
|
||||
Subject: [PATCH] export btrfs_subvol and btrfs_subvolid
|
||||
|
||||
We should export btrfs_subvol and btrfs_subvolid to have both visible
|
||||
to subsidiary configuration files loaded using configfile.
|
||||
|
|
@ -12,10 +12,10 @@ Signed-off-by: Michael Chang <mchang@suse.com>
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 38facf3cb..396296166 100644
|
||||
index 8e2b1e9f7bc..14e38a4df02 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -2273,6 +2273,8 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2920,6 +2920,8 @@ GRUB_MOD_INIT (btrfs)
|
||||
subvol_set_env);
|
||||
grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
|
||||
subvolid_set_env);
|
||||
|
|
@ -24,6 +24,3 @@ index 38facf3cb..396296166 100644
|
|||
}
|
||||
|
||||
GRUB_MOD_FINI (btrfs)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From 8eed7be8a61c295df700e918744a984162378ca9 Mon Sep 17 00:00:00 2001
|
||||
From: Fu Wei <fu.wei@linaro.org>
|
||||
Date: Sun, 14 May 2017 15:43:45 +0800
|
||||
Subject: [PATCH 039/194] arm64: Add "--nounzip" option support in xen_module
|
||||
command
|
||||
|
||||
This patch adds "--nounzip" option support in order to
|
||||
be compatible with the module command of multiboot on other architecture,
|
||||
by this way we can simplify grub-mkconfig support code.
|
||||
|
||||
This patch also allow us to use zip compressed module(like Linux kernel
|
||||
for Dom0).
|
||||
|
||||
Signed-off-by: Fu Wei <fu.wei@linaro.org>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
grub-core/loader/arm64/xen_boot.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
|
||||
index 8ae43d7e8..27ede46ca 100644
|
||||
--- a/grub-core/loader/arm64/xen_boot.c
|
||||
+++ b/grub-core/loader/arm64/xen_boot.c
|
||||
@@ -379,6 +379,20 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
|
||||
|
||||
struct xen_boot_binary *module = NULL;
|
||||
grub_file_t file = 0;
|
||||
+ int nounzip = 0;
|
||||
+
|
||||
+ if (!argc)
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (grub_strcmp (argv[0], "--nounzip") == 0)
|
||||
+ {
|
||||
+ argv++;
|
||||
+ argc--;
|
||||
+ nounzip = 1;
|
||||
+ }
|
||||
|
||||
if (!argc)
|
||||
{
|
||||
@@ -403,6 +417,8 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),
|
||||
|
||||
grub_dprintf ("xen_loader", "Init module and node info\n");
|
||||
|
||||
+ if (nounzip)
|
||||
+ grub_file_filter_disable_compression ();
|
||||
file = grub_file_open (argv[0]);
|
||||
if (!file)
|
||||
goto fail;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,17 +1,19 @@
|
|||
From 33d2bbf28d14971e531276fce042dadd4239de4e Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 177/194] grub2-btrfs-03-follow_default
|
||||
Subject: [PATCH] grub2-btrfs-03-follow_default
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 107 ++++++++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 76 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 396296166..2c462584e 100644
|
||||
index 14e38a4df02..d47f9ab0352 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -920,6 +920,7 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1335,6 +1335,7 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
{
|
||||
struct grub_btrfs_data *data;
|
||||
grub_err_t err;
|
||||
|
|
@ -19,7 +21,7 @@ index 396296166..2c462584e 100644
|
|||
|
||||
if (!dev->disk)
|
||||
{
|
||||
@@ -950,11 +951,14 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
@@ -1365,11 +1366,14 @@ grub_btrfs_mount (grub_device_t dev)
|
||||
data->devices_attached[0].dev = dev;
|
||||
data->devices_attached[0].id = data->sblock.this_device.device_id;
|
||||
|
||||
|
|
@ -38,7 +40,7 @@ index 396296166..2c462584e 100644
|
|||
}
|
||||
|
||||
return data;
|
||||
@@ -1414,24 +1418,39 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1966,24 +1970,39 @@ find_path (struct grub_btrfs_data *data,
|
||||
grub_size_t allocated = 0;
|
||||
struct grub_btrfs_dir_item *direl = NULL;
|
||||
struct grub_btrfs_key key_out;
|
||||
|
|
@ -85,7 +87,7 @@ index 396296166..2c462584e 100644
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -1442,15 +1461,23 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -1994,15 +2013,23 @@ find_path (struct grub_btrfs_data *data,
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
@ -118,7 +120,7 @@ index 396296166..2c462584e 100644
|
|||
|
||||
if (*type != GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY)
|
||||
{
|
||||
@@ -1461,7 +1488,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2013,7 +2040,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
|
||||
if (ctokenlen == 1 && ctoken[0] == '.')
|
||||
{
|
||||
|
|
@ -129,7 +131,7 @@ index 396296166..2c462584e 100644
|
|||
continue;
|
||||
}
|
||||
if (ctokenlen == 2 && ctoken[0] == '.' && ctoken[1] == '.')
|
||||
@@ -1492,8 +1521,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2044,8 +2073,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
*type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
|
||||
key->object_id = key_out.offset;
|
||||
|
||||
|
|
@ -141,7 +143,7 @@ index 396296166..2c462584e 100644
|
|||
continue;
|
||||
}
|
||||
|
||||
@@ -1562,7 +1592,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2114,7 +2144,9 @@ find_path (struct grub_btrfs_data *data,
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +154,7 @@ index 396296166..2c462584e 100644
|
|||
if (cdirel->type == GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK)
|
||||
{
|
||||
struct grub_btrfs_inode inode;
|
||||
@@ -1612,14 +1644,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
@@ -2164,14 +2196,26 @@ find_path (struct grub_btrfs_data *data,
|
||||
path = path_alloc = tmp;
|
||||
if (path[0] == '/')
|
||||
{
|
||||
|
|
@ -186,7 +188,7 @@ index 396296166..2c462584e 100644
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -2275,6 +2319,7 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2922,6 +2966,7 @@ GRUB_MOD_INIT (btrfs)
|
||||
subvolid_set_env);
|
||||
grub_env_export ("btrfs_subvol");
|
||||
grub_env_export ("btrfs_subvolid");
|
||||
|
|
@ -194,6 +196,3 @@ index 396296166..2c462584e 100644
|
|||
}
|
||||
|
||||
GRUB_MOD_FINI (btrfs)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,22 +1,24 @@
|
|||
From ddf05a259df3e5c43ea0714abf227bdb82dd34a5 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 178/194] grub2-btrfs-04-grub2-install
|
||||
Subject: [PATCH] grub2-btrfs-04-grub2-install
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/osdep/linux/getroot.c | 7 +++++++
|
||||
grub-core/osdep/unix/config.c | 17 +++++++++++++++--
|
||||
include/grub/emu/config.h | 1 +
|
||||
util/config.c | 10 ++++++++++
|
||||
util/grub-install.c | 15 +++++++++++++++
|
||||
util/grub-install.c | 14 ++++++++++++++
|
||||
util/grub-mkrelpath.c | 6 ++++++
|
||||
6 files changed, 54 insertions(+), 2 deletions(-)
|
||||
include/grub/emu/config.h | 1 +
|
||||
6 files changed, 53 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
||||
index 6d9f4e5fa..5d50dd6f8 100644
|
||||
index 7dd775d2ad9..7c29b3523b4 100644
|
||||
--- a/grub-core/osdep/linux/getroot.c
|
||||
+++ b/grub-core/osdep/linux/getroot.c
|
||||
@@ -376,6 +376,7 @@ get_btrfs_fs_prefix (const char *mount_path)
|
||||
@@ -373,6 +373,7 @@ get_btrfs_fs_prefix (const char *mount_path)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -24,7 +26,7 @@ index 6d9f4e5fa..5d50dd6f8 100644
|
|||
|
||||
char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
|
||||
@@ -519,6 +520,12 @@ again:
|
||||
@@ -516,6 +517,12 @@ again:
|
||||
{
|
||||
ret = grub_find_root_devices_from_btrfs (dir);
|
||||
fs_prefix = get_btrfs_fs_prefix (entries[i].enc_path);
|
||||
|
|
@ -38,7 +40,7 @@ index 6d9f4e5fa..5d50dd6f8 100644
|
|||
else if (!retry && grub_strcmp (entries[i].fstype, "autofs") == 0)
|
||||
{
|
||||
diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
|
||||
index 65effa9f3..b637c58ef 100644
|
||||
index 0b1f7618d21..0ce0e309ac0 100644
|
||||
--- a/grub-core/osdep/unix/config.c
|
||||
+++ b/grub-core/osdep/unix/config.c
|
||||
@@ -82,6 +82,19 @@ grub_util_load_config (struct grub_util_config *cfg)
|
||||
|
|
@ -72,20 +74,8 @@ index 65effa9f3..b637c58ef 100644
|
|||
|
||||
argv[2] = script;
|
||||
argv[3] = '\0';
|
||||
diff --git a/include/grub/emu/config.h b/include/grub/emu/config.h
|
||||
index 875d5896c..c9a7e5f4a 100644
|
||||
--- a/include/grub/emu/config.h
|
||||
+++ b/include/grub/emu/config.h
|
||||
@@ -37,6 +37,7 @@ struct grub_util_config
|
||||
{
|
||||
int is_cryptodisk_enabled;
|
||||
char *grub_distributor;
|
||||
+ int is_suse_btrfs_snapshot_enabled;
|
||||
};
|
||||
|
||||
void
|
||||
diff --git a/util/config.c b/util/config.c
|
||||
index ebcdd8f5e..f044a880a 100644
|
||||
index ebcdd8f5e22..f044a880a76 100644
|
||||
--- a/util/config.c
|
||||
+++ b/util/config.c
|
||||
@@ -42,6 +42,16 @@ grub_util_parse_config (FILE *f, struct grub_util_config *cfg, int simple)
|
||||
|
|
@ -106,19 +96,19 @@ index ebcdd8f5e..f044a880a 100644
|
|||
sizeof ("GRUB_DISTRIBUTOR=") - 1) == 0)
|
||||
{
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 75e3e5ba6..036fe1822 100644
|
||||
index 7dc5657bb67..ec3ed49674b 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -816,6 +816,8 @@ fill_core_services (const char *core_services)
|
||||
free (sysv_plist);
|
||||
@@ -843,6 +843,8 @@ try_open (const char *path)
|
||||
}
|
||||
#endif
|
||||
|
||||
+extern int use_relative_path_on_btrfs;
|
||||
+
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@@ -849,6 +851,9 @@ main (int argc, char *argv[])
|
||||
@@ -876,6 +878,9 @@ main (int argc, char *argv[])
|
||||
|
||||
grub_util_load_config (&config);
|
||||
|
||||
|
|
@ -128,11 +118,10 @@ index 75e3e5ba6..036fe1822 100644
|
|||
if (!bootloader_id && config.grub_distributor)
|
||||
{
|
||||
char *ptr;
|
||||
@@ -1321,6 +1326,16 @@ main (int argc, char *argv[])
|
||||
fprintf (load_cfg_f, "set debug='%s'\n",
|
||||
debug_image);
|
||||
@@ -1366,6 +1371,15 @@ main (int argc, char *argv[])
|
||||
relative_grubdir = xstrdup ("/");
|
||||
}
|
||||
+
|
||||
|
||||
+ if (config.is_suse_btrfs_snapshot_enabled
|
||||
+ && grub_strncmp(grub_fs->name, "btrfs", sizeof ("btrfs") - 1) == 0)
|
||||
+ {
|
||||
|
|
@ -146,7 +135,7 @@ index 75e3e5ba6..036fe1822 100644
|
|||
char *install_drive = NULL;
|
||||
|
||||
diff --git a/util/grub-mkrelpath.c b/util/grub-mkrelpath.c
|
||||
index 47a241a39..5db7a9a7d 100644
|
||||
index 47a241a391b..5db7a9a7d97 100644
|
||||
--- a/util/grub-mkrelpath.c
|
||||
+++ b/util/grub-mkrelpath.c
|
||||
@@ -40,9 +40,12 @@ struct arguments
|
||||
|
|
@ -172,6 +161,15 @@ index 47a241a39..5db7a9a7d 100644
|
|||
case ARGP_KEY_ARG:
|
||||
if (state->arg_num == 0)
|
||||
arguments->pathname = xstrdup (arg);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
diff --git a/include/grub/emu/config.h b/include/grub/emu/config.h
|
||||
index 875d5896ce1..c9a7e5f4ade 100644
|
||||
--- a/include/grub/emu/config.h
|
||||
+++ b/include/grub/emu/config.h
|
||||
@@ -37,6 +37,7 @@ struct grub_util_config
|
||||
{
|
||||
int is_cryptodisk_enabled;
|
||||
char *grub_distributor;
|
||||
+ int is_suse_btrfs_snapshot_enabled;
|
||||
};
|
||||
|
||||
void
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
From d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe Mon Sep 17 00:00:00 2001
|
||||
From: Fu Wei <fu.wei@linaro.org>
|
||||
Date: Sun, 14 May 2017 15:43:46 +0800
|
||||
Subject: [PATCH 040/194] util/grub.d/20_linux_xen.in: Add xen_boot command
|
||||
support for aarch64
|
||||
|
||||
This patch adds the support of xen_boot command for aarch64:
|
||||
xen_hypervisor
|
||||
xen_module
|
||||
These two commands are only for aarch64, since it has its own protocol and
|
||||
commands to boot xen hypervisor and Dom0, but not multiboot.
|
||||
|
||||
For other architectures, they are still using multiboot and module
|
||||
commands.
|
||||
|
||||
Signed-off-by: Fu Wei <fu.wei@linaro.org>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
util/grub.d/20_linux_xen.in | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index c48af948d..c002fc9f9 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -122,16 +122,16 @@ linux_entry ()
|
||||
else
|
||||
xen_rm_opts="no-real-mode edd=off"
|
||||
fi
|
||||
- multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
|
||||
+ ${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
|
||||
echo '$(echo "$lmessage" | grub_quote)'
|
||||
- module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
||||
+ ${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
||||
message="$(gettext_printf "Loading initial ramdisk ...")"
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
echo '$(echo "$message" | grub_quote)'
|
||||
- module --nounzip ${rel_dirname}/${initrd}
|
||||
+ ${module_loader} --nounzip ${rel_dirname}/${initrd}
|
||||
EOF
|
||||
fi
|
||||
sed "s/^/$submenu_indentation/" << EOF
|
||||
@@ -206,6 +206,14 @@ while [ "x${xen_list}" != "x" ] ; do
|
||||
if [ "x$is_top_level" != xtrue ]; then
|
||||
echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
|
||||
fi
|
||||
+ $grub_file --is-arm64-efi $current_xen
|
||||
+ if [ $? -ne 0 ]; then
|
||||
+ xen_loader="multiboot"
|
||||
+ module_loader="module"
|
||||
+ else
|
||||
+ xen_loader="xen_hypervisor"
|
||||
+ module_loader="xen_module"
|
||||
+ fi
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
gettext_printf "Found linux image: %s\n" "$linux" >&2
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
From 26c2f306fd425d2c0348023b8dcb7eb40a01851a Mon Sep 17 00:00:00 2001
|
||||
From: Fu Wei <fu.wei@linaro.org>
|
||||
Date: Sun, 14 May 2017 15:43:47 +0800
|
||||
Subject: [PATCH 041/194] arm64: Update the introduction of Xen boot commands
|
||||
in docs/grub.texi
|
||||
|
||||
delete: xen_linux, xen_initrd, xen_xsm
|
||||
add: xen_module
|
||||
|
||||
This update bases on
|
||||
commit 0edd750e50698854068358ea53528100a9192902
|
||||
Author: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Fri Jan 22 10:18:47 2016 +0100
|
||||
|
||||
xen_boot: Remove obsolete module type distinctions.
|
||||
|
||||
Also bases on the module loading mechanism of Xen code:
|
||||
488c2a8 docs/arm64: clarify the documention for loading XSM support
|
||||
67831c4 docs/arm64: update the documentation for loading XSM support
|
||||
ca32012 xen/arm64: check XSM Magic from the second unknown module.
|
||||
|
||||
Signed-off-by: Fu Wei <fu.wei@linaro.org>
|
||||
Reviewed-by: Julien Grall <julien.grall@arm.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
docs/grub.texi | 38 +++++++++++++-------------------------
|
||||
1 file changed, 13 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/docs/grub.texi b/docs/grub.texi
|
||||
index e935af33e..a0c4b9e4e 100644
|
||||
--- a/docs/grub.texi
|
||||
+++ b/docs/grub.texi
|
||||
@@ -3873,11 +3873,9 @@ you forget a command, you can run the command @command{help}
|
||||
@comment * vbeinfo:: List available video modes
|
||||
* verify_detached:: Verify detached digital signature
|
||||
* videoinfo:: List available video modes
|
||||
-@comment * xen_*:: Xen boot commands
|
||||
-* xen_hypervisor:: Load xen hypervisor binary
|
||||
-* xen_linux:: Load dom0 kernel for xen hypervisor
|
||||
-* xen_initrd:: Load dom0 initrd for dom0 kernel
|
||||
-* xen_xsm:: Load xen security module for xen hypervisor
|
||||
+@comment * xen_*:: Xen boot commands for AArch64
|
||||
+* xen_hypervisor:: Load xen hypervisor binary (only on AArch64)
|
||||
+* xen_module:: Load xen modules for xen hypervisor (only on AArch64)
|
||||
@end menu
|
||||
|
||||
|
||||
@@ -5153,32 +5151,22 @@ List available video modes. If resolution is given, show only matching modes.
|
||||
Load a Xen hypervisor binary from @var{file}. The rest of the line is passed
|
||||
verbatim as the @dfn{kernel command-line}. Any other binaries must be
|
||||
reloaded after using this command.
|
||||
+This command is only available on AArch64 systems.
|
||||
@end deffn
|
||||
|
||||
-@node xen_linux
|
||||
-@subsection xen_linux
|
||||
+@node xen_module
|
||||
+@subsection xen_module
|
||||
|
||||
-@deffn Command xen_linux file [arguments]
|
||||
-Load a dom0 kernel image for xen hypervisor at the booting process of xen.
|
||||
+@deffn Command xen_module [--nounzip] file [arguments]
|
||||
+Load a module for xen hypervisor at the booting process of xen.
|
||||
The rest of the line is passed verbatim as the module command line.
|
||||
+Modules should be loaded in the following order:
|
||||
+ - dom0 kernel image
|
||||
+ - dom0 ramdisk if present
|
||||
+ - XSM policy if present
|
||||
+This command is only available on AArch64 systems.
|
||||
@end deffn
|
||||
|
||||
-@node xen_initrd
|
||||
-@subsection xen_initrd
|
||||
-
|
||||
-@deffn Command xen_initrd file
|
||||
-Load a initrd image for dom0 kernel at the booting process of xen.
|
||||
-@end deffn
|
||||
-
|
||||
-@node xen_xsm
|
||||
-@subsection xen_xsm
|
||||
-
|
||||
-@deffn Command xen_xsm file
|
||||
-Load a xen security module for xen hypervisor at the booting process of xen.
|
||||
-See @uref{http://wiki.xen.org/wiki/XSM} for more detail.
|
||||
-@end deffn
|
||||
-
|
||||
-
|
||||
@node Networking commands
|
||||
@section The list of networking commands
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,21 +1,22 @@
|
|||
From 8cc6f3420b5a42871cfc2bc7bdfed60b34eac4a8 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 21 Aug 2014 03:39:11 +0000
|
||||
Subject: [PATCH 179/194] grub2-btrfs-05-grub2-mkconfig
|
||||
Subject: [PATCH] grub2-btrfs-05-grub2-mkconfig
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
---
|
||||
util/grub-mkconfig.in | 3 ++-
|
||||
util/grub-mkconfig_lib.in | 4 ++++
|
||||
util/grub.d/00_header.in | 24 +++++++++++++++++++++++-
|
||||
util/grub.d/00_header.in | 25 ++++++++++++++++++++++++-
|
||||
util/grub.d/10_linux.in | 4 ++++
|
||||
util/grub.d/20_linux_xen.in | 4 ++++
|
||||
5 files changed, 37 insertions(+), 2 deletions(-)
|
||||
5 files changed, 38 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
index e32de5ef3..3b0bfe403 100644
|
||||
index 28e92515795..884e4d363ca 100644
|
||||
--- a/util/grub-mkconfig.in
|
||||
+++ b/util/grub-mkconfig.in
|
||||
@@ -239,7 +239,8 @@ export GRUB_DEFAULT \
|
||||
@@ -256,7 +256,8 @@ export GRUB_DEFAULT \
|
||||
GRUB_BADRAM \
|
||||
GRUB_OS_PROBER_SKIP_LIST \
|
||||
GRUB_DISABLE_SUBMENU \
|
||||
|
|
@ -26,10 +27,10 @@ index e32de5ef3..3b0bfe403 100644
|
|||
if test "x${grub_cfg}" != "x"; then
|
||||
rm -f "${grub_cfg}.new"
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index 9c410eae4..2fb4f4f81 100644
|
||||
index 33e1750aebb..0ba0e0e1c65 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -52,7 +52,11 @@ grub_warn ()
|
||||
@@ -49,7 +49,11 @@ grub_warn ()
|
||||
|
||||
make_system_path_relative_to_its_root ()
|
||||
{
|
||||
|
|
@ -42,7 +43,7 @@ index 9c410eae4..2fb4f4f81 100644
|
|||
|
||||
is_path_readable_by_grub ()
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 858b526c9..e2a533001 100644
|
||||
index c2d8b093762..3e1b77265db 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -27,6 +27,14 @@ export TEXTDOMAINDIR="@localedir@"
|
||||
|
|
@ -71,12 +72,13 @@ index 858b526c9..e2a533001 100644
|
|||
load_env
|
||||
fi
|
||||
EOF
|
||||
@@ -356,3 +366,15 @@ fi
|
||||
@@ -356,3 +366,16 @@ fi
|
||||
if [ "x${GRUB_BADRAM}" != "x" ] ; then
|
||||
echo "badram ${GRUB_BADRAM}"
|
||||
fi
|
||||
+
|
||||
+if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] &&
|
||||
+ [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ] &&
|
||||
+ [ "x${GRUB_FS}" = "xbtrfs" ] ; then
|
||||
+ # Note: No $snapshot_num on *read-only* rollback! (bsc#901487)
|
||||
+ cat <<EOF
|
||||
|
|
@ -88,10 +90,10 @@ index 858b526c9..e2a533001 100644
|
|||
+EOF
|
||||
+fi
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index c9bf223f2..7e78ad336 100644
|
||||
index e8ab4082f87..48ff32c1da4 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -56,10 +56,14 @@ fi
|
||||
@@ -68,10 +68,14 @@ fi
|
||||
|
||||
case x"$GRUB_FS" in
|
||||
xbtrfs)
|
||||
|
|
@ -107,10 +109,10 @@ index c9bf223f2..7e78ad336 100644
|
|||
xzfs)
|
||||
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
||||
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
||||
index 54f1ec8a2..462f8e1f8 100644
|
||||
index 98ee5bc58dc..efcded0fbb4 100644
|
||||
--- a/util/grub.d/20_linux_xen.in
|
||||
+++ b/util/grub.d/20_linux_xen.in
|
||||
@@ -63,10 +63,14 @@ fi
|
||||
@@ -75,10 +75,14 @@ fi
|
||||
|
||||
case x"$GRUB_FS" in
|
||||
xbtrfs)
|
||||
|
|
@ -125,6 +127,3 @@ index 54f1ec8a2..462f8e1f8 100644
|
|||
fi;;
|
||||
xzfs)
|
||||
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,28 +1,30 @@
|
|||
From 67ac693c0da060226ab012074ee33156e7ebf338 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Fri, 22 May 2015 11:45:25 +0000
|
||||
Subject: [PATCH 180/194] grub2-btrfs-06-subvol-mount
|
||||
Date: Tue, 9 Jul 2019 13:56:16 +0200
|
||||
Subject: [PATCH] grub2-btrfs-06-subvol-mount
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 195 +++++++++++++++++++++++++++++++++++++++-
|
||||
grub-core/osdep/linux/getroot.c | 148 +++++++++++++++++++++++++++++-
|
||||
include/grub/emu/getroot.h | 5 ++
|
||||
util/grub-install.c | 49 ++++++++++
|
||||
include/grub/emu/getroot.h | 5 ++
|
||||
4 files changed, 392 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 2c462584e..d111147e8 100644
|
||||
index d47f9ab0352..d44a1c73b8a 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -32,6 +32,7 @@
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <grub/command.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/extcmd.h>
|
||||
+#include <grub/list.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -245,6 +246,12 @@ static grub_err_t
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/diskfilter.h>
|
||||
#include <grub/safemath.h>
|
||||
@@ -266,6 +267,12 @@ static grub_err_t
|
||||
grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
||||
grub_disk_addr_t addr, void *buf, grub_size_t size,
|
||||
int recursion_depth);
|
||||
|
|
@ -35,7 +37,7 @@ index 2c462584e..d111147e8 100644
|
|||
|
||||
static grub_err_t
|
||||
read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
|
||||
@@ -887,9 +894,26 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
@@ -1302,9 +1309,26 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
grub_err_t err;
|
||||
grub_uint64_t tree = 0;
|
||||
grub_uint8_t type;
|
||||
|
|
@ -62,10 +64,10 @@ index 2c462584e..d111147e8 100644
|
|||
if (err)
|
||||
return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", path);
|
||||
|
||||
@@ -1758,11 +1782,20 @@ grub_btrfs_dir (grub_device_t device, const char *path,
|
||||
int r = 0;
|
||||
@@ -2316,11 +2340,20 @@ grub_btrfs_dir (grub_device_t device, const char *path,
|
||||
grub_uint64_t tree;
|
||||
grub_uint8_t type;
|
||||
grub_size_t est_size = 0;
|
||||
+ char *new_path = NULL;
|
||||
|
||||
if (!data)
|
||||
|
|
@ -84,7 +86,7 @@ index 2c462584e..d111147e8 100644
|
|||
if (err)
|
||||
{
|
||||
grub_btrfs_unmount (data);
|
||||
@@ -1864,11 +1897,21 @@ grub_btrfs_open (struct grub_file *file, const char *name)
|
||||
@@ -2447,11 +2480,21 @@ grub_btrfs_open (struct grub_file *file, const char *name)
|
||||
struct grub_btrfs_inode inode;
|
||||
grub_uint8_t type;
|
||||
struct grub_btrfs_key key_in;
|
||||
|
|
@ -107,7 +109,7 @@ index 2c462584e..d111147e8 100644
|
|||
if (err)
|
||||
{
|
||||
grub_btrfs_unmount (data);
|
||||
@@ -2039,6 +2082,150 @@ grub_cmd_btrfs_info (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||
@@ -2686,6 +2729,150 @@ grub_cmd_btrfs_info (grub_command_t cmd __attribute__ ((unused)), int argc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +260,7 @@ index 2c462584e..d111147e8 100644
|
|||
static grub_err_t
|
||||
get_fs_root(struct grub_btrfs_data *data, grub_uint64_t tree,
|
||||
grub_uint64_t objectid, grub_uint64_t offset,
|
||||
@@ -2245,6 +2432,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
@@ -2892,6 +3079,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
};
|
||||
|
||||
static grub_command_t cmd_info;
|
||||
|
|
@ -266,7 +268,7 @@ index 2c462584e..d111147e8 100644
|
|||
static grub_extcmd_t cmd_list_subvols;
|
||||
|
||||
static char *
|
||||
@@ -2308,6 +2496,9 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -2955,6 +3143,9 @@ GRUB_MOD_INIT (btrfs)
|
||||
cmd_info = grub_register_command("btrfs-info", grub_cmd_btrfs_info,
|
||||
"DEVICE",
|
||||
"Print BtrFS info about DEVICE.");
|
||||
|
|
@ -277,10 +279,10 @@ index 2c462584e..d111147e8 100644
|
|||
grub_cmd_btrfs_list_subvols, 0,
|
||||
"[-p|-n] [-o var] DEVICE",
|
||||
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
||||
index 5d50dd6f8..4c5a13022 100644
|
||||
index 7c29b3523b4..74a48c03026 100644
|
||||
--- a/grub-core/osdep/linux/getroot.c
|
||||
+++ b/grub-core/osdep/linux/getroot.c
|
||||
@@ -107,6 +107,14 @@ struct btrfs_ioctl_search_key
|
||||
@@ -103,6 +103,14 @@ struct btrfs_ioctl_search_key
|
||||
grub_uint32_t unused[9];
|
||||
};
|
||||
|
||||
|
|
@ -295,7 +297,7 @@ index 5d50dd6f8..4c5a13022 100644
|
|||
struct btrfs_ioctl_search_args {
|
||||
struct btrfs_ioctl_search_key key;
|
||||
grub_uint64_t buf[(4096 - sizeof(struct btrfs_ioctl_search_key))
|
||||
@@ -378,6 +386,109 @@ get_btrfs_fs_prefix (const char *mount_path)
|
||||
@@ -375,6 +383,109 @@ get_btrfs_fs_prefix (const char *mount_path)
|
||||
|
||||
int use_relative_path_on_btrfs = 0;
|
||||
|
||||
|
|
@ -405,7 +407,7 @@ index 5d50dd6f8..4c5a13022 100644
|
|||
char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
|
||||
{
|
||||
@@ -519,12 +630,15 @@ again:
|
||||
@@ -516,12 +627,15 @@ again:
|
||||
else if (grub_strcmp (entries[i].fstype, "btrfs") == 0)
|
||||
{
|
||||
ret = grub_find_root_devices_from_btrfs (dir);
|
||||
|
|
@ -424,7 +426,7 @@ index 5d50dd6f8..4c5a13022 100644
|
|||
}
|
||||
}
|
||||
else if (!retry && grub_strcmp (entries[i].fstype, "autofs") == 0)
|
||||
@@ -1150,6 +1264,34 @@ grub_util_get_grub_dev_os (const char *os_dev)
|
||||
@@ -1147,6 +1261,34 @@ grub_util_get_grub_dev_os (const char *os_dev)
|
||||
return grub_dev;
|
||||
}
|
||||
|
||||
|
|
@ -459,27 +461,11 @@ index 5d50dd6f8..4c5a13022 100644
|
|||
char *
|
||||
grub_make_system_path_relative_to_its_root_os (const char *path)
|
||||
{
|
||||
diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h
|
||||
index 73fa2d34a..9c642ae3f 100644
|
||||
--- a/include/grub/emu/getroot.h
|
||||
+++ b/include/grub/emu/getroot.h
|
||||
@@ -53,6 +53,11 @@ char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
|
||||
#endif
|
||||
|
||||
+#ifdef __linux__
|
||||
+char *
|
||||
+grub_util_get_btrfs_subvol (const char *path, char **mount_path);
|
||||
+#endif
|
||||
+
|
||||
/* Devmapper functions provided by getroot_devmapper.c. */
|
||||
void
|
||||
grub_util_pull_devmapper (const char *os_dev);
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 036fe1822..cd84a72b9 100644
|
||||
index ec3ed49674b..d3ec2570d1d 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -1534,6 +1534,55 @@ main (int argc, char *argv[])
|
||||
@@ -1615,6 +1615,55 @@ main (int argc, char *argv[])
|
||||
prefix_drive = xasprintf ("(%s)", grub_drives[0]);
|
||||
}
|
||||
|
||||
|
|
@ -535,6 +521,19 @@ index 036fe1822..cd84a72b9 100644
|
|||
char mkimage_target[200];
|
||||
const char *core_name = NULL;
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h
|
||||
index 73fa2d34abb..9c642ae3fe3 100644
|
||||
--- a/include/grub/emu/getroot.h
|
||||
+++ b/include/grub/emu/getroot.h
|
||||
@@ -53,6 +53,11 @@ char **
|
||||
grub_find_root_devices_from_mountinfo (const char *dir, char **relroot);
|
||||
#endif
|
||||
|
||||
+#ifdef __linux__
|
||||
+char *
|
||||
+grub_util_get_btrfs_subvol (const char *path, char **mount_path);
|
||||
+#endif
|
||||
+
|
||||
/* Devmapper functions provided by getroot_devmapper.c. */
|
||||
void
|
||||
grub_util_pull_devmapper (const char *os_dev);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From f8679cedff703b437171f4708d46adbfcff80a65 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Snowberg <eric.snowberg@oracle.com>
|
||||
Date: Thu, 18 May 2017 17:10:22 -0600
|
||||
Subject: [PATCH 042/194] sparc64: Don't use devspec to determine the OBP path
|
||||
|
||||
Don't use devspec to determine the OBP path on SPARC hardware. Within all
|
||||
versions of Linux on SPARC, the devspec returns one of three values:
|
||||
"none", "vnet-port", or "vdisk". Unlike on PPC, none of these values
|
||||
are useful in determining the OBP path.
|
||||
|
||||
Before this patch grub-ofpathname always returned the wrong value
|
||||
for a virtual disk. For example:
|
||||
|
||||
% grub-ofpathname /dev/vdiskc2
|
||||
vdisk/disk@2:b
|
||||
|
||||
After this patch it now returns the correct value:
|
||||
|
||||
% grub-ofpathname /dev/vdiskc2
|
||||
/virtual-devices@100/channel-devices@200/disk@2:b
|
||||
|
||||
Orabug: 24459765
|
||||
|
||||
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
grub-core/osdep/linux/ofpath.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
|
||||
index a79682a5e..dce4e59d0 100644
|
||||
--- a/grub-core/osdep/linux/ofpath.c
|
||||
+++ b/grub-core/osdep/linux/ofpath.c
|
||||
@@ -120,6 +120,8 @@ find_obppath (const char *sysfs_path_orig)
|
||||
#endif
|
||||
|
||||
fd = open(path, O_RDONLY);
|
||||
+
|
||||
+#ifndef __sparc__
|
||||
if (fd < 0 || fstat (fd, &st) < 0)
|
||||
{
|
||||
if (fd >= 0)
|
||||
@@ -127,6 +129,7 @@ find_obppath (const char *sysfs_path_orig)
|
||||
snprintf(path, path_size, "%s/devspec", sysfs_path);
|
||||
fd = open(path, O_RDONLY);
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (fd < 0 || fstat (fd, &st) < 0)
|
||||
{
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
From 734668238fcc0ef691a080839e04f33854fa133a Mon Sep 17 00:00:00 2001
|
||||
From: Eric Biggers <ebiggers@google.com>
|
||||
Date: Thu, 29 Jun 2017 13:27:49 +0000
|
||||
Subject: [PATCH 043/194] Allow GRUB to mount ext2/3/4 filesystems that have
|
||||
the encryption feature.
|
||||
|
||||
On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
|
||||
For a regular file, this means its contents are encrypted; for a
|
||||
directory, this means the filenames in its directory entries are
|
||||
encrypted; and for a symlink, this means its target is encrypted. Since
|
||||
GRUB cannot decrypt encrypted contents or filenames, just issue an error
|
||||
if it would need to do so. This is sufficient to allow unencrypted boot
|
||||
files to co-exist with encrypted files elsewhere on the filesystem.
|
||||
|
||||
(Note that encrypted regular files and symlinks will not normally be
|
||||
encountered outside an encrypted directory; however, it's possible via
|
||||
hard links, so they still need to be handled.)
|
||||
|
||||
Tested by booting from an ext4 /boot partition on which I had run
|
||||
'tune2fs -O encrypt'. I also verified that the expected error messages
|
||||
are printed when trying to access encrypted directories, files, and
|
||||
symlinks from the GRUB command line. Also ran 'sudo ./grub-fs-tester
|
||||
ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.
|
||||
|
||||
Signed-off-by: Eric Biggers <ebiggers@google.com>
|
||||
---
|
||||
grub-core/fs/ext2.c | 23 ++++++++++++++++++++++-
|
||||
tests/ext234_test.in | 1 +
|
||||
tests/util/grub-fs-tester.in | 10 ++++++++++
|
||||
3 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
|
||||
index cdce63bcc..b8ad75a0f 100644
|
||||
--- a/grub-core/fs/ext2.c
|
||||
+++ b/grub-core/fs/ext2.c
|
||||
@@ -102,6 +102,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
|
||||
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
|
||||
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
|
||||
+#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
|
||||
|
||||
/* The set of back-incompatible features this driver DOES support. Add (OR)
|
||||
* flags here as the related features are implemented into the driver. */
|
||||
@@ -109,7 +110,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
| EXT4_FEATURE_INCOMPAT_EXTENTS \
|
||||
| EXT4_FEATURE_INCOMPAT_FLEX_BG \
|
||||
| EXT2_FEATURE_INCOMPAT_META_BG \
|
||||
- | EXT4_FEATURE_INCOMPAT_64BIT)
|
||||
+ | EXT4_FEATURE_INCOMPAT_64BIT \
|
||||
+ | EXT4_FEATURE_INCOMPAT_ENCRYPT)
|
||||
/* List of rationales for the ignored "incompatible" features:
|
||||
* needs_recovery: Not really back-incompatible - was added as such to forbid
|
||||
* ext2 drivers from mounting an ext3 volume with a dirty
|
||||
@@ -138,6 +140,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
#define EXT3_JOURNAL_FLAG_DELETED 4
|
||||
#define EXT3_JOURNAL_FLAG_LAST_TAG 8
|
||||
|
||||
+#define EXT4_ENCRYPT_FLAG 0x800
|
||||
#define EXT4_EXTENTS_FLAG 0x80000
|
||||
|
||||
/* The ext2 superblock. */
|
||||
@@ -706,6 +709,12 @@ grub_ext2_read_symlink (grub_fshelp_node_t node)
|
||||
grub_ext2_read_inode (diro->data, diro->ino, &diro->inode);
|
||||
if (grub_errno)
|
||||
return 0;
|
||||
+
|
||||
+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "symlink is encrypted");
|
||||
+ return 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
symlink = grub_malloc (grub_le_to_cpu32 (diro->inode.size) + 1);
|
||||
@@ -749,6 +758,12 @@ grub_ext2_iterate_dir (grub_fshelp_node_t dir,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (diro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
|
||||
+ {
|
||||
+ grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "directory is encrypted");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
/* Search the file. */
|
||||
while (fpos < grub_le_to_cpu32 (diro->inode.size))
|
||||
{
|
||||
@@ -859,6 +874,12 @@ grub_ext2_open (struct grub_file *file, const char *name)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ if (fdiro->inode.flags & grub_cpu_to_le32_compile_time (EXT4_ENCRYPT_FLAG))
|
||||
+ {
|
||||
+ err = grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "file is encrypted");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
grub_memcpy (data->inode, &fdiro->inode, sizeof (struct grub_ext2_inode));
|
||||
grub_free (fdiro);
|
||||
|
||||
diff --git a/tests/ext234_test.in b/tests/ext234_test.in
|
||||
index 892b99cbd..4f1eb527e 100644
|
||||
--- a/tests/ext234_test.in
|
||||
+++ b/tests/ext234_test.in
|
||||
@@ -30,3 +30,4 @@ fi
|
||||
"@builddir@/grub-fs-tester" ext3
|
||||
"@builddir@/grub-fs-tester" ext4
|
||||
"@builddir@/grub-fs-tester" ext4_metabg
|
||||
+"@builddir@/grub-fs-tester" ext4_encrypt
|
||||
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
|
||||
index 88cbe7365..fd7e0f14b 100644
|
||||
--- a/tests/util/grub-fs-tester.in
|
||||
+++ b/tests/util/grub-fs-tester.in
|
||||
@@ -156,6 +156,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
|
||||
# Could go further but what's the point?
|
||||
MAXBLKSIZE=$((65536*1024))
|
||||
;;
|
||||
+ xext4_encrypt)
|
||||
+ # OS LIMITATION: Linux currently only allows the 'encrypt' feature
|
||||
+ # in combination with block_size = PAGE_SIZE (4096 bytes on x86).
|
||||
+ MINBLKSIZE=$(getconf PAGE_SIZE)
|
||||
+ MAXBLKSIZE=$MINBLKSIZE
|
||||
+ ;;
|
||||
xext*)
|
||||
MINBLKSIZE=1024
|
||||
if [ $MINBLKSIZE -lt $SECSIZE ]; then
|
||||
@@ -796,6 +802,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
|
||||
MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O meta_bg,^resize_inode -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
MOUNTFS=ext4
|
||||
;;
|
||||
+ xext4_encrypt)
|
||||
+ MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.ext4" -O encrypt -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}"
|
||||
+ MOUNTFS=ext4
|
||||
+ ;;
|
||||
xext*)
|
||||
MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;;
|
||||
xxfs)
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From f26ee91138d132c84068bc6afb362eabc5d0af13 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Borzenkov <arvidjaar@gmail.com>
|
||||
Date: Tue, 21 Jun 2016 16:44:17 +0000
|
||||
Subject: [PATCH 182/194] Fallback to old subvol name scheme to support old
|
||||
snapshot config
|
||||
Subject: [PATCH] Fallback to old subvol name scheme to support old snapshot
|
||||
config
|
||||
|
||||
Ref: bsc#953538
|
||||
---
|
||||
|
|
@ -10,13 +10,14 @@ Ref: bsc#953538
|
|||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index d111147e8..a5c000805 100644
|
||||
index d44a1c73b8a..dba86d19b1a 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -925,10 +925,40 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
@@ -1339,11 +1339,41 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path)
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
+static grub_err_t
|
||||
+lookup_root_by_name_fallback(struct grub_btrfs_data *data, const char *path)
|
||||
+{
|
||||
+ grub_err_t err;
|
||||
|
|
@ -35,7 +36,7 @@ index d111147e8..a5c000805 100644
|
|||
+ return GRUB_ERR_NONE;
|
||||
+}
|
||||
+
|
||||
+static grub_err_t
|
||||
static grub_err_t
|
||||
btrfs_handle_subvol(struct grub_btrfs_data *data __attribute__ ((unused)))
|
||||
{
|
||||
if (btrfs_default_subvol)
|
||||
|
|
@ -55,6 +56,3 @@ index d111147e8..a5c000805 100644
|
|||
|
||||
if (btrfs_default_subvolid)
|
||||
return lookup_root_by_id(data, btrfs_default_subvolid);
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
From 2fd2c751861ecc2350d3bcb81228b3e663778dd1 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Thu, 11 May 2017 08:56:57 +0000
|
||||
Subject: [PATCH 183/194] Grub not working correctly with btrfs snapshots
|
||||
(bsc#1026511)
|
||||
Subject: [PATCH] Grub not working correctly with btrfs snapshots (bsc#1026511)
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 238 insertions(+)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index a5c000805..3cd947219 100644
|
||||
index dba86d19b1a..87e4dd1a07a 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -2446,6 +2446,238 @@ out:
|
||||
@@ -3093,6 +3093,238 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -250,8 +251,8 @@ index a5c000805..3cd947219 100644
|
|||
+
|
||||
static struct grub_fs grub_btrfs_fs = {
|
||||
.name = "btrfs",
|
||||
.dir = grub_btrfs_dir,
|
||||
@@ -2464,6 +2696,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
.fs_dir = grub_btrfs_dir,
|
||||
@@ -3111,6 +3343,7 @@ static struct grub_fs grub_btrfs_fs = {
|
||||
static grub_command_t cmd_info;
|
||||
static grub_command_t cmd_mount_subvol;
|
||||
static grub_extcmd_t cmd_list_subvols;
|
||||
|
|
@ -259,7 +260,7 @@ index a5c000805..3cd947219 100644
|
|||
|
||||
static char *
|
||||
subvolid_set_env (struct grub_env_var *var __attribute__ ((unused)),
|
||||
@@ -2534,6 +2767,11 @@ GRUB_MOD_INIT (btrfs)
|
||||
@@ -3181,6 +3414,11 @@ GRUB_MOD_INIT (btrfs)
|
||||
"[-p|-n] [-o var] DEVICE",
|
||||
"Print list of BtrFS subvolumes on "
|
||||
"DEVICE.", options);
|
||||
|
|
@ -271,6 +272,3 @@ index a5c000805..3cd947219 100644
|
|||
grub_register_variable_hook ("btrfs_subvol", subvol_get_env,
|
||||
subvol_set_env);
|
||||
grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From edb37fb30bbc8a3b6bec67911c7200e4eb071127 Mon Sep 17 00:00:00 2001
|
||||
From: phcoder <phcoder@sid.debian.laptop.phnet>
|
||||
Date: Sun, 9 Jul 2017 20:58:31 +0200
|
||||
Subject: [PATCH 044/194] ehci: Fix compilation for amd64
|
||||
|
||||
---
|
||||
grub-core/bus/usb/ehci.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
|
||||
index c772e7654..7b7061f53 100644
|
||||
--- a/grub-core/bus/usb/ehci.c
|
||||
+++ b/grub-core/bus/usb/ehci.c
|
||||
@@ -504,8 +504,8 @@ grub_ehci_init_device (volatile void *regs)
|
||||
#endif
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
- (grub_addr_t) e->iobase_ehcc + caplen);
|
||||
+ "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08llxx\n",
|
||||
+ (unsigned long long) e->iobase_ehcc + caplen);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -696,8 +696,8 @@ grub_ehci_init_device (volatile void *regs)
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: OK at all\n");
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
- "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
- (grub_addr_t) regs);
|
||||
+ "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08llx\n",
|
||||
+ (unsigned long long) regs);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From ab2832aae2c1aa27d95a18c9a15ea6e5b630cca9 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 09:59:56 -0400
|
||||
Subject: [PATCH 184/194] Add grub_efi_allocate_pool() and grub_efi_free_pool()
|
||||
Subject: [PATCH] Add grub_efi_allocate_pool() and grub_efi_free_pool()
|
||||
wrappers.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
|
|
@ -10,24 +10,24 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
1 file changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
|
||||
index 91e29ce66..68326d96f 100644
|
||||
index a5cd99e5afa..8d98203a784 100644
|
||||
--- a/include/grub/efi/efi.h
|
||||
+++ b/include/grub/efi/efi.h
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <grub/dl.h>
|
||||
#include <grub/efi/api.h>
|
||||
@@ -36,6 +36,10 @@ struct linux_arch_kernel_header {
|
||||
struct grub_pe_image_header pe_image_header;
|
||||
};
|
||||
|
||||
+/* Variables. */
|
||||
+extern grub_efi_system_table_t *EXPORT_VAR(grub_efi_system_table);
|
||||
+extern grub_efi_handle_t EXPORT_VAR(grub_efi_image_handle);
|
||||
+
|
||||
/* Functions. */
|
||||
void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_efi_guid_t *protocol,
|
||||
void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_guid_t *protocol,
|
||||
void *registration);
|
||||
@@ -58,6 +62,33 @@ EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size,
|
||||
grub_efi_uintn_t *map_key,
|
||||
@@ -71,6 +75,33 @@ EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size,
|
||||
grub_efi_uintn_t *descriptor_size,
|
||||
grub_efi_uint32_t *descriptor_version);
|
||||
void grub_efi_memory_fini (void);
|
||||
+
|
||||
+static inline grub_efi_status_t
|
||||
+__attribute__((__unused__))
|
||||
|
|
@ -39,7 +39,7 @@ index 91e29ce66..68326d96f 100644
|
|||
+ grub_efi_status_t status;
|
||||
+
|
||||
+ b = grub_efi_system_table->boot_services;
|
||||
+ status = efi_call_3 (b->allocate_pool, pool_type, buffer_size, buffer);
|
||||
+ status = b->allocate_pool(pool_type, buffer_size, buffer);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
|
|
@ -51,14 +51,14 @@ index 91e29ce66..68326d96f 100644
|
|||
+ grub_efi_status_t status;
|
||||
+
|
||||
+ b = grub_efi_system_table->boot_services;
|
||||
+ status = efi_call_1 (b->free_pool, buffer);
|
||||
+ status = b->free_pool(buffer);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (grub_efi_handle_t image_handle);
|
||||
void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp);
|
||||
char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp);
|
||||
@@ -103,10 +134,7 @@ void grub_efi_init (void);
|
||||
@@ -140,10 +171,7 @@ void grub_efi_init (void);
|
||||
void grub_efi_fini (void);
|
||||
void grub_efi_set_prefix (void);
|
||||
|
||||
|
|
@ -70,6 +70,3 @@ index 91e29ce66..68326d96f 100644
|
|||
extern int EXPORT_VAR(grub_efi_is_finished);
|
||||
|
||||
struct grub_net_card;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
From d8901e3ba115d705c9c08ecedd201aca8b4867b8 Mon Sep 17 00:00:00 2001
|
||||
From: phcoder <phcoder@sid.debian.laptop.phnet>
|
||||
Date: Sun, 9 Jul 2017 20:59:15 +0200
|
||||
Subject: [PATCH 045/194] cache: Fix compilation for ppc, sparc and arm64
|
||||
|
||||
---
|
||||
include/grub/cache.h | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/grub/cache.h b/include/grub/cache.h
|
||||
index 1c98ce270..ccfa717e6 100644
|
||||
--- a/include/grub/cache.h
|
||||
+++ b/include/grub/cache.h
|
||||
@@ -34,7 +34,9 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef GRUB_MACHINE_EMU
|
||||
-#if defined (__i386__) || defined (__x86_64__)
|
||||
+#if defined (__aarch64__) || defined (__powerpc__) || defined (__sparc__)
|
||||
+
|
||||
+#elif defined (__i386__) || defined (__x86_64__)
|
||||
static inline void
|
||||
grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)),
|
||||
grub_size_t len __attribute__ ((unused)))
|
||||
--
|
||||
2.13.5
|
||||
|
||||
36
0046-Use-grub_efi_.-memory-helpers-where-reasonable.patch
Normal file
36
0046-Use-grub_efi_.-memory-helpers-where-reasonable.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 10:06:38 -0400
|
||||
Subject: [PATCH] Use grub_efi_...() memory helpers where reasonable.
|
||||
|
||||
This uses grub_efi_allocate_pool(), grub_efi_free_pool(), and
|
||||
grub_efi_free_pages() instead of open-coded efi_call_N() calls, so we
|
||||
get more reasonable type checking.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/loader/efi/chainloader.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
||||
index 1de98f78313..2036924504b 100644
|
||||
--- a/grub-core/loader/efi/chainloader.c
|
||||
+++ b/grub-core/loader/efi/chainloader.c
|
||||
@@ -95,7 +95,7 @@ grub_chainloader_boot (void *context)
|
||||
}
|
||||
|
||||
if (exit_data)
|
||||
- b->free_pool (exit_data);
|
||||
+ grub_efi_free_pool (exit_data);
|
||||
|
||||
grub_loader_unset ();
|
||||
|
||||
@@ -419,7 +419,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
||||
grub_free (file_path);
|
||||
|
||||
if (address)
|
||||
- b->free_pages (address, pages);
|
||||
+ grub_efi_free_pages (address, pages);
|
||||
|
||||
if (image_handle != NULL)
|
||||
b->unload_image (image_handle);
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 284afab081ef7ed7db2c59151853aa3c92d988f2 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Sun, 9 Jul 2017 21:31:19 +0200
|
||||
Subject: [PATCH 046/194] ehci: Fix compilation on i386
|
||||
|
||||
---
|
||||
grub-core/bus/usb/ehci.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
|
||||
index 7b7061f53..d966fc210 100644
|
||||
--- a/grub-core/bus/usb/ehci.c
|
||||
+++ b/grub-core/bus/usb/ehci.c
|
||||
@@ -505,7 +505,7 @@ grub_ehci_init_device (volatile void *regs)
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08llxx\n",
|
||||
- (unsigned long long) e->iobase_ehcc + caplen);
|
||||
+ (unsigned long long) (grub_addr_t) e->iobase_ehcc + caplen);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -697,7 +697,7 @@ grub_ehci_init_device (volatile void *regs)
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08llx\n",
|
||||
- (unsigned long long) regs);
|
||||
+ (unsigned long long) (grub_addr_t) regs);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
--
|
||||
2.13.5
|
||||
|
||||
33
0047-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch
Normal file
33
0047-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 10:07:50 -0400
|
||||
Subject: [PATCH] Add PRIxGRUB_EFI_STATUS and use it.
|
||||
|
||||
This avoids syntax checkers getting confused about if it's llx or lx.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
include/grub/efi/api.h | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
|
||||
index c1b869db520..daa9268fdaa 100644
|
||||
--- a/include/grub/efi/api.h
|
||||
+++ b/include/grub/efi/api.h
|
||||
@@ -577,7 +577,16 @@ typedef grub_uint64_t grub_efi_uint64_t;
|
||||
typedef grub_uint8_t grub_efi_char8_t;
|
||||
typedef grub_uint16_t grub_efi_char16_t;
|
||||
|
||||
+
|
||||
typedef grub_efi_uintn_t grub_efi_status_t;
|
||||
+/* Make grub_efi_status_t reasonably printable. */
|
||||
+#if GRUB_CPU_SIZEOF_VOID_P == 8
|
||||
+#define PRIxGRUB_EFI_STATUS "lx"
|
||||
+#define PRIdGRUB_EFI_STATUS "ld"
|
||||
+#else
|
||||
+#define PRIxGRUB_EFI_STATUS "llx"
|
||||
+#define PRIdGRUB_EFI_STATUS "lld"
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* On x86, the EFI calling convention may deviate from the local one, so
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From a0fe0c26aa8a1c0ad66d9527611bd726b849c623 Mon Sep 17 00:00:00 2001
|
||||
From: AppChecker <appchecker>
|
||||
Date: Sun, 9 Jul 2017 21:57:35 +0200
|
||||
Subject: [PATCH 047/194] crypto: Fix use after free.
|
||||
|
||||
Reported by: AppChecker
|
||||
Transformed to patch by: Satish Govindarajan
|
||||
---
|
||||
grub-core/normal/crypto.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/crypto.c b/grub-core/normal/crypto.c
|
||||
index 2bfd67c8e..e6d345f33 100644
|
||||
--- a/grub-core/normal/crypto.c
|
||||
+++ b/grub-core/normal/crypto.c
|
||||
@@ -147,8 +147,8 @@ read_crypto_list (const char *prefix)
|
||||
if (! cur->modname)
|
||||
{
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
- grub_free (cur);
|
||||
grub_free (cur->name);
|
||||
+ grub_free (cur);
|
||||
continue;
|
||||
}
|
||||
cur->next = crypto_specs;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From cb8b7e4e36bf32dccbbba8252aa44ad3ada4fbc1 Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Sun, 9 Jul 2017 21:48:37 +0000
|
||||
Subject: [PATCH 048/194] arm-efi: Fix compilation
|
||||
|
||||
---
|
||||
grub-core/loader/arm/linux.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
|
||||
index 260cbf068..e64c79a95 100644
|
||||
--- a/grub-core/loader/arm/linux.c
|
||||
+++ b/grub-core/loader/arm/linux.c
|
||||
@@ -252,12 +252,12 @@ linux_boot (void)
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
grub_size_t size;
|
||||
if (fdt_valid)
|
||||
- size = grub_fdt_get_totalsize (fdt_addr);
|
||||
+ size = grub_fdt_get_totalsize (current_fdt);
|
||||
else
|
||||
- size = 4 * get_atag_size (atag_orig);
|
||||
+ size = 4 * get_atag_size (current_fdt);
|
||||
size += grub_strlen (linux_args) + 256;
|
||||
target_fdt = grub_efi_allocate_loader_memory (LINUX_FDT_PHYS_OFFSET, size);
|
||||
- if (!fdt_addr)
|
||||
+ if (!target_fdt)
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
#else
|
||||
target_fdt = (void *) LINUX_FDT_ADDRESS;
|
||||
@@ -522,7 +522,7 @@ GRUB_MOD_INIT (linux)
|
||||
/* TRANSLATORS: DTB stands for device tree blob. */
|
||||
0, N_("Load DTB file."));
|
||||
my_mod = mod;
|
||||
- current_fdt = grub_arm_firmware_get_boot_data ();
|
||||
+ current_fdt = (const void *) grub_arm_firmware_get_boot_data ();
|
||||
machine_type = grub_arm_firmware_get_machine_type ();
|
||||
}
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
From 5f6a3933dfc6e3fff9aef089eea365f40e3c830c Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 12:44:59 -0400
|
||||
Subject: [PATCH 189/194] don't use int for efi status
|
||||
Subject: [PATCH] don't use int for efi status
|
||||
|
||||
---
|
||||
grub-core/kern/efi/efi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
||||
index 1f3ac5e1d..2b60a6e27 100644
|
||||
index 885d7c6420e..2bb8a0e7a38 100644
|
||||
--- a/grub-core/kern/efi/efi.c
|
||||
+++ b/grub-core/kern/efi/efi.c
|
||||
@@ -157,7 +157,7 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle)
|
||||
@@ -177,7 +177,7 @@ grub_reboot (void)
|
||||
void
|
||||
grub_exit (int retval)
|
||||
{
|
||||
|
|
@ -20,6 +20,3 @@ index 1f3ac5e1d..2b60a6e27 100644
|
|||
|
||||
if (retval == 0)
|
||||
rc = GRUB_EFI_SUCCESS;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 68d54b55f49249c5e0517bf189f0f3df7ee6a36f Mon Sep 17 00:00:00 2001
|
||||
From: Vladimir Serbinenko <phcoder@gmail.com>
|
||||
Date: Mon, 10 Jul 2017 01:34:22 +0000
|
||||
Subject: [PATCH 049/194] fdt: silence clang warning.
|
||||
|
||||
---
|
||||
grub-core/lib/fdt.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/lib/fdt.c b/grub-core/lib/fdt.c
|
||||
index bdc630244..2705f2629 100644
|
||||
--- a/grub-core/lib/fdt.c
|
||||
+++ b/grub-core/lib/fdt.c
|
||||
@@ -309,7 +309,8 @@ advance_token (const void *fdt, const grub_uint32_t *token, const grub_uint32_t
|
||||
continue;
|
||||
}
|
||||
char *ptr;
|
||||
- for (ptr = (char *) (token + 1); *ptr && ptr < (char *) end; ptr++);
|
||||
+ for (ptr = (char *) (token + 1); *ptr && ptr < (char *) end; ptr++)
|
||||
+ ;
|
||||
if (ptr >= (char *) end)
|
||||
return 0;
|
||||
return token;
|
||||
--
|
||||
2.13.5
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
From 25ef0f18c77e5a5080f04e34a84aa801f21fb893 Mon Sep 17 00:00:00 2001
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 26 Jun 2017 12:46:23 -0400
|
||||
Subject: [PATCH 190/194] make GRUB_MOD_INIT() declare its function prototypes.
|
||||
Subject: [PATCH] make GRUB_MOD_INIT() declare its function prototypes.
|
||||
|
||||
---
|
||||
include/grub/dl.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/grub/dl.h b/include/grub/dl.h
|
||||
index 2bca56ce0..b1ed3c333 100644
|
||||
index cd1f46c8bad..f2bf50eb98d 100644
|
||||
--- a/include/grub/dl.h
|
||||
+++ b/include/grub/dl.h
|
||||
@@ -54,6 +54,7 @@ grub_mod_fini (void)
|
||||
|
|
@ -27,6 +27,3 @@ index 2bca56ce0..b1ed3c333 100644
|
|||
void \
|
||||
grub_##name##_fini (void) { grub_mod_fini (); } \
|
||||
static void \
|
||||
--
|
||||
2.13.5
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue