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 ?
==============================================
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!!
已解决! 转到解答。
Hi @vick_chang
You can refer this knowledge base to enable IIO sensor HAL: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Porting-MPU6050-on-Android-to-realize-au...
Hi @vick_chang
You can refer this knowledge base to enable IIO sensor HAL: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Porting-MPU6050-on-Android-to-realize-au...