From patchwork Fri Oct 10 21:42:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 38641 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34847202DB for ; Fri, 10 Oct 2014 21:42:41 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf2681099eek.5 for ; Fri, 10 Oct 2014 14:42:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Y/PkRH0OPvExlEbHyH36mnOfeJPZJ8cXQ/Ita4xKGxw=; b=Vs+3dCLvcQQDcIRI3lpkwjsPDo049ZxEuR7Gt8yadKqh+VTMBC7TX2ryHIM7kV8gtN ypwjXjQas2HEPdHmI6YZlhsIRNI1AKpk4S4VqZKyRRGHcJirevZfHCrc+uErftrYFsjc 2l8hSMCl0tM0Vw+VzeMT4AMDXT728uwS1zdfaz1tegxMe+obG9yth4q8bg0e0fe+6nN1 +O04XfD7Vjonyd5kiMcbxOoUiINbbL8LxDiW/oQyjWa+PZziW7oeMzD9r5cpdR+X9BUf c+TerLQPiqH0ozJNV24rCma1Vvju95MLFwUW7K7KQ+RhOSyiHyxfIV7Mw9hJcm4Xj8+V Wjwg== X-Gm-Message-State: ALoCoQm4vWNF8n02tEcEYl3qkZSpnoTWB/lhOhKVMFLOLk5gFf3D8ZQR5jtL0Zty5S6OTTgz8t3A X-Received: by 10.194.92.13 with SMTP id ci13mr3033wjb.5.1412977360161; Fri, 10 Oct 2014 14:42:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.4 with SMTP id ky4ls74386lab.23.gmail; Fri, 10 Oct 2014 14:42:39 -0700 (PDT) X-Received: by 10.112.142.33 with SMTP id rt1mr7393346lbb.69.1412977359680; Fri, 10 Oct 2014 14:42:39 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id b9si11161634lbp.50.2014.10.10.14.42.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 14:42:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gi9so4013196lab.5 for ; Fri, 10 Oct 2014 14:42:39 -0700 (PDT) X-Received: by 10.152.22.42 with SMTP id a10mr7739814laf.56.1412977359495; Fri, 10 Oct 2014 14:42:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.84.229 with SMTP id c5csp505989lbz; Fri, 10 Oct 2014 14:42:38 -0700 (PDT) X-Received: by 10.68.68.162 with SMTP id x2mr8110616pbt.40.1412977357546; Fri, 10 Oct 2014 14:42:37 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id ra2si4616145pbb.207.2014.10.10.14.42.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 14:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.44 as permitted sender) client-ip=209.85.220.44; Received: by mail-pa0-f44.google.com with SMTP id et14so2474892pad.17 for ; Fri, 10 Oct 2014 14:42:36 -0700 (PDT) X-Received: by 10.69.17.234 with SMTP id gh10mr8311919pbd.0.1412977356809; Fri, 10 Oct 2014 14:42:36 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id ig4sm4364977pbb.55.2014.10.10.14.42.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Oct 2014 14:42:35 -0700 (PDT) From: John Stultz To: projectara-software-dev@linaro.org Cc: John Stultz Subject: [PATCH v4] greybus: Changes required for integrating into the Android build Date: Fri, 10 Oct 2014 14:42:33 -0700 Message-Id: <1412977353-30665-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In order to easily integrate into the Android build, include an Android.mk. Signed-off-by: John Stultz --- v4: Reworked from Greg's feedback to avoid changes to the Makefile. Simplified some of the ARCH argument management. Android.mk | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Android.mk diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..773129b --- /dev/null +++ b/Android.mk @@ -0,0 +1,29 @@ +.PHONY: build-greybus + +$(PRODUCT_OUT)/ramdisk.img: build-greybus + +include $(CLEAR_VARS) +GREYBUS_SRC_PATH := $(ANDROID_BUILD_TOP)/external/greybus/ +LOCAL_PATH := $(GREYBUS_SRC_PATH) +LOCAL_SRC_FILES := greybus.ko +LOCAL_MODULE := $(LOCAL_SRC_FILES) +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_MODULE_PATH := $(PRODUCT_OUT)/root/lib/modules +$(LOCAL_PATH)/$(LOCAL_SRC_FILES): build-greybus +include $(BUILD_PREBUILT) + +KDIRARG := KERNELDIR="${ANDROID_PRODUCT_OUT}/obj/kernel" +ifneq ($(ANDROID_64),) + ARCHARG := ARCH=arm64 + FLAGARG := EXTRA_CFLAGS+=-fno-pic +else + ARCHARG := ARCH=arm +endif +ARGS := $(KDIRARG) $(ARCHARG) $(FLAGARG) + +build-greybus: android_kernel + make clean -C $(GREYBUS_SRC_PATH) + cd $(GREYBUS_SRC_PATH) &&\ + $(MAKE) -j$(MAKE_JOBS) CROSS_COMPILE=$(KERNEL_TOOLS_PREFIX) $(ARGS) + mkdir -p $(PRODUCT_OUT)/root/lib/modules + cp $(GREYBUS_SRC_PATH)/greybus.ko $(PRODUCT_OUT)/root/lib/modules