mirror of https://github.com/acidanthera/audk.git
Patch from open source community for CryptoPkg to allow it to build for ARM using the RVCT toolchain.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11565 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c220787b13
commit
8e01b449de
|
@ -23,7 +23,7 @@
|
||||||
PLATFORM_VERSION = 0.91
|
PLATFORM_VERSION = 0.91
|
||||||
DSC_SPECIFICATION = 0x00010005
|
DSC_SPECIFICATION = 0x00010005
|
||||||
OUTPUT_DIRECTORY = Build/CryptoPkg
|
OUTPUT_DIRECTORY = Build/CryptoPkg
|
||||||
SUPPORTED_ARCHITECTURES = IA32|X64|IPF|EBC
|
SUPPORTED_ARCHITECTURES = IA32|X64|IPF|EBC|ARM
|
||||||
BUILD_TARGETS = DEBUG|RELEASE
|
BUILD_TARGETS = DEBUG|RELEASE
|
||||||
SKUID_IDENTIFIER = DEFAULT
|
SKUID_IDENTIFIER = DEFAULT
|
||||||
|
|
||||||
|
@ -50,6 +50,14 @@
|
||||||
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
||||||
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
||||||
|
|
||||||
|
[LibraryClasses.ARM]
|
||||||
|
#
|
||||||
|
# It is not possible to prevent the ARM compiler for generic intrinsic functions.
|
||||||
|
# This library provides the instrinsic functions generate by a given compiler.
|
||||||
|
# [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
|
||||||
|
#
|
||||||
|
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.PEIM]
|
[LibraryClasses.common.PEIM]
|
||||||
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
|
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,18 @@ typedef VOID *FILE;
|
||||||
//
|
//
|
||||||
// Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h
|
// Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h
|
||||||
//
|
//
|
||||||
|
#if !defined(__CC_ARM) // if va_list is not already defined
|
||||||
#define va_list VA_LIST
|
#define va_list VA_LIST
|
||||||
#define va_arg VA_ARG
|
#define va_arg VA_ARG
|
||||||
#define va_start VA_START
|
#define va_start VA_START
|
||||||
#define va_end VA_END
|
#define va_end VA_END
|
||||||
|
#else // __CC_ARM
|
||||||
|
#define va_start(Marker, Parameter) __va_start(Marker, Parameter)
|
||||||
|
#define va_arg(Marker, TYPE) __va_arg(Marker, TYPE)
|
||||||
|
#define va_end(Marker) ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// #defines from EFI Application Toolkit required to buiild Open SSL
|
// #defines from EFI Application Toolkit required to buiild Open SSL
|
||||||
|
@ -211,9 +219,9 @@ __sighandler_t *signal (int, __sighandler_t *);
|
||||||
//
|
//
|
||||||
// Global variables from EFI Application Toolkit required to buiild Open SSL
|
// Global variables from EFI Application Toolkit required to buiild Open SSL
|
||||||
//
|
//
|
||||||
FILE *stderr;
|
static FILE *stderr;
|
||||||
FILE *stdin;
|
static FILE *stdin;
|
||||||
FILE *stdout;
|
static FILE *stdout;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions
|
// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions
|
||||||
|
|
|
@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
#include <OpenSslSupport.h>
|
#include <OpenSslSupport.h>
|
||||||
|
|
||||||
|
int errno = 0;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
INTN
|
INTN
|
||||||
(*SORT_COMPARE)(
|
(*SORT_COMPARE)(
|
||||||
|
@ -298,3 +300,113 @@ void *UI_OpenSSL(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int X509_load_cert_file (VOID *ctx, const char *file, int type)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int X509_load_crl_file (VOID *ctx, const char *file, int type)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int chmod (const char *c, mode_t m)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int close (int f)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void closelog (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void exit (int e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int fclose (FILE *f)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE *fopen (const char *c, const char *m)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t fread (void *b, size_t c, size_t i, FILE *f)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fprintf (FILE *f, const char *s, ...)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uid_t getuid (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uid_t geteuid (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gid_t getgid (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gid_t getegid (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
off_t lseek (int a, off_t o, int d)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void openlog (const char *c, int a, int b)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ssize_t read (int f, void *b, size_t c)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int stat (const char *c, struct stat *s)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strcasecmp (const char *c, const char *s)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strncasecmp (const char *c, const char *s, size_t l)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void syslog (int a, const char *c, ...)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ssize_t write (int f, const void *b, size_t l)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF
|
# VALID_ARCHITECTURES = IA32 X64 IPF ARM
|
||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
@ -599,3 +599,7 @@
|
||||||
MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w
|
MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /X /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w
|
||||||
INTEL:*_*_*_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w
|
INTEL:*_*_*_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) /w
|
||||||
GCC:*_*_*_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w
|
GCC:*_*_*_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) -w
|
||||||
|
RVCT:DEBUG_*_*_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3
|
||||||
|
RVCT:RELEASE_*_*_CC_FLAGS = $(OPENSSL_FLAGS) $(OPENSSL_EXFLAGS) --library_interface=aeabi_clib99 --fpu=vfpv3
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue