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
}