mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-24 07:51:03 +02:00
sys-firmware/edk2-armvirt: retarget ebuild at ArmVirtPkg
This commit is contained in:
parent
a98f98c5a0
commit
f4240dc2c0
1
sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-armvirt/edk2-armvirt-18219.ebuild
vendored
Symbolic link
1
sdk_container/src/third_party/coreos-overlay/sys-firmware/edk2-armvirt/edk2-armvirt-18219.ebuild
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
edk2-armvirt-99999.ebuild
|
@ -11,34 +11,26 @@ HOMEPAGE="http://tianocore.sourceforge.net"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="debug +qemu +secure-boot"
|
||||
IUSE="debug +secure-boot"
|
||||
|
||||
if [[ ${PV} == 99999 ]]; then
|
||||
inherit subversion
|
||||
ESVN_REPO_URI="https://svn.code.sf.net/p/edk2/code/trunk/edk2"
|
||||
KEYWORDS="-* ~amd64"
|
||||
KEYWORDS="-* ~arm64"
|
||||
else
|
||||
MY_P="edk2-${PV}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
SRC_URI="http://storage.core-os.net/mirror/snapshots/${MY_P}.tar.xz"
|
||||
KEYWORDS="-* amd64"
|
||||
KEYWORDS="-* arm64"
|
||||
fi
|
||||
|
||||
OPENSSL_PV="1.0.2d"
|
||||
OPENSSL_P="openssl-${OPENSSL_PV}"
|
||||
SRC_URI+=" mirror://openssl/source/${OPENSSL_P}.tar.gz"
|
||||
|
||||
DEPEND=">=dev-lang/nasm-2.0.7
|
||||
sys-power/iasl"
|
||||
RDEPEND="qemu? ( app-emulation/qemu )"
|
||||
|
||||
src_prepare() {
|
||||
# This build system is impressively complicated, needless to say
|
||||
# it does things that get confused by PIE being enabled by default.
|
||||
# Add -nopie to a few strategic places... :)
|
||||
if gcc-specs-pie; then
|
||||
epatch "${FILESDIR}/edk2-nopie.patch"
|
||||
fi
|
||||
# aarch64 gcc gets confused by -pie
|
||||
epatch "${FILESDIR}/edk2-nopie.patch"
|
||||
|
||||
if use secure-boot; then
|
||||
local openssllib="${S}/CryptoPkg/Library/OpensslLib"
|
||||
@ -57,8 +49,7 @@ src_configure() {
|
||||
TARGET_NAME=$(usex debug DEBUG RELEASE)
|
||||
TARGET_TOOLS="GCC$(gcc-version | tr -d .)"
|
||||
case $ARCH in
|
||||
amd64) TARGET_ARCH=X64 ;;
|
||||
#x86) TARGET_ARCH=IA32 ;;
|
||||
arm64) TARGET_ARCH=AARCH64 ;;
|
||||
*) die "Unsupported $ARCH" ;;
|
||||
esac
|
||||
}
|
||||
@ -66,23 +57,22 @@ src_configure() {
|
||||
src_compile() {
|
||||
emake ARCH=${TARGET_ARCH} -C BaseTools -j1
|
||||
|
||||
./OvmfPkg/build.sh \
|
||||
-a "${TARGET_ARCH}" \
|
||||
-b "${TARGET_NAME}" \
|
||||
-t "${TARGET_TOOLS}" \
|
||||
export GCC49_AARCH64_PREFIX="${CHOST}-"
|
||||
. ./edksetup.sh || die
|
||||
build \
|
||||
-a ${TARGET_ARCH} \
|
||||
-b ${TARGET_NAME} \
|
||||
-p ArmVirtPkg/ArmVirtQemu.dsc \
|
||||
-t ${TARGET_TOOLS} \
|
||||
-n $(makeopts_jobs) \
|
||||
-D SECURE_BOOT_ENABLE=$(usex secure-boot TRUE FALSE) \
|
||||
-D FD_SIZE_2MB \
|
||||
|| die "OvmfPkg/build.sh failed"
|
||||
-D FD_SIZE_2MB || die "Building ArmVirtPkg failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local fv="Build/OvmfX64/${TARGET_NAME}_${TARGET_TOOLS}/FV"
|
||||
local fv="Build/ArmVirtQemu-${TARGET_ARCH}/${TARGET_NAME}_${TARGET_TOOLS}/FV"
|
||||
insinto /usr/share/${PN}
|
||||
doins "${fv}"/OVMF{,_CODE,_VARS}.fd
|
||||
dosym OVMF.fd /usr/share/${PN}/bios.bin
|
||||
|
||||
if use qemu; then
|
||||
dosym ../${PN}/OVMF.fd /usr/share/qemu/efi-bios.bin
|
||||
fi
|
||||
doins "${fv}"/QEMU_EFI.fd
|
||||
dosym QEMU_EFI.fd /usr/share/${PN}/bios.bin
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
edk2-ovmf-99999.ebuild
|
@ -1,25 +1,3 @@
|
||||
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
|
||||
index 859fbe1..3731150 100644
|
||||
--- a/BaseTools/Conf/tools_def.template
|
||||
+++ b/BaseTools/Conf/tools_def.template
|
||||
@@ -3807,7 +3807,7 @@ NOOPT_DDK3790xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF
|
||||
DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
|
||||
RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG =
|
||||
|
||||
-DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h
|
||||
+DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h -nopie
|
||||
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
|
||||
@@ -3838,7 +3838,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-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
|
||||
+DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -nopie
|
||||
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -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))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large -fno-asynchronous-unwind-tables
|
||||
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections -z common-page-size=0x20
|
||||
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
|
||||
index 09d2bff..f3ca05d 100644
|
||||
--- a/BaseTools/Source/C/Makefiles/header.makefile
|
||||
|
Loading…
x
Reference in New Issue
Block a user