EDK2: new recipe (#2582)

This commit is contained in:
miqlas
2018-06-24 06:02:29 +02:00
committed by waddlesplash
parent 365226b6b2
commit 129b5b4aba
2 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
SUMMARY="EFI firmware development environment"
DESCRIPTION="The EDK II project is the response to the EFI communitys \
request for a better build and version tracking environment for UEFI and PI \
development. The main difference between the EDK II to the original EDK is \
the Enhanced Build Environment of the EDK II. The advantages of the Enhanced \
Build Environment include:
* Operating System independence
* Flexibility in choosing the compiler and assembler tools
* The ability to generate working code using open source build tools and \
applications
* Enhanced development and build capability of modules and module packages
* Use of build configuration tools and data sets to provide flexible process
* Online source control allows users to contribute code and become participants"
HOMEPAGE="http://www.tianocore.org/"
COPYRIGHT="2004-2016 Intel Corporation
2008-2010 Apple Inc
2011-2015 ARM Limited
2014-2015 Linaro Limited
2013-2015 Red Hat, Inc."
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/tianocore/edk2/archive/vUDK$portVersion.tar.gz"
CHECKSUM_SHA256="a37aa6dc7a4326b562ce03e225afd96a0cd1dc847d9aeddfd867ce6b2e7cc7bc"
SOURCE_DIR="edk2-vUDK$portVersion"
PATCHES="edk2-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 !x86 x86_64"
SECONDARY_ARCHITECTURES="!x86"
DISABLE_SOURCE_PACKAGE="yes"
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
fi
PROVIDES="
edk2$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libuuid$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:iasl$commandSuffix
cmd:make
cmd:nasm
cmd:python2
cmd:sed
"
PATCH()
{
local ACTIVE_PLATFORM="MdeModulePkg/MdeModulePkg.dsc"
local TARGET="RELEASE" # DEBUG, RELEASE, NOOPT
local TARGET_ARCH="X64" # IA32, IPF, X64, EBC, ARM or AArch64
local TOOL_CHAIN_TAG="GCC5"
if [ "$effectiveTargetArchitecture" = x86 ]; then
local TARGET_ARCH="IA32" # IA32, IPF, X64, EBC, ARM or AArch64
fi
sed -i "s|@ACTIVE_PLATFORM@|$ACTIVE_PLATFORM|g" BaseTools/Conf/target.template
sed -i "s|@TARGET@|$TARGET|g" BaseTools/Conf/target.template
sed -i "s|@TARGET_ARCH@|$TARGET_ARCH|g" BaseTools/Conf/target.template
sed -i "s|@TOOL_CHAIN_TAG@|$TOOL_CHAIN_TAG|g" BaseTools/Conf/target.template
sed -i "s|gcc-ar|ar|g" BaseTools/Conf/tools_def.template
}
BUILD()
{
make -C BaseTools
. ./edksetup.sh
local EDK_TOOLS_PATH="$sourceDir"/BaseTools
. ./edksetup.sh BaseTools
build
}
INSTALL()
{
install -m 0755 -d "$dataDir"/edk2
cd Build
install -m 0644 -t "$dataDir"/edk2 */RELEASE*/*/*.efi
}

View File

@@ -0,0 +1,75 @@
From 01018cf928376c099cc2a7a52ea56b697c895da6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 20 May 2018 11:03:33 +0200
Subject: strlwr redeclared
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index dccb192..53ff817 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -474,9 +474,11 @@ Returns:
#define strcmpi strcasecmp
size_t _filelength(int fd);
#ifndef __CYGWIN__
+#ifndef __HAIKU__
char *strlwr(char *s);
#endif
#endif
+#endif
//
// On windows, mkdir only has one parameter.
--
2.16.2
From 20624f52f58bffbbfae989a00ac3d6b6b4fc7bb3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 20 May 2018 11:06:15 +0200
Subject: Build conf parametrisation
diff --git a/BaseTools/Conf/target.template b/BaseTools/Conf/target.template
index e5c31fe..032318a 100644
--- a/BaseTools/Conf/target.template
+++ b/BaseTools/Conf/target.template
@@ -23,7 +23,7 @@
# build. This line is required if and only if the current
# working directory does not contain one or more description
# files.
-ACTIVE_PLATFORM = Nt32Pkg/Nt32Pkg.dsc
+ACTIVE_PLATFORM = @ACTIVE_PLATFORM@
# TARGET List Optional Zero or more of the following: DEBUG, RELEASE, NOOPT
# UserDefined; separated by a space character.
@@ -31,7 +31,7 @@ ACTIVE_PLATFORM = Nt32Pkg/Nt32Pkg.dsc
# valid targets specified in the platform description file
# will attempt to be built. The following line will build
# DEBUG platform target.
-TARGET = DEBUG
+TARGET = @TARGET@
# TARGET_ARCH List Optional What kind of architecture is the binary being target for.
# One, or more, of the following, IA32, IPF, X64, EBC, ARM
@@ -47,7 +47,7 @@ TARGET = DEBUG
# If not specified, then all valid architectures specified
# in the platform file, for which tools are available, will be
# built.
-TARGET_ARCH = IA32
+TARGET_ARCH = @TARGET_ARCH@
# TOOL_DEFINITION_FILE Filename Optional Specify the name of the filename to use for specifying
# the tools to use for the build. If not specified,
@@ -57,7 +57,7 @@ TOOL_CHAIN_CONF = Conf/tools_def.txt
# TAGNAME List Optional Specify the name(s) of the tools_def.txt TagName to use.
# If not specified, all applicable TagName tools will be
# used for the build. The list uses space character separation.
-TOOL_CHAIN_TAG = MYTOOLS
+TOOL_CHAIN_TAG = @TOOL_CHAIN_TAG@
# MAX_CONCURRENT_THREAD_NUMBER NUMBER Optional The number of concurrent threads. If not specified or set
# to zero, tool automatically detect number of processor
--
2.16.2