diff --git a/.syntastic_c_config b/.syntastic_c_config new file mode 100644 index 0000000..b93723b --- /dev/null +++ b/.syntastic_c_config @@ -0,0 +1,53 @@ +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/.. +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/../Include/ +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/crypto +-I/usr/lib/gcc/x86_64-redhat-linux/7/include +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/../Include +-I/usr/include/efi +-I/usr/include/efi/x86_64 +-I/usr/include/efi/protocol +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/crypto/asn1 +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/crypto/evp +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/crypto/modes +-I/home/pjones/devel/github.com/shim/master/Cryptlib/OpenSSL/crypto/include +-DL_ENDIAN +-D_CRT_SECURE_NO_DEPRECATE +-D_CRT_NONSTDC_NO_DEPRECATE +-DOPENSSL_SMALL_FOOTPRINT +-DPEDANTIC +-ggdb +-O0 +-fno-stack-protector +-fno-strict-aliasing +-fpic +-fshort-wchar +-Wall +-Wsign-compare +-Werror +-fno-builtin +-Werror=sign-compare +-ffreestanding +-std=gnu89 +-I/usr/lib/gcc/x86_64-redhat-linux/7/include +-nostdinc +-I/home/pjones/devel/github.com/shim/master/Cryptlib +-I/home/pjones/devel/github.com/shim/master/Cryptlib/Include +-I/usr/include/efi +-I/usr/include/efi/x86_64 +-I/usr/include/efi/protocol +-I/home/pjones/devel/github.com/shim/master/include +-iquote +/home/pjones/devel/github.com/shim/master +-iquote +/home/pjones/devel/github.com/shim/master +-mno-mmx +-mno-sse +-mno-red-zone +-nostdinc +-maccumulate-outgoing-args +-DEFI_FUNCTION_WRAPPER +-DGNU_EFI_USE_MS_ABI +-DNO_BUILTIN_VA_FUNCS +-DMDE_CPU_X64 +-DPAGE_SIZE=4096 diff --git a/shim.h b/shim.h index 52cbfeb..ae5a168 100644 --- a/shim.h +++ b/shim.h @@ -37,3 +37,63 @@ typedef struct _SHIM_LOCK { extern EFI_STATUS shim_init(void); extern void shim_fini(void); + +#ifdef __x86_64__ +#ifndef DEFAULT_LOADER +#define DEFAULT_LOADER L"\\grubx64.efi" +#endif +#ifndef DEFAULT_LOADER_CHAR +#define DEFAULT_LOADER_CHAR L"\\grubx64.efi" +#endif +#ifndef EFI_ARCH +#define EFI_ARCH L"x64" +#endif +#ifndef DEBUGDIR +#define DEBUGDIR L"/usr/lub/debug/usr/share/shim/x64/" +#endif +#endif + +#if defined(__i686__) || defined(__i386__) +#ifndef DEFAULT_LOADER +#define DEFAULT_LOADER L"\\grubia32.efi" +#endif +#ifndef DEFAULT_LOADER_CHAR +#define DEFAULT_LOADER_CHAR L"\\grubia32.efi" +#endif +#ifndef EFI_ARCH +#define EFI_ARCH L"ia32" +#endif +#ifndef DEBUGDIR +#define DEBUGDIR L"/usr/lub/debug/usr/share/shim/ia32/" +#endif +#endif + +#if defined(__aarch64__) +#ifndef DEFAULT_LOADER +#define DEFAULT_LOADER L"\\grubaa64.efi" +#endif +#ifndef DEFAULT_LOADER_CHAR +#define DEFAULT_LOADER_CHAR L"\\grubaa64.efi" +#endif +#ifndef EFI_ARCH +#define EFI_ARCH L"aa64" +#endif +#ifndef DEBUGDIR +#define DEBUGDIR L"/usr/lub/debug/usr/share/shim/aa64/" +#endif +#endif + +#if defined(__arm__) +#ifndef DEFAULT_LOADER +#define DEFAULT_LOADER L"\\grubarm.efi" +#endif +#ifndef DEFAULT_LOADER_CHAR +#define DEFAULT_LOADER_CHAR L"\\grubarm.efi" +#endif +#ifndef EFI_ARCH +#define EFI_ARCH L"arm" +#endif +#ifndef DEBUGDIR +#define DEBUGDIR L"/usr/lub/debug/usr/share/shim/arm/" +#endif +#endif