merge the generation of SecMain into the whole build process.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5491 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2008-07-16 05:28:50 +00:00
parent 19efd9ec94
commit 73aa7f049b
6 changed files with 20 additions and 18 deletions

View File

@ -219,7 +219,7 @@
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) $(LIBS) ${src}
<Command.GCC>
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\)
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(LIBS) ${src} -\) $(DLINK2_FLAGS)
[Build.Dynamic-Library-File]
<InputFile>

View File

@ -497,14 +497,14 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
*_ELFGCC_IA32_CC_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_IA32_SLINK_PATH = DEF(ELFGCC_BIN)/ar
*_ELFGCC_IA32_DLINK_PATH = DEF(ELFGCC_BIN)/ld
*_ELFGCC_IA32_DLINK2_PATH = DEF(ELFGCC_BIN)/ld
*_ELFGCC_IA32_ASM_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_IA32_PP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_IA32_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc
*_ELFGCC_*_MAKE_PATH = make
*_ELFGCC_*_MAKE_FLAGS = -i
*_ELFGCC_IA32_CC_FLAGS = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
*_ELFGCC_*_DLINK_FLAGS = -melf_i386 -nostdlib --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
*_ELFGCC_*_DLINK_FLAGS = -melf_i386 -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
#*_ELFGCC_*_DLINK_FLAGS = -melf_i386 -nostdlib -n -q -Ttext 0x220 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)
*_ELFGCC_*_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
*_ELFGCC_*_PP_FLAGS = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h

View File

@ -53,17 +53,17 @@ EFI_PEI_PE_COFF_LOADER_PROTOCOL_INSTANCE mPeiEfiPeiPeCoffLoaderInstance = {
EFI_PEI_PE_COFF_LOADER_PROTOCOL *gPeiEfiPeiPeCoffLoader = &mPeiEfiPeiPeCoffLoaderInstance.PeCoff;
EFI_PEI_PE_COFF_LOADER_PROTOCOL *gPeiEfiPeiPeCoffLoader = &mPeiEfiPeiPeCoffLoaderInstance.PeCoff;
UNIX_PEI_LOAD_FILE_PPI mSecNtLoadFilePpi = { SecWinNtPeiLoadFile };
UNIX_PEI_LOAD_FILE_PPI mSecNtLoadFilePpi = { SecWinNtPeiLoadFile };
PEI_UNIX_AUTOSCAN_PPI mSecNtAutoScanPpi = { SecWinNtPeiAutoScan };
PEI_UNIX_AUTOSCAN_PPI mSecNtAutoScanPpi = { SecWinNtPeiAutoScan };
PEI_UNIX_THUNK_PPI mSecWinNtThunkPpi = { SecWinNtWinNtThunkAddress };
PEI_UNIX_THUNK_PPI mSecWinNtThunkPpi = { SecWinNtWinNtThunkAddress };
EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { SecPeiReportStatusCode };
EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { SecPeiReportStatusCode };
UNIX_FWH_PPI mSecFwhInformationPpi = { SecWinNtFdAddress };
UNIX_FWH_PPI mSecFwhInformationPpi = { SecWinNtFdAddress };
TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {SecTemporaryRamSupport};

View File

@ -18,7 +18,7 @@
INF_VERSION = 0x00010005
BASE_NAME = SecMain
FILE_GUID = f43be88c-8985-11db-8f78-0040d02b1835
MODULE_TYPE = SEC
MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
@ -73,4 +73,8 @@
gEfiUnixPkgTokenSpaceGuid.PcdUnixFirmwareFdSize
[BuildOptions.common]
GCC:*_*_IA32_DLINK_FLAGS =
GCC:*_*_IA32_DLINK_FLAGS = -o $(BIN_DIR)/SecMain.exe -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o -L/usr/X11R6/lib -lXext -lX11 /usr/lib/crtn.o
GCC:*_*_*_DLINK2_FLAGS = -lc
GCC:*_*_IA32_CC_FLAGS = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
GCC:*_*_IA32_PP_FLAGS = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
GCC:*_*_IA32_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h

View File

@ -58,6 +58,7 @@ VOID
SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
{
struct itimerval timerval;
UINT32 remainder;
if (!settimer_initialized) {
struct sigaction act;
@ -73,9 +74,10 @@ SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
printf ("SetTimer: gettimeofday error %s\n", strerror (errno));
}
}
timerval.it_value.tv_sec = PeriodMs / 1000;
timerval.it_value.tv_usec = (PeriodMs % 1000) * 1000;
timerval.it_value.tv_sec = PeriodMs / 1000;
timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000);
DivU64x32Remainder(PeriodMs, 1000, &remainder);
timerval.it_value.tv_usec = remainder * 1000;
timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000);
timerval.it_interval = timerval.it_value;
if (setitimer (ITIMER_REAL, &timerval, NULL) != 0) {

View File

@ -490,7 +490,3 @@
<LibraryClasses>
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
}
[BuildOptions]
DEBUG_*_IA32_DLINK_FLAGS = --shared
*_*_IA32_CC_FLAGS = -idirafter/usr/include