diff options
author | Matthias Maier <tamiko@gentoo.org> | 2018-02-11 18:41:59 -0600 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2018-02-11 18:42:48 -0600 |
commit | 151b7c4e15ef366da00ac8350c35484b0fd582c9 (patch) | |
tree | 2dee182438ca199a67e105fbca0999f2d295dc9e /sys-firmware | |
parent | sys-firmware/edk2-ovmf: drop old (diff) | |
download | gentoo-151b7c4e15ef366da00ac8350c35484b0fd582c9.tar.gz gentoo-151b7c4e15ef366da00ac8350c35484b0fd582c9.tar.bz2 gentoo-151b7c4e15ef366da00ac8350c35484b0fd582c9.zip |
sys-firmware/edk2-ovmf: version bump to 2017_p20180211
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sys-firmware')
3 files changed, 206 insertions, 0 deletions
diff --git a/sys-firmware/edk2-ovmf/Manifest b/sys-firmware/edk2-ovmf/Manifest index c941b85849ea..a061a11c712d 100644 --- a/sys-firmware/edk2-ovmf/Manifest +++ b/sys-firmware/edk2-ovmf/Manifest @@ -1,2 +1,4 @@ +DIST edk2-ovmf-2017_p20180211-bin.tar.xz 910896 BLAKE2B 2d2ead282cebc1254cae2b10042f809e887a17a83fe67998ddcadf86cdf07e615594b243ab35d3fa8a6d6ce218f8f0bad758ee1db2ab4ff6c08d65419f4078b0 SHA512 88c3c4d7cecc2af1cc4dfa06686f34cc3a5facfb24750c766b47f53dec7267b95b58b391d23038e6a589d1687d2c117f1912d10118e26f99c0906c3d8e90deed +DIST edk2-ovmf-2017_p20180211.tar.xz 22977736 BLAKE2B 4d95eaf3017668197632ab7e035ad6c9f1490bde3d27e575170541fd64773fef8676406c88451b8dc996d9d7dd625fa389279105951f02e08f6de025075bd172 SHA512 ee3d70da562ed7dc4647576da8605d25fd9f991b4a96c2ed106e0d1b697af9e0624ad161750ccba7ab3db553ab1c6177780dd9c29a70073eb17729e9ae24c5a7 DIST edk2-ovmf-2017_pre20170505-bin.tar.xz 874904 BLAKE2B a381d3ca20cf0e1f3aff74335c1d783bb80f0b5c7a8716d8154f2e0a19255780e5b08fae37cab9fa484fc1cbe3bc3b5d40339634ee3b0808bd2b3a8b2849730a SHA512 c7a7d83758214b6ab63c6cefe827a601aaa7656b7f01e03413c84d913078a2b0d8037f70de34d42d8e1614aee794e0ffd7d9e62314eb4e04c21256b70338af5c DIST edk2-ovmf-2017_pre20170505.tar.xz 22952060 BLAKE2B 7d4da1fed8e76f643e2856be2485f6c398896d61b7ad8fb013e891fd73f69c4acfd9980e7f95aec002cee647719a622711100f8cb6829edecae35ed31b3ef563 SHA512 6da859360448fd6d04d1492c88a7e935f7108c524f7ccfe6aa4c13bf9af9695dbc4a5b8efa274adc86d3105946aaa1ba80bcd9713facdca153f1a3d873797b63 diff --git a/sys-firmware/edk2-ovmf/edk2-ovmf-2017_p20180211.ebuild b/sys-firmware/edk2-ovmf/edk2-ovmf-2017_p20180211.ebuild new file mode 100644 index 000000000000..ff5c5d8fabdc --- /dev/null +++ b/sys-firmware/edk2-ovmf/edk2-ovmf-2017_p20180211.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_REQ_USE="sqlite" +PYTHON_COMPAT=( python2_7 ) + +inherit eutils python-any-r1 readme.gentoo-r1 + +DESCRIPTION="UEFI firmware for 64-bit x86 virtual machines" +HOMEPAGE="https://github.com/tianocore/edk2" + +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} +" +SOURCE_DEPEND=" + >=dev-lang/nasm-2.0.7 + >=sys-power/iasl-20160729 + ${PYTHON_DEPS} +" +DEPEND="" +RDEPEND="" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/tianocore/edk2" + DEPEND+=" + ${SOURCE_DEPEND}" +else + SRC_URI=" + binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz ) + !binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}.tar.xz )" + KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd" + IUSE="+binary" + REQUIRED_USE+=" + !amd64? ( binary ) + " + DEPEND+=" + !binary? ( amd64? ( ${SOURCE_DEPEND} ) )" +fi + +LICENSE="BSD-2 MIT" +SLOT="0" + +DISABLE_AUTOFORMATTING=true +DOC_CONTENTS="This package contains the tianocore edk2 UEFI firmware for 64-bit x86 +virtual machines. The firmware is located under + /usr/share/edk2-ovmf/OVMF.fd + /usr/share/edk2-ovmf/OVMF_CODE.fd + /usr/share/edk2-ovmf/OVMF_VARS.fd + +The firmware does not support csm (due to no free csm implementation +available). If you need a firmware with csm support you have to download +one for yourself. Firmware blobs are commonly labeled + OVMF{,_CODE,_VARS}-with-csm.fd + +In order to use the firmware you can run qemu the following way + + $ qemu-system-x86_64 \ + -drive file=/usr/share/edk2-ovmf/OVMF.fd,if=pflash,format=raw,unit=0,readonly=on \ + ... + +You can register the firmware for use in libvirt by adding to /etc/libvirt/qemu.conf: + nvram = [ + \"/usr/share/edk2-ovmf/OVMF_CODE.fd:/usr/share/edk2-ovmf/OVMF_VARS.fd\" + ]" + +PATCHES=( + "${FILESDIR}"/${P}-build_system_fixes.patch +) + +pkg_setup() { + [[ ${PV} != "9999" ]] && use binary || python-any-r1_pkg_setup +} + +src_prepare() { + if [[ ${PV} != "9999" ]] && use binary; then + eapply_user + return + fi + default +} + +src_compile() { + TARGET_ARCH=X64 + TARGET_NAME=RELEASE + TARGET_TOOLS=GCC49 + + [[ ${PV} != "9999" ]] && use binary && return + + emake ARCH=${TARGET_ARCH} -C BaseTools -j1 + + . ./edksetup.sh + + ./OvmfPkg/build.sh \ + -a "${TARGET_ARCH}" -b "${TARGET_NAME}" -t "${TARGET_TOOLS}" \ + -D FD_SIZE_2MB \ + || die "OvmfPkg/build.sh failed" +} + +src_install() { + local builddir="Build/OvmfX64/${TARGET_NAME}_${TARGET_TOOLS}/FV" + + insinto /usr/share/${PN} + doins "${builddir}"/OVMF{,_CODE,_VARS}.fd + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-firmware/edk2-ovmf/files/edk2-ovmf-2017_p20180211-build_system_fixes.patch b/sys-firmware/edk2-ovmf/files/edk2-ovmf-2017_p20180211-build_system_fixes.patch new file mode 100644 index 000000000000..cdb465336e14 --- /dev/null +++ b/sys-firmware/edk2-ovmf/files/edk2-ovmf-2017_p20180211-build_system_fixes.patch @@ -0,0 +1,91 @@ +diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template +index 427ad60..c2b6d83 100755 +--- a/BaseTools/Conf/tools_def.template ++++ b/BaseTools/Conf/tools_def.template +@@ -4500,7 +4500,7 @@ RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG = + NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
+ *_*_*_DTC_FLAGS = -H epapr
+
+-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
++DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Wno-array-bounds -include AutoGen.h -fno-common
+ DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
+ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
+ DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency
+@@ -4535,7 +4535,7 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 + DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
+ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
+
+-DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
++DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+ DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables
+ DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables
+ DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
+@@ -6139,7 +6139,7 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl + *_ELFGCC_X64_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc
+ *_ELFGCC_X64_RC_PATH = DEF(ELFGCC_BIN)/objcopy
+
+-*_ELFGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-address -Wno-array-bounds -include AutoGen.h -D_EFI_P64
++*_ELFGCC_X64_CC_FLAGS = -Os -fshort-wchar -fno-strict-aliasing -Wall -Wno-address -Wno-array-bounds -include AutoGen.h -D_EFI_P64
+ *_ELFGCC_X64_DLINK_FLAGS = -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ *_ELFGCC_X64_SLINK_FLAGS =
+ *_ELFGCC_X64_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
+@@ -6162,7 +6162,7 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl + *_ELFGCC_IPF_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc
+ *_ELFGCC_IPF_RC_PATH = DEF(ELFGCC_BIN)/objcopy
+
+-*_ELFGCC_IPF_CC_FLAGS = -Os -fshort-wchar -Wall -Werror -include AutoGen.h -D_EFI_P64
++*_ELFGCC_IPF_CC_FLAGS = -Os -fshort-wchar -Wall -include AutoGen.h -D_EFI_P64
+ *_ELFGCC_IPF_DLINK_FLAGS = -nostdlib --shared --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ *_ELFGCC_IPF_SLINK_FLAGS =
+ *_ELFGCC_IPF_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
+@@ -7553,7 +7553,7 @@ NOOPT_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT + ##################
+ # ASL definitions
+ ##################
+-*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
++*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Wno-missing-braces -c -include AutoGen.h
+ *_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+ *_XCODE5_*_ASLPP_FLAGS = -x c -E -include AutoGen.h
+ *_XCODE5_*_ASL_FLAGS =
+@@ -7581,9 +7581,9 @@ RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386 + *_XCODE5_IA32_NASM_FLAGS = -f macho32
+
+
+- DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+-RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+- NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++ DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
++ NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
+
+ ##################
+ # X64 definitions
+@@ -7600,9 +7600,9 @@ RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64 + *_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
+ *_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+
+- DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+- NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+-RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++ DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -Os -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++ NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -O0 -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
++RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
+
+ ####################################################################################
+ #
+diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile +index 0976973..d9ee70e 100644 +--- a/BaseTools/Source/C/Makefiles/header.makefile ++++ b/BaseTools/Source/C/Makefiles/header.makefile +@@ -71,9 +71,9 @@ INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKE + BUILD_CPPFLAGS = $(INCLUDE) -O2
+ ifeq ($(DARWIN),Darwin)
+ # assume clang or clang compatible flags on OS X
+-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g
+ else
+-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
++BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g
+ endif
+ BUILD_LFLAGS =
+ BUILD_CXXFLAGS = -Wno-unused-result
|