diff -Nru sbsigntool-0.9.2/debian/changelog sbsigntool-0.9.2/debian/changelog --- sbsigntool-0.9.2/debian/changelog 2021-03-25 14:52:52.000000000 +0100 +++ sbsigntool-0.9.2/debian/changelog 2022-03-10 20:41:04.000000000 +0100 @@ -1,3 +1,9 @@ +sbsigntool (0.9.2-2ubuntu1~18.04.2) bionic; urgency=medium + + * Enable signing riscv64 EFI binaries (LP: #1964510) + + -- Heinrich Schuchardt Thu, 10 Mar 2022 20:41:04 +0100 + sbsigntool (0.9.2-2ubuntu1~18.04.1) bionic; urgency=medium * No-change backport to bionic: diff -Nru sbsigntool-0.9.2/debian/patches/series sbsigntool-0.9.2/debian/patches/series --- sbsigntool-0.9.2/debian/patches/series 2019-05-04 01:12:28.000000000 +0200 +++ sbsigntool-0.9.2/debian/patches/series 2022-03-10 20:40:57.000000000 +0100 @@ -4,3 +4,4 @@ ubuntu-kernel-module-signing-fixes.patch ubuntu-clear-image-before-use.patch fix_checksum_calc.patch +ubuntu-add-support-for-RISC-V-64-bit-PE-COFF-ima.patch diff -Nru sbsigntool-0.9.2/debian/patches/ubuntu-add-support-for-RISC-V-64-bit-PE-COFF-ima.patch sbsigntool-0.9.2/debian/patches/ubuntu-add-support-for-RISC-V-64-bit-PE-COFF-ima.patch --- sbsigntool-0.9.2/debian/patches/ubuntu-add-support-for-RISC-V-64-bit-PE-COFF-ima.patch 1970-01-01 01:00:00.000000000 +0100 +++ sbsigntool-0.9.2/debian/patches/ubuntu-add-support-for-RISC-V-64-bit-PE-COFF-ima.patch 2022-03-10 20:41:04.000000000 +0100 @@ -0,0 +1,45 @@ +From 25af2eb5e39b5d54703d4489182a6b9d0af58b76 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Fri, 4 Jun 2021 14:36:17 +0200 +Subject: [PATCH] sbsigntool: add support for RISC-V 64-bit PE/COFF images + +Signed-off-by: Andreas Schwab +Signed-off-by: James Bottomley +Link: https://groups.io/g/sbsigntools/message/51 +--- + configure.ac | 2 +- + src/coff/pe.h | 1 + + src/image.c | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -66,7 +66,7 @@ + dnl gnu-efi headers require extra include dirs + AC_CANONICAL_HOST + EFI_ARCH=$(echo $host_cpu | sed 's/i.86/ia32/;s/arm.*/arm/') +-AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" ]) ++AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" -o "$EFI_ARCH" = riscv64 ]) + + ## + # no consistent view of where gnu-efi should dump the efi stuff, so find it +--- a/src/coff/pe.h ++++ b/src/coff/pe.h +@@ -152,6 +152,7 @@ + #define IMAGE_FILE_MACHINE_TRICORE 0x0520 + #define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169 + #define IMAGE_FILE_MACHINE_AARCH64 0xaa64 ++#define IMAGE_FILE_MACHINE_RISCV64 0x5064 + + #define IMAGE_SUBSYSTEM_UNKNOWN 0 + #define IMAGE_SUBSYSTEM_NATIVE 1 +--- a/src/image.c ++++ b/src/image.c +@@ -239,6 +239,7 @@ + switch (magic) { + case IMAGE_FILE_MACHINE_AMD64: + case IMAGE_FILE_MACHINE_AARCH64: ++ case IMAGE_FILE_MACHINE_RISCV64: + rc = image_pecoff_parse_64(image); + break; + case IMAGE_FILE_MACHINE_I386: