mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-22 16:08:07 +01:00
Align and clean GCC and Xcode build flags.
Removed some warnings.
This commit is contained in:
parent
d66a14ae39
commit
b346d25c32
@ -2008,10 +2008,10 @@ DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --re
|
||||
DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
|
||||
DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
|
||||
|
||||
DEFINE GCC48_ALL_CC_FLAGS = -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
DEFINE GCC48_ALL_CC_FLAGS = -fshort-wchar -fno-builtin -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -nostdinc -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DNO_MSABI_VA_FUNCS
|
||||
DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
|
||||
DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
|
||||
DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector -mabi=ms "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
|
||||
DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector -mabi=ms "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
|
||||
DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
|
||||
DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
|
||||
DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
|
||||
@ -2079,7 +2079,7 @@ DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
|
||||
DEFINE GCC5_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -fno-lto
|
||||
|
||||
DEFINE GCC53_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
|
||||
DEFINE GCC53_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable
|
||||
DEFINE GCC53_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -fno-unwind-tables -Wno-incompatible-ms-struct -mms-bitfields -fno-ms-extensions -Wno-unused-parameter
|
||||
DEFINE GCC53_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections,-z,common-page-size=0x40,--defsym=PECOFF_HEADER_SIZE=0x240,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
|
||||
|
||||
DEFINE GCC53_IA32_X64_ASLDLINK_FLAGS = DEF(GCC53_IA32_X64_DLINK_COMMON),--entry,ReferenceAcpiTable,-u,ReferenceAcpiTable
|
||||
@ -2414,10 +2414,11 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
|
||||
*_GCC53_X64_OBJCOPY_FLAGS =
|
||||
*_GCC53_X64_NASM_FLAGS = -f elf64
|
||||
|
||||
DEBUG_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0 -fno-lto
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -flto
|
||||
DEBUG_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0 -fno-lto
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -flto
|
||||
#Jief removed lto flag. It is set in CLover.dsc, from the env var 'DISABLE_LTO'
|
||||
DEBUG_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os
|
||||
DEBUG_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os
|
||||
|
||||
#
|
||||
#
|
||||
@ -2503,19 +2504,19 @@ RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
|
||||
*_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
|
||||
|
||||
|
||||
DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
# -mno-implicit-float
|
||||
# -Wno-varargs
|
||||
# -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
|
||||
# $(PLATFORM_FLAGS)
|
||||
|
||||
NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
# -mno-implicit-float
|
||||
# -Wno-varargs
|
||||
# -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
|
||||
# $(PLATFORM_FLAGS)
|
||||
|
||||
RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -DNO_MSABI_VA_FUNCS
|
||||
# -mno-implicit-float
|
||||
# -Wno-varargs
|
||||
# -Wno-unused-const-variable
|
||||
@ -2586,16 +2587,18 @@ RELEASE_XCODE8_*_MTOC_FLAGS = -align 0x20
|
||||
# -Wno-varargs
|
||||
# -Wno-unused-const-variable
|
||||
|
||||
DEFINE XCODE8_COMMON_FLAGS = -c -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare "-DNO_MSABI_VA_FUNCS" -mno-red-zone
|
||||
DEFINE XCODE8_COMMON_FLAGS = -c -Wall -Wextra -include AutoGen.h -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mms-bitfields -Wno-unused-parameter -Wno-sign-compare -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DNO_MSABI_VA_FUNCS -mno-red-zone -fno-common -fdata-sections -ffreestanding -ffunction-sections -fno-asynchronous-unwind-tables -m64 -mabi=ms -mcmodel=small
|
||||
|
||||
|
||||
|
||||
DEBUG_XCODE8_X64_CC_FLAGS = -g -gdwarf -O0 DEF(XCODE8_COMMON_FLAGS)
|
||||
DEBUGMACOS_XCODE8_X64_CC_FLAGS = -g -gdwarf -O0 DEF(XCODE8_COMMON_FLAGS)
|
||||
RELEASE_XCODE8_X64_CC_FLAGS = -Os DEF(XCODE8_COMMON_FLAGS)
|
||||
RELEASE_XCODE8_X64_CC_FLAGS = -Os DEF(XCODE8_COMMON_FLAGS) -Werror
|
||||
DEBUG_XCODE8_X64_CXX_FLAGS = -g -gdwarf -O0 DEF(XCODE8_COMMON_FLAGS)
|
||||
DEBUGMACOS_XCODE8_X64_CXX_FLAGS = -g -gdwarf -O0 DEF(XCODE8_COMMON_FLAGS)
|
||||
RELEASE_XCODE8_X64_CXX_FLAGS = -Os DEF(XCODE8_COMMON_FLAGS)
|
||||
RELEASE_XCODE8_X64_CXX_FLAGS = -Os DEF(XCODE8_COMMON_FLAGS) -Werror
|
||||
|
||||
*_XCODE8_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
|
||||
*_XCODE8_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -c -include AutoGen.h
|
||||
*_XCODE8_*_ASLDLINK_FLAGS = -nostdlib -Wl,-e,_ReferenceAcpiTable,-preload,-segalign,0x20,-pie,-seg1addr,0x260,-read_only_relocs,suppress,-map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
|
||||
*_XCODE8_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
|
||||
*_XCODE8_*_ASL_FLAGS =
|
||||
|
14
Clover.dsc
14
Clover.dsc
@ -967,19 +967,17 @@ DEFINE EXIT_USBKB_FLAG = -DEXIT_USBKB
|
||||
DEFINE JIEF_DEBUG_FLAG = -DJIEF_DEBUG
|
||||
!endif
|
||||
|
||||
DEFINE BUILD_OPTIONS=-DIS_UEFI_MODULE -DMDEPKG_NDEBUG -DCLOVER_BUILD $(VBIOS_PATCH_CLOVEREFI_FLAG) $(ONLY_SATA_0_FLAG) $(BLOCKIO_FLAG) $(NOUSB_FLAG) $(NOUDMA_FLAG) $(AMD_FLAG) $(SECURE_BOOT_FLAG) $(ANDX86_FLAG) $(PS2MOUSE_LEGACYBOOT_FLAG) $(DEBUG_ON_SERIAL_PORT_FLAG) $(EXIT_USBKB_FLAG) $(LTO_FLAG) $(JIEF_DEBUG_FLAG) -D DISABLE_NEW_DEPRECATED_INTERFACES -D OC_TARGET_DEBUG
|
||||
DEFINE BUILD_OPTIONS=-DIS_UEFI_MODULE -DMDEPKG_NDEBUG -DCLOVER_BUILD $(VBIOS_PATCH_CLOVEREFI_FLAG) $(ONLY_SATA_0_FLAG) $(BLOCKIO_FLAG) $(NOUSB_FLAG) $(NOUDMA_FLAG) $(AMD_FLAG) $(SECURE_BOOT_FLAG) $(ANDX86_FLAG) $(PS2MOUSE_LEGACYBOOT_FLAG) $(DEBUG_ON_SERIAL_PORT_FLAG) $(EXIT_USBKB_FLAG) $(LTO_FLAG) $(JIEF_DEBUG_FLAG) -DDISABLE_NEW_DEPRECATED_INTERFACES -DOC_TARGET_DEBUG
|
||||
|
||||
XCODE:DEBUG_*_*_CC_FLAGS = -target x86_64-pc-win32-macho
|
||||
XCODE:DEBUG_*_*_CXX_FLAGS = -target x86_64-pc-win32-macho
|
||||
|
||||
#MSFT:*_*_*_CC_FLAGS = /FAcs /FR$(@R).SBR /wd4701 /wd4703 $(BUILD_OPTIONS)
|
||||
MSFT:*_*_*_CC_FLAGS = /FAcs $(BUILD_OPTIONS) -Dinline=__inline /Zi -D DISABLE_NEW_DEPRECATED_INTERFACES -D OC_TARGET_DEBUG
|
||||
MSFT:*_*_*_CC_FLAGS = /FAcs $(BUILD_OPTIONS) -Dinline=__inline /Zi -DDISABLE_NEW_DEPRECATED_INTERFACES -DOC_TARGET_DEBUG
|
||||
|
||||
XCODE:*_*_*_CC_FLAGS = -std=c11 -fno-unwind-tables -Wno-msvc-include $(BUILD_OPTIONS)
|
||||
XCODE:*_*_*_CXX_FLAGS = -std=c++11 -fno-unwind-tables -Wno-msvc-include $(BUILD_OPTIONS)
|
||||
GCC:*_*_*_CC_FLAGS = $(BUILD_OPTIONS)
|
||||
GCC:*_*_*_CXX_FLAGS = $(BUILD_OPTIONS)
|
||||
XCODE:*_*_*_CC_FLAGS = -std=c11 -fno-unwind-tables $(BUILD_OPTIONS)
|
||||
XCODE:*_*_*_CXX_FLAGS = -std=c++11 -fno-unwind-tables $(BUILD_OPTIONS)
|
||||
GCC:*_*_*_CC_FLAGS = -std=c11 $(BUILD_OPTIONS)
|
||||
GCC:*_*_*_CXX_FLAGS = -std=c++11 $(BUILD_OPTIONS)
|
||||
#-fanalyzer -Wmismatched-tags
|
||||
#-Weffc++
|
||||
#-Wunused-but-set-variable
|
||||
# -Os -fno-omit-frame-pointer -maccumulate-outgoing-args
|
||||
|
@ -46,12 +46,12 @@ GRAPHICS_CONSOLE_DEV mGraphicsConsoleDevTemplate = {
|
||||
};
|
||||
|
||||
GRAPHICS_CONSOLE_MODE_DATA mGraphicsConsoleModeData[] = {
|
||||
{100, 31},
|
||||
{100, 31, 0, 0, 0, 0, 0},
|
||||
//
|
||||
// New modes can be added here.
|
||||
// The last entry is specific for full screen mode.
|
||||
//
|
||||
{0, 0}
|
||||
{0, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
|
||||
|
@ -55,7 +55,7 @@ UINT32 mFlowControlValue[2] = {
|
||||
///
|
||||
BM_MENU_OPTION FsOptionMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
/*
|
||||
@ -64,7 +64,7 @@ BM_MENU_OPTION FsOptionMenu = {
|
||||
///
|
||||
BM_MENU_OPTION ConsoleInpMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -73,7 +73,7 @@ BM_MENU_OPTION ConsoleInpMenu = {
|
||||
///
|
||||
BM_MENU_OPTION ConsoleOutMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -82,7 +82,7 @@ BM_MENU_OPTION ConsoleOutMenu = {
|
||||
///
|
||||
BM_MENU_OPTION ConsoleErrMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
*/
|
||||
@ -91,7 +91,7 @@ BM_MENU_OPTION ConsoleErrMenu = {
|
||||
///
|
||||
BM_MENU_OPTION BootOptionMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -100,7 +100,7 @@ BM_MENU_OPTION BootOptionMenu = {
|
||||
///
|
||||
BM_MENU_OPTION DriverOptionMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -109,7 +109,7 @@ BM_MENU_OPTION DriverOptionMenu = {
|
||||
///
|
||||
BM_MENU_OPTION LegacyFDMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -118,7 +118,7 @@ BM_MENU_OPTION LegacyFDMenu = {
|
||||
///
|
||||
BM_MENU_OPTION LegacyHDMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -127,7 +127,7 @@ BM_MENU_OPTION LegacyHDMenu = {
|
||||
///
|
||||
BM_MENU_OPTION LegacyCDMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -136,7 +136,7 @@ BM_MENU_OPTION LegacyCDMenu = {
|
||||
///
|
||||
BM_MENU_OPTION LegacyNETMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -145,7 +145,7 @@ BM_MENU_OPTION LegacyNETMenu = {
|
||||
///
|
||||
BM_MENU_OPTION LegacyBEVMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -154,7 +154,7 @@ BM_MENU_OPTION LegacyBEVMenu = {
|
||||
///
|
||||
BM_MENU_OPTION DirectoryMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
@ -163,13 +163,13 @@ BM_MENU_OPTION DirectoryMenu = {
|
||||
///
|
||||
BM_MENU_OPTION DriverMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
/*
|
||||
BM_MENU_OPTION TerminalMenu = {
|
||||
BM_MENU_OPTION_SIGNATURE,
|
||||
{NULL},
|
||||
{NULL, NULL},
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,8 @@ DEVICE_MANAGER_CALLBACK_DATA gDeviceManagerPrivate = {
|
||||
FakeExtractConfig,
|
||||
FakeRouteConfig,
|
||||
DriverHealthCallback
|
||||
}
|
||||
},
|
||||
0,
|
||||
};
|
||||
|
||||
#define MAX_MAC_ADDRESS_NODE_LIST_LEN 10
|
||||
|
@ -247,7 +247,8 @@ FONT_PACK_BIN mFontBin = {
|
||||
0x00
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ { 0, 0, { 0, }, { 0, }, { 0, }, }, },
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -123,6 +123,7 @@ EFI_DXE_SERVICES mDxeServices = {
|
||||
(EFI_SCHEDULE) CoreSchedule, // Schedule
|
||||
(EFI_TRUST) CoreTrust, // Trust
|
||||
(EFI_PROCESS_FIRMWARE_VOLUME) CoreProcessFirmwareVolume, // ProcessFirmwareVolume
|
||||
NULL,
|
||||
};
|
||||
|
||||
EFI_SYSTEM_TABLE mEfiSystemTableTemplate = {
|
||||
|
@ -54,7 +54,8 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage = {
|
||||
NULL, // ImageBase
|
||||
0, // ImageSize
|
||||
EfiBootServicesCode, // ImageCodeType
|
||||
EfiBootServicesData // ImageDataType
|
||||
EfiBootServicesData, // ImageDataType
|
||||
NULL,
|
||||
},
|
||||
(EFI_PHYSICAL_ADDRESS)0, // ImageBasePage
|
||||
0, // NumberOfPages
|
||||
@ -68,7 +69,9 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage = {
|
||||
0, // Machine
|
||||
NULL, // Ebc
|
||||
NULL, // RuntimeData
|
||||
NULL // LoadedImageDevicePath
|
||||
NULL, // LoadedImageDevicePath
|
||||
{0},
|
||||
0,
|
||||
};
|
||||
//
|
||||
// The field is define for Loading modules at fixed address feature to tracker the PEI code
|
||||
|
@ -399,9 +399,39 @@ HOB_TEMPLATE gHobTemplate = {
|
||||
EFI_ACPI_DESCRIPTION_GUID
|
||||
},
|
||||
{
|
||||
{
|
||||
0,
|
||||
},
|
||||
{ 0, }, // PM_TMR_BLK
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
{ 0, 0, 0, 0, 0, }, // RESET_REG
|
||||
0,
|
||||
{ 0, 0, 0, 0, 0, }, // PM1a_EVT_BLK
|
||||
{ 0, 0, 0, 0, 0, }, // PM1b_EVT_BLK
|
||||
{ 0, 0, 0, 0, 0, }, // PM1a_CNT_BLK
|
||||
{ 0, 0, 0, 0, 0, }, // PM1b_CNT_BLK
|
||||
{ 0, 0, 0, 0, 0, }, // PM2_CNT_BLK
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
{ 0, 0, 0, 0, 0, }, // GPE0_BLK
|
||||
{ 0, 0, 0, 0, 0, }, // GPE1_BLK
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
}
|
||||
},
|
||||
{ // NV Storage FV Resource
|
||||
|
@ -78,7 +78,8 @@ ATA_DEVICE gAtaDeviceTemplate = {
|
||||
0, // IoAlign
|
||||
0, // LastBlock
|
||||
0, // LowestAlignedLba
|
||||
1 // LogicalBlocksPerPhysicalBlock
|
||||
1, // LogicalBlocksPerPhysicalBlock
|
||||
0,
|
||||
},
|
||||
{ // DiskInfo
|
||||
EFI_DISK_INFO_IDE_INTERFACE_GUID,
|
||||
@ -96,7 +97,7 @@ ATA_DEVICE gAtaDeviceTemplate = {
|
||||
0, // Port
|
||||
0, // PortMultiplierPort
|
||||
{ 0, }, // Packet
|
||||
{{ 0}, }, // Acb
|
||||
{{0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0} }, // Acb
|
||||
NULL, // Asb
|
||||
FALSE, // UdmaValid
|
||||
FALSE, // Lba48Bit
|
||||
|
@ -21,7 +21,7 @@ UINTN mBmHotkeySupportCount = 0;
|
||||
//
|
||||
// Set OptionNumber as unassigned value to indicate the option isn't initialized
|
||||
//
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION mBmHotkeyBootOption = { LoadOptionNumberUnassigned };
|
||||
EFI_BOOT_MANAGER_LOAD_OPTION mBmHotkeyBootOption = { LoadOptionNumberUnassigned, 0, 0, 0, NULL, NULL, 0, {0}, 0, NULL, 0 };
|
||||
|
||||
EFI_BOOT_MANAGER_KEY_OPTION *mBmContinueKeyOption = NULL;
|
||||
VOID *mBmTxtInExRegistration = NULL;
|
||||
|
@ -104,7 +104,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
||||
FALSE,
|
||||
|
||||
FALSE,
|
||||
FALSE
|
||||
FALSE,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
|
@ -45,7 +45,8 @@ DISK_IO_PRIVATE_DATA gDiskIoPrivateDataTemplate = {
|
||||
DiskIo2ReadDiskEx,
|
||||
DiskIo2WriteDiskEx,
|
||||
DiskIo2FlushDiskEx
|
||||
}
|
||||
},
|
||||
0,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 0354dc9fbdc8b6658480a43aeb0b1d7eab1b0566
|
||||
Subproject commit 6809233672eaa1c3f058c7e21605a653aca6f36c
|
@ -58,7 +58,8 @@ OvrReadData (IN APPLE_SMC_IO_PROTOCOL *This,
|
||||
AsciiSPrint(Str, 512, "--> data=:");
|
||||
Ptr = &Str[10];
|
||||
*Ptr++ = ' ';
|
||||
for (i=0; i<MIN(Size, 500); i++) {
|
||||
ASSERT(Size < sizeof(Str)-15);
|
||||
for (i=0; i<Size; i++) { // Jief : it was "MIN(Size, 500)", but it's always true because Size is 8 bits
|
||||
AsciiSPrint(StrSmall, 10, "%02x ", Value[i]);
|
||||
*Ptr++ = StrSmall[0];
|
||||
*Ptr++ = StrSmall[1];
|
||||
@ -88,7 +89,8 @@ OvrWriteValue (IN APPLE_SMC_IO_PROTOCOL *This,
|
||||
AsciiSPrint(Str, 512, "--> data=:");
|
||||
Ptr = &Str[10];
|
||||
*Ptr++ = ' ';
|
||||
for (i=0; i<MIN(Size, 500); i++) {
|
||||
ASSERT(Size < sizeof(Str)-15);
|
||||
for (i=0; i<Size; i++) { // Jief : it was "MIN(Size, 500)", but it's always true because Size is 8 bits
|
||||
AsciiSPrint(StrSmall, 10, "%02x ", Value[i]);
|
||||
*Ptr++ = StrSmall[0];
|
||||
*Ptr++ = StrSmall[1];
|
||||
|
@ -55,8 +55,9 @@ then
|
||||
echo ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi
|
||||
ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi || exit 1
|
||||
|
||||
echo ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi
|
||||
ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi || exit 1
|
||||
#no need to replace BootX64.efi as it is BootLoaderChooser now
|
||||
#echo ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi
|
||||
#ditto "$clover_efi_file" /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi || exit 1
|
||||
else
|
||||
: # TODO : if it's a module, has to be copied in Drivers
|
||||
fi
|
||||
|
@ -16,6 +16,13 @@ executable="$2"
|
||||
echo executable="$executable"
|
||||
executable_name=$(basename "$executable")
|
||||
echo executable_name="$executable_name"
|
||||
executable_name_without_extension="${executable_name%.*}"
|
||||
echo executable_name_without_extension="$executable_name_without_extension"
|
||||
executable_path="$(dirname "$executable")"
|
||||
echo executable_path="$executable_path"
|
||||
executable_dirname="${executable_path##*/}"
|
||||
echo executable_dirname="$executable_dirname"
|
||||
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
@ -50,11 +57,18 @@ then
|
||||
|
||||
if [[ "$executable_name" == "CloverX64"* ]]
|
||||
then
|
||||
echo ditto "$project_dir"/"${executable%.*}".efi /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi
|
||||
ditto "$project_dir"/"${executable%.*}".efi /Volumes/QEMU_EFI/EFI/CLOVER/CLOVERX64.efi || exit 1
|
||||
if [[ "$executable_dirname" == "DWARF" ]]
|
||||
then
|
||||
echo ditto "$project_dir"/"$(dirname "$executable")"/../../../../"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/CLOVER/"$executable_name_without_extension".efi
|
||||
ditto "$project_dir"/"$(dirname "$executable")"/../../../../"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/CLOVER/"$executable_name_without_extension".efi || exit 1
|
||||
else
|
||||
echo ditto "$project_dir"/"$executable_path"/"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/CLOVER/"$executable_name_without_extension".efi
|
||||
ditto "$project_dir"/"$executable_path"/"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/CLOVER/"$executable_name_without_extension".efi || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ditto "$project_dir"/"${executable%.*}".efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi
|
||||
ditto "$project_dir"/"${executable%.*}".efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi || exit 1
|
||||
# echo ditto "$project_dir"/"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi
|
||||
# ditto "$project_dir"/"$executable_name_without_extension".efi /Volumes/QEMU_EFI/EFI/BOOT/BOOTX64.efi || exit 1
|
||||
else
|
||||
: # if it's a module, has to be copied in Drivers
|
||||
fi
|
||||
@ -72,7 +86,6 @@ then
|
||||
-device VGA,vgamem_mb=64,edid=on,xres=1024,yres=768 \
|
||||
-device ahci,id=ahi \
|
||||
-drive format=raw,id=hda,file=./disk_image_gpt.img \
|
||||
-cdrom "/JiefLand/3.Infos/3.Infos-Mac/MacOs/11.0.20A5343j Big Sur/BigSurInstall.iso" \
|
||||
-usb \
|
||||
-device usb-mouse,bus=usb-bus.0,port=2 \
|
||||
-device usb-kbd,bus=usb-bus.0,port=1 \
|
||||
@ -81,9 +94,12 @@ then
|
||||
-gdb tcp::9000 &
|
||||
[[ $? -eq 0 ]] || exit 1
|
||||
|
||||
# -cdrom "/JiefLand/3.Infos/3.Infos-Mac/MacOs/11.0.20A5343j Big Sur/BigSurInstall.iso" \
|
||||
|
||||
|
||||
count=1
|
||||
timeout=60
|
||||
image_base_str="Clover : Image base = "
|
||||
image_base_str="CloverX64 : Image base = "
|
||||
|
||||
getImageBase() {
|
||||
[ -f ./serial0_qemu_out.log ] || return 1
|
||||
@ -104,7 +120,7 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$8/NR}')"
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$6}')"
|
||||
echo adr="$adr"
|
||||
|
||||
|
||||
|
@ -389,7 +389,7 @@ CreateTabCompletionList (
|
||||
}
|
||||
}
|
||||
StrnCatS (TabStr, (BufferSize) / sizeof (CHAR16), InputString + TabPos, StringLen - TabPos);
|
||||
StrnCatS (TabStr, (BufferSize) / sizeof (CHAR16), L"*", (BufferSize) / sizeof (CHAR16) - 1 - StrLen (TabStr));
|
||||
StrnCatS (TabStr, (BufferSize) / sizeof (CHAR16), L"*", (BufferSize) / sizeof (CHAR16) - 1 - StrLen (TabStr));
|
||||
Status = ShellInfoObject.NewEfiShellProtocol->FindFiles(TabStr, &FileList);
|
||||
|
||||
//
|
||||
@ -950,7 +950,11 @@ EFI_FILE_PROTOCOL FileInterfaceStdIn = {
|
||||
FileInterfaceNopSetPosition,
|
||||
FileInterfaceNopGetInfo,
|
||||
FileInterfaceNopSetInfo,
|
||||
FileInterfaceNopGeneric
|
||||
FileInterfaceNopGeneric,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
EFI_FILE_PROTOCOL FileInterfaceStdOut = {
|
||||
@ -964,7 +968,11 @@ EFI_FILE_PROTOCOL FileInterfaceStdOut = {
|
||||
FileInterfaceNopSetPosition,
|
||||
FileInterfaceNopGetInfo,
|
||||
FileInterfaceNopSetInfo,
|
||||
FileInterfaceNopGeneric
|
||||
FileInterfaceNopGeneric,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
EFI_FILE_PROTOCOL FileInterfaceStdErr = {
|
||||
@ -978,7 +986,11 @@ EFI_FILE_PROTOCOL FileInterfaceStdErr = {
|
||||
FileInterfaceNopSetPosition,
|
||||
FileInterfaceNopGetInfo,
|
||||
FileInterfaceNopSetInfo,
|
||||
FileInterfaceNopGeneric
|
||||
FileInterfaceNopGeneric,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
EFI_FILE_PROTOCOL FileInterfaceNulFile = {
|
||||
@ -992,7 +1004,11 @@ EFI_FILE_PROTOCOL FileInterfaceNulFile = {
|
||||
FileInterfaceNopSetPosition,
|
||||
FileInterfaceNopGetInfo,
|
||||
FileInterfaceNopSetInfo,
|
||||
FileInterfaceNopGeneric
|
||||
FileInterfaceNopGeneric,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
|
@ -34,7 +34,8 @@ SHELL_INFO ShellInfoObject = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
0,
|
||||
0,
|
||||
}},
|
||||
0,
|
||||
NULL,
|
||||
@ -349,12 +350,12 @@ UefiMain (
|
||||
*/
|
||||
//
|
||||
// Clear the screen
|
||||
//
|
||||
//
|
||||
|
||||
Status = gST->ConOut->ClearScreen(gST->ConOut);
|
||||
if (EFI_ERROR(Status)) {
|
||||
return (Status);
|
||||
}
|
||||
}
|
||||
|
||||
// Print(L"Hello, World!\n");
|
||||
//
|
||||
@ -387,7 +388,7 @@ UefiMain (
|
||||
|| FeaturePcdGet(PcdShellSupportFrameworkHii)
|
||||
) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
@ -418,7 +419,7 @@ UefiMain (
|
||||
ShellInfoObject.HiiHandle = HiiAddPackages (&gEfiCallerIdGuid, gImageHandle, ShellStrings, NULL);
|
||||
if (ShellInfoObject.HiiHandle == NULL) {
|
||||
if (PcdGetBool(PcdShellSupportFrameworkHii)) { //set FALSE
|
||||
///@todo Add our package into Framework HII
|
||||
///@todo Add our package into Framework HII
|
||||
|
||||
}
|
||||
if (ShellInfoObject.HiiHandle == NULL) {
|
||||
|
@ -1438,7 +1438,9 @@ EFI_EDITOR_GLOBAL_EDITOR MainEditorConst = {
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
NULL
|
||||
NULL,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,20 @@ HEFI_EDITOR_FILE_IMAGE HFileImageBackupVar;
|
||||
// for basic initialization of HFileImage
|
||||
//
|
||||
HEFI_EDITOR_BUFFER_IMAGE HFileImageConst = {
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
FALSE
|
||||
NULL,
|
||||
{0},
|
||||
{0},
|
||||
{0},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL ,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1,21 +1,46 @@
|
||||
/*
|
||||
* stdbool.h
|
||||
* Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Created on: Sep 1, 2020
|
||||
* Author: jief
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD: src/include/stdbool.h,v 1.6 2002/08/16 07:33:14 alfred Exp $
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_POSIX_STDBOOL_H_
|
||||
#define PLATFORM_POSIX_STDBOOL_H_
|
||||
#ifndef _STDBOOL_H_
|
||||
#define _STDBOOL_H_
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
#define bool _Bool
|
||||
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3
|
||||
typedef int _Bool;
|
||||
#endif
|
||||
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#endif /* PLATFORM_POSIX_STDBOOL_H_ */
|
||||
#endif /* !_STDBOOL_H_ */
|
||||
|
@ -501,10 +501,14 @@
|
||||
[Pcd]
|
||||
|
||||
[BuildOptions]
|
||||
// XCODE:*_*_*_CC_FLAGS = -std=c11 -fsigned-char -fno-omit-frame-pointer -ffreestanding -fno-rtti -fno-exceptions -Wno-deprecated -Wno-writable-strings -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
// XCODE:*_*_*_CXX_FLAGS = -std=c++11 -fsigned-char -fno-omit-frame-pointer -ffreestanding -fno-rtti -fno-exceptions -Wno-deprecated -Wno-writable-strings -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
XCODE:*_*_*_CC_FLAGS = -fno-use-cxa-atexit -std=c11 -fsigned-char -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-writable-strings -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
XCODE:*_*_*_CXX_FLAGS = -fno-use-cxa-atexit -std=c++11 -fsigned-char -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-writable-strings -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
GCC:*_*_*_CC_FLAGS = -std=c99 -fno-omit-frame-pointer -maccumulate-outgoing-args
|
||||
GCC:*_*_*_CXX_FLAGS = -std=c++11 -fno-omit-frame-pointer -maccumulate-outgoing-args -ffreestanding -fno-rtti -fno-exceptions -Wno-deprecated -Wno-write-strings -Wno-unused-const-variable -Wno-pointer-arith -DJCONST=CONST
|
||||
|
||||
XCODE:*_*_*_CC_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
XCODE:*_*_*_CXX_FLAGS = -fno-use-cxa-atexit -fno-omit-frame-pointer -fno-rtti -fno-exceptions -Wno-deprecated -Wno-unused-const-variable -DJCONST=CONST -Wno-incompatible-ms-struct
|
||||
|
||||
|
||||
# -Wno-unused-const-variable, -maccumulate-outgoing-args is set in tools_def.template
|
||||
GCC:*_*_*_CC_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-exceptions -Wno-deprecated -Wno-write-strings -Wno-pointer-arith -DJCONST=CONST
|
||||
GCC:*_*_*_CXX_FLAGS = -fno-omit-frame-pointer -ffreestanding -fno-rtti -fno-exceptions -Wno-deprecated -Wno-write-strings -Wno-pointer-arith -DJCONST=CONST
|
||||
|
||||
|
||||
MSFT:*_*_*_CC_FLAGS = /Os /wd4201 /D JCONST=const
|
||||
|
Loading…
Reference in New Issue
Block a user