summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kuhn (Wuodan) <wuodan-gentoo@hispeed.ch>2012-12-15 13:34:34 +0100
committerStefan Kuhn (Wuodan) <wuodan-gentoo@hispeed.ch>2012-12-15 13:34:34 +0100
commitbde5487b9ef2758ef6464c23e4e630d7cbb6e0fb (patch)
treeb6f43604b0a83fac4f17d8be08f0aed793456d64
parentsys-firmware/edk2 : tested update (diff)
downloadwuodan-bde5487b9ef2758ef6464c23e4e630d7cbb6e0fb.tar.gz
wuodan-bde5487b9ef2758ef6464c23e4e630d7cbb6e0fb.tar.bz2
wuodan-bde5487b9ef2758ef6464c23e4e630d7cbb6e0fb.zip
sys-firmware/edk2-efishell-bin: ebuild fetches the binary from edk2 repo/website
sys-firmware: minor updates
-rw-r--r--sys-firmware/edk2-efishell-bin/Manifest1
-rw-r--r--sys-firmware/edk2-efishell-bin/edk2-efishell-bin-9999.ebuild26
-rw-r--r--sys-firmware/edk2/Manifest4
-rw-r--r--sys-firmware/edk2/edk2-9999-r11337.ebuild190
-rw-r--r--sys-firmware/edk2/metadata.xml1
5 files changed, 219 insertions, 3 deletions
diff --git a/sys-firmware/edk2-efishell-bin/Manifest b/sys-firmware/edk2-efishell-bin/Manifest
new file mode 100644
index 0000000..e4abaea
--- /dev/null
+++ b/sys-firmware/edk2-efishell-bin/Manifest
@@ -0,0 +1 @@
+EBUILD edk2-efishell-bin-9999.ebuild 685 SHA256 59abf4ec24494428a69a4a1b1b5765b2ea33562df0afa5ff10ed7abb97a744c8 SHA512 5c29adb08683abd8c45101c186bba515e330665f696f25f35157f53ac142d14f763b84d64de393979da54f9a06800ce2dc53c6cf4596c6f773943ed77989ea6a WHIRLPOOL dbc082c5301738228787da60b1e14e7451be21288d566953edfeb19566d57bddd89b533000493ce7af15675476ccf5879e4700cca4b0ddb32cd409e46f825ff2
diff --git a/sys-firmware/edk2-efishell-bin/edk2-efishell-bin-9999.ebuild b/sys-firmware/edk2-efishell-bin/edk2-efishell-bin-9999.ebuild
new file mode 100644
index 0000000..55afd32
--- /dev/null
+++ b/sys-firmware/edk2-efishell-bin/edk2-efishell-bin-9999.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit subversion
+
+DESCRIPTION="EFI-Shell - provides native UDK implemenations of a UEFI Shell 2.0."
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell"
+SRC_URI=""
+# ESVN_REPO_URI="http://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg"
+ESVN_REPO_URI="http://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64"
+
+LICENSE="intel-ucode"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install() {
+ insinto "/usr/share/${PN}/shell"
+ newins Shell.efi Shellx64.efi
+}
diff --git a/sys-firmware/edk2/Manifest b/sys-firmware/edk2/Manifest
index ff83e67..2cfd838 100644
--- a/sys-firmware/edk2/Manifest
+++ b/sys-firmware/edk2/Manifest
@@ -1,2 +1,2 @@
-EBUILD edk2-0.ebuild 6593 SHA256 fd4de6f4bda7617cf2ee6a1bd206f6f02427b5ea1e03da8a4cb276ca5769172f SHA512 6b28c198b9d43214b7fec44e4e8e9da3884fbc041e17f93c9a401761a06d0d027eb70e724357f6f7d2905e0688b2290cfecbf43349690d822344e1838485a97c WHIRLPOOL 3bbe22583f99e73b83b173d96cad25e40fabb335a945d3d7ddccebb862a3e6e80031d4b911d9ba1f6c122afecbae392cf73387961c365612796d8a439a1a9ce8
-MISC metadata.xml 713 SHA256 370cd2807e54e5596c488a0511e6b99d39934b44aa8b51a31fb4bd180cbb9bc2 SHA512 1cdf87a9e05d880568438e4b20c2500bae285aa7d98c98b925149344e8b2521385e06099d27caeb8c2bb05803cf9579f067c8c3810e999c05594151c01dfb464 WHIRLPOOL 554c7163858f7b63793fbdaae8fede3453043a53288858f2c15ccc813edf357992ce987032523e56c3cf629311c8e526e6ebce6df349a1d55f9fbade6e01a744
+EBUILD edk2-9999-r11337.ebuild 6355 SHA256 1947b6c0356283da6360d9dd51be703b951e0eaccb52ac4450f7fbcc6e076504 SHA512 b703162b7b60f6d9a5e69eb57d82c9e5638ccbe449cc5b887ab73e5ec53b31f262488ab1dbf7080557a2d1a0673340cfed7b99a30c3779d02232247b25aedd34 WHIRLPOOL ddbc0412d639594fa3913b382f75804f4b01df5a38059fda5355ba903ccdec5021c99e184b78c83c6661739228b90b639d61a5752578fc69036d292a4ecbd187
+MISC metadata.xml 634 SHA256 926504f700c193cd127263da7e38869bbc5a79260811fd0ebb49097d576e5191 SHA512 184cbcc668a57b07238e13fa7a4c3a15cb9c277265bd3071324e97d7f9c89a7a5eff37e393335a338381d7ee3cdb2626495f9e91b53b3fc06cf77b0fc36d45a8 WHIRLPOOL 7dc634a6befd693939988d936abb225861b2a6077084edfa64df1150e9b2054f11c33ee108faa5588395dfcdefe6056ab74f16ddd46cec096b04731afbe7b0da
diff --git a/sys-firmware/edk2/edk2-9999-r11337.ebuild b/sys-firmware/edk2/edk2-9999-r11337.ebuild
new file mode 100644
index 0000000..49299af
--- /dev/null
+++ b/sys-firmware/edk2/edk2-9999-r11337.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="sqlite"
+inherit python subversion toolchain-funcs flag-o-matic
+
+DESCRIPTION="A modern, feature-rich, cross-platform firmware development env. for the UEFI and PI specifications"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/tianocore"
+SRC_URI=""
+REPO_REV="@11337"
+# REPO_REV="@13452"
+# REPO_REV="@13692"
+ESVN_REPO_URI="http://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="hello-world kvm shell"
+REQUIRED_USE="|| ( hello-world kvm shell )"
+
+DEPEND="
+ app-arch/unzip
+ sys-devel/binutils
+ sys-libs/glibc
+ >=dev-vcs/subversion-1.5
+ kvm? (
+ >=app-emulation/qemu-0.9.1
+ sys-power/iasl
+ )"
+RDEPEND="kvm? ( >=app-emulation/qemu-0.9.1 )"
+
+S="$(dirname ${S})"
+
+TAGNAME="GCC$(gcc-major-version)$(gcc-minor-version)"
+# TODO:
+# fix this:
+# In function ‘void* memset(void*, int, size_t)’,
+# inlined from ‘SVfrVarStorageNode::SVfrVarStorageNode(EFI_GUID*, CHAR8*, EFI_VARSTORE_ID, EFI_STRING_ID, UINT32, BOOLEAN)’ at VfrUtilityLib.cpp:1309:41:
+# /usr/include/bits/string3.h:85:70: warning: call to void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int) will always overflow destination buffer
+# In function ‘void* memset(void*, int, size_t)’,
+# inlined from ‘SVfrVarStorageNode::SVfrVarStorageNode(EFI_GUID*, CHAR8*, EFI_VARSTORE_ID, SVfrDataType*, BOOLEAN)’ at VfrUtilityLib.cpp:1336:41:
+# /usr/include/bits/string3.h:85:70: warning: call to void* __builtin___memset_chk(void*, int, long unsigned int, long unsigned int) will always overflow destination buffer
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_unpack(){
+ local repo_pkg="
+ MdePkg
+ MdeModulePkg
+ "
+ use kvm && repo_pkg+="
+ OvmfPkg
+ OptionRomPkg
+ UefiCpuPkg
+ IntelFrameworkModulePkg
+ PcAtChipsetPkg
+ FatBinPkg
+ EdkShellBinPkg
+ IntelFrameworkPkg
+ "
+ ( use kvm || use shell ) && repo_pkg+="
+ ShellPkg
+ "
+ einfo "### Be patient! ###"
+ einfo "Downloading individual folders is slow, but really decreases total download size."
+ einfo "### Be patient! ###"
+
+ mkdir Conf || die "Failed to 'mkdir Conf'"
+ ESVN_OPTIONS="--depth files" subversion_fetch "${ESVN_REPO_URI}${REPO_REV}"
+ # avoid downloading useless Bin (47MB) folder
+ ESVN_OPTIONS="--depth immediates" subversion_fetch "${ESVN_REPO_URI}/BaseTools${REPO_REV}" BaseTools
+ local dir
+ for dir in `find BaseTools -mindepth 1 -maxdepth 1 -type d | grep -v 'Bin$'`; do
+ subversion_fetch "${ESVN_REPO_URI}/${dir}${REPO_REV}" "${dir}"
+ done
+
+ for dir in ${repo_pkg}; do
+ subversion_fetch "${ESVN_REPO_URI}/${dir}${REPO_REV}" "${dir}"
+ done
+}
+
+src_prepare(){
+ # errors occur with -O -O1 -O2 but not with -O3
+ filter-flags -O*
+ # TODO AS=gcc ...why I don't know
+ # patch compiler flags
+ sed -i -r \
+ -e "s/^(CC = ).*$/\1`tc-getCC`/" \
+ -e "s/^(CXX = ).*$/\1`tc-getCXX`/" \
+ -e "s/^(AS = ).*$/\1`tc-getAS`/" \
+ -e "s/^(AR = ).*$/\1`tc-getAR`/" \
+ -e "s/^(LD = ).*$/\1`tc-getLD`/" \
+ -e "s/ -Werror//" \
+ -e "s/^(CFLAGS = )/\1`echo "${CFLAGS}"` /" \
+ -e "s/^(LFLAGS = )/\1`echo "${LFLAGS}"` /" \
+ BaseTools/Source/C/Makefiles/header.makefile || die "Failed to patch compiler flags"
+ for file in dlg/makefile antlr/makefile support/genmk/makefile; do
+ sed -i -r \
+ -e "s/^(CC *= *).*$/\1`tc-getCC`/" \
+ -e "s/^(CXX *= *).*$/\1`echo "${CFLAGS}"`/" \
+ "BaseTools/Source/C/VfrCompile/Pccts/${file}" || die "Failed to patch compiler flags in ${file}"
+ done
+ # filter our -march, building for kvm guest!
+ filter-flags -march*
+ sed -i -r \
+ -e "s/gcc[[:space:]]*$/`tc-getCC`/" \
+ -e "s/as[[:space:]]*$/`tc-getAS`/" \
+ -e "s/ar[[:space:]]*$/`tc-getAR`/" \
+ -e "s/ld[[:space:]]*$/`tc-getLD`/" \
+ -e "s/^(DEFINE GCC44_ALL_CC_FLAGS *=)(.*) -Werror /\1 `echo "${CFLAGS}"` \2 /" \
+ BaseTools/Conf/tools_def.template || die "Failed to patch compiler flags"
+}
+
+src_compile(){
+ # $ARCH is used, preserve old value
+ # Gentoo uses 'amd64', the package needs 'X64'
+ local oldARCH="${ARCH}"
+ ARCH='X64'
+
+ # build the BaseTools
+ MAKEOPTS+="-j1" emake -C BaseTools
+
+ export EDK_TOOLS_PATH="${S}"/BaseTools
+ # this mainly appends to $PATH
+ . edksetup.sh BaseTools
+
+ # build using the generated cross-compiler
+ # for a list of options, run 'build --help' or look at BaseTools/Source/Python/build/build.py MyOptionParser()
+ # TODO: -n X should be number of CPU+1. See no effect of it so far
+ if use hello-world; then
+ build --arch "${ARCH}" --platform MdeModulePkg/MdeModulePkg.dsc --tagname "${TAGNAME}" \
+ --module MdeModulePkg/Application/HelloWorld/HelloWorld.inf \
+ --buildtarget RELEASE || die "Failed to build HelloWorld"
+ # create startup.nsh for kvm testing
+ echo "fs0:\HelloWorld.efi" > Build/MdeModule/RELEASE_GCC45/X64/startup.nsh || die "Failed to
+ create startup.nsh"
+ fi
+
+ if use kvm; then
+ build --arch "${ARCH}" --platform OvmfPkg/OvmfPkgX64.dsc --tagname "${TAGNAME}" \
+ --buildtarget RELEASE || die "Failed to build UEFI-shell"
+ fi
+
+ if use shell; then
+ build --arch "${ARCH}" --platform ShellPkg/ShellPkg.dsc --tagname "${TAGNAME}" \
+ --module ShellPkg/Application/Shell/Shell.inf \
+ --buildtarget RELEASE || die "Failed to build UEFI-shell"
+ fi
+
+ # reset $ARCH
+ ARCH="${oldARCH}"
+}
+
+src_install(){
+ if use hello-world; then
+ insinto "/usr/share/${PN}/hello-world"
+ doins "Build/MdeModule/RELEASE_${TAGNAME}/X64/HelloWorld.efi"
+ doins "Build/MdeModule/RELEASE_${TAGNAME}/X64/startup.nsh"
+ fi
+
+ if use kvm; then
+ insinto "/usr/share/${PN}/kvm"
+ newins Build/OvmfX64/RELEASE_GCC45/FV/OVMF.fd uefibios.bin
+ newins Build/OvmfX64/RELEASE_GCC45/FV/CirrusLogic5446.rom vgabios-cirrus.bin
+ dosym "../${PN}/kvm/uefibios.bin" /usr/share/qemu/uefibios.bin
+ fi
+
+ if use shell; then
+ insinto "/usr/share/${PN}/shell"
+ newins Build/Shell/RELEASE_GCC45/X64/Shell.efi Shellx64.efi
+ fi
+}
+
+pkg_postinst() {
+ use kvm && einfo "To use uefi with qemu-kvm, start it with '-bios uefibios.bin'"
+ if use hello-world; then
+ einfo "A sample HelloWorld.efi was installed in /usr/share/${PN}/hello-world."
+ if use kvm; then
+ einfo "To test the uefi support in kvm, simply run:"
+ einfo " qemu-kvm -hda fat:/usr/share/edk2/hello-world -bios uefibios.bin"
+ einfo "and await the message 'UEFI Hello World!' before the shell prompt appears."
+ fi
+ fi
+}
diff --git a/sys-firmware/edk2/metadata.xml b/sys-firmware/edk2/metadata.xml
index 507939d..3dbd636 100644
--- a/sys-firmware/edk2/metadata.xml
+++ b/sys-firmware/edk2/metadata.xml
@@ -13,6 +13,5 @@ environment for the UEFI and PI specifications.
<pkg>app-emulation/qemu-kvm</pkg>.</flag>
<flag name="kvm">Creates the uefi-bios for <pkg>app-emulation/qemu-kvm</pkg>.</flag>
<flag name="shell">Creates the uefi-shell.</flag>
-<flag name="development">DO NOT SET THIS. FOR EBUILD DEVELOPMENT ONLY !</flag>
</use>
</pkgmetadata>