<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-10-27 14:28 GMT+02:00 Rob Herring <span dir="ltr"><<a href="mailto:robh@kernel.org" target="_blank">robh@kernel.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Fri, Oct 27, 2017 at 6:41 AM, Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>> wrote:<br>
> On 26 October 2017 at 23:48, Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>> wrote:<br>
>> Having moved gallium_dri.so library to /vendor/lib/dri<br>
>> also symlinks need to be coherently created using TARGET_OUT_VENDOR insted of TARGET_OUT<br>
>> or all non Intel drivers will not be loaded with Android N and earlier,<br>
>> thus causing SurfaceFlinger SIGABRT<br>
>><br>
>> Fixes: c3f75d483c ("Android: move libraries to /vendor")<br>
>><br>
>> Cc: 17.3 <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
>> ---<br>
>> src/gallium/targets/dri/<wbr>Android.mk | 4 ++--<br>
>> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
</span>Reviewed-by: Rob Herring <<a href="mailto:robh@kernel.org">robh@kernel.org</a>><br>
<span class="gmail-"><br>
>><br>
>> diff --git a/src/gallium/targets/dri/<wbr>Android.mk b/src/gallium/targets/dri/<wbr>Android.mk<br>
>> index 61b65769ff..3fa86a2d56 100644<br>
>> --- a/src/gallium/targets/dri/<wbr>Android.mk<br>
>> +++ b/src/gallium/targets/dri/<wbr>Android.mk<br>
>> @@ -70,8 +70,8 @@ LOCAL_SHARED_LIBRARIES += $(sort $(GALLIUM_SHARED_LIBS))<br>
>> ifneq ($(filter 5 6 7, $(MESA_ANDROID_MAJOR_VERSION))<wbr>,)<br>
>> LOCAL_POST_INSTALL_CMD := \<br>
>> $(foreach l, lib $(if $(filter true,$(TARGET_IS_64_BIT)),<wbr>lib64), \<br>
>> - mkdir -p $(TARGET_OUT)/$(l)/$(MESA_DRI_<wbr>MODULE_REL_PATH); \<br>
>> - $(foreach d, $(GALLIUM_TARGET_DRIVERS), ln -sf gallium_dri.so $(TARGET_OUT)/$(l)/$(MESA_DRI_<wbr>MODULE_REL_PATH)/$(d)_dri.so;) \<br>
>> + mkdir -p $(TARGET_OUT_VENDOR)/$(l)/$(<wbr>MESA_DRI_MODULE_REL_PATH); \<br>
>> + $(foreach d, $(GALLIUM_TARGET_DRIVERS), ln -sf gallium_dri.so $(TARGET_OUT_VENDOR)/$(l)/$(<wbr>MESA_DRI_MODULE_REL_PATH)/$(d)<wbr>_dri.so;) \<br>
> Can we fold the long path into a variable and then reuse it?<br>
> This code will be around for a bit, so it might be worth it.<br>
><br>
> foo=$(TARGET_OUT_VENDOR)/$(l)/<wbr>$(MESA_DRI_MODULE_REL_PATH)<br>
> mkdir -p $(foo)<br>
> $(foreach d, $(GALLIUM_TARGET_DRIVERS), ln -sf gallium_dri.so<br>
> $(foo)/$(d)_dri.so;)<br>
><br>
> -Emil<br>
> *Please use better variable name than foo<br>
<br>
</span>bar?<br></blockquote><div><br></div><div>...and the winner is ... MESA_DRI_MODULE_PATH</div><div><br></div><div>$(eval MESA_DRI_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(l)/$(MESA_DRI_MODULE_REL_PATH))<br></div><div><br></div><div>Sending tested v2 patch soon</div><div>Mauro</div></div><br></div></div>