Commit 03f918bb authored by Steve McIntyre's avatar Steve McIntyre

Use the new installer-specific grub netboot binaries

Closes: #928750

Update copyright info
Add more comments to describe what's going on
parent 4c4c152b
......@@ -2,6 +2,7 @@
set -e
# Copyright (C) 2010, 2011 Canonical Ltd.
# (C) 2019 Steve McIntyre <[email protected]>
# Author: Colin Watson <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
......@@ -62,20 +63,25 @@ mkdir -p "$outdir/boot/grub/$platform"
echo "source /boot/grub/grub.cfg") >"$outdir/boot/grub/$platform/grub.cfg"
if [ $efi_signed = y ]; then
# Just copy existing binaries into place
# First, the binaries we use for disc or CD boot
echo "$0: Using pre-signed grub-efi binaries for $efi_name"
cp /usr/lib/grub/$platform-signed/grub$efi_name.efi.signed \
$workdir/grub$efi_name.efi
# Just copy existing shim and Grub binaries into place.
# First, the binaries we use for disc or CD boot.
echo "$0: Using pre-signed grub-efi and shim binaries for $efi_name"
cp /usr/lib/shim/shim$efi_name.efi.signed \
$workdir/boot$efi_name.efi
cp /usr/lib/grub/$platform-signed/grub$efi_name.efi.signed \
$workdir/grub$efi_name.efi
# Now the binaries for netboot. These are *not* used to
# generate the image here, but will be picked up later on in
# the d-i build. Hence the different output directory.
# Now the binaries for netboot. These are *not* actually used
# in generating the image here, but will be picked up later on
# in the d-i build and copied into the output netboot
# tree. Hence the different output directory.
cp /usr/lib/shim/shim$efi_name.efi.signed \
$outdir/bootnet$efi_name.efi
cp /usr/lib/grub/$platform-signed/grubnet$efi_name.efi.signed \
# Copy the pre-built signed grub-netboot binary that is
# configured just for d-i, with the right prefix baked in
# (debian-installer/$arch/grub)". We can't change the prefix,
# hence the special build. (See #928750)
cp /usr/lib/grub/$platform-signed/grubnet$efi_name-installer.efi.signed \
$outdir/grub$efi_name.efi
else
# Build the core image for disc/CD boot
......@@ -89,7 +95,8 @@ else
# Now the image for netboot. This is *not* used to generate
# the image here, but will be picked up later on in the d-i
# build. Hence the different output directory.
# build and copied into the output netboot tree. Hence the
# different output directory.
grub-mkimage -O "$platform" \
-o "$outdir/bootnet$efi_name.efi" -p "$netboot_prefix/grub" \
search configfile normal efinet tftp net
......
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