Skip to content

Commit

Permalink
update gnu-efi to latest and use EDK2 protocol names
Browse files Browse the repository at this point in the history
* Also set Clang optimisation to smallest size
  • Loading branch information
pbatard committed Jul 9, 2016
1 parent 2278b92 commit 29d4efe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .clang/gnu-efi.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
<MSExtensions>false</MSExtensions>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<ExceptionHandling>Disabled</ExceptionHandling>
<Optimization>MinSize</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -220,6 +221,7 @@
<MSExtensions>false</MSExtensions>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<ExceptionHandling>Disabled</ExceptionHandling>
<Optimization>MinSize</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -243,6 +245,7 @@
<MSExtensions>false</MSExtensions>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<ExceptionHandling>Disabled</ExceptionHandling>
<Optimization>MinSize</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
3 changes: 3 additions & 0 deletions .clang/uefi-ntfs.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@
<ExceptionHandling>Disabled</ExceptionHandling>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<MSExtensions>false</MSExtensions>
<Optimization>MinSize</Optimization>
</ClCompile>
<Lib>
<SubSystem>EFI Application</SubSystem>
Expand Down Expand Up @@ -263,6 +264,7 @@
<ExceptionHandling>Disabled</ExceptionHandling>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<MSExtensions>false</MSExtensions>
<Optimization>MinSize</Optimization>
</ClCompile>
<Lib>
<SubSystem>EFI Application</SubSystem>
Expand Down Expand Up @@ -292,6 +294,7 @@
<ExceptionHandling>Disabled</ExceptionHandling>
<AdditionalOptions>-ffreestanding -Wno-macro-redefined</AdditionalOptions>
<MSExtensions>false</MSExtensions>
<Optimization>MinSize</Optimization>
</ClCompile>
<Lib>
<SubSystem>EFI Application</SubSystem>
Expand Down
8 changes: 4 additions & 4 deletions boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ EFI_HANDLE MainImageHandle = NULL;
#define PrintWarning(fmt, ...) Print(L"%E[WARN] " fmt L"%N\n", ##__VA_ARGS__);
#define PrintError(fmt, ...) Print(L"%E[FAIL] " fmt L": [%d] %r%N\n", ##__VA_ARGS__, (Status&0x7FFFFFFF), Status);

// Return the device path node right before the end node
/* Return the device path node right before the end node */
static EFI_DEVICE_PATH* GetLastDevicePath(CONST EFI_DEVICE_PATH* dp)
{
EFI_DEVICE_PATH *next, *p;
Expand Down Expand Up @@ -229,8 +229,8 @@ static EFI_STATUS SetPathCase(CONST EFI_FILE_HANDLE Root, CHAR16* Path)
static CHAR16* GetDriverName(CONST EFI_HANDLE DriverHandle)
{
CHAR16 *DriverName;
EFI_COMPONENT_NAME *ComponentName;
EFI_COMPONENT_NAME2 *ComponentName2;
EFI_COMPONENT_NAME_PROTOCOL *ComponentName;
EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;

// Try EFI_COMPONENT_NAME2 protocol first
if ( (BS->OpenProtocol(DriverHandle, &ComponentName2Protocol, (VOID**)&ComponentName2,
Expand Down Expand Up @@ -324,7 +324,7 @@ static VOID DisconnectBlockingDrivers(VOID) {
*/
EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
EFI_LOADED_IMAGE *LoadedImage;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
EFI_STATUS Status;
EFI_INPUT_KEY Key;
EFI_DEVICE_PATH *DevicePath, *ParentDevicePath = NULL, *BootDiskPath = NULL;
Expand Down
2 changes: 1 addition & 1 deletion gnu-efi
Submodule gnu-efi updated from 78e4df to 93ef26

0 comments on commit 29d4efe

Please sign in to comment.