From patchwork Tue Jul 29 16:00:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robbie King X-Patchwork-Id: 34484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 23766202E4 for ; Tue, 29 Jul 2014 16:01:24 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf48164624oif.5 for ; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=0lfQaJmYrSr/9iS4a4GvtXE8RfTCz/gIMt+ZNbH7jYo=; b=Ep3/9dtK8aZ/WpX5dHXADF8ghFAY5oriUjUa2lAAEZ6DHtD66L45HFFgGKIWHWAW3Z Hmy/JdokpJ84wxPKPqTya0Myhz2bBnshjjGsvPLn8ZbE4TL71laXn6pSDiVg6xkhIG6V apWQ/kzKiYHplvQKXqSCsYXzEBDxVVRqQWlc4U8RQUvFh6BqfmnAEePPr+01iKp2+h59 L5DWzIqCqzTFDUi18dP3KKEdHE9sfFzdEB4zwKWU2zSEErI9lxkKUOgbO1DUOeMq59jf meDMTOduGsqAv2UNYQ+7VQxnddD3nSvzgbVX271ucw1AK1yzZzRudq/vvKs5XiMKaGPb ObWw== X-Gm-Message-State: ALoCoQn0e0uG/3Iq0r1p53d3xjPH/T1Gu8B67w+AvMJdohSXhltnoWqgZdsEE1JR6w66AnI2Tedl X-Received: by 10.183.10.133 with SMTP id ea5mr1159867obd.24.1406649683710; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.77 with SMTP id r71ls181323qga.71.gmail; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) X-Received: by 10.52.9.68 with SMTP id x4mr2407980vda.20.1406649683582; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [2607:f8b0:400c:c03::22c]) by mx.google.com with ESMTPS id kd8si14822239vec.89.2014.07.29.09.01.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jul 2014 09:01:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22c as permitted sender) client-ip=2607:f8b0:400c:c03::22c; Received: by mail-vc0-f172.google.com with SMTP id im17so13906404vcb.3 for ; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr1465409vdj.95.1406649683454; Tue, 29 Jul 2014 09:01:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp255179vcb; Tue, 29 Jul 2014 09:01:22 -0700 (PDT) X-Received: by 10.224.161.83 with SMTP id q19mr484657qax.26.1406649682840; Tue, 29 Jul 2014 09:01:22 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id g35si38439251qgf.104.2014.07.29.09.01.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 29 Jul 2014 09:01:21 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XC9q2-0000Hu-Pq; Tue, 29 Jul 2014 16:01:18 +0000 Received: from rcdn-iport-5.cisco.com ([173.37.86.76]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XC9pt-0000HO-Gp for lng-odp@lists.linaro.org; Tue, 29 Jul 2014 16:01:09 +0000 X-IronPort-AV: E=Sophos;i="5.01,757,1400025600"; d="scan'208";a="343618773" Received: from alln-core-8.cisco.com ([173.36.13.141]) by rcdn-iport-5.cisco.com with ESMTP; 29 Jul 2014 16:01:04 +0000 Received: from cpp-rtpbld-55.cisco.com (cpp-rtpbld-55.cisco.com [172.18.5.199]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id s6TG13lo025877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Jul 2014 16:01:03 GMT Received: from cpp-rtpbld-55.cisco.com (localhost.localdomain [127.0.0.1]) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8) with ESMTP id s6TG13aX004795; Tue, 29 Jul 2014 12:01:03 -0400 Received: (from robking@localhost) by cpp-rtpbld-55.cisco.com (8.13.8/8.13.8/Submit) id s6TG13QV004765; Tue, 29 Jul 2014 12:01:03 -0400 From: Robbie King To: lng-odp@lists.linaro.org Date: Tue, 29 Jul 2014 12:00:59 -0400 Message-Id: <1406649661-614-2-git-send-email-robking@cisco.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1406649661-614-1-git-send-email-robking@cisco.com> References: <1406649661-614-1-git-send-email-robking@cisco.com> X-Topics: crypto patch Subject: [lng-odp] [PATCHv3 1/3] Add crypto library to dependencies and configure script X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Original-Sender: robking@cisco.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22c as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@cisco.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Robbie King Reviewed-by: Anders Roxell --- DEPENDENCIES | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 17 ++++++++++++++++ 2 files changed, 77 insertions(+), 0 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 4b7faef..53233ff 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -16,3 +16,63 @@ Prerequisites for building the OpenDataPlane (ODP) API On CentOS/RedHat/Fedora systems: $ sudo yum install automake autoconf autoconf-archive libtool libtoolize + +3. required libraries + + Libraries currently required to link: openssl + +3.1 native compile + + For native compilation, simply load the necessary libraries using the appropriate + tool set. + + On Debian/Ubuntu systems: + $ sudo apt-get install libssl-dev + + On CentOS/RedHat/Fedora systems: + $ sudo yum install openssl-devel + +3.2 cross compilation + + Cross compilation requires cross compiling the individual libraries. In order for + a cross compiled executable to run on a target system, one must build the same + version as that which is installed on the target rootfs. + + For example, to build openssl for both 32 and 64 bit compilation: + + # Clone openssl repository + $ git clone git://git.openssl.org/openssl.git + $ cd openssl + + # The command "git tag" will list all tags available in the repo. + $ git tag + + # Checkout the specific tag to match openssl library in your target rootfs + $ git checkout + + # Build and install 32 bit version of openssl + $ ./Configure linux-generic32 --cross-compile-prefix=arm-linux-gnueabihf- \ + --prefix=/home/user/src/install-openssl + $ make + $ make install + + # Build and install 64 bit version of openssl + $ ./Configure linux-aarch64 --cross-compile-prefix=aarch64-linux-gnu- \ + --prefix=/home/user/src/install-openssl-aarch64 + $ make + $ make install + + # You may now build either 32 or 64 bit ODP + $ git clone git://git.linaro.org/lng/odp.git odp + $ cd odp + $ ./bootstrap + + # Build 32 bit version of ODP + $ ./configure --host=arm-linux-gnueabihf \ + --with-openssl-path=/home/user/src/install-openssl + $ make + + # Or build 64 bit version of ODP + $ ./configure --host=aarch64-linux-gnu \ + --with-openssl-path=/home/user/src/install-openssl-aarch64 + $ make \ No newline at end of file diff --git a/configure.ac b/configure.ac index 97089e9..56040e7 100644 --- a/configure.ac +++ b/configure.ac @@ -87,6 +87,23 @@ AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" AM_LDFLAGS="$AM_LDFLAGS $PTHREAD_LDFLAGS" ########################################################################## +# Check for openssl availability +########################################################################## + +AC_ARG_WITH([openssl-path], +AC_HELP_STRING([--with-openssl-path=DIR Path to openssl libs and headers], + [(or in the default path if not specified).]), +[OPENSSL_PATH=$withval +AM_CFLAGS="$AM_CFLAGS -I$OPENSSL_PATH/include" +AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib" +],[ +AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], + [AC_MSG_FAILURE([can't find openssl crypto lib])]) +AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], [], + [AC_MSG_FAILURE([can't find openssl crypto headers])]) + ]) + +########################################################################## # Default warning setup ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes"