source: chapter08/grub.xml@ 0d4f1b4

xry111/arm64 xry111/arm64-12.0
Last change on this file since 0d4f1b4 was 0d4f1b4, checked in by Xi Ruoyao <xry111@…>, 14 months ago

arm64: grub: Apply an upstream change to support generic zboot

  • Property mode set to 100644
File size: 15.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-grub" role="wrap">
9 <?dbhtml filename="grub.html"?>
10
11 <sect1info condition="script">
12 <productname>grub</productname>
13 <productnumber>&grub-version;</productnumber>
14 <address>&grub-url;</address>
15 </sect1info>
16
17 <title>GRUB-&grub-version;</title>
18
19 <indexterm zone="ch-system-grub">
20 <primary sortas="a-Grub">GRUB</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The GRUB package contains the GRand Unified Bootloader.</para>
27
28 <segmentedlist>
29 <segtitle>&buildtime;</segtitle>
30 <segtitle>&diskspace;</segtitle>
31
32 <seglistitem>
33 <seg>&grub-fin-sbu;</seg>
34 <seg>&grub-fin-du;</seg>
35 </seglistitem>
36 </segmentedlist>
37
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of GRUB</title>
42
43 <note>
44 <para>
45 On ARM64 systems, the following instruction builds GRUB for UEFI.
46 But the built GRUB lacks some features because a few optional
47 dependencies of GRUB for UEFI is beyond the scope of LFS and not
48 installed yet.
49 </para>
50 <para>
51 If your system firmware does not support UEFI, you need to skip the
52 content of this page and try to figure out how to boot your system.
53 </para>
54 <para>
55 If your system has UEFI support and you wish to boot LFS with UEFI,
56 you can skip this package in LFS,
57 and install GRUB with UEFI support (and its dependencies) by following
58 the instructions on
59 <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>
60 (with <parameter>--target=x86_64</parameter> removed).
61 </para>
62 </note>
63
64 <warning>
65 <para>Unset any environment variables which may affect the build:</para>
66
67 <screen><userinput remap='pre'>unset {C,CPP,CXX,LD}FLAGS</userinput></screen>
68
69 <para>Don't try <quote>tuning</quote> this package with custom
70 compilation flags. This package is a bootloader. The low-level
71 operations in the source code may be broken by
72 aggressive optimization.</para>
73 </warning>
74
75 <para>
76 Fix an issue causing <command>grub-install</command> to fail when the
77 <filename class='directory'>/boot</filename> partition (or the root
78 partition if <filename class='directory'>/boot</filename> is not a
79 separate partition) is created by e2fsprogs-1.47.0 or later:
80 </para>
81
82<screen><userinput remap='pre'>patch -Np1 -i ../grub-&grub-version;-upstream_fixes-1.patch</userinput></screen>
83
84 <!--https://git.savannah.gnu.org/cgit/grub.git/commit/?id=69edb312 -->
85 <para>Apply an upstream change so GRUB will be capable to load
86 compressed kernel image on an ARM64 system:</para>
87
88<screen><userinput remap='pre'>sed '/ARMXX_MAGIC/,+2d' -i grub-core/loader/arm64/linux.c</userinput></screen>
89
90 <para>Prepare GRUB for compilation:</para>
91
92<screen><userinput remap="configure">./configure --prefix=/usr \
93 --sysconfdir=/etc \
94 --disable-efiemu \
95 --disable-werror</userinput></screen>
96
97 <variablelist>
98 <title>The meaning of the new configure options:</title>
99
100 <varlistentry>
101 <term><parameter>--disable-werror</parameter></term>
102 <listitem>
103 <para>This allows the build to complete with warnings introduced
104 by more recent versions of Flex.</para>
105 </listitem>
106 </varlistentry>
107
108 <varlistentry>
109 <term><parameter>--disable-efiemu</parameter></term>
110 <listitem>
111 <para>This option minimizes what is built by disabling a feature and
112 eliminating some test programs not needed for LFS.</para>
113 </listitem>
114 </varlistentry>
115
116 </variablelist>
117
118 <para>Compile the package:</para>
119
120<screen><userinput remap="make">make</userinput></screen>
121
122 <para>The test suite for this packages is not recommended. Most of
123 the tests depend on packages that are not available in the limited
124 LFS environment. To run the tests anyway, run <command>make check</command>.</para>
125
126 <para>Install the package:</para>
127
128<screen><userinput remap="install">make install
129mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
130
131 <para>Making your LFS system bootable with GRUB will be discussed in
132 <xref linkend="ch-bootable-grub"/>.</para>
133
134 </sect2>
135
136 <sect2 id="contents-gRUB" role="content">
137 <title>Contents of GRUB</title>
138
139 <segmentedlist>
140 <segtitle>Installed programs</segtitle>
141 <segtitle>Installed directories</segtitle>
142
143 <seglistitem>
144
145 <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest,
146 grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless,
147 grub-menulst2cfg, grub-mkconfig,
148 grub-mkimage, grub-mklayout, grub-mknetdir,
149 grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone,
150 grub-ofpathname, grub-probe, grub-reboot, grub-render-label,
151 grub-script-check,
152 grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg>
153
154 <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install
155 is first run)</seg>
156 </seglistitem>
157 </segmentedlist>
158
159 <variablelist>
160 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
161 <?dbfo list-presentation="list"?>
162 <?dbhtml list-presentation="table"?>
163
164 <varlistentry id="grub-bios-setup">
165 <term><command>grub-bios-setup</command></term>
166 <listitem>
167 <para>Is a helper program for <command>grub-install</command></para>
168 <indexterm zone="ch-system-grub grub-bios-setup">
169 <primary sortas="b-grub-bios-setup">grub-bios-setup</primary>
170 </indexterm>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry id="grub-editenv">
175 <term><command>grub-editenv</command></term>
176 <listitem>
177 <para>Is a tool to edit the environment block</para>
178 <indexterm zone="ch-system-grub grub-editenv">
179 <primary sortas="b-grub-editenv">grub-editenv</primary>
180 </indexterm>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry id="grub-file">
185 <term><command>grub-file</command></term>
186 <listitem>
187 <para>Checks to see if the given file is of the specified type</para>
188 <indexterm zone="ch-system-grub grub-file">
189 <primary sortas="b-grub-file">grub-file</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="grub-fstest">
195 <term><command>grub-fstest</command></term>
196 <listitem>
197 <para>Is a tool to debug the filesystem driver</para>
198 <indexterm zone="ch-system-grub grub-fstest">
199 <primary sortas="b-grub-fstest">grub-fstest</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="grub-glue-efi">
205 <term><command>grub-glue-efi</command></term>
206 <listitem>
207 <para>Glues 32-bit and 64-bit binaries into a single file (for Apple machines)</para>
208 <indexterm zone="ch-system-grub grub-glue-efi">
209 <primary sortas="b-grub-glue-efi">grub-glue-efi</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry id="grub-install">
215 <term><command>grub-install</command></term>
216 <listitem>
217 <para>Installs GRUB on your drive</para>
218 <indexterm zone="ch-system-grub grub-install">
219 <primary sortas="b-grub-install">grub-install</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="grub-kbdcomp">
225 <term><command>grub-kbdcomp</command></term>
226 <listitem>
227 <para>Is a script that converts an xkb layout into one recognized by
228 GRUB</para>
229 <indexterm zone="ch-system-grub grub-kbdcomp">
230 <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="grub-macbless">
236 <term><command>grub-macbless</command></term>
237 <listitem>
238 <para>Is the Mac-style bless for HFS or HFS+ file systems (<command>bless</command>
239 is peculiar to Apple machines; it makes a device bootable)</para>
240 <indexterm zone="ch-system-grub grub-macbless">
241 <primary sortas="b-grub-macbless">grub-macbless</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="grub-menulst2cfg">
247 <term><command>grub-menulst2cfg</command></term>
248 <listitem>
249 <para>Converts a GRUB Legacy <filename>menu.lst</filename>
250 into a <filename>grub.cfg</filename> for use with GRUB 2</para>
251 <indexterm zone="ch-system-grub grub-menulst2cfg">
252 <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
253 </indexterm>
254 </listitem>
255 </varlistentry>
256
257 <varlistentry id="grub-mkconfig">
258 <term><command>grub-mkconfig</command></term>
259 <listitem>
260 <para>Generates a <filename>grub.cfg</filename> file</para>
261 <indexterm zone="ch-system-grub grub-mkconfig">
262 <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="grub-mkimage">
268 <term><command>grub-mkimage</command></term>
269 <listitem>
270 <para>Makes a bootable image of GRUB</para>
271 <indexterm zone="ch-system-grub grub-mkimage">
272 <primary sortas="b-grub-mkimage">grub-mkimage</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="grub-mklayout">
278 <term><command>grub-mklayout</command></term>
279 <listitem>
280 <para>Generates a GRUB keyboard layout file</para>
281 <indexterm zone="ch-system-grub grub-mklayout">
282 <primary sortas="b-grub-mklayout">grub-mklayout</primary>
283 </indexterm>
284 </listitem>
285 </varlistentry>
286
287 <varlistentry id="grub-mknetdir">
288 <term><command>grub-mknetdir</command></term>
289 <listitem>
290 <para>Prepares a GRUB netboot directory</para>
291 <indexterm zone="ch-system-grub grub-mknetdir">
292 <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="grub-mkpasswd-pbkdf2">
298 <term><command>grub-mkpasswd-pbkdf2</command></term>
299 <listitem>
300 <para>Generates an encrypted PBKDF2 password for use in the boot
301 menu</para>
302 <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
303 <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="grub-mkrelpath">
309 <term><command>grub-mkrelpath</command></term>
310 <listitem>
311 <para>Makes a system pathname relative to its root</para>
312 <indexterm zone="ch-system-grub grub-mkrelpath">
313 <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="grub-mkrescue">
319 <term><command>grub-mkrescue</command></term>
320 <listitem>
321 <para>Makes a bootable image of GRUB suitable for a floppy disk,
322 CDROM/DVD, or a USB drive</para>
323 <indexterm zone="ch-system-grub grub-mkrescue">
324 <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="grub-mkstandalone">
330 <term><command>grub-mkstandalone</command></term>
331 <listitem>
332 <para>Generates a standalone image</para>
333 <indexterm zone="ch-system-grub grub-mkstandalone">
334 <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="grub-ofpathname">
340 <term><command>grub-ofpathname</command></term>
341 <listitem>
342 <para>Is a helper program that prints the path to a GRUB device</para>
343 <indexterm zone="ch-system-grub grub-ofpathname">
344 <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="grub-probe">
350 <term><command>grub-probe</command></term>
351 <listitem>
352 <para>Probes device information for a given path or device</para>
353 <indexterm zone="ch-system-grub grub-probe">
354 <primary sortas="b-grub-probe">grub-probe</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="grub-reboot">
360 <term><command>grub-reboot</command></term>
361 <listitem>
362 <para>Sets the default boot entry for GRUB for the next boot only</para>
363 <indexterm zone="ch-system-grub grub-reboot">
364 <primary sortas="b-grub-reboot">grub-reboot</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="grub-render-label">
370 <term><command>grub-render-label</command></term>
371 <listitem>
372 <para>Renders Apple .disk_label for Apple Macs</para>
373 <indexterm zone="ch-system-grub grub-render-label">
374 <primary sortas="b-grub-render-label">grub-render-label</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="grub-script-check">
380 <term><command>grub-script-check</command></term>
381 <listitem>
382 <para>Checks the GRUB configuration script for syntax errors</para>
383 <indexterm zone="ch-system-grub grub-script-check">
384 <primary sortas="b-grub-script-check">grub-script-check</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <varlistentry id="grub-set-default">
390 <term><command>grub-set-default</command></term>
391 <listitem>
392 <para>Sets the default boot entry for GRUB</para>
393 <indexterm zone="ch-system-grub grub-set-default">
394 <primary sortas="b-grub-set-default">grub-set-default</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="grub-sparc64-setup">
400 <term><command>grub-sparc64-setup</command></term>
401 <listitem>
402 <para>Is a helper program for grub-setup</para>
403 <indexterm zone="ch-system-grub grub-sparc64-setup">
404 <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="grub-syslinux2cfg">
410 <term><command>grub-syslinux2cfg</command></term>
411 <listitem>
412 <para>Transforms a syslinux config file into grub.cfg format</para>
413 <indexterm zone="ch-system-grub grub-syslinux2cfg">
414 <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 </variablelist>
420
421 </sect2>
422
423</sect1>
Note: See TracBrowser for help on using the repository browser.