diff mbox series

[libdrm] Android: move libraries to /vendor

Message ID 20170919215959.19650-1-robh@kernel.org
State New
Headers show
Series [libdrm] Android: move libraries to /vendor | expand

Commit Message

Rob Herring (Arm) Sept. 19, 2017, 9:59 p.m. UTC
As part of Treble project in Android O, all the device specific files have
to be located in a separate vendor partition. This is done by setting
LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not
break existing platforms without a vendor partition as it will just move
files to /system/vendor.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Android.mk                | 1 +
 amdgpu/Android.mk         | 3 ++-
 data/Android.mk           | 3 ++-
 etnaviv/Android.mk        | 1 +
 freedreno/Android.mk      | 1 +
 intel/Android.mk          | 1 +
 nouveau/Android.mk        | 1 +
 radeon/Android.mk         | 1 +
 tests/modetest/Android.mk | 1 +
 tests/proptest/Android.mk | 1 +
 10 files changed, 12 insertions(+), 2 deletions(-)

Comments

Sean Paul Sept. 20, 2017, 11:11 p.m. UTC | #1
On Tue, Sep 19, 2017 at 04:59:59PM -0500, Rob Herring wrote:
> As part of Treble project in Android O, all the device specific files have
> to be located in a separate vendor partition. This is done by setting
> LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not
> break existing platforms without a vendor partition as it will just move
> files to /system/vendor.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  Android.mk                | 1 +
>  amdgpu/Android.mk         | 3 ++-
>  data/Android.mk           | 3 ++-
>  etnaviv/Android.mk        | 1 +
>  freedreno/Android.mk      | 1 +
>  intel/Android.mk          | 1 +
>  nouveau/Android.mk        | 1 +
>  radeon/Android.mk         | 1 +
>  tests/modetest/Android.mk | 1 +
>  tests/proptest/Android.mk | 1 +
>  10 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/Android.mk b/Android.mk
> index 292be2360263..8b2abba89ba1 100644
> --- a/Android.mk
> +++ b/Android.mk
> @@ -49,6 +49,7 @@ include $(BUILD_STATIC_LIBRARY)
>  # Shared library for the device
>  include $(CLEAR_VARS)
>  LOCAL_MODULE := libdrm
> +LOCAL_PROPRIETARY_MODULE := true
>  
>  LOCAL_SRC_FILES := $(LIBDRM_FILES)
>  LOCAL_EXPORT_C_INCLUDE_DIRS := \
> diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk
> index 88d376511730..3a897f01c1fa 100644
> --- a/amdgpu/Android.mk
> +++ b/amdgpu/Android.mk
> @@ -5,13 +5,14 @@ include $(CLEAR_VARS)
>  include $(LOCAL_PATH)/Makefile.sources
>  
>  LOCAL_MODULE := libdrm_amdgpu
> +LOCAL_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  
>  LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
>  
>  LOCAL_CFLAGS := \
> -	-DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
> +	-DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\" \
>  	-DAMDGPU_ASIC_ID_TABLE_NUM_ENTRIES=$(shell egrep -ci '^[0-9a-f]{4},.*[0-9a-f]+,' $(LIBDRM_TOP)/data/amdgpu.ids)
>  
>  LOCAL_REQUIRED_MODULES := amdgpu.ids
> diff --git a/data/Android.mk b/data/Android.mk
> index 3c1fd7c62fb9..62013f0cb46b 100644
> --- a/data/Android.mk
> +++ b/data/Android.mk
> @@ -4,6 +4,7 @@ include $(CLEAR_VARS)
>  LOCAL_MODULE := amdgpu.ids
>  LOCAL_MODULE_TAGS := optional
>  LOCAL_MODULE_CLASS := ETC
> -LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/hwdata
> +LOCAL_PROPRIETARY_MODULE := true
> +LOCAL_MODULE_RELATIVE_PATH := hwdata
>  LOCAL_SRC_FILES := $(LOCAL_MODULE)
>  include $(BUILD_PREBUILT)
> diff --git a/etnaviv/Android.mk b/etnaviv/Android.mk
> index 390f9a98924d..9b32deb833a1 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_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  
> diff --git a/freedreno/Android.mk b/freedreno/Android.mk
> index 2b582aeded74..c31101c9b99b 100644
> --- a/freedreno/Android.mk
> +++ b/freedreno/Android.mk
> @@ -5,6 +5,7 @@ include $(CLEAR_VARS)
>  include $(LOCAL_PATH)/Makefile.sources
>  
>  LOCAL_MODULE := libdrm_freedreno
> +LOCAL_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  
> diff --git a/intel/Android.mk b/intel/Android.mk
> index 5407ff3ed208..457eafe199f2 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_PROPRIETARY_MODULE := true
>  
>  LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES)
>  
> diff --git a/nouveau/Android.mk b/nouveau/Android.mk
> index b430af4fdd70..f58386fcb976 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_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  
> diff --git a/radeon/Android.mk b/radeon/Android.mk
> index 71040dab79b8..b770728e67c6 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_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  
> diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk
> index c1a71fd9702a..80c806afd765 100644
> --- a/tests/modetest/Android.mk
> +++ b/tests/modetest/Android.mk
> @@ -6,6 +6,7 @@ include $(LOCAL_PATH)/Makefile.sources
>  LOCAL_SRC_FILES := $(MODETEST_FILES)
>  
>  LOCAL_MODULE := modetest
> +LOCAL_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  LOCAL_STATIC_LIBRARIES := libdrm_util
> diff --git a/tests/proptest/Android.mk b/tests/proptest/Android.mk
> index 91a590fc9fca..b6e1f5ef1fb5 100644
> --- a/tests/proptest/Android.mk
> +++ b/tests/proptest/Android.mk
> @@ -6,6 +6,7 @@ include $(LOCAL_PATH)/Makefile.sources
>  LOCAL_SRC_FILES := $(PROPTEST_FILES)
>  
>  LOCAL_MODULE := proptest
> +LOCAL_PROPRIETARY_MODULE := true
>  
>  LOCAL_SHARED_LIBRARIES := libdrm
>  LOCAL_STATIC_LIBRARIES := libdrm_util
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Eric Engestrom Sept. 21, 2017, 3:36 p.m. UTC | #2
On Tuesday, 2017-09-19 21:59:59 +0000, Rob Herring wrote:
> As part of Treble project in Android O, all the device specific files have
> to be located in a separate vendor partition. This is done by setting
> LOCAL_PROPRIETARY_MODULE (the name is misleading).

Just to double-check; this:

> This change will not
> break existing platforms without a vendor partition as it will just move
> files to /system/vendor.

also applies to this, right?

> -	-DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
> +	-DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\" \

I guess this means /vendor/ used to be a symlink to /system/vendor/
on older Android versions?
Rob Herring (Arm) Sept. 21, 2017, 4:58 p.m. UTC | #3
On Thu, Sep 21, 2017 at 10:36 AM, Eric Engestrom
<eric.engestrom@imgtec.com> wrote:
> On Tuesday, 2017-09-19 21:59:59 +0000, Rob Herring wrote:
>> As part of Treble project in Android O, all the device specific files have
>> to be located in a separate vendor partition. This is done by setting
>> LOCAL_PROPRIETARY_MODULE (the name is misleading).
>
> Just to double-check; this:
>
>> This change will not
>> break existing platforms without a vendor partition as it will just move
>> files to /system/vendor.
>
> also applies to this, right?
>
>> -     -DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
>> +     -DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\" \
>
> I guess this means /vendor/ used to be a symlink to /system/vendor/
> on older Android versions?

Correct. It's been that way for quite a while and still is in O if you
don't enable a vendor partition.

Rob
diff mbox series

Patch

diff --git a/Android.mk b/Android.mk
index 292be2360263..8b2abba89ba1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -49,6 +49,7 @@  include $(BUILD_STATIC_LIBRARY)
 # Shared library for the device
 include $(CLEAR_VARS)
 LOCAL_MODULE := libdrm
+LOCAL_PROPRIETARY_MODULE := true
 
 LOCAL_SRC_FILES := $(LIBDRM_FILES)
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk
index 88d376511730..3a897f01c1fa 100644
--- a/amdgpu/Android.mk
+++ b/amdgpu/Android.mk
@@ -5,13 +5,14 @@  include $(CLEAR_VARS)
 include $(LOCAL_PATH)/Makefile.sources
 
 LOCAL_MODULE := libdrm_amdgpu
+LOCAL_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 
 LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
 
 LOCAL_CFLAGS := \
-	-DAMDGPU_ASIC_ID_TABLE=\"/system/etc/hwdata/amdgpu.ids\" \
+	-DAMDGPU_ASIC_ID_TABLE=\"/vendor/etc/hwdata/amdgpu.ids\" \
 	-DAMDGPU_ASIC_ID_TABLE_NUM_ENTRIES=$(shell egrep -ci '^[0-9a-f]{4},.*[0-9a-f]+,' $(LIBDRM_TOP)/data/amdgpu.ids)
 
 LOCAL_REQUIRED_MODULES := amdgpu.ids
diff --git a/data/Android.mk b/data/Android.mk
index 3c1fd7c62fb9..62013f0cb46b 100644
--- a/data/Android.mk
+++ b/data/Android.mk
@@ -4,6 +4,7 @@  include $(CLEAR_VARS)
 LOCAL_MODULE := amdgpu.ids
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/hwdata
+LOCAL_PROPRIETARY_MODULE := true
+LOCAL_MODULE_RELATIVE_PATH := hwdata
 LOCAL_SRC_FILES := $(LOCAL_MODULE)
 include $(BUILD_PREBUILT)
diff --git a/etnaviv/Android.mk b/etnaviv/Android.mk
index 390f9a98924d..9b32deb833a1 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_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 
diff --git a/freedreno/Android.mk b/freedreno/Android.mk
index 2b582aeded74..c31101c9b99b 100644
--- a/freedreno/Android.mk
+++ b/freedreno/Android.mk
@@ -5,6 +5,7 @@  include $(CLEAR_VARS)
 include $(LOCAL_PATH)/Makefile.sources
 
 LOCAL_MODULE := libdrm_freedreno
+LOCAL_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 
diff --git a/intel/Android.mk b/intel/Android.mk
index 5407ff3ed208..457eafe199f2 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_PROPRIETARY_MODULE := true
 
 LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES)
 
diff --git a/nouveau/Android.mk b/nouveau/Android.mk
index b430af4fdd70..f58386fcb976 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_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 
diff --git a/radeon/Android.mk b/radeon/Android.mk
index 71040dab79b8..b770728e67c6 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_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 
diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk
index c1a71fd9702a..80c806afd765 100644
--- a/tests/modetest/Android.mk
+++ b/tests/modetest/Android.mk
@@ -6,6 +6,7 @@  include $(LOCAL_PATH)/Makefile.sources
 LOCAL_SRC_FILES := $(MODETEST_FILES)
 
 LOCAL_MODULE := modetest
+LOCAL_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 LOCAL_STATIC_LIBRARIES := libdrm_util
diff --git a/tests/proptest/Android.mk b/tests/proptest/Android.mk
index 91a590fc9fca..b6e1f5ef1fb5 100644
--- a/tests/proptest/Android.mk
+++ b/tests/proptest/Android.mk
@@ -6,6 +6,7 @@  include $(LOCAL_PATH)/Makefile.sources
 LOCAL_SRC_FILES := $(PROPTEST_FILES)
 
 LOCAL_MODULE := proptest
+LOCAL_PROPRIETARY_MODULE := true
 
 LOCAL_SHARED_LIBRARIES := libdrm
 LOCAL_STATIC_LIBRARIES := libdrm_util