diff --git a/.gitignore b/.gitignore index e69de29..5b10dba 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/shim-0.1.tar.bz2 diff --git a/shim-fedora.diff b/shim-fedora.diff new file mode 100644 index 0000000..4e672ea --- /dev/null +++ b/shim-fedora.diff @@ -0,0 +1,7 @@ +diff --git a/cert.h b/cert.h +index 380bc04..7b91a59 100644 +--- a/cert.h ++++ b/cert.h +@@ -1 +1 @@ +-static UINT8 vendor_cert[] = {0x00}; ++static UINT8 vendor_cert[] = { 0x30, 0x82, 0x04, 0x2F, 0x30, 0x82, 0x03, 0x17, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xF7, 0xD9, 0x05, 0xDC, 0xFD, 0x96, 0x96, 0x21, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x30, 0x76, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0D, 0x4D, 0x61, 0x73, 0x73, 0x61, 0x63, 0x68, 0x75, 0x73, 0x65, 0x74, 0x74, 0x73, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6D, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0D, 0x52, 0x65, 0x64, 0x20, 0x48, 0x61, 0x74, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x23, 0x30, 0x21, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1A, 0x52, 0x65, 0x64, 0x20, 0x48, 0x61, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x79, 0x69, 0x6E, 0x67, 0x20, 0x43, 0x41, 0x30, 0x1E, 0x17, 0x0D, 0x31, 0x32, 0x30, 0x37, 0x30, 0x39, 0x31, 0x39, 0x31, 0x32, 0x34, 0x34, 0x5A, 0x17, 0x0D, 0x31, 0x33, 0x30, 0x37, 0x30, 0x39, 0x31, 0x39, 0x31, 0x32, 0x34, 0x34, 0x5A, 0x30, 0x74, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0D, 0x4D, 0x61, 0x73, 0x73, 0x61, 0x63, 0x68, 0x75, 0x73, 0x65, 0x74, 0x74, 0x73, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6D, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0D, 0x52, 0x65, 0x64, 0x20, 0x48, 0x61, 0x74, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x21, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x18, 0x52, 0x65, 0x64, 0x20, 0x48, 0x61, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xBF, 0x87, 0xF1, 0x75, 0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0x82, 0xF6, 0x15, 0x82, 0x99, 0x71, 0x64, 0x83, 0xD9, 0x80, 0x4E, 0x09, 0xEC, 0xF6, 0x23, 0x48, 0xB1, 0x96, 0x2A, 0x13, 0xA1, 0xE1, 0x91, 0xF8, 0x35, 0xF2, 0x61, 0x42, 0xB4, 0x7D, 0x8D, 0x70, 0x38, 0x3C, 0xDC, 0xEB, 0x1E, 0x0B, 0x97, 0x2F, 0x27, 0x60, 0xE0, 0x28, 0x18, 0x77, 0x55, 0xE8, 0x30, 0x35, 0x58, 0xBF, 0x85, 0x99, 0xA4, 0x2B, 0xA2, 0x6E, 0x70, 0xAE, 0xDD, 0x36, 0x2F, 0xCF, 0x49, 0xC3, 0x6A, 0xCF, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x81, 0xC1, 0x30, 0x81, 0xBE, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x35, 0x80, 0xCF, 0x35, 0xD7, 0x6B, 0x3B, 0x66, 0x7A, 0x40, 0xDF, 0x66, 0x69, 0x1C, 0xBC, 0xF8, 0x73, 0x53, 0xB2, 0x3C, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x08, 0xA0, 0xEF, 0x58, 0x00, 0xCB, 0x02, 0xFB, 0x58, 0x7C, 0x12, 0xB4, 0x03, 0x25, 0x9C, 0x7D, 0x4E, 0xF1, 0x5D, 0x1C, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x03, 0x03, 0x07, 0xFF, 0x80, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x25, 0x04, 0x18, 0x30, 0x16, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x0A, 0x03, 0x01, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x3F, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x0D, 0x04, 0x32, 0x16, 0x30, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6E, 0x67, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x52, 0x65, 0x64, 0x20, 0x48, 0x61, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x7C, 0xC1, 0x9E, 0xF4, 0xD4, 0xDD, 0x85, 0x4E, 0xF2, 0xA9, 0x34, 0xDE, 0xB6, 0x76, 0x8C, 0x4D, 0x27, 0x53, 0x53, 0x81, 0x61, 0xF3, 0x64, 0xC0, 0x3E, 0xF4, 0x45, 0x05, 0x34, 0x74, 0x58, 0x0E, 0xA8, 0xD8, 0xF8, 0x78, 0x65, 0xD7, 0x7D, 0xE5, 0xB7, 0x15, 0xC0, 0xD6, 0x4E, 0x3A, 0xFC, 0x44, 0x9D, 0xF8, 0x37, 0x29, 0x7E, 0xE6, 0x09, 0x2F, 0x66, 0x82, 0xA1, 0xC8, 0xD8, 0x15, 0xA0, 0xE8, 0xB9, 0x2F, 0x6F, 0x77, 0x06, 0x36, 0xBE, 0x01, 0x81, 0x7C, 0x70, 0x4F, 0xF0, 0xF3, 0xD9, 0x01, 0x7E, 0x97, 0x98, 0x93, 0x59, 0xE2, 0x4F, 0x26, 0xBC, 0xFA, 0x07, 0x59, 0x11, 0xD9, 0x2B, 0xEF, 0x84, 0x30, 0xA4, 0xF0, 0x53, 0xBD, 0x22, 0x28, 0xDC, 0x18, 0xDD, 0x71, 0x9A, 0x35, 0x28, 0x3E, 0x72, 0x9E, 0xD0, 0x36, 0x53, 0x9C, 0xF8, 0x66, 0x7E, 0x76, 0x29, 0xF7, 0xEA, 0x03, 0x9A, 0x6B, 0x6E, 0x90, 0x70, 0x3B, 0x2A, 0xDD, 0xD1, 0xCA, 0x9C, 0x1F, 0x8A, 0x84, 0x31, 0xF8, 0x86, 0xA1, 0x08, 0x8A, 0x7D, 0x01, 0xE2, 0xBE, 0x74, 0x93, 0xF6, 0xF4, 0x5F, 0x2F, 0xC6, 0x4C, 0xDB, 0xE5, 0x6E, 0xE9, 0xB9, 0xF4, 0x7A, 0x95, 0xFB, 0x64, 0x05, 0x78, 0xDE, 0x0D, 0xEF, 0xCC, 0x7A, 0x47, 0x81, 0xBF, 0xCA, 0xC1, 0x85, 0x6D, 0x40, 0xDF, 0x17, 0x19, 0x80, 0xC5, 0x54, 0xBF, 0x12, 0x7F, 0x34, 0xB1, 0x1D, 0x60, 0x0C, 0x53, 0x5E, 0xA8, 0xE8, 0xB6, 0x93, 0x84, 0x49, 0x2C, 0x5D, 0x01, 0x9A, 0xD9, 0x1A, 0xE0, 0x19, 0xDC, 0xE9, 0xCA, 0x30, 0x68, 0xFE, 0xAB, 0xAB, 0x65, 0xBD, 0x14, 0x2C, 0x67, 0x4A, 0x84, 0x4F, 0xB3, 0x9E, 0xC1, 0xD4, 0x2D, 0x6E, 0xF3, 0x5B, 0xE4, 0x82, 0x6D, 0xCB, 0x9F, 0xED, 0xEC, 0xCB, 0xB8, 0x03, 0x74, 0xFD, 0x0C, 0x3C, 0x32, 0x82, 0xFD, 0xF9, 0xE2}; diff --git a/shim.spec b/shim.spec new file mode 100644 index 0000000..0369c40 --- /dev/null +++ b/shim.spec @@ -0,0 +1,54 @@ +Name: shim +Version: 0.1 +Release: 1%{?dist} +Summary: First-stage UEFI bootloader + +License: BSD +URL: http://www.codon.org.uk/~mjg59/shim/ +Source0: http://www.codon.org.uk/~mjg59/shim/shim-%{version}.tar.bz2 + +BuildRequires: gnu-efi +Requires: gnu-efi + +# Shim uses OpenSSL, but cannot use the system copy as the UEFI ABI is not +# compatible with SysV (there's no red zone under UEFI) and there isn't a +# POSIX-style C library. +# BuildRequires: OpenSSL + +# Shim is only required on platforms implementing the UEFI secure boot +# protocol. The only one of those we currently wish to support is 64-bit x86. +# Adding further platforms will require adding appropriate relocation code. +ExclusiveArch: x86_64 + +# Temporary test key - update before final +Patch0: shim-fedora.diff + +# Shim generates no binaries that run under the installed OS, so debuginfo +# is useless +%global debug_package %{nil} + +%description +Initial UEFI bootloader that handles chaining to a trusted full bootloader +under secure boot environments. + + +%prep +%setup -q +%patch0 -p1 + +%build +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +install -m 0755 -D shim.efi $RPM_BUILD_ROOT/boot/efi/EFI/redhat/shim.efi + +%files +%doc +/boot/efi/EFI/redhat/shim.efi + + +%changelog +* Mon Aug 13 2012 Matthew Garrett - 0.1-1 +- initial release diff --git a/sources b/sources index e69de29..3946f28 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7c5286aae419ce82b6b2ab81f717d3b4 shim-0.1.tar.bz2