Define an EFI_ARCH variable, and use that for paths to shim. This makes it possible to build a shim for other architectures than amd64.

This commit is contained in:
Mathieu Trudel-Lapierre 2017-08-07 17:42:42 -04:00
parent ea54c7675f
commit 5d42729fe3
2 changed files with 8 additions and 2 deletions

2
debian/changelog vendored
View File

@ -6,6 +6,8 @@ shim (12+1501864225.b586175-0) UNRELEASED; urgency=medium
- Update dh_auto_build/dh_auto_clean for new upstream options: set
MAKELEVEL.
- Set DEFAULT_LOADER; this makes second-stage-path unnecessary.
- Define an EFI_ARCH variable, and use that for paths to shim. This
makes it possible to build a shim for other architectures than amd64.
* debian/patches/second-stage-path: dropped.
* debian/patches/sbsigntool-no-pesign: refreshed.

8
debian/rules vendored
View File

@ -10,6 +10,10 @@ else
cert=debian/debian-uefi-ca.der
endif
ifeq ($(DEB_HOST_ARCH),amd64)
export EFI_ARCH := x64
endif
%:
dh $@ --parallel
@ -19,9 +23,9 @@ override_dh_auto_build:
dh_auto_build -- \
MAKELEVEL=0 \
EFI_PATH=/usr/lib \
DEFAULT_LOADER=\\\grubx64.efi \
DEFAULT_LOADER=\\\grub$(EFI_ARCH).efi \
VENDOR_CERT_FILE=$(cert)
override_dh_fixperms:
dh_fixperms
chmod a-x debian/shim/usr/lib/shim/shimx64.efi
chmod a-x debian/shim/usr/lib/shim/shim$(EFI_ARCH).efi