]> git.proxmox.com Git - pve-edk2-firmware.git/commitdiff
Initial import
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 16 Mar 2018 12:58:28 +0000 (13:58 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 22 Mar 2018 07:26:15 +0000 (08:26 +0100)
new repository splitting out the EDK2 (Efi Development Kit II) backed
OVMF (Open Virtual Machine Firmware) from pve-qemu package, where
only pre-built BLOBs were tracked.

Borrow some the built style from the Debian Upstream package.

We do not provide/conflict ovmf from Debian, but rather see this as
it's own package, providing the FW files under its own path.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
12 files changed:
.gitignore [new file with mode: 0644]
.gitmodules [new file with mode: 0644]
Makefile [new file with mode: 0644]
debian/Logo.bmp [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/clean [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/pve-edk2-firmware.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
edk2 [new submodule]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a4c231b
--- /dev/null
@@ -0,0 +1,4 @@
+*.deb
+*.buildinfo
+*.changes
+edk2.build
diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..e24b385
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "edk2"]
+       path = edk2
+       url = ../mirror_edk2
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d24eacc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+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}
diff --git a/debian/Logo.bmp b/debian/Logo.bmp
new file mode 100644 (file)
index 0000000..4c46dd8
Binary files /dev/null and b/debian/Logo.bmp differ
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..0c8ab6c
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..8772fda
--- /dev/null
@@ -0,0 +1,4 @@
+Conf/BuildEnv.sh
+Conf/build_rule.txt
+Conf/target.txt
+Conf/tools_def.txt
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..31b4100
--- /dev/null
@@ -0,0 +1,20 @@
+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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..5941725
--- /dev/null
@@ -0,0 +1,29 @@
+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.
diff --git a/debian/pve-edk2-firmware.install b/debian/pve-edk2-firmware.install
new file mode 100644 (file)
index 0000000..1c99312
--- /dev/null
@@ -0,0 +1,2 @@
+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
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..da3cc01
--- /dev/null
@@ -0,0 +1,58 @@
+#!/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
diff --git a/edk2 b/edk2
new file mode 160000 (submodule)
index 0000000..d0976b9
--- /dev/null
+++ b/edk2
@@ -0,0 +1 @@
+Subproject commit d0976b9accedfd1f45fe2f81c59351ed17f34aa0