-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EFI: Port acpidump to EDK2 environment
This patch adds necessary build files for EDK2 environment to build ACPICA tools. The command steps of building edk2 binaries are (if you are using gcc4.7): # cd edk2 # . ./edksetup.sh # ln -s <path to acpica> AcpiPkg # AcpiPkg/generate/efi/edksetup.sh # build -p AcpiPkg/AcpiPkg.dsc -t GCC47 Note the above build test was done in Linux, and the Windows hasn't been tested when this patch is generated. For building edk2 binaries in the MSVC environment, you need to modify acpidump.inf, adding necessary options when they cannot pass the build in the following configure items: MSFT:*_*_IA32_CC_FLAGS/MSFT:*_*_X64_CC_FLAGS. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
- Loading branch information
Lv Zheng
committed
Jul 22, 2016
1 parent
a9dfb44
commit 790b8ba
Showing
9 changed files
with
179 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## @file | ||
# Build description file to ACPICA applications. | ||
# | ||
# Copyright (c) 2009 - 2011, 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. | ||
# | ||
## | ||
|
||
[Defines] | ||
PACKAGE_NAME = AcpiPkg | ||
PACKAGE_GUID = 3ee43d98-2941-11e6-a597-0024e8c6d30e | ||
PACKAGE_VERSION = 0.01 | ||
DEC_SPECIFICATION = 0x00010005 | ||
|
||
[Includes] | ||
source/include | ||
|
||
[Guids] | ||
gAcpiPkgTokenSpaceGuid = { 0x81c5af5c, 0x2941, 0x11e6, { 0xa5, 0x3d, 0x00, 0x24, 0xe8, 0xc6, 0xd3, 0x0e }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#/** @file | ||
# Build discription file to generate ACPICA applications. | ||
# | ||
# Copyright (c) 2009 Intel Corporation. All rights reserved | ||
# This software and associated documentation (if any) is furnished | ||
# under a license and may only be used or copied in accordance | ||
# with the terms of the license. Except as permitted by such | ||
# license, no part of this software or documentation may be | ||
# reproduced, stored in a retrieval system, or transmitted in any | ||
# form or by any means without the express written consent of | ||
# Intel Corporation. | ||
# | ||
# **/ | ||
|
||
[Defines] | ||
PLATFORM_NAME = Acpi | ||
PLATFORM_GUID = b03fdec4-2942-11e6-a416-0024e8c6d30e | ||
PLATFORM_VERSION = 1.0 | ||
DSC_SPECIFICATION = 0x00010005 | ||
OUTPUT_DIRECTORY = Build/Acpi | ||
SUPPORTED_ARCHITECTURES = IA32|X64 | ||
BUILD_TARGETS = DEBUG|RELEASE | ||
SKUID_IDENTIFIER = DEFAULT | ||
|
||
[LibraryClasses] | ||
# | ||
# Entry Point Libraries | ||
# | ||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf | ||
# | ||
# Common Libraries | ||
# | ||
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf | ||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf | ||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf | ||
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf | ||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf | ||
!if $(DEBUG_ENABLE_OUTPUT) | ||
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf | ||
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf | ||
!else ## DEBUG_ENABLE_OUTPUT | ||
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf | ||
!endif ## DEBUG_ENABLE_OUTPUT | ||
|
||
[Components.common] | ||
AcpiPkg/source/acpidump.inf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## @file | ||
# acpidump.inf | ||
# | ||
# Copyright (c) 2016, Intel Corporation. All rights reserved. | ||
# | ||
# 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. | ||
# | ||
# | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = acpidump | ||
FILE_GUID = bf942c9a-2942-11e6-9a64-0024e8c6d30e | ||
MODULE_TYPE = UEFI_APPLICATION | ||
VERSION_STRING = 1.0 | ||
ENTRY_POINT = UefiMain | ||
|
||
[Sources] | ||
tools/acpidump/apdump.c | ||
tools/acpidump/apfiles.c | ||
tools/acpidump/apmain.c | ||
common/cmfsize.c | ||
common/getopt.c | ||
os_specific/service_layers/oseficlib.c | ||
os_specific/service_layers/osefitbl.c | ||
os_specific/service_layers/osefixf.c | ||
components/tables/tbprint.c | ||
components/tables/tbxfroot.c | ||
components/utilities/utascii.c | ||
components/utilities/utbuffer.c | ||
components/utilities/utclib.c | ||
components/utilities/utdebug.c | ||
components/utilities/utexcep.c | ||
components/utilities/utglobal.c | ||
components/utilities/utmath.c | ||
components/utilities/utnonansi.c | ||
components/utilities/utprint.c | ||
components/utilities/utstring.c | ||
components/utilities/utxferror.c | ||
|
||
[Packages] | ||
AcpiPkg/AcpiPkg.dec | ||
MdePkg/MdePkg.dec | ||
|
||
[LibraryClasses] | ||
UefiApplicationEntryPoint | ||
BaseLib | ||
|
||
[BuildOptions] | ||
MSFT:*_*_IA32_CC_FLAGS = /Oi- /WX- /D_EDK2_EFI /DACPI_DUMP_APP | ||
MSFT:*_*_X64_CC_FLAGS = /Oi- /WX- /D_EDK2_EFI /DACPI_DUMP_APP | ||
GCC:*_*_IA32_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include | ||
GCC:*_*_X64_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
EFIPROGS="acpidump" | ||
|
||
EFIDIR=`(cd \`dirname $0\`; pwd)` | ||
TOPDIR=`(cd ${EFIDIR}/../..; pwd)` | ||
|
||
echo "Copying AcpiPkg package files..." | ||
cp -f ${EFIDIR}/AcpiPkg.dec ${TOPDIR}/AcpiPkg.dec | ||
cp -f ${EFIDIR}/AcpiPkg.dsc ${TOPDIR}/AcpiPkg.dsc | ||
for p in ${EFIPROGS}; do | ||
echo "Copying $p build files..." | ||
cp -f ${EFIDIR}/$p/${p}.inf ${TOPDIR}/source/${p}.inf | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters