From patchwork Tue Dec 12 10:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiyong Park X-Patchwork-Id: 10109599 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 A9EA360327 for ; Wed, 13 Dec 2017 09:54:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1AE628FEB for ; Wed, 13 Dec 2017 09:54:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96919291E8; Wed, 13 Dec 2017 09:54:13 +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 C941E28FEB for ; Wed, 13 Dec 2017 09:54:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B02BE6E3F8; Wed, 13 Dec 2017 09:54:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C3E76E1F2 for ; Tue, 12 Dec 2017 10:43:21 +0000 (UTC) Received: by mail-pf0-x241.google.com with SMTP id j124so13895892pfc.2 for ; Tue, 12 Dec 2017 02:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OPc7dNfjKP7X/mDwRw+VPc9gt9NoLAaj1pHaMNhn5hk=; b=kmpl4jhaELPdqHr6WkeTBoLqn4V5Myl2tdOIk0Eu5nnpl6sdDa/B9hOZz3zXC9lREL to6NMJZxNEED8yRxNSuIkcMmUqT4lVBnFiFpTypzu1+wLQRfLUX1g0ndQd0ASkmB2/dg vEltYoXccQE9AAgraTEeKpTjbV4EQ56w3KacnyxfNE8+sOqYMq9RnlV99Zs7+WfhF/Dh Sw+XytLpoVgucfNg5Mw8YnpvzH9inlL66Twh6Ym4OASGuyM4sSk/eO7JuywA9i50YQp3 OgZMMd1hQoOsooqZStcD8ZcOPLTYhZrD3GICe5lrfKhMz392sZE42GkUslMnI6aQarDm 9/cg== 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:in-reply-to :references; bh=OPc7dNfjKP7X/mDwRw+VPc9gt9NoLAaj1pHaMNhn5hk=; b=HpJo2HgcwYSkxlCdS7aEmwJkfNCawSahrBtwfZACE2uECelmsuIxWD6hbaViMQd2sv efk+rdbKH7ktKkyIbTocsOQi/2evvd2VmeeWUZv0+X0xsgPQF1WzCzZyj+F7BA5Mmu02 gQUPOAPkAFTcdsDzP97OAQ4gwRqEn1Pxz3oSM+ZnJArJXx49fWQUpNA1wsNraGsdCxCj aTWZOGT7u/P2Yaa9drr3UQ+XDYnvlYBlUxbHqX746Z2kEMbNK/ZXEia2nxQ0aonVndqR Oc+DwcOb+26dQjOJ0i81LW+hP8O7ez4grycAAthN7c5ib7kGiPYaynSq5Am6QkwZDQl6 VGMQ== X-Gm-Message-State: AKGB3mKAjnOQaj8wkgrtfj20UWfDlVRV7TL9Em2tqDFUvvL1yVXgRaK4 cZu3Dbeeqa4UVII/BaCDHEkfnZZ67wA= X-Google-Smtp-Source: ACJfBot0PZ5DgmaqFpH+PIxtsR1+il7soQVy6bxBShcq47THH4XDSpsrspGW1Crix64echa3B41wOw== X-Received: by 10.99.160.96 with SMTP id u32mr1661960pgn.25.1513075399764; Tue, 12 Dec 2017 02:43:19 -0800 (PST) Received: from jiyong.seo.corp.google.com ([2401:fa00:d:10:82a:415b:a23e:c0a3]) by smtp.gmail.com with ESMTPSA id j79sm31154852pfe.129.2017.12.12.02.43.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 02:43:19 -0800 (PST) From: Jiyong Park To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] android: make libdrm*.so available to the vendor partition Date: Tue, 12 Dec 2017 19:43:07 +0900 Message-Id: <20171212104307.147134-1-jiyong@google.com> X-Mailer: git-send-email 2.15.1.424.g9478a66081-goog In-Reply-To: References: X-Mailman-Approved-At: Wed, 13 Dec 2017 09:53:59 +0000 Cc: jiyong@google.com, seanpaul@google.com, emil.l.velikov@gmail.com, marcheu@google.com, robherring2@gmail.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.common.mk | 2 -- 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 +- 12 files changed, 49 insertions(+), 7 deletions(-) diff --git a/Android.common.mk b/Android.common.mk index e3de1069..85b99c67 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -14,5 +14,3 @@ LOCAL_CFLAGS += \ # Quiet down the build system and remove any .h files from the sources LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES)) LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH) - -LOCAL_PROPRIETARY_MODULE := true diff --git a/Android.mk b/Android.mk index 292be236..e8c6608b 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 1f028d0b..fc7892e7 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)