Skip to content

Commit

Permalink
Build: Include DuetPkg as OpenDuetPkg
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed May 17, 2020
1 parent f76030f commit ce1c67b
Show file tree
Hide file tree
Showing 125 changed files with 32,903 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ prelinkedkernel.unpack
*.pyc
Debug/QemuRun
Doxy
Legacy/BinDrivers/X64
Legacy/BinDrivers/IA32
Legacy/BootLoader/bin
Legacy/BootSector/bin
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ matrix:

script:
- HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl mingw-w64
- "./macbuild.tool"
- "./build_oc.tool"
- "./build_duet.tool"

deploy:
provider: releases
Expand Down Expand Up @@ -59,7 +60,8 @@ matrix:
- if [ "$sum" != "$expsum" ]; then echo "Invalid checksum $sum" ; exit 1 ; fi
- tar -xf "${file}${suf}" || exit 1
- export PATH="$(pwd)/${file}/bin:$PATH"
- "./macbuild.tool"
- "./build_oc.tool"
- "./build_duet.tool"

- os: linux
name: "Build Linux CLANG38"
Expand All @@ -77,7 +79,8 @@ matrix:
- sudo apt-get remove -y llvm-3.8 libllvm3.8 # Move LLVM 3.8 out of the way.
- export PATH="/usr/lib/llvm-8/bin:$PATH" # Default compiler (7.0 or 3.8) has no LTO plugin.
- export TOOLCHAINS=CLANG38
- "./macbuild.tool"
- "./build_oc.tool"
- "./build_duet.tool"
# Currently this is too ugly, but maybe we can use that in the future.
- sudo apt-get install -y doxygen texlive texlive-latex-extra
- abort() { tail -200 log.txt ; exit 1 ; }
Expand Down Expand Up @@ -107,6 +110,6 @@ matrix:
name: "acidanthera/OpenCorePkg"
description: "OpenCorePkg"
notification_email: $NOTIFICATION_EMAIL
build_command_prepend: "./macbuild.tool --skip-build --skip-package && cd UDK ; src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/covstrap.sh) && eval \"$src\" || exit 1"
build_command: "../macbuild.tool --skip-tests --skip-package RELEASE"
build_command_prepend: "./build_oc.tool --skip-build --skip-package && cd UDK ; src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/covstrap.sh) && eval \"$src\" || exit 1"
build_command: "../build_oc.tool --skip-tests --skip-package RELEASE"
branch_pattern: master
12 changes: 6 additions & 6 deletions Docs/Configuration.tex
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ \subsection{Installation and Upgrade}\label{configuration-install}
utilised.

For BIOS booting a third-party UEFI environment provider will have to
be used. \texttt{DuetPkg} is one of the known UEFI environment providers
be used. \texttt{OpenDuetPkg} is one of the known UEFI environment providers
for legacy systems. To run OpenCore on such a legacy system you can install
\texttt{DuetPkg} with a dedicated tool BootInstall (bundled with OpenCore).
\texttt{OpenDuetPkg} with a dedicated tool BootInstall (bundled with OpenCore).

For upgrade purposes refer to \texttt{Differences.pdf} document, providing
the information about the changes affecting the configuration compared
Expand Down Expand Up @@ -591,7 +591,6 @@ \subsection{Contribution}\label{configuration-comp}
\begin{lstlisting}[caption=Compilation Commands, label=compile, style=ocbash]
git clone https://github.com/acidanthera/audk UDK
cd UDK
git clone https://github.com/acidanthera/DuetPkg
git clone https://github.com/acidanthera/OpenCorePkg
source edksetup.sh
make -C BaseTools
Expand All @@ -610,11 +609,12 @@ \subsection{Contribution}\label{configuration-comp}
-I/UefiPackages/MdeModulePkg
-I/UefiPackages/MdeModulePkg/Include
-I/UefiPackages/MdeModulePkg/Include/X64
-I/UefiPackages/DuetPkg/Include
-I/UefiPackages/AppleSupportPkg/Include
-I/UefiPackages/OpenCorePkg/Include/AMI
-I/UefiPackages/OpenCorePkg/Include/Acidanthera
-I/UefiPackages/OpenCorePkg/Include/Apple
-I/UefiPackages/OpenCorePkg/Include/Apple/X64
-I/UefiPackages/OpenCorePkg/Include/Duet
-I/UefiPackages/OpenCorePkg/Include/Generic
-I/UefiPackages/OpenCorePkg/Include/Intel
-I/UefiPackages/OpenCorePkg/Include/Microsoft
Expand Down Expand Up @@ -2217,7 +2217,7 @@ \subsection{Introduction}\label{miscintro}
\end{itemize}

\emph{Note 1}: This process is meant to work reliably only when \texttt{RequestBootVarRouting}
option is enabled or the firmware does not control UEFI boot options (\texttt{DuetPkg} or
option is enabled or the firmware does not control UEFI boot options (\texttt{OpenDuetPkg} or
custom BDS). Without \texttt{BootProtect} it also is possible that other operating systems
overwrite OpenCore, make sure to enable it if you plan to use them.

Expand Down Expand Up @@ -4163,7 +4163,7 @@ \subsection{Drivers}\label{uefidrivers}
on top of a custom USB keyboard driver implementation. This is an alternative to
builtin \texttt{KeySupport}, which may work better or worse depending on the firmware. \\
\href{https://github.com/acidanthera/audk}{\texttt{Ps2KeyboardDxe}}\textbf{*}
& PS/2 keyboard driver from \texttt{MdeModulePkg}. DuetPkg and some firmwares
& PS/2 keyboard driver from \texttt{MdeModulePkg}. \texttt{OpenDuetPkg} and some firmwares
may not include this driver, but it is necessary for PS/2 keyboard to work.
Note, unlike \texttt{OpenUsbKbDxe} this driver has no \texttt{AppleKeyMapAggregator}
support and thus requires \texttt{KeySupport} to be enabled. \\
Expand Down
153 changes: 153 additions & 0 deletions Include/Duet/EfiFlashMap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/** @file
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
EfiFlashMap.h
Abstract:
Defines for the EFI Flash Map functionality
**/

#ifndef _EFI_FLASHMAP_H_
#define _EFI_FLASHMAP_H_

//
// Definition for flash map GUIDed HOBs
//
typedef UINT32 EFI_FLASH_AREA_ATTRIBUTES;

#define EFI_FLASH_AREA_FV 0x0001
#define EFI_FLASH_AREA_SUBFV 0x0002
#define EFI_FLASH_AREA_MEMMAPPED_FV 0x0004
#define EFI_FLASH_AREA_REQUIRED 0x0008
#define EFI_FLASH_AREA_CORRUPT 0x0010

typedef UINT8 EFI_FLASH_AREA_TYPE;

#define EFI_FLASH_AREA_RECOVERY_BIOS 0x0 // Recovery code
#define EFI_FLASH_AREA_MAIN_BIOS 0x1 // Regular BIOS code
#define EFI_FLASH_AREA_PAL_B 0x2 // PAL-B
#define EFI_FLASH_AREA_RESERVED_03 0x3 // Reserved for backwards compatibility
#define EFI_FLASH_AREA_RESERVED_04 0x4 // Reserved for backwards compatibility
#define EFI_FLASH_AREA_DMI_FRU 0x5 // DMI FRU information
#define EFI_FLASH_AREA_OEM_BINARY 0x6 // OEM Binary Code/data
#define EFI_FLASH_AREA_RESERVED_07 0x7 // Reserved for backwards compatibility
#define EFI_FLASH_AREA_RESERVED_08 0x8 // Reserved for backwards compatibility
#define EFI_FLASH_AREA_RESERVED_09 0x9 // Reserved for backwards compatibility
#define EFI_FLASH_AREA_RESERVED_0A 0x0a // Reserved for backwards compatibility
#define EFI_FLASH_AREA_EFI_VARIABLES 0x0b // EFI variables
#define EFI_FLASH_AREA_MCA_LOG 0x0c // MCA error log
#define EFI_FLASH_AREA_SMBIOS_LOG 0x0d // SMBIOS error log
#define EFI_FLASH_AREA_FTW_BACKUP 0x0e // A backup block during FTW operations
#define EFI_FLASH_AREA_FTW_STATE 0x0f // State information during FTW operations
#define EFI_FLASH_AREA_UNUSED 0x0fd // Not used
#define EFI_FLASH_AREA_GUID_DEFINED 0x0fe // Usage defined by a GUID
#pragma pack(1)
//
// An individual sub-area Entry.
// A single flash area may consist of more than one sub-area.
//
/**
typedef struct {
EFI_FLASH_AREA_ATTRIBUTES Attributes;
UINT32 Reserved;
EFI_PHYSICAL_ADDRESS Base;
EFI_PHYSICAL_ADDRESS Length;
EFI_GUID FileSystem;
} EFI_FLASH_SUBAREA_ENTRY;
typedef struct {
UINT8 Reserved[3];
EFI_FLASH_AREA_TYPE AreaType;
EFI_GUID AreaTypeGuid;
UINT32 NumEntries;
EFI_FLASH_SUBAREA_ENTRY Entries[1];
} EFI_FLASH_MAP_ENTRY_DATA;
typedef struct {
UINT8 Reserved[3];
EFI_FLASH_AREA_TYPE AreaType;
EFI_GUID AreaTypeGuid;
UINT32 NumberOfEntries;
EFI_FLASH_SUBAREA_ENTRY Entries[1];
//
// Extended Hob data.
//
// VolumeId and FilePath indicating a unique file.
//
UINT32 VolumeId;
CHAR16 FilePath[256];
UINT32 ActuralSize;
UINT32 Offset;
} EFI_FLASH_MAP_FS_ENTRY_DATA;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Name;
UINT8 Reserved[3];
EFI_FLASH_AREA_TYPE AreaType;
EFI_GUID AreaTypeGuid;
UINT32 NumEntries;
EFI_FLASH_SUBAREA_ENTRY Entries[1];
} EFI_HOB_FLASH_MAP_ENTRY_TYPE;
//
// Internal definitions
//
typedef struct {
UINT8 Reserved[3];
EFI_FLASH_AREA_TYPE AreaType;
EFI_GUID AreaTypeGuid;
UINT32 NumberOfEntries;
EFI_FLASH_SUBAREA_ENTRY SubAreaData;
} EFI_FLASH_AREA_HOB_DATA;
typedef struct {
UINTN Base;
UINTN Length;
EFI_FLASH_AREA_ATTRIBUTES Attributes;
EFI_FLASH_AREA_TYPE AreaType;
UINT8 Reserved[3];
EFI_GUID AreaTypeGuid;
} EFI_FLASH_AREA_DATA;
**/

typedef struct {
EFI_FLASH_AREA_ATTRIBUTES Attributes;
UINT32 Reserved;
EFI_PHYSICAL_ADDRESS Base;
EFI_PHYSICAL_ADDRESS Length;
EFI_GUID FileSystem;
} EFI_FLASH_SUBAREA_ENTRY;

typedef struct {
UINT8 Reserved[3];
EFI_FLASH_AREA_TYPE AreaType;
EFI_GUID AreaTypeGuid;
UINT32 NumberOfEntries;
EFI_FLASH_SUBAREA_ENTRY Entries[1];
//
// Extended Hob data.
//
// VolumeId and FilePath indicating a unique file.
//
UINT32 VolumeId;
CHAR16 FilePath[258];
UINT32 ActuralSize;
UINT32 Offset;
} EFI_FLASH_MAP_FS_ENTRY_DATA;

#pragma pack()

#endif // #ifndef _EFI_FLASHMAP_H_
Loading

0 comments on commit ce1c67b

Please sign in to comment.