Commit ef4aea10 authored by Steve McIntyre's avatar Steve McIntyre Committed by Colin Watson

Add an extra di-specific version of the UEFI netboot image

Identical to the normal netboot image, but With a different baked-in
prefix value ("$vendor-installer/$ARCH/grub" instead of "/grub").

Helps to fix #928750, making d-i consistent in terms of PXE setup.
parent ca0e5508
...@@ -20,16 +20,17 @@ set -e ...@@ -20,16 +20,17 @@ set -e
# Make EFI boot images for signing. # Make EFI boot images for signing.
if [ $# -lt 5 ]; then if [ $# -lt 6 ]; then
echo "usage: $0 GRUB-MKIMAGE GRUB-CORE OUTPUT-DIRECTORY PLATFORM EFI-NAME [EFI-VENDOR]" echo "usage: $0 GRUB-MKIMAGE GRUB-CORE OUTPUT-DIRECTORY DEB-ARCH PLATFORM EFI-NAME [EFI-VENDOR]"
fi fi
grub_mkimage="$1" grub_mkimage="$1"
grub_core="$2" grub_core="$2"
outdir="$3" outdir="$3"
platform="$4" deb_arch="$4"
efi_name="$5" platform="$5"
efi_vendor="${6:-$(dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')}" efi_name="$6"
efi_vendor="${7:-$(dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')}"
# mkfs.msdos may not be on the default PATH. # mkfs.msdos may not be on the default PATH.
export PATH="$PATH:/sbin:/usr/sbin" export PATH="$PATH:/sbin:/usr/sbin"
...@@ -184,15 +185,29 @@ NET_MODULES="$CD_MODULES ...@@ -184,15 +185,29 @@ NET_MODULES="$CD_MODULES
tftp tftp
" "
# CD boot image
"$grub_mkimage" -O "$platform" -o "$outdir/gcd$efi_name.efi" \ "$grub_mkimage" -O "$platform" -o "$outdir/gcd$efi_name.efi" \
-d "$grub_core" \ -d "$grub_core" \
-c "$workdir/grub-bootstrap.cfg" -m "$workdir/memdisk.fat" \ -c "$workdir/grub-bootstrap.cfg" -m "$workdir/memdisk.fat" \
-p /boot/grub \ -p /boot/grub \
$CD_MODULES $CD_MODULES
# Normal disk boot image
"$grub_mkimage" -O "$platform" -o "$outdir/grub$efi_name.efi" \ "$grub_mkimage" -O "$platform" -o "$outdir/grub$efi_name.efi" \
-d "$grub_core" -p "/EFI/$efi_vendor" $GRUB_MODULES -d "$grub_core" -p "/EFI/$efi_vendor" $GRUB_MODULES
# Normal network boot image
"$grub_mkimage" -O "$platform" -o "$outdir/grubnet$efi_name.efi" \ "$grub_mkimage" -O "$platform" -o "$outdir/grubnet$efi_name.efi" \
-d "$grub_core" -c "$workdir/grub-bootstrap.cfg" \ -d "$grub_core" -c "$workdir/grub-bootstrap.cfg" \
-m "$workdir/memdisk-netboot.fat" -p /grub $NET_MODULES -m "$workdir/memdisk-netboot.fat" \
-p /grub $NET_MODULES
# Special network boot image for d-i to use. Just the same as the
# normal network boot image, but with a different value baked in for
# the prefix setting
"$grub_mkimage" -O "$platform" -o "$outdir/grubnet$efi_name-installer.efi" \
-d "$grub_core" -c "$workdir/grub-bootstrap.cfg" \
-m "$workdir/memdisk-netboot.fat" \
-p "${efi_vendor}-installer/$deb_arch/grub" $NET_MODULES
exit 0 exit 0
...@@ -7,6 +7,8 @@ grub2 (2.02+dfsg1-19) UNRELEASED; urgency=medium ...@@ -7,6 +7,8 @@ grub2 (2.02+dfsg1-19) UNRELEASED; urgency=medium
* Add the ntfs module to signed UEFI images. Closes: #923855 * Add the ntfs module to signed UEFI images. Closes: #923855
* Add the cpuid module to signed UEFI images. Closes: #928628 * Add the cpuid module to signed UEFI images. Closes: #928628
* Add the play module to signed UEFI images. Closes: #930290 * Add the play module to signed UEFI images. Closes: #930290
* Add an extra di-specific version of the UEFI netboot image with a
different baked-in prefix value. Helps to fix #928750.
-- Colin Watson <cjwatson@debian.org> Tue, 14 May 2019 10:18:27 +0100 -- Colin Watson <cjwatson@debian.org> Tue, 14 May 2019 10:18:27 +0100
......
...@@ -219,7 +219,7 @@ debian/stamps/build-grub-efi-ia32 debian/stamps/build-grub-efi-amd64 debian/stam ...@@ -219,7 +219,7 @@ debian/stamps/build-grub-efi-ia32 debian/stamps/build-grub-efi-amd64 debian/stam
obj/grub-$(COMMON_PLATFORM)/grub-mkimage \ obj/grub-$(COMMON_PLATFORM)/grub-mkimage \
obj/$(package)/grub-core \ obj/$(package)/grub-core \
obj/monolithic/$(package) \ obj/monolithic/$(package) \
$(SB_PLATFORM) $(SB_EFI_NAME) $(SB_EFI_VENDOR) $(DEB_HOST_ARCH) $(SB_PLATFORM) $(SB_EFI_NAME) $(SB_EFI_VENDOR)
touch $@ touch $@
debian/stamps/build-grub-xen-host-i386: PVBOOT_ARCH := i386 debian/stamps/build-grub-xen-host-i386: PVBOOT_ARCH := i386
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"files": [ "files": [
{"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/gcd@efi@.efi"}, {"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/gcd@efi@.efi"},
{"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/grubnet@efi@.efi"}, {"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/grubnet@efi@.efi"},
{"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/grubnet@efi@-installer.efi"},
{"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/grub@efi@.efi"} {"sig_type": "efi", "file": "usr/lib/grub/@efi_platform@/monolithic/grub@efi@.efi"}
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment