From 9b96939178b9bf7ffb0a207e6f608b784b9bc1b2 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Mon, 24 Jul 2017 12:21:44 +0800 Subject: sbsigntool: code style fixup Signed-off-by: Lans Zhang --- .../sbsigntool/sbsigntool-native_git.bb | 61 ++++++++++++++-------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/meta-efi-secure-boot/recipes-devtools/sbsigntool/sbsigntool-native_git.bb b/meta-efi-secure-boot/recipes-devtools/sbsigntool/sbsigntool-native_git.bb index 2d09a97..b48f91d 100644 --- a/meta-efi-secure-boot/recipes-devtools/sbsigntool/sbsigntool-native_git.bb +++ b/meta-efi-secure-boot/recipes-devtools/sbsigntool/sbsigntool-native_git.bb @@ -1,50 +1,69 @@ -SUMMARY = "Signing utility for UEFI secure boot" +SUMMARY = "Utilities for signing UEFI binaries for use with secure boot" LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746" -SRC_URI = "git://kernel.ubuntu.com/jk/sbsigntool \ +LIC_FILES_CHKSUM = "\ + file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ + file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ +" + +DEPENDS += "binutils-native openssl-native gnu-efi-native util-linux-native" + +PV = "0.6+git${SRCPV}" + +SRC_URI = "\ + git://kernel.ubuntu.com/jk/sbsigntool \ file://ccan.git.tar.bz2 \ + file://fix-mixed-implicit-and-normal-rules.patch;apply=0 \ file://disable-man-page-creation.patch \ file://Fix-for-multi-sign.patch \ file://sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ - file://fix-mixed-implicit-and-normal-rules.patch;apply=0 \ file://image-fix-the-segment-fault-caused-by-the-uninitiali.patch \ " - SRCREV="951ee95a301674c046f55330cd7460e1314deff2" -PV = "0.6+git${SRCPV}" + +S = "${WORKDIR}/git" inherit autotools-brokensep pkgconfig native -DEPENDS_append = " binutils-native openssl-native gnu-efi-native util-linux-native" +def efi_arch(d): + import re + arch = d.getVar("TARGET_ARCH") + if re.match("i[3456789]86", arch): + return "ia32" + return arch -S = "${WORKDIR}/git" +# Avoids build breaks when using no-static-libs.inc +#DISABLE_STATIC_class-target = "" + +#EXTRA_OECONF_remove_class-target += "\ +# --with-libtool-sysroot \ +#" + +EXTRA_OEMAKE += "\ + INCLUDES='-I${S}/lib/ccan.git' \ + EFI_CPPFLAGS='-I${STAGING_INCDIR}/efi \ + -I${STAGING_INCDIR}/efi/${@efi_arch(d)}' \ +" do_configure() { - cd ${S} - rm -rf lib/ccan.git - git clone ${WORKDIR}/ccan.git lib/ccan.git - cd lib/ccan.git && git apply ${WORKDIR}/fix-mixed-implicit-and-normal-rules.patch && cd - + cd "${S}" + rm -rf "lib/ccan.git" + git clone "${WORKDIR}/ccan.git" lib/ccan.git + cd lib/ccan.git && \ + git apply "${WORKDIR}/fix-mixed-implicit-and-normal-rules.patch" && \ + cd - OLD_CC="${CC}" if [ ! -e lib/ccan ]; then export CC="${BUILD_CC}" - export TMPDIR=${B} lib/ccan.git/tools/create-ccan-tree \ --build-type=automake lib/ccan \ - talloc read_write_all build_assert array_size || exit 2 + talloc read_write_all build_assert array_size endian || exit 1 fi export CC="${OLD_CC}" ./autogen.sh --noconfigure oe_runconf } - -EXTRA_OEMAKE += " \ - INCLUDES='-I../lib/ccan.git/' \ - EFI_CPPFLAGS='-DEFI_FUNCTION_WRAPPER \ - -I${STAGING_INCDIR}/efi \ - -I${STAGING_INCDIR}/efi/${BUILD_ARCH}' \ -" -- cgit v1.2.3-54-g00ecf