From patchwork Wed Jul 26 10:08:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiyong Park X-Patchwork-Id: 9864539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1617A6038C for ; Wed, 26 Jul 2017 10:08:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 196BA28738 for ; Wed, 26 Jul 2017 10:08:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E23928744; Wed, 26 Jul 2017 10:08:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 58B1A28738 for ; Wed, 26 Jul 2017 10:08:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D82766E6BC; Wed, 26 Jul 2017 10:08:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x22d.google.com (mail-pg0-x22d.google.com [IPv6:2607:f8b0:400e:c05::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58FB86E6BC for ; Wed, 26 Jul 2017 10:08:30 +0000 (UTC) Received: by mail-pg0-x22d.google.com with SMTP id v190so82332667pgv.2 for ; Wed, 26 Jul 2017 03:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EnnLC5JzLam+KvZM2moSo2XNbwuKSr/X4ne+yXMmkbM=; b=tWqrB6vv9RXJF25Du+axjAiuM+sX8fTd3oqdCSSXpbalqUeeRgFL0bP4PZ6ZVcfaGR G85OeWl92J7TWOGPIHlzY9VMcraFvsReiIQ1oioT910S0lUQ01u596c0EsYLWxkd7u8g i4p+vi5HqKNk1wnxbaboiG/XV682m1NC+1jajOiuOEAWcbmpg1Cy8Cx7wo8CqfuWcKPM 1blznD1LrTbMnUuFfjX1/T09Rvk+4TqIp2NcALPE3nICr5n0f1Dan/hcmMS5DwY55mza VPqpGkl9Qyt5ucE9ab2R2jgxMIAL7WfjLoYdTVKRLtrpup/wbm44Cs+m0mRo78Ct/EWR P+og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EnnLC5JzLam+KvZM2moSo2XNbwuKSr/X4ne+yXMmkbM=; b=tI1k/8/1R7lv2ImNkB0otrYNnvu/bFEgHvvabVyNZw2Y4xkHN7EysFmob6LG3CnCvW dJfqtQxaXQpBw38CTdDQ2t1rhaDNWQnoQcvUTta4PHa998zZ4ffTcsMgKQXf76/2IFs1 wbBpqZIRqhe/sSCCHP0t/SrkBZmTPzWVaLmrY8Vg0T1XI2xiZd7EUH5iJF1LD/0sPaNx pf9yprTlafOvAyjx0/kPR7qcNfeIklGhwkdrw2LH1BYysrF6vh/WJdq7oBJ2qyMSmkJl Vip8D4MPzm+BUzxUJOc/p9mpNk+Z5zdgriYrtjMWU388n0y/NTZxEmizFxZgeK/y00MA EArg== X-Gm-Message-State: AIVw11132bP2A7vjs9SfDtYHeakVQXLy/oebRo02kHAR5q2s28JZdb8U 1Q4F48OyE8lEBLlH2yexHg== X-Received: by 10.99.158.10 with SMTP id s10mr369597pgd.113.1501063709248; Wed, 26 Jul 2017 03:08:29 -0700 (PDT) Received: from jiyong.seo.corp.google.com ([100.102.128.43]) by smtp.gmail.com with ESMTPSA id s18sm9374213pfg.166.2017.07.26.03.08.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Jul 2017 03:08:28 -0700 (PDT) From: Jiyong Park To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] android: make libdrm*.so available to the vendor partition Date: Wed, 26 Jul 2017 19:08:20 +0900 Message-Id: <20170726100820.191886-1-jiyong@google.com> X-Mailer: git-send-email 2.14.0.rc0.400.g1c36432dff-goog Cc: jiyong@google.com, marcheu@google.com, seanpaul@google.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP libdrm_.so are moved to the vendor partition (/vendor/lib or /system/vendor/lib if there is no dedicated vendor partition), since they are vendor-specific extension that must not be in the system partition which should be generic. libdrm.so (which is generic) is built/installed twice: once to /vendor/lib to satisfy the dependency for the libdrm_.so libs and once to /system/lib for platform clients such as the recovery executable. The platform variant of libdrm is named as libdrm_platform.so since in Android.mk we can't have two different shared libs having same soname. In the near future, this will be fixed by converting these Android.mk files to Android.bp and mark the module libdrm as 'vendor_available: true'. (See https://android-review.googlesource.com/c/368372/ for further detail on the property) Signed-off-by: Jiyong Park --- Android.mk | 39 +++++++++++++++++++++++++++++++++++++++ amdgpu/Android.mk | 2 +- etnaviv/Android.mk | 1 + freedreno/Android.mk | 2 +- intel/Android.mk | 1 + libkms/Android.mk | 1 + nouveau/Android.mk | 1 + radeon/Android.mk | 1 + tests/modetest/Android.mk | 2 +- tests/proptest/Android.mk | 2 +- tests/util/Android.mk | 2 +- 11 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Android.mk b/Android.mk index 292be236..a5986b4e 100644 --- a/Android.mk +++ b/Android.mk @@ -21,6 +21,10 @@ # IN THE SOFTWARE. # +# Two identical libs are defined here. +# libdrm: for vendors. installed to /vendor/lib. libdrm_ uses this. +# libdrm_platform: for platform modules (such as libminui). installed to /system/lib + LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk LOCAL_PATH := $(call my-dir) @@ -33,7 +37,41 @@ include $(LOCAL_PATH)/Makefile.sources #static library for the device (recovery) include $(CLEAR_VARS) + +LOCAL_MODULE := libdrm_platform + +LOCAL_SRC_FILES := $(LIBDRM_FILES) +LOCAL_EXPORT_C_INCLUDE_DIRS := \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/include/drm + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/include/drm + +include $(LIBDRM_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) + +# Dynamic library for the device +include $(CLEAR_VARS) + +LOCAL_MODULE := libdrm_platform + +LOCAL_SRC_FILES := $(LIBDRM_FILES) +LOCAL_EXPORT_C_INCLUDE_DIRS := \ + $(LOCAL_PATH) \ + $(LOCAL_PATH)/include/drm + +LOCAL_C_INCLUDES := \ + $(LOCAL_PATH)/include/drm + +include $(LIBDRM_COMMON_MK) +include $(BUILD_SHARED_LIBRARY) + +# Static library for the device (recovery) +include $(CLEAR_VARS) + LOCAL_MODULE := libdrm +LOCAL_VENDOR_MODULE := true LOCAL_SRC_FILES := $(LIBDRM_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := \ @@ -49,6 +87,7 @@ include $(BUILD_STATIC_LIBRARY) # Shared library for the device include $(CLEAR_VARS) LOCAL_MODULE := libdrm +LOCAL_VENDOR_MODULE := true LOCAL_SRC_FILES := $(LIBDRM_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := \ diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk index bf0611ba..1df84b3e 100644 --- a/amdgpu/Android.mk +++ b/amdgpu/Android.mk @@ -5,7 +5,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_amdgpu - +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES) diff --git a/etnaviv/Android.mk b/etnaviv/Android.mk index 390f9a98..1143eac5 100644 --- a/etnaviv/Android.mk +++ b/etnaviv/Android.mk @@ -5,6 +5,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_etnaviv +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm diff --git a/freedreno/Android.mk b/freedreno/Android.mk index 2b582aed..c1289145 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -5,7 +5,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_freedreno - +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) diff --git a/intel/Android.mk b/intel/Android.mk index 5407ff3e..902b8633 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -28,6 +28,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_intel +LOCAL_VENDOR_MODULE := true LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) diff --git a/libkms/Android.mk b/libkms/Android.mk index 0be72054..d0a16149 100644 --- a/libkms/Android.mk +++ b/libkms/Android.mk @@ -45,6 +45,7 @@ LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES) endif LOCAL_MODULE := libkms +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm include $(LIBDRM_COMMON_MK) diff --git a/nouveau/Android.mk b/nouveau/Android.mk index b430af4f..27433d87 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -5,6 +5,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_nouveau +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm diff --git a/radeon/Android.mk b/radeon/Android.mk index 71040dab..7bc9cee9 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -5,6 +5,7 @@ include $(CLEAR_VARS) include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_radeon +LOCAL_VENDOR_MODULE := true LOCAL_SHARED_LIBRARIES := libdrm diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk index c1a71fd9..a2a52dfe 100644 --- a/tests/modetest/Android.mk +++ b/tests/modetest/Android.mk @@ -7,7 +7,7 @@ LOCAL_SRC_FILES := $(MODETEST_FILES) LOCAL_MODULE := modetest -LOCAL_SHARED_LIBRARIES := libdrm +LOCAL_SHARED_LIBRARIES := libdrm_platform LOCAL_STATIC_LIBRARIES := libdrm_util include $(LIBDRM_COMMON_MK) diff --git a/tests/proptest/Android.mk b/tests/proptest/Android.mk index 91a590fc..26aea514 100644 --- a/tests/proptest/Android.mk +++ b/tests/proptest/Android.mk @@ -7,7 +7,7 @@ LOCAL_SRC_FILES := $(PROPTEST_FILES) LOCAL_MODULE := proptest -LOCAL_SHARED_LIBRARIES := libdrm +LOCAL_SHARED_LIBRARIES := libdrm_platform LOCAL_STATIC_LIBRARIES := libdrm_util include $(LIBDRM_COMMON_MK) diff --git a/tests/util/Android.mk b/tests/util/Android.mk index 12eccb42..6c5c924d 100644 --- a/tests/util/Android.mk +++ b/tests/util/Android.mk @@ -28,7 +28,7 @@ include $(LOCAL_PATH)/Makefile.sources LOCAL_MODULE := libdrm_util -LOCAL_SHARED_LIBRARIES := libdrm +LOCAL_SHARED_LIBRARIES := libdrm_platform LOCAL_SRC_FILES := $(UTIL_FILES)