diff --git a/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/Manifest new file mode 100644 index 0000000000..d12875dae0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/Manifest @@ -0,0 +1 @@ +DIST edk2-15046.tar.xz 21148204 SHA256 3764f113b04d9d3af9a1152a81866c802885329e6f8bc41dda32b70900fa26f9 SHA512 7073d0f3809dc0f39e7283ffa53201b4d2e30e912f1e50f2e17083181e4867d15535beac192f65575deef0649257378b2ec507772891aec11f9fc99bba4c4c80 WHIRLPOOL 91b78c5c3c805fb207cdc6cfeb52fe5478c0fa914101ef27b5272dc2e6f0b431ff08a1d354e5dd7fba75bfdd2e52a4d05ce014d66b9606f878eee21d65a5407b diff --git a/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-15046.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-15046.ebuild new file mode 120000 index 0000000000..4e3f249350 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-15046.ebuild @@ -0,0 +1 @@ +edk2-ovmf-99999.ebuild \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-99999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-99999.ebuild new file mode 100644 index 0000000000..4421479f9b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-ovmf/edk2-ovmf-99999.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit multiprocessing toolchain-funcs + +DESCRIPTION="EDK II Open Source UEFI Firmware" +HOMEPAGE="http://tianocore.sourceforge.net" + +LICENSE="BSD-2" +SLOT="0" +IUSE="+qemu" + +if [[ ${PV} == 99999 ]]; then + inherit subversion + ESVN_REPO_URI="https://svn.code.sf.net/p/edk2/code/trunk/edk2" + KEYWORDS="-* ~amd64" +else + MY_P="edk2-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="http://storage.core-os.net/mirror/snapshots/${MY_P}.tar.xz" + KEYWORDS="-* amd64" +fi + +DEPEND="sys-power/iasl" +RDEPEND="qemu? ( app-emulation/qemu )" + +edk_build() { + local package="$1" + + # Use a subshell since edksetup.sh expects to be sourced. + ( export WORKSPACE="${S}" EDK_TOOLS_PATH="${S}/BaseTools" + source edksetup.sh BaseTools || exit $? + build -p "${package}" \ + -a "${TARGET_ARCH}" \ + -b "${TARGET_NAME}" \ + -t "${TARGET_TOOLS}" \ + -n "${BUILD_JOBS}" || exit $? + ) || die "Building EDK package ${package} failed" +} + +src_configure() { + ./edksetup.sh || die + + BUILD_JOBS=$(makeopts_jobs) + TARGET_NAME="RELEASE" + TARGET_TOOLS="GCC$(gcc-version | tr -d .)" + case $ARCH in + amd64) TARGET_ARCH=X64 ;; + #x86) TARGET_ARCH=IA32 ;; + *) die "Unsupported $ARCH" ;; + esac +} + +src_compile() { + emake ARCH=${TARGET_ARCH} -C BaseTools -j1 + + edk_build OvmfPkg/OvmfPkgX64.dsc +} + +src_install() { + insinto /usr/share/${PN} + doins Build/OvmfX64/${TARGET_NAME}_${TARGET_TOOLS}/FV/OVMF.fd + dosym OVMF.fd /usr/share/${PN}/bios.bin + + if use qemu; then + dosym ../${PN}/OVMF.fd /usr/share/qemu/efi-bios.bin + fi +}