sbsigntool: code style fixup

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
This commit is contained in:
Lans Zhang
2017-07-24 12:21:44 +08:00
parent c929a3e3fc
commit 9b96939178
@@ -1,50 +1,69 @@
SUMMARY = "Signing utility for UEFI secure boot" SUMMARY = "Utilities for signing UEFI binaries for use with secure boot"
LICENSE = "GPLv3" 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://ccan.git.tar.bz2 \
file://fix-mixed-implicit-and-normal-rules.patch;apply=0 \
file://disable-man-page-creation.patch \ file://disable-man-page-creation.patch \
file://Fix-for-multi-sign.patch \ file://Fix-for-multi-sign.patch \
file://sbsign-add-x-option-to-avoid-overwrite-existing-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 \ file://image-fix-the-segment-fault-caused-by-the-uninitiali.patch \
" "
SRCREV="951ee95a301674c046f55330cd7460e1314deff2" SRCREV="951ee95a301674c046f55330cd7460e1314deff2"
PV = "0.6+git${SRCPV}"
inherit autotools-brokensep pkgconfig native
DEPENDS_append = " binutils-native openssl-native gnu-efi-native util-linux-native"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
inherit autotools-brokensep pkgconfig native
def efi_arch(d):
import re
arch = d.getVar("TARGET_ARCH")
if re.match("i[3456789]86", arch):
return "ia32"
return arch
# 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() { do_configure() {
cd ${S} cd "${S}"
rm -rf lib/ccan.git rm -rf "lib/ccan.git"
git clone ${WORKDIR}/ccan.git 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 lib/ccan.git && \
git apply "${WORKDIR}/fix-mixed-implicit-and-normal-rules.patch" && \
cd -
OLD_CC="${CC}" OLD_CC="${CC}"
if [ ! -e lib/ccan ]; then if [ ! -e lib/ccan ]; then
export CC="${BUILD_CC}" export CC="${BUILD_CC}"
export TMPDIR=${B}
lib/ccan.git/tools/create-ccan-tree \ lib/ccan.git/tools/create-ccan-tree \
--build-type=automake lib/ccan \ --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 fi
export CC="${OLD_CC}" export CC="${OLD_CC}"
./autogen.sh --noconfigure ./autogen.sh --noconfigure
oe_runconf oe_runconf
} }
EXTRA_OEMAKE += " \
INCLUDES='-I../lib/ccan.git/' \
EFI_CPPFLAGS='-DEFI_FUNCTION_WRAPPER \
-I${STAGING_INCDIR}/efi \
-I${STAGING_INCDIR}/efi/${BUILD_ARCH}' \
"