All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chih-Wei Huang <cwhuang@android-x86.org>
To: Jiyong Park <jiyong@google.com>
Cc: "Stéphane Marchesin" <marcheu@google.com>,
	"Rob Herring" <robherring2@gmail.com>,
	"Sean Paul" <seanpaul@google.com>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm] android: make libdrm*.so available to the vendor partition
Date: Mon, 11 Dec 2017 11:51:40 +0800	[thread overview]
Message-ID: <CAKc24n3RrL9SCOxt6h1euaZsEE2r+LreBFJLLwoNp8UOc0rRjw@mail.gmail.com> (raw)
In-Reply-To: <20170726100820.191886-1-jiyong@google.com>

It seems the patch is necessary in Android 8.1,
otherwise we got the errors:

bootable/recovery/minui/Android.mk: error: libminui (STATIC_LIBRARIES
android-x86_64) missing libdrm_platform (STATIC_LIBRARIES
android-x86_64)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if
this is intentional, but that may defer real problems until later in
the build.
bootable/recovery/minui/Android.mk: error: libminui (STATIC_LIBRARIES
android-x86) missing libdrm_platform (STATIC_LIBRARIES android-x86)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if
this is intentional, but that may defer real problems until later in
the build.
build/core/main.mk:728: error: exiting from previous errors.

Please rebase to the latest master and re-submit the patch.
In particular, please consider the master already has
a Rob Herring's patch which moved libdrm* to /vendor.



2017-07-26 18:08 GMT+08:00 Jiyong Park <jiyong@google.com>:
> libdrm_<vendor>.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_<vendor>.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 <jiyong@google.com>
> ---
>  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_<vendor> 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)
>
> --
> 2.14.0.rc0.284.gd933b75aa4-goog
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-12-11  3:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 10:08 [PATCH libdrm] android: make libdrm*.so available to the vendor partition Jiyong Park
2017-12-11  3:51 ` Chih-Wei Huang [this message]
2017-12-11 19:28   ` Emil Velikov
2017-12-12  9:12     ` Jiyong Park
2017-12-12 10:43       ` Jiyong Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc24n3RrL9SCOxt6h1euaZsEE2r+LreBFJLLwoNp8UOc0rRjw@mail.gmail.com \
    --to=cwhuang@android-x86.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jiyong@google.com \
    --cc=marcheu@google.com \
    --cc=robherring2@gmail.com \
    --cc=seanpaul@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.