From patchwork Tue Sep 15 03:59:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 517658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 938F4140497 for ; Tue, 15 Sep 2015 14:00:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZT0GQOqT; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BE2F989E97; Tue, 15 Sep 2015 04:00:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 99b9Ht29sojm; Tue, 15 Sep 2015 04:00:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 96B908862B; Tue, 15 Sep 2015 04:00:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1062E1CEC8B for ; Tue, 15 Sep 2015 04:00:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D02D9273C6 for ; Tue, 15 Sep 2015 04:00:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DbSoJv5j0yYh for ; Tue, 15 Sep 2015 04:00:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by silver.osuosl.org (Postfix) with ESMTPS id 4F50227306 for ; Tue, 15 Sep 2015 04:00:09 +0000 (UTC) Received: by iofh134 with SMTP id h134so189231642iof.0 for ; Mon, 14 Sep 2015 21:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SUBMourigaooql8eSdpZfTykk3m8OlaHbivjXZXn2D4=; b=ZT0GQOqTZx/zfsehBwaJ7mCxcitlxThJS/u+OmEXuIMrzGewFHfaWxoP8GArkbLhDH EwZRz3PrSGeYOFywIU2vfdBBkNwxyQPbq2LhFd3meRWefXMKVfP74DOCmpL/cKzc07br A9IbVUE0K7G+WSyXuQ0QBcw+9XPjC66eUbbZ+w84umQRx8vs497v07T2JciwSJXiLuwz FasEauNxNkFbLqBdVZH9C/c+yhI6XBMdcP/EVE2Yo3uEHwwfgnjlqLBIDeZQU5zOTwzY 9Q0Q0T71yAt6o1NMcGgDdVLOgEw1CJ7G5agqgdgjj/5YCFcPdYz2DpKT0Bjexx1GWfXk VMDQ== X-Received: by 10.107.35.20 with SMTP id j20mr28112732ioj.39.1442289608779; Mon, 14 Sep 2015 21:00:08 -0700 (PDT) Received: from ryan-ubuntu.barnett.net (50-83-61-125.client.mchsi.com. [50.83.61.125]) by smtp.gmail.com with ESMTPSA id pi6sm6798267igb.21.2015.09.14.21.00.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Sep 2015 21:00:08 -0700 (PDT) From: Ryan Barnett To: buildroot@buildroot.org Date: Mon, 14 Sep 2015 22:59:51 -0500 Message-Id: <1442289591-30376-3-git-send-email-ryanbarnett3@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442289591-30376-1-git-send-email-ryanbarnett3@gmail.com> References: <1442289591-30376-1-git-send-email-ryanbarnett3@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 2/2] openssl: enable parallel build and installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas Petazzoni On my build server, the current build of OpenSSL takes 1 minutes and 20 seconds. With this commit applied, enabling parallel build and installation, the build only takes 28 seconds. All the patches are downloaded from Gentoo. There is apparently some interest in upstream OpenSSL to enable parallel build, see for example commit https://github.com/openssl/openssl/commit/c3f22253b139793ff3b91ff7e6969e180cf06815. This commit is not part of any OpenSSL release, but we can hope that the problem will resolved in the future. I have tested 20 consecutive builds of a config that has openssl and host-openssl being used by uboot-tools and host-uboot-tools (through the FIT image support). [Ryan: simplified patches from gentoo (single patch now)] [Ryan: updated offsets to apply cleanly] [Ryan: updated hash file] Signed-off-by: Thomas Petazzoni Signed-off-by: Ryan Barnett --- ...ont-waste-time-building-manpages-if-we-re-not-going.patch | 11 ++++++----- .../0002-cryptodev-Fix-issue-with-signature-generation.patch | 7 ++++--- package/openssl/openssl.hash | 2 ++ package/openssl/openssl.mk | 12 +++++++----- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch b/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch index 93e2118..f54f2fa 100644 --- a/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch +++ b/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch @@ -1,19 +1,20 @@ -From 53980448064b362a58e4ab2aca6f38fec93c07c3 Mon Sep 17 00:00:00 2001 +From 12de3d3aa9525c551ebbd7fcff9d9d2b08e58aad Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 16 May 2015 18:53:51 +0200 -Subject: [PATCH 1/3] Dont waste time building manpages if we're not going to +Subject: [PATCH 1/2] Dont waste time building manpages if we're not going to use em. Signed-off-by: Thomas Petazzoni +Signed-off-by: Ryan Barnett --- Makefile.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.org b/Makefile.org -index b7a3f96..8a47840 100644 +index 60f07cc..976ceaf 100644 --- a/Makefile.org +++ b/Makefile.org -@@ -536,7 +536,7 @@ dist: +@@ -527,7 +527,7 @@ dist: dist_pem_h: (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) @@ -23,5 +24,5 @@ index b7a3f96..8a47840 100644 install_sw: @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ -- -2.1.0 +1.9.1 diff --git a/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch b/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch index 17887d3..2fe9fae 100644 --- a/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch +++ b/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch @@ -1,7 +1,7 @@ -From 0718df24bd828f26d7d0e8e7f935d8e21f70ebca Mon Sep 17 00:00:00 2001 +From 4f802320219bc5c4969ce92ba42acce73bad0b77 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Sat, 16 May 2015 18:55:08 +0200 -Subject: [PATCH 2/3] cryptodev: Fix issue with signature generation +Subject: [PATCH 2/2] cryptodev: Fix issue with signature generation Forward port of 0001-cryptodev-Fix-issue-with-signature-generation.patch from http://rt.openssl.org/Ticket/Display.html?id=2770&user=guest&pass=guest @@ -10,6 +10,7 @@ It was originally targetted at 1.0.2-beta3. Without this patch digest acceleration via cryptodev is broken. Signed-off-by: Thomas Petazzoni +Signed-off-by: Ryan Barnett --- crypto/engine/eng_cryptodev.c | 195 +++++++++++++++++++++++++++++++----------- 1 file changed, 146 insertions(+), 49 deletions(-) @@ -445,5 +446,5 @@ index 926d95c..7021d9a 100644 !ENGINE_set_digests(engine, cryptodev_engine_digests) || !ENGINE_set_ctrl_function(engine, cryptodev_ctrl) || -- -2.1.0 +1.9.1 diff --git a/package/openssl/openssl.hash b/package/openssl/openssl.hash index 355be79..7e67737 100644 --- a/package/openssl/openssl.hash +++ b/package/openssl/openssl.hash @@ -1,2 +1,4 @@ # From https://www.openssl.org/source/openssl-1.0.2d.tar.gz.sha256 sha256 671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8 openssl-1.0.2d.tar.gz +# Locally computed +sha256 deaf6f3af41874ecc6d63841ea14b8e6c71cea81d4a511a754bc90c9a993147f openssl-1.0.2d-parallel-build.patch?revision=1.1 diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk index 3d87919..c7459dd 100644 --- a/package/openssl/openssl.mk +++ b/package/openssl/openssl.mk @@ -13,6 +13,8 @@ OPENSSL_DEPENDENCIES = zlib HOST_OPENSSL_DEPENDENCIES = host-zlib OPENSSL_TARGET_ARCH = generic32 OPENSSL_CFLAGS = $(TARGET_CFLAGS) +OPENSSL_PATCH = \ + https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/openssl/files/openssl-1.0.2d-parallel-build.patch?revision=1.1 ifeq ($(BR2_USE_MMU),) OPENSSL_CFLAGS += -DHAVE_FORK=0 @@ -99,23 +101,23 @@ OPENSSL_POST_CONFIGURE_HOOKS += OPENSSL_FIXUP_STATIC_MAKEFILE endif define HOST_OPENSSL_BUILD_CMDS - $(MAKE1) -C $(@D) + $(MAKE) -C $(@D) endef define OPENSSL_BUILD_CMDS - $(MAKE1) -C $(@D) + $(MAKE) -C $(@D) endef define OPENSSL_INSTALL_STAGING_CMDS - $(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install + $(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install endef define HOST_OPENSSL_INSTALL_CMDS - $(MAKE1) -C $(@D) install + $(MAKE) -C $(@D) install endef define OPENSSL_INSTALL_TARGET_CMDS - $(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install + $(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl rm -f $(TARGET_DIR)/usr/bin/c_rehash endef