Skip to content

Commit

Permalink
Buid: Migrate all tools to Utilities (acidanthera#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
PMheart authored Jun 5, 2020
1 parent ecea50a commit c904ab6
Show file tree
Hide file tree
Showing 69 changed files with 1,541 additions and 2,442 deletions.
27 changes: 13 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@ xcshareddata
xcuserdata
project.xcworkspace
*.dSYM
TestsUser/DiskImage/DiskImage
TestsUser/Macho/Macho
TestsUser/Prelinked/Prelinked
TestsUser/Prelinked/Result.xml
TestsUser/RsaPreprocess/RsaPreprocess
TestsUser/Serialized/Serialized
TestsUser/Smbios/Smbios
Utilities/RsaTool/RsaTool
Utilities/EfiResTool/EfiResTool
Utilities/AppleEfiSignTool/AppleEfiSignTool
Utilities/disklabel/disklabel
Utilities/EfiResTool/EfiResTool
Utilities/macserial/macserial
Utilities/icnspack/icnspack
Utilities/DiskImage/DiskImage
Utilities/HelloWorld/HelloWorld
Utilities/KextInject/KextInject
Utilities/ConfigValidity/ConfigValidity
Utilities/disklabel/disklabel
Utilities/ocvalidate/ocvalidate
Utilities/RsaTool/RsaTool
Utilities/TestBmf/Bmf
Utilities/TestDiskImage/DiskImage
Utilities/TestHelloWorld/HelloWorld
Utilities/TestImg4/Img4
Utilities/TestKextInject/KextInject
Utilities/TestKextInject/Result.xml
Utilities/TestMacho/Macho
Utilities/TestRsaPreprocess/RsaPreprocess
Utilities/TestSmbios/Smbios
*.o
*.exe
DICT
Expand Down
Binary file modified Docs/Configuration.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion Docs/Configuration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ \subsection{Configuration Structure}\label{configuration-structure}
\end{itemize}

It is possible to perform basic validation of the configuration by using
\texttt{ConfigValidity} utility. Please note, that \texttt{ConfigValidity}
\texttt{ocvalidate} utility. Please note, that \texttt{ocvalidate}
must match the used OpenCore release and may not be able to detect all
configuration flaws present in the file.

Expand Down
Binary file modified Docs/Differences/Differences.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions Docs/Differences/Differences.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Tue Jun 2 03:55:18 2020
%DIF ADD ../Configuration.tex Fri Jun 5 12:29:25 2020
%DIF DEL PreviousConfiguration.tex Tue Jun 2 02:24:29 2020
%DIF ADD ../Configuration.tex Fri Jun 5 19:35:52 2020

\usepackage{lmodern}
\usepackage{amssymb,amsmath}
Expand Down Expand Up @@ -429,7 +429,7 @@ \subsection{Configuration Structure}\label{configuration-structure}
\end{itemize}

It is possible to perform basic validation of the configuration by using
\texttt{ConfigValidity} utility. Please note, that \texttt{ConfigValidity}
\texttt{\DIFdelbegin \DIFdel{ConfigValidity}\DIFdelend \DIFaddbegin \DIFadd{ocvalidate}\DIFaddend } utility. Please note, that \texttt{\DIFdelbegin \DIFdel{ConfigValidity}\DIFdelend \DIFaddbegin \DIFadd{ocvalidate}\DIFaddend }
must match the used OpenCore release and may not be able to detect all
configuration flaws present in the file.

Expand Down
4 changes: 2 additions & 2 deletions Library/OcAppleImg4Lib/OcAppleImg4Lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "libDERImg4/libDERImg4.h"
#include "libDERImg4/Img4oids.h"

GLOBAL_REMOVE_IF_UNREFERENCED const uint8_t *DERImg4RootCertificate = gAppleX86SecureBootRootCaCert;
GLOBAL_REMOVE_IF_UNREFERENCED const size_t *DERImg4RootCertificateSize = &gAppleX86SecureBootRootCaCertSize;
GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 *DERImg4RootCertificate = gAppleX86SecureBootRootCaCert;
GLOBAL_REMOVE_IF_UNREFERENCED const UINTN *DERImg4RootCertificateSize = &gAppleX86SecureBootRootCaCertSize;

bool
DERImg4VerifySignature (
Expand Down
4 changes: 2 additions & 2 deletions Library/OcAppleImg4Lib/libDERImg4/libDERImg4_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ extern "C" {

#define DER_IMG4_MAX_DIGEST_SIZE 64

extern const uint8_t *DERImg4RootCertificate;
extern const size_t *DERImg4RootCertificateSize;
extern const UINT8 *DERImg4RootCertificate;
extern const UINTN *DERImg4RootCertificateSize;

bool
DERImg4VerifySignature (
Expand Down
18 changes: 15 additions & 3 deletions Library/OcAppleImg4Lib/libDER_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,35 @@ extern "C" {
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>

#ifndef EFIUSER
typedef UINT8 uint8_t;
typedef UINT16 uint16_t;
typedef UINT32 uint32_t;
typedef UINT64 uint64_t;
typedef UINTN size_t;

#ifndef bool
typedef BOOLEAN bool;
#endif
#endif /* bool */

#ifndef assert
#define assert ASSERT
#endif
#define DER_ENCODE_ENABLE 0
#endif /* assert */

#define memset(ptr, c, len) SetMem(ptr, len, c)
#define memmove(dst, src, len) CopyMem(dst, src, len)
#define memcmp(b1, b2, len) CompareMem(b1, b2, len)

#else /* EFIUSER */
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#endif /* !EFIUSER */

#define DER_ENCODE_ENABLE 0

#define DER_TAG_SIZE 8
//
// edk2 porting - end
Expand Down
2 changes: 1 addition & 1 deletion Library/OcCpuLib/OcCpuInternals.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// Tolerance within which we consider two frequency values to be roughly
// equivalent.
//
#define OC_CPU_FREQUENCY_TOLERANCE 50000000ULL // 50 Mhz
#define OC_CPU_FREQUENCY_TOLERANCE 50000000LL // 50 Mhz

/**
Internal CPU synchronisation structure.
Expand Down
2 changes: 1 addition & 1 deletion Platform/OpenCanopy/Input/InputSimAbsPtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ InternalGetInterpolatedValue (
if (Value != 0) {
Bit = HighBitSet32 (ABS (Value));
return (INT64) Value * AccelerationNumbers[
MIN (Bit, ARRAY_SIZE (AccelerationNumbers) - 1)
MIN (Bit, (INTN) ARRAY_SIZE (AccelerationNumbers) - 1)
];
}

Expand Down
Loading

0 comments on commit c904ab6

Please sign in to comment.