--- /dev/null
+*.deb
+*.buildinfo
+*.changes
+edk2.build
--- /dev/null
+[submodule "edk2"]
+ path = edk2
+ url = ../mirror_edk2
--- /dev/null
+PACKAGE=pve-edk2-firmware
+# version and package release is controlled over d/changelog
+VER=$(shell dpkg-parsechangelog -S version)
+
+SRCDIR=edk2
+BUILDDIR=${SRCDIR}.build
+
+GITVERSION:=$(shell git rev-parse HEAD)
+
+DEB=${PACKAGE}_${VER}_all.deb
+
+all: ${DEB}
+ @echo ${DEB}
+
+.PHONY: deb
+deb: ${DEB}
+${DEB}: | submodule
+ rm -rf ${BUILDDIR}
+ cp -rpa ${SRCDIR} ${BUILDDIR}
+ cp -a debian ${BUILDDIR}
+ echo "git clone git://git.proxmox.com/git/pve-edk2-firmware.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
+ cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
+ lintian ${DEB}
+ @echo ${DEB}
+
+.PHONY: submodule
+submodule:
+ test -f "${SRCDIR}/Readme.md" || git submodule update --init
+
+.PHONY: update_modules
+update_modules: submodule
+ git submodule foreach 'git pull --ff-only origin master'
+
+.PHONY: upload
+upload: ${DEB}
+ tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
+
+.PHONY: distclean
+distclean: clean
+
+.PHONY: clean
+clean:
+ rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo
+
+.PHONY: dinstall
+dinstall: ${DEB}
+ dpkg -i ${DEB}
--- /dev/null
+pve-edk2-firmware (1.20180316-1) stable; urgency=medium
+
+ * updated to newer OVMF release (commit
+ d0976b9accedfd1f45fe2f81c59351ed17f34aa0)
+
+ * build from source instead of tracking binary rreleases (BLOBs)
+
+ * split from pve-qemu into separate package
+
+ -- Proxmox Support Team <support@proxmox.com> Fri, 16 Mar 2018 12:10:02 +0200
+
--- /dev/null
+Conf/BuildEnv.sh
+Conf/build_rule.txt
+Conf/target.txt
+Conf/tools_def.txt
--- /dev/null
+Source: pve-edk2-firmware
+Section: misc
+Priority: extra
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Build-Depends: debhelper (>= 9),
+ iasl,
+ nasm,
+ python,
+ uuid-dev,
+Homepage: http://www.tianocore.org
+Standards-Version: 3.9.8
+
+Package: pve-edk2-firmware
+Architecture: all
+Depends: ${misc:Depends},
+Description: edk2 based firmware modules for virtual machines
+ Contains OVMF. Open Virtual Machine Firmware (OVMF) is a build of EDK II for
+ virtual machines. It includes full support for UEFI, including Secure Boot,
+ allowing use of UEFI in place of a traditional BIOS in your VM.
+ Proxmox VE specific release with disabled secure boot.
--- /dev/null
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved
+Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
+Copyright (c) 2011 - 2015, ARM Limited. All rights reserved.
+Copyright (c) 2014 - 2015, Linaro Limited. All rights reserved.
+Copyright (c) 2013 - 2015, Red Hat, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+Build/OvmfX64/RELEASE_*GCC*/FV/OVMF_CODE.fd /usr/share/pve-edk2-firmware
+Build/OvmfX64/RELEASE_*GCC*/FV/OVMF_VARS.fd /usr/share/pve-edk2-firmware
--- /dev/null
+#!/usr/bin/make -f
+SHELL=/bin/bash
+
+# this is a simplified version from the upstream package
+
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+
+EDK2_TOOLCHAIN = GCC5 # for GCC5 and newer, LTO enabled
+export $(EDK2_TOOLCHAIN)_AARCH64_PREFIX=aarch64-linux-gnu-
+
+ifeq ($(DEB_BUILD_ARCH),amd64)
+ EDK2_BUILD_ARCH=X64
+ EDK2_HOST_ARCH=X64
+endif
+ifeq ($(DEB_BUILD_ARCH),arm64)
+ EDK2_BUILD_ARCH=AARCH64
+endif
+
+# Clear variables used internally by the edk2 build system
+undefine WORKSPACE
+undefine ECP_SOURCE
+undefine EDK_SOURCE
+undefine EFI_SOURCE
+undefine EDK_TOOLS_PATH
+undefine CONF_PATH
+
+%:
+ dh $@
+
+override_dh_auto_build: build-ovmf
+
+setup-build:
+ cp -a debian/Logo.bmp MdeModulePkg/Logo/Logo.bmp
+ make -C BaseTools ARCH=$(EDK2_BUILD_ARCH)
+ # call this when building too, it modifies the shell environment
+ . ./edksetup.sh
+
+build-ovmf: EDK2_ARCH_DIR=X64
+build-ovmf: EDK2_HOST_ARCH=X64
+build-ovmf: setup-build
+ set -e; . ./edksetup.sh; \
+ OvmfPkg/build.sh \
+ -b RELEASE \
+ -a $(EDK2_HOST_ARCH) \
+ -t $(EDK2_TOOLCHAIN) \
+ -DSECURE_BOOT_ENABLE=FALSE \
+ -DFD_SIZE_2MB \
+ -n $$(getconf _NPROCESSORS_ONLN)
+
+override_dh_auto_clean:
+ set -e; \
+ if [ -d BaseTools/Source/C/bin ]; then \
+ . ./edksetup.sh; build clean; \
+ make -C BaseTools clean; \
+ fi
+ rm -rf Conf/.cache Build .pc-post
+
+.PHONY: setup-build build-ovmf
--- /dev/null
+Subproject commit d0976b9accedfd1f45fe2f81c59351ed17f34aa0