Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
Index: git/configure.ac
|
||||
===================================================================
|
||||
--- git.orig/configure.ac
|
||||
+++ git/configure.ac
|
||||
@@ -84,9 +84,6 @@ AC_ARG_WITH([efi-lds],
|
||||
AS_HELP_STRING([--with-efi-lds=LDS_PATH],[Path to gnu-efi lds file.]),
|
||||
[],
|
||||
[with_efi_lds="/usr/lib/elf_${ARCH}_efi.lds"])
|
||||
-AC_CHECK_FILE(["${with_efi_lds}"],
|
||||
- [],
|
||||
- [AC_MSG_ERROR([Missing file: ${with_efi_lds}.])])
|
||||
EXTRA_LDFLAGS="-L /usr/lib -L /usr/lib64 -Wl,--script=${with_efi_lds}"
|
||||
|
||||
# path to object file from gnu-efi
|
||||
@@ -94,9 +91,6 @@ AC_ARG_WITH([efi-crt0],
|
||||
AS_HELP_STRING([--with-efi-crt0=OBJ_PATH],[Path to gnu-efi crt0 object file.]),
|
||||
[],
|
||||
[with_efi_crt0="/usr/lib/crt0-efi-${ARCH}.o"])
|
||||
-AC_CHECK_FILE(["${with_efi_crt0}"],
|
||||
- [],
|
||||
- [AC_MSG_ERROR([Missing ${with_efi_crt0} file.])])
|
||||
EXTRA_LDLIBS="${with_efi_crt0}"
|
||||
|
||||
# check for efi and gnuefi libraries
|
||||
@@ -0,0 +1,25 @@
|
||||
Error building for i386 target in cross env
|
||||
|
||||
#include <efi/x86_64/efibind.h>
|
||||
|
||||
ARCH is host arch, not target arch
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
||||
Index: git/src/uefi-types.h
|
||||
===================================================================
|
||||
--- git.orig/src/uefi-types.h
|
||||
+++ git/src/uefi-types.h
|
||||
@@ -3,9 +3,9 @@
|
||||
#define UEFI_TYPES_H
|
||||
|
||||
#ifndef EDK2_BUILD
|
||||
-#if ARCH == x86_64
|
||||
+#if defined(__x86_64__)
|
||||
#include <efi/x86_64/efibind.h>
|
||||
-#elif ARCH == ia32
|
||||
+#elif defined(__i386__)
|
||||
#include <efi/ia32/efibind.h>
|
||||
#else
|
||||
#error "Unsupported ARCH."
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
From b74837184cfdefb45e48f3fdc974fc67691fc861 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
|
||||
Date: Wed, 3 Jul 2019 19:16:35 +0300
|
||||
Subject: [PATCH] configure.ac: stop inserting host directories into compile
|
||||
path
|
||||
|
||||
Do not insert /usr/lib and /usr/lib64 into library search path.
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: git/configure.ac
|
||||
===================================================================
|
||||
--- git.orig/configure.ac
|
||||
+++ git/configure.ac
|
||||
@@ -70,10 +70,6 @@ EXTRA_CFLAGS+="-I${with_efi_includedir}
|
||||
# compiler flags / search path
|
||||
CFLAGS_TMP="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||
-AC_CHECK_HEADERS([efi.h efilib.h],
|
||||
- [],
|
||||
- [AC_MSG_ERROR([Missing gnu-efi headers.])],
|
||||
- [#include <efi.h>])
|
||||
CFLAGS="$CFLAGS_TMP"
|
||||
|
||||
# path to linker script from gnu-efi
|
||||
@@ -81,7 +77,7 @@ AC_ARG_WITH([efi-lds],
|
||||
AS_HELP_STRING([--with-efi-lds=LDS_PATH],[Path to gnu-efi lds file.]),
|
||||
[],
|
||||
[with_efi_lds="/usr/lib/elf_${ARCH}_efi.lds"])
|
||||
-EXTRA_LDFLAGS="-L /usr/lib -L /usr/lib64 -Wl,--script=${with_efi_lds}"
|
||||
+EXTRA_LDFLAGS="-Wl,--script=${with_efi_lds}"
|
||||
|
||||
# path to object file from gnu-efi
|
||||
AC_ARG_WITH([efi-crt0],
|
||||
@@ -0,0 +1,47 @@
|
||||
SUMMARY = "TCTI module for use with TSS2 libraries in UEFI environment"
|
||||
SECTION = "security/tpm"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
|
||||
DEPENDS = "libtss2-dev libtss2-mu-dev gnu-efi-native gnu-efi pkgconfig autoconf-archive-native"
|
||||
|
||||
SRC_URI = "git://github.com/tpm2-software/tpm2-tcti-uefi.git;branch=master;protocol=https \
|
||||
file://configure_oe_fixup.patch \
|
||||
file://0001-configure.ac-stop-inserting-host-directories-into-co.patch \
|
||||
file://fix_header_file.patch \
|
||||
"
|
||||
|
||||
SRCREV = "0241b08f069f0fdb3612f5c1b938144dbe9be811"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
EFIDIR ?= "/EFI/BOOT"
|
||||
|
||||
EFI_ARCH:x86 = "ia32"
|
||||
EFI_ARCH:x86-64 = "x86_64"
|
||||
|
||||
CFLAGS:append = " -I${STAGING_INCDIR}/efi -I${STAGING_INCDIR}/efi/${EFI_ARCH}"
|
||||
|
||||
EXTRA_OECONF:append = " \
|
||||
--with-efi-includedir=${STAGING_INCDIR} \
|
||||
--with-efi-crt0=${STAGING_LIBDIR}/crt0-efi-${EFI_ARCH}.o \
|
||||
--with-efi-lds=${STAGING_LIBDIR}/elf_${EFI_ARCH}_efi.lds \
|
||||
"
|
||||
|
||||
do_compile:append() {
|
||||
oe_runmake example
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
install -d "${D}${EFIDIR}"
|
||||
install -m 0755 "${B}"/example/*.efi "${D}${EFIDIR}"
|
||||
}
|
||||
|
||||
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
|
||||
|
||||
FILES:${PN} += "${EFIDIR}"
|
||||
|
||||
RDEPENDS:${PN} = "gnu-efi libtss2-mu"
|
||||
Reference in New Issue
Block a user