mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 20:36:40 +02:00
testing/edk2: new aport
EFI Development Kit II + Open Virtual Machine Firmware http://www.tianocore.org/edk2/
This commit is contained in:
parent
4a3a8807fb
commit
06c4742ba8
84
testing/edk2/APKBUILD
Normal file
84
testing/edk2/APKBUILD
Normal file
@ -0,0 +1,84 @@
|
||||
# Contributor: Timo Teräs <timo.teras@iki.fi>
|
||||
# Maintainer:
|
||||
pkgname=edk2
|
||||
pkgver=0.0.20161115
|
||||
_commitid=e242cdfb307a6dfe2c0f75c4719f5c1f6b418625
|
||||
pkgrel=0
|
||||
pkgdesc="EFI Development Kit II"
|
||||
url="http://www.tianocore.org/edk2/"
|
||||
arch="x86_64"
|
||||
license="BSD"
|
||||
depends=""
|
||||
makedepends="bash python2 iasl nasm util-linux-dev"
|
||||
install=""
|
||||
subpackages="ovmf"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/tianocore/$pkgname/archive/$_commitid.tar.gz
|
||||
build-hack.patch"
|
||||
builddir="$srcdir/$pkgname-$_commitid"
|
||||
|
||||
case "$CARCH" in
|
||||
x86) TARGET_ARCH=IA32; OVMFPKG=OvmfPkgIa32.dsc;;
|
||||
x86_64) TARGET_ARCH=X64; OVMFPKG=OvmfPkgX64.dsc;;
|
||||
esac
|
||||
|
||||
# use GCC49 instead of GCC5 until gcc 6.3 (see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955)
|
||||
TOOLCHAIN=GCC49
|
||||
RELEASE=DEBUG
|
||||
|
||||
prepare() {
|
||||
cd "$builddir"
|
||||
# unix line endings for the files to be patched
|
||||
sed -e 's/\r$//' -i BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp BaseTools/Source/C/VolInfo/VolInfo.c
|
||||
default_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
bash -c ". edksetup.sh" || return 1
|
||||
make -j1 -C BaseTools || return 1
|
||||
|
||||
export WORKSPACE=$PWD
|
||||
export PACKAGES_PATH=$PWD
|
||||
export EDK_TOOLS_PATH=$PWD/BaseTools/
|
||||
export PATH=$PWD/BaseTools/BinWrappers/PosixLike/:$PATH
|
||||
|
||||
msg "Building OVMF"
|
||||
command build -b ${RELEASE} -a ${TARGET_ARCH} -p OvmfPkg/${OVMFPKG} -t ${TOOLCHAIN} -n ${JOBS:-2} || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
mkdir -p "$pkgdir"/usr/bin \
|
||||
"$pkgdir"/usr/share/$pkgname/Conf \
|
||||
"$pkgdir"/usr/share/$pkgname/Scripts
|
||||
|
||||
install BaseTools/Source/C/bin/* BaseTools/BinWrappers/PosixLike/LzmaF86Compress \
|
||||
"$pkgdir"/usr/bin
|
||||
install BaseTools/BuildEnv "$pkgdir"/usr/share/$pkgname/
|
||||
install BaseTools/Conf/*.template "$pkgdir"/usr/share/$pkgname/Conf
|
||||
install BaseTools/Scripts/GccBase.lds "$pkgdir"/usr/share/$pkgname/Scripts
|
||||
|
||||
cp -R BaseTools/Source/Python "$pkgdir"/usr/share/$pkgname/Python
|
||||
for i in build BPDG Ecc GenDepex GenFds GenPatchPcdTable PatchPcdValue TargetTool Trim UPT; do
|
||||
echo '#!/bin/sh
|
||||
export PYTHONPATH=/usr/share/$pkgname/Python
|
||||
exec python '/usr/share/$pkgname/Python/$i/$i.py' "$@"' > "$pkgdir"/usr/bin/$i
|
||||
chmod +x "$pkgdir"/usr/bin/$i
|
||||
done
|
||||
}
|
||||
|
||||
ovmf() {
|
||||
pkgdesc="Open Virtual Machine Firmware (OVMF) BIOS"
|
||||
license="BSD MIT"
|
||||
|
||||
cd "$builddir"
|
||||
mkdir -p "$subpkgdir"/usr/share/$subpkgname/
|
||||
install Build/Ovmf${TARGET_ARCH}/${RELEASE}_${TOOLCHAIN}/FV/OVMF.fd "$subpkgdir"/usr/share/$subpkgname/bios.bin
|
||||
}
|
||||
|
||||
md5sums="6e6a28fbdcc4062108da9df348d69240 edk2-0.0.20161115.tar.gz
|
||||
63def07e68b1fad4062c99406bde7c0a build-hack.patch"
|
||||
sha256sums="e71586a0f335412a834b6720d88ec9d0a5d33621bbb6d87decdc2ee84b8d6e0e edk2-0.0.20161115.tar.gz
|
||||
d493fd3d711a96229b9fba8de81ba42c236af14e508f8090d3e9dd74d90e2371 build-hack.patch"
|
||||
sha512sums="7b1de6c5aa08ba6ab0897b59c5f0eab654062c01c0a9bcdf182a5fd695eb8639b8cc418b2d2e0ebb35855b2bf7294947335d49c0c790fa05830f783ddaea6414 edk2-0.0.20161115.tar.gz
|
||||
29158db1d54922f32215892bec0542176d64de4501fcdb1535508bb48b25e1f364ccd57b58aca07f2415c4654f76409dd64e40f5066db3fb9284a7217bbc2230 build-hack.patch"
|
||||
26
testing/edk2/build-hack.patch
Normal file
26
testing/edk2/build-hack.patch
Normal file
@ -0,0 +1,26 @@
|
||||
VfrCompile seg.faults with fortify enabled. It's probably broken.
|
||||
VolInfo does not compile due to -fshort-wchar not being supported by musl. The only major problem is the printf, so comment it out.
|
||||
|
||||
diff -ru a/edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
|
||||
--- edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp 2016-11-16 10:01:14.000000000 +0200
|
||||
+++ edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp 2016-11-16 14:47:30.211978076 +0200
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
**/
|
||||
|
||||
+#define _FORTIFY_SOURCE 0
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "CommonLib.h"
|
||||
diff -ru a/edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VolInfo/VolInfo.c b/edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VolInfo/VolInfo.c
|
||||
--- edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VolInfo/VolInfo.c 2016-11-16 10:01:14.000000000 +0200
|
||||
+++ edk2-e242cdfb307a6dfe2c0f75c4719f5c1f6b418625/BaseTools/Source/C/VolInfo/VolInfo.c 2016-11-16 11:12:40.182415584 +0200
|
||||
@@ -1714,7 +1714,7 @@
|
||||
break;
|
||||
|
||||
case EFI_SECTION_USER_INTERFACE:
|
||||
- printf (" String: %ls\n", (wchar_t *) &((EFI_USER_INTERFACE_SECTION *) Ptr)->FileNameString);
|
||||
+ //printf (" String: %ls\n", (wchar_t *) &((EFI_USER_INTERFACE_SECTION *) Ptr)->FileNameString);
|
||||
break;
|
||||
|
||||
case EFI_SECTION_FIRMWARE_VOLUME_IMAGE:
|
||||
Loading…
x
Reference in New Issue
Block a user