From patchwork Thu Apr 17 11:56:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28557 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DB0C720674 for ; Thu, 17 Apr 2014 11:57:22 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf1025636pdb.4 for ; Thu, 17 Apr 2014 04:57:22 -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:cc: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=C6SYilTX94+AiJ4MNT3uEoRQPPBgJ9O+mpjOq5dbbbo=; b=cmcXRN7uvROKUhGJnlgZWTIrvOTgTpxI7KMOh96RTNbPFV9GfV5ZFsVUjMQcPv9vIY dAVMJoXBhUaW7V+/gNVJQlRiQkrLFtpubVqzpqCebWGvE4sjOUaQpCs2DERoFTzEZ6aj L3kqw5WpftqC9YKtalkuAPJlQzyqyhOMFKFBKCk+JcNrr2mn/to7HvgGSn5YA4UI94q5 8peWxHvPmVujpXHwA9dRih9YYQOZWeCVHHirAlvg0ulAVqV71mLXpFSCa2X1t8UR7KN0 v38Y9XFRiStsR2eAxSAjv5LBBYjZtKqXyOe+Fv7qdA+lsccJ0RDKOq6tdIzzqlCvKrV0 8aLA== X-Gm-Message-State: ALoCoQmnF0Nh0CkTqrlcxCOd/neufcVAxyxypEtynwqLV0DbEdeOGeyJfWfmF5d7PF7Tcnkplp6b X-Received: by 10.66.192.232 with SMTP id hj8mr6859834pac.2.1397735842056; Thu, 17 Apr 2014 04:57:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.119 with SMTP id 110ls1001349qgu.20.gmail; Thu, 17 Apr 2014 04:57:21 -0700 (PDT) X-Received: by 10.52.53.101 with SMTP id a5mr7043542vdp.14.1397735841910; Thu, 17 Apr 2014 04:57:21 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id cx1si3070478vdb.74.2014.04.17.04.57.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:57:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id id10so349012vcb.40 for ; Thu, 17 Apr 2014 04:57:21 -0700 (PDT) X-Received: by 10.58.230.103 with SMTP id sx7mr1477129vec.28.1397735841826; Thu, 17 Apr 2014 04:57:21 -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.220.221.72 with SMTP id ib8csp29000vcb; Thu, 17 Apr 2014 04:57:21 -0700 (PDT) X-Received: by 10.140.50.231 with SMTP id s94mr16044041qga.33.1397735841447; Thu, 17 Apr 2014 04:57:21 -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 a7si3446717qcf.63.2014.04.17.04.57.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:57:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) 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 1WakwG-00066I-OH; Thu, 17 Apr 2014 11:57:08 +0000 Received: from mail-ee0-f54.google.com ([74.125.83.54]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Wakvh-00064M-Rp for lng-odp@lists.linaro.org; Thu, 17 Apr 2014 11:56:33 +0000 Received: by mail-ee0-f54.google.com with SMTP id d49so587172eek.27 for ; Thu, 17 Apr 2014 04:56:40 -0700 (PDT) X-Received: by 10.14.214.198 with SMTP id c46mr13660690eep.29.1397735800065; Thu, 17 Apr 2014 04:56:40 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id z48sm66742553eel.27.2014.04.17.04.56.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:56:39 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Thu, 17 Apr 2014 14:56:14 +0300 Message-Id: <1397735782-31924-4-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397735782-31924-1-git-send-email-taras.kondratiuk@linaro.org> References: <1397735782-31924-1-git-send-email-taras.kondratiuk@linaro.org> Cc: Filip Moerman Subject: [lng-odp] [PATCH v2 03/11] Keystone2: Use OpenEM helper libraries 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Include OpenEM headers and pack static libraries content into libodp.a. Signed-off-by: Taras Kondratiuk --- platform/linux-keystone2/Makefile | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/platform/linux-keystone2/Makefile b/platform/linux-keystone2/Makefile index 15e2a2c..1965d1d 100644 --- a/platform/linux-keystone2/Makefile +++ b/platform/linux-keystone2/Makefile @@ -32,10 +32,27 @@ ODP_ROOT = ../.. LIB_DIR = ./lib DOC_DIR = ./doc +OPENEM_ROOT ?= $(ODP_ROOT)/../openem_keystone +OPENEM_TARGET_DIR ?= c6638/arm-linux +OPENEM_LIB_DIR = $(abspath $(OPENEM_ROOT)/lib/$(OPENEM_TARGET_DIR)) + +MY_PLATFORM = DEVICE_K2K + +PLAT_CFLAGS = -D$(MY_PLATFORM) +PLAT_CFLAGS += -D_GNU_SOURCE -DEM_32_BIT -DTI_EM_CENTRAL_SCHED +PLAT_CFLAGS += -DTI_EM_TRACE_LEVEL=3 -DEM_CHECK_LEVEL=1 +PLAT_CFLAGS += -DTI_EM_LINUX -DTI_EM_GCC -DTI_EM_ARM_A15 -DTI_EM_C6638 +PLAT_CFLAGS += -D_LITTLE_ENDIAN -DTI_EM_USE_MSM -DTI_EM_XGE_LOOPBACK +PLAT_CFLAGS += -DTI_ODP + +EXTRA_CFLAGS += $(PLAT_CFLAGS) EXTRA_CFLAGS += -I$(ODP_ROOT)/include EXTRA_CFLAGS += -I./include EXTRA_CFLAGS += -I./include/api -EXTRA_CFLAGS += -fPIC +EXTRA_CFLAGS += -I$(OPENEM_ROOT) +EXTRA_CFLAGS += -I$(OPENEM_ROOT)/linux/keystone2 +EXTRA_CFLAGS += -I$(OPENEM_ROOT)/linux/osal +EXTRA_CFLAGS += -I$(OPENEM_ROOT)/linux/rh ifeq ($(ODP_HAVE_NETMAP),yes) EXTRA_CFLAGS += -DODP_HAVE_NETMAP @@ -100,8 +117,8 @@ $(OBJ_DIR)/%.o: ./source/%.c # # Lib rule # -$(STATIC_LIB): $(OBJS) - $(AR) -cr $@ $(OBJS) +$(STATIC_LIB): $(OBJS) extract_prebuilt_libs + $(AR) -cr $@ $(OBJ_DIR)/*.o clean: $(RMDIR) $(OBJ_DIR) @@ -124,6 +141,16 @@ docs_install: docs pdf: docs make --directory doc/latex refman.pdf 1> /dev/null +.PHONY: extract_prebuilt_libs +extract_prebuilt_libs: $(OBJ_DIR) + (cd $(OBJ_DIR) && $(AR) x $(OPENEM_LIB_DIR)/libopenem_osal.a) + (cd $(OBJ_DIR) && $(AR) x $(OPENEM_LIB_DIR)/libopenem_rh.a) + +.PHONY: openem_mod_install +openem_mod_install: + install -d $(DESTDIR)/module + install -m 0644 $(OPENEM_ROOT)/linux/modules/*.ko $(DESTDIR)/module + .PHONY: libs libs: $(OBJ_DIR) $(LIB_DIR) $(STATIC_LIB) @@ -138,4 +165,4 @@ headers_install: libs $(COPY) $(ODP_ROOT)/include $(DESTDIR) $(COPY) include/api/* $(DESTDIR)/include/ -install: lib_install headers_install +install: lib_install headers_install openem_mod_install