Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "TCTI module for use with TSS2 libraries in UEFI environment" |
| 2 | SECTION = "security/tpm" |
| 3 | LICENSE = "BSD-2-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 5 | DEPENDS = "libtss2-dev libtss2-mu-dev gnu-efi-native gnu-efi pkgconfig autoconf-archive-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | |
| 7 | SRC_URI = "git://github.com/tpm2-software/tpm2-tcti-uefi.git \ |
| 8 | file://configure_oe_fixup.patch \ |
Brad Bishop | a3b01f4 | 2019-09-13 06:30:46 -0400 | [diff] [blame] | 9 | file://0001-configure.ac-stop-inserting-host-directories-into-co.patch \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 10 | file://fix_header_file.patch \ |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame^] | 11 | " |
| 12 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 13 | SRCREV = "0241b08f069f0fdb3612f5c1b938144dbe9be811" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | inherit autotools pkgconfig |
| 18 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 19 | EFIDIR ?= "/EFI/BOOT" |
| 20 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 21 | EFI_ARCH_x86 = "ia32" |
| 22 | EFI_ARCH_x86-64 = "x86_64" |
| 23 | |
| 24 | CFLAGS_append = " -I${STAGING_INCDIR}/efi -I${STAGING_INCDIR}/efi/${EFI_ARCH}" |
| 25 | |
| 26 | EXTRA_OECONF_append = " \ |
| 27 | --with-efi-includedir=${STAGING_INCDIR} \ |
| 28 | --with-efi-crt0=${STAGING_LIBDIR}/crt0-efi-${EFI_ARCH}.o \ |
| 29 | --with-efi-lds=${STAGING_LIBDIR}/elf_${EFI_ARCH}_efi.lds \ |
| 30 | " |
| 31 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 32 | do_compile_append() { |
| 33 | oe_runmake example |
| 34 | } |
| 35 | |
| 36 | do_install_append() { |
| 37 | install -d "${D}${EFIDIR}" |
| 38 | install -m 0755 "${B}"/example/*.efi "${D}${EFIDIR}" |
| 39 | } |
| 40 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 41 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 42 | |
| 43 | FILES_${PN} += "${EFIDIR}" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 44 | |
| 45 | RDEPENDS_${PN} = "gnu-efi libtss2-mu" |