How to enable IIO sensor HAL and Sensor multi HAL for different sensors?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to enable IIO sensor HAL and Sensor multi HAL for different sensors?

跳至解决方案
4,943 次查看
vick_chang
Contributor III

We’re porting Gsensor and Light sensor on A11, I tried to enable IIO sensor HAL for light sensor and use other HAL for Gyro sensor.

 

Hence, we may need Sensor multi HAL. 

Did you have a guide for how to enable ?

  1. IIO sensor HAL in NXP
  2. Sensor multi HAL

 ==============================================

I have tried to add below in evk_8mq.mk

 

PRODUCT_PACKAGES += \

android.hardware.sensors@2.0-service.multihal \

android.hardware.sensors@2.0-service.multihal.rc \

android.hardware.sensors@2.0-nxp-IIO-Subhal \

 

and add below in manifest.xml

<hal format="hidl">

        <name>android.hardware.sensors</name>

            <transport>hwbinder</transport>

        <version>2.0</version>

        <interface>

            <name>ISensors</name>

            <instance>multihal/</instance>

        </interface>

        <fqname>@2.0::ISensors/multihal</fqname>

</hal>

=====================================

And I get build errors:

checkvintf I 08-29 03:03:49   116   116 check_vintf.cpp:84] List 'out/target/product/evk_8mq/product/etc/vintf/': No such file or directory

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] files are incompatible: The following instances are in the device manifest but not specified in framework compatibility matrix:

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554]     android.hardware.sensors@2.0::ISensors/multihal

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554]     android.hardware.sensors@2.0::ISensors/multihal/

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] Suggested fix:

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] 1. Update deprecated HALs to the latest version.

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] 2. Check for any typos in device manifest or framework compatibility matrices with FCM version >= 5.

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] 3. For new platform HALs, add them to any framework compatibility matrix with FCM version >= 5 where applicable.

checkvintf E 08-29 03:03:49   116   116 check_vintf.cpp:554] 4. For device-specific HALs, add to DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE or DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.: Success

INCOMPATIBLE

03:03:50 ninja failed with: exit status 1

 

#### failed to build some targets (5 seconds) ####

 

Thanks!!

0 项奖励
回复
1 解答
4,898 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 项奖励
回复
2 回复数
4,899 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 项奖励
回复
4,884 次查看
vick_chang
Contributor III

Hi @Zhiming_Liu 

It works, thank you!!

0 项奖励
回复