Commit e27fc2aa authored by Colin Watson's avatar Colin Watson

Merge branch 'extra-di-netboot-image' into 'master'

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

See merge request !9
parents ca0e5508 ef4aea10
......@@ -20,16 +20,17 @@ set -e
# Make EFI boot images for signing.
if [ $# -lt 5 ]; then
echo "usage: $0 GRUB-MKIMAGE GRUB-CORE OUTPUT-DIRECTORY PLATFORM EFI-NAME [EFI-VENDOR]"
if [ $# -lt 6 ]; then
echo "usage: $0 GRUB-MKIMAGE GRUB-CORE OUTPUT-DIRECTORY DEB-ARCH PLATFORM EFI-NAME [EFI-VENDOR]"
fi
grub_mkimage="$1"
grub_core="$2"
outdir="$3"
platform="$4"
efi_name="$5"
efi_vendor="${6:-$(dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')}"
deb_arch="$4"
platform="$5"
efi_name="$6"
efi_vendor="${7:-$(dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')}"
# mkfs.msdos may not be on the default PATH.
export PATH="$PATH:/sbin:/usr/sbin"
......@@ -184,15 +185,29 @@ NET_MODULES="$CD_MODULES
tftp
"
# CD boot image
"$grub_mkimage" -O "$platform" -o "$outdir/gcd$efi_name.efi" \
-d "$grub_core" \
-c "$workdir/grub-bootstrap.cfg" -m "$workdir/memdisk.fat" \
-p /boot/grub \
$CD_MODULES
# Normal disk boot image
"$grub_mkimage" -O "$platform" -o "$outdir/grub$efi_name.efi" \
-d "$grub_core" -p "/EFI/$efi_vendor" $GRUB_MODULES
# Normal network boot image
"$grub_mkimage" -O "$platform" -o "$outdir/grubnet$efi_name.efi" \
-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
......@@ -7,6 +7,8 @@ grub2 (2.02+dfsg1-19) UNRELEASED; urgency=medium
* Add the ntfs module to signed UEFI images. Closes: #923855
* Add the cpuid module to signed UEFI images. Closes: #928628
* 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
......
......@@ -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/$(package)/grub-core \
obj/monolithic/$(package) \
$(SB_PLATFORM) $(SB_EFI_NAME) $(SB_EFI_VENDOR)
$(DEB_HOST_ARCH) $(SB_PLATFORM) $(SB_EFI_NAME) $(SB_EFI_VENDOR)
touch $@
debian/stamps/build-grub-xen-host-i386: PVBOOT_ARCH := i386
......
......@@ -6,6 +6,7 @@
"files": [
{"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@-installer.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