summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLans Zhang <jia.zhang@windriver.com>2017-07-24 12:21:44 +0800
committerLans Zhang <jia.zhang@windriver.com>2017-07-24 12:21:44 +0800
commit9b96939178b9bf7ffb0a207e6f608b784b9bc1b2 (patch)
treea2278044124c8e8652a25f423764294eb528558e
parentc929a3e3fc2c9c26f4799ea74f3a4cf908f717f1 (diff)
downloadmeta-secure-core-9b96939178b9bf7ffb0a207e6f608b784b9bc1b2.tar.gz
sbsigntool: code style fixup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
-rw-r--r--meta-efi-secure-boot/recipes-devtools/sbsigntool/sbsigntool-native_git.bb61
1 files 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 @@
1SUMMARY = "Signing utility for UEFI secure boot" 1SUMMARY = "Utilities for signing UEFI binaries for use with secure boot"
2 2
3LICENSE = "GPLv3" 3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746"
5 4
6SRC_URI = "git://kernel.ubuntu.com/jk/sbsigntool \ 5LIC_FILES_CHKSUM = "\
6 file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \
7 file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \
8"
9
10DEPENDS += "binutils-native openssl-native gnu-efi-native util-linux-native"
11
12PV = "0.6+git${SRCPV}"
13
14SRC_URI = "\
15 git://kernel.ubuntu.com/jk/sbsigntool \
7 file://ccan.git.tar.bz2 \ 16 file://ccan.git.tar.bz2 \
17 file://fix-mixed-implicit-and-normal-rules.patch;apply=0 \
8 file://disable-man-page-creation.patch \ 18 file://disable-man-page-creation.patch \
9 file://Fix-for-multi-sign.patch \ 19 file://Fix-for-multi-sign.patch \
10 file://sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ 20 file://sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \
11 file://fix-mixed-implicit-and-normal-rules.patch;apply=0 \
12 file://image-fix-the-segment-fault-caused-by-the-uninitiali.patch \ 21 file://image-fix-the-segment-fault-caused-by-the-uninitiali.patch \
13" 22"
14
15SRCREV="951ee95a301674c046f55330cd7460e1314deff2" 23SRCREV="951ee95a301674c046f55330cd7460e1314deff2"
16PV = "0.6+git${SRCPV}" 24
25S = "${WORKDIR}/git"
17 26
18inherit autotools-brokensep pkgconfig native 27inherit autotools-brokensep pkgconfig native
19 28
20DEPENDS_append = " binutils-native openssl-native gnu-efi-native util-linux-native" 29def efi_arch(d):
30 import re
31 arch = d.getVar("TARGET_ARCH")
32 if re.match("i[3456789]86", arch):
33 return "ia32"
34 return arch
21 35
22S = "${WORKDIR}/git" 36# Avoids build breaks when using no-static-libs.inc
37#DISABLE_STATIC_class-target = ""
38
39#EXTRA_OECONF_remove_class-target += "\
40# --with-libtool-sysroot \
41#"
42
43EXTRA_OEMAKE += "\
44 INCLUDES='-I${S}/lib/ccan.git' \
45 EFI_CPPFLAGS='-I${STAGING_INCDIR}/efi \
46 -I${STAGING_INCDIR}/efi/${@efi_arch(d)}' \
47"
23 48
24do_configure() { 49do_configure() {
25 cd ${S} 50 cd "${S}"
26 rm -rf lib/ccan.git 51 rm -rf "lib/ccan.git"
27 git clone ${WORKDIR}/ccan.git lib/ccan.git 52 git clone "${WORKDIR}/ccan.git" lib/ccan.git
28 cd lib/ccan.git && git apply ${WORKDIR}/fix-mixed-implicit-and-normal-rules.patch && cd - 53 cd lib/ccan.git && \
54 git apply "${WORKDIR}/fix-mixed-implicit-and-normal-rules.patch" && \
55 cd -
29 56
30 OLD_CC="${CC}" 57 OLD_CC="${CC}"
31 58
32 if [ ! -e lib/ccan ]; then 59 if [ ! -e lib/ccan ]; then
33 export CC="${BUILD_CC}" 60 export CC="${BUILD_CC}"
34 export TMPDIR=${B}
35 lib/ccan.git/tools/create-ccan-tree \ 61 lib/ccan.git/tools/create-ccan-tree \
36 --build-type=automake lib/ccan \ 62 --build-type=automake lib/ccan \
37 talloc read_write_all build_assert array_size || exit 2 63 talloc read_write_all build_assert array_size endian || exit 1
38 fi 64 fi
39 65
40 export CC="${OLD_CC}" 66 export CC="${OLD_CC}"
41 ./autogen.sh --noconfigure 67 ./autogen.sh --noconfigure
42 oe_runconf 68 oe_runconf
43} 69}
44
45EXTRA_OEMAKE += " \
46 INCLUDES='-I../lib/ccan.git/' \
47 EFI_CPPFLAGS='-DEFI_FUNCTION_WRAPPER \
48 -I${STAGING_INCDIR}/efi \
49 -I${STAGING_INCDIR}/efi/${BUILD_ARCH}' \
50"