From patchwork Fri Mar 16 18:05:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 887091 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=hauke-m.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qtMdQCaz"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 402tpz6HGkz9sMl for ; Sat, 17 Mar 2018 05:12:43 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=N6wiES0+5cqnnP+Oulve7rqDMElAaLyF2ceDxrtgAnI=; b=qtMdQCazBmxMp3 CsRki7pN5QIqmGc+cwWXnkp0LGQuZEyNe1YtRTLn6qspSLVGSTqlzsgSgF2rEBYPowIdOrxXu9/33 tR/rMhZElEC3Cl0Bz0aXa6WYKz60SadL5DS0ONUv2S9b685hSY1NkAh5tRrUUm4NdxKU0GjaRCsQ4 fYN//AVofOGFlLIAniRZf2edgflruDLp4uKN8cMMBROuLhqJE97KUCgNPjrx1fXeCQzlSHg0qDz0U 3tSxbbM+p4lSRCIOENSVhbPvPk1Zs09iarCKJRc+hC0NU3ZTQns5PqI0LFbbvehRVk1NStQS+Q3BT 5MszqWvCDTT2eziJFrhg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewtq9-0006p8-01; Fri, 16 Mar 2018 18:12:29 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewtjg-0004GY-5h for lede-dev@lists.infradead.org; Fri, 16 Mar 2018 18:05:51 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 248A442A55; Fri, 16 Mar 2018 19:05:31 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id jMC8zB_gK4Vj; Fri, 16 Mar 2018 19:05:29 +0100 (CET) From: Hauke Mehrtens To: lede-dev@lists.infradead.org, wigyori@uid0.hu Date: Fri, 16 Mar 2018 19:05:10 +0100 Message-Id: <20180316180510.6304-1-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180316_110548_530059_4180F88B X-CRM114-Status: GOOD ( 25.98 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [80.241.60.212 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Subject: [LEDE-DEV] uboot-mxs: fix compile problems related to OpenSSL X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use the UBOOT_MAKE_FLAGS defined in include/u-boot.mk and do not overwrite them to compile the host tools against the shipped LibreSSL. In addition add a patch to fix a compile problem when compiling the tools against LibreSSL caused by differences in the API between OpenSSL 1.1 and LibreSSL. This should fix the compile problems seen in build bot from time to time by not depending on the host libssl-dev package any more but using the LibreSSL version from OpenWrt. Signed-off-by: Hauke Mehrtens Tested-by: Michael Heimpold --- package/boot/uboot-mxs/Makefile | 2 +- .../uboot-mxs/patches/001-add-i2se-duckbill.patch | 26 ---------------------- ...s-mxsimage-Support-building-with-LibreSSL.patch | 25 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 27 deletions(-) create mode 100644 package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 6fde52ef56..cd752bb81a 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -35,7 +35,7 @@ UBOOT_TARGETS := \ mx23_olinuxino \ duckbill -UBOOT_MAKE_FLAGS = $(UBOOT_IMAGE) +UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE) define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch index 15217b57ee..1ad67fbba8 100644 --- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch +++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch @@ -43,8 +43,6 @@ Signed-off-by: Stefan Wahren create mode 100644 configs/duckbill_defconfig create mode 100644 include/configs/duckbill.h -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 30e71b2..b77e778 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -373,6 +373,12 @@ config TARGET_MX28EVK @@ -77,9 +75,6 @@ index 30e71b2..b77e778 100644 default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136 default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 -diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig -new file mode 100644 -index 0000000..98c1e46 --- /dev/null +++ b/board/i2se/duckbill/Kconfig @@ -0,0 +1,15 @@ @@ -98,9 +93,6 @@ index 0000000..98c1e46 + default "duckbill" + +endif -diff --git a/board/i2se/duckbill/MAINTAINERS b/board/i2se/duckbill/MAINTAINERS -new file mode 100644 -index 0000000..5496baa --- /dev/null +++ b/board/i2se/duckbill/MAINTAINERS @@ -0,0 +1,6 @@ @@ -110,9 +102,6 @@ index 0000000..5496baa +F: board/i2se/duckbill/ +F: include/configs/duckbill.h +F: configs/duckbill_defconfig -diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile -new file mode 100644 -index 0000000..66baec4 --- /dev/null +++ b/board/i2se/duckbill/Makefile @@ -0,0 +1,12 @@ @@ -128,9 +117,6 @@ index 0000000..66baec4 +else +obj-y := iomux.o +endif -diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c -new file mode 100644 -index 0000000..caeb903 --- /dev/null +++ b/board/i2se/duckbill/duckbill.c @@ -0,0 +1,181 @@ @@ -315,9 +301,6 @@ index 0000000..caeb903 + + return 0; +} -diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c -new file mode 100644 -index 0000000..b3c4d92 --- /dev/null +++ b/board/i2se/duckbill/iomux.c @@ -0,0 +1,157 @@ @@ -478,9 +461,6 @@ index 0000000..b3c4d92 + else + mxs_iomux_setup_multiple_pads(iomux_setup_v1, ARRAY_SIZE(iomux_setup_v1)); +} -diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig -new file mode 100644 -index 0000000..2adce92 --- /dev/null +++ b/configs/duckbill_defconfig @@ -0,0 +1,31 @@ @@ -515,9 +495,6 @@ index 0000000..2adce92 +CONFIG_ENV_IS_IN_MMC=y +CONFIG_MMC_MXS=y +CONFIG_OF_LIBFDT=y -diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h -new file mode 100644 -index 0000000..f9374c6 --- /dev/null +++ b/include/configs/duckbill.h @@ -0,0 +1,199 @@ @@ -720,6 +697,3 @@ index 0000000..f9374c6 +#include + +#endif /* __CONFIGS_DUCKBILL_H__ */ --- -2.7.4 - diff --git a/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch b/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch new file mode 100644 index 0000000000..1870fd094e --- /dev/null +++ b/package/boot/uboot-mxs/patches/002-tools-mxsimage-Support-building-with-LibreSSL.patch @@ -0,0 +1,25 @@ +From 461e8174de320dac1aee1c1b61a9f0f5cfc38a00 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sat, 17 Feb 2018 15:34:19 +0100 +Subject: [PATCH] tools/mxsimage: Support building with LibreSSL + +The mxsimage utility fails to compile against LibreSSL because LibreSSL +says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 +interface. + +Signed-off-by: Hauke Mehrtens +--- + tools/mxsimage.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/mxsimage.c ++++ b/tools/mxsimage.c +@@ -26,7 +26,7 @@ + * OpenSSL 1.1.0 and newer compatibility functions: + * https://wiki.openssl.org/index.php/1.1_API_Changes + */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + static void *OPENSSL_zalloc(size_t num) + { + void *ret = OPENSSL_malloc(num);