Gentoo Archives: gentoo-commits

From: Richard Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/
Date: Tue, 03 Jul 2018 20:35:11
Message-Id: 1530650005.f21f16418c91c5b5601aa6c7927f47c57f8d2d66.zerochaos@gentoo
1 commit: f21f16418c91c5b5601aa6c7927f47c57f8d2d66
2 Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 3 20:33:25 2018 +0000
4 Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 3 20:33:25 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f21f1641
7
8 always support both uefi modes
9
10 targets/support/functions.sh | 35 ++++++++++++++++++-----------------
11 1 file changed, 18 insertions(+), 17 deletions(-)
12
13 diff --git a/targets/support/functions.sh b/targets/support/functions.sh
14 index e8f3e401..d4834a2d 100755
15 --- a/targets/support/functions.sh
16 +++ b/targets/support/functions.sh
17 @@ -107,23 +107,24 @@ create_bootloader() {
18 echo "configfile /grub/grub.cfg" >> grub-stub.cfg
19
20 cp /usr/share/grub/unicode.pf2 grub/fonts/
21 - if [ "${clst_buildarch}" = "x86" ] || [ "${clst_buildarch}" = "amd64" ]; then
22 - # some 64 bit machines have 32 bit UEFI, so we take the safest path
23 - mkdir -p grub/i386-efi
24 - cp /usr/lib/grub/i386-efi/*.lst /usr/lib/grub/i386-efi/*.img /usr/lib/grub/i386-efi/*.mod grub/i386-efi/
25 - ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O i386-efi -o ./boot/EFI/BOOT/grubia32.efi --themes= -v || die "Failed to make grubia32.efi"
26 - #secure boot shim
27 - cp /usr/share/shim/BOOTIA32.EFI boot/EFI/BOOT/
28 - cp /usr/share/shim/mmia32.efi boot/EFI/BOOT/
29 - fi
30 - if [ "${clst_buildarch}" = "amd64" ]; then
31 - mkdir -p grub/x86_64-efi
32 - cp /usr/lib/grub/x86_64-efi/*.lst /usr/lib/grub/x86_64-efi/*.img /usr/lib/grub/x86_64-efi/*.mod grub/x86_64-efi/
33 - ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O x86_64-efi -o ./boot/EFI/BOOT/grubx64.efi --themes= -v || die "Failed to make grubx64.efi"
34 - #secure boot shim
35 - cp /usr/share/shim/BOOTX64.EFI boot/EFI/BOOT/
36 - cp /usr/share/shim/mmx64.efi boot/EFI/BOOT/
37 - fi
38 +
39 + # some 64 bit machines have 32 bit UEFI, and you might want to boot 32 bit on a 64 bit machine, so we take the safest path and include both
40 + # set up 32 bit uefi
41 + mkdir -p grub/i386-efi
42 + cp /usr/lib/grub/i386-efi/*.lst /usr/lib/grub/i386-efi/*.img /usr/lib/grub/i386-efi/*.mod grub/i386-efi/
43 + ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O i386-efi -o ./boot/EFI/BOOT/grubia32.efi --themes= -v || die "Failed to make grubia32.efi"
44 + #secure boot shim
45 + cp /usr/share/shim/BOOTIA32.EFI boot/EFI/BOOT/
46 + cp /usr/share/shim/mmia32.efi boot/EFI/BOOT/
47 +
48 + #set up 64 bit uefi
49 + mkdir -p grub/x86_64-efi
50 + cp /usr/lib/grub/x86_64-efi/*.lst /usr/lib/grub/x86_64-efi/*.img /usr/lib/grub/x86_64-efi/*.mod grub/x86_64-efi/
51 + ${grubmkstndaln} /boot/grub/grub.cfg=./grub-stub.cfg --compress=xz -O x86_64-efi -o ./boot/EFI/BOOT/grubx64.efi --themes= -v || die "Failed to make grubx64.efi"
52 + #secure boot shim
53 + cp /usr/share/shim/BOOTX64.EFI boot/EFI/BOOT/
54 + cp /usr/share/shim/mmx64.efi boot/EFI/BOOT/
55 +
56 rm grub-stub.cfg || echo "Failed to remove grub-stub.cfg, but this hurts nothing"
57 popd || die "Failed to leave livecd dir"
58 }