2016-12-12 18:44:30 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-26 03:43:27 +02:00
|
|
|
if [ ! -d $ANDROID_BUILD_TOP/hardware/interfaces ] ; then
|
2016-12-12 18:44:30 +01:00
|
|
|
echo "Where is hardware/interfaces?";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2017-09-26 03:43:27 +02:00
|
|
|
if [ ! -d $ANDROID_BUILD_TOP/system/libhidl/transport ] ; then
|
2016-12-12 18:44:30 +01:00
|
|
|
echo "Where is system/libhidl/transport?";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "WARNING: This script changes files in many places."
|
|
|
|
|
|
|
|
# These files only exist to facilitate the easy transition to hidl.
|
|
|
|
|
|
|
|
options="-Lexport-header \
|
|
|
|
-randroid.hardware:hardware/interfaces \
|
|
|
|
-randroid.hidl:system/libhidl/transport"
|
|
|
|
|
|
|
|
# hardware/libhardware
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/sensors-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.sensors@1.0
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/nfc-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.nfc@1.0
|
2016-11-22 17:17:23 +01:00
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/hardware/libhardware/include/hardware/gnss-base.h \
|
2016-11-22 17:17:23 +01:00
|
|
|
android.hardware.gnss@1.0
|
2016-12-12 18:44:30 +01:00
|
|
|
|
|
|
|
# system/core
|
|
|
|
hidl-gen $options \
|
2017-12-12 22:38:07 +01:00
|
|
|
-o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.0.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.graphics.common@1.0
|
2017-12-12 22:38:07 +01:00
|
|
|
hidl-gen $options \
|
|
|
|
-o $ANDROID_BUILD_TOP/system/core/include/system/graphics-base-v1.1.h \
|
|
|
|
android.hardware.graphics.common@1.1
|
2016-12-12 18:44:30 +01:00
|
|
|
|
|
|
|
# system/media
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.audio.common@2.0
|
|
|
|
hidl-gen $options \
|
2017-09-26 03:43:27 +02:00
|
|
|
-o $ANDROID_BUILD_TOP/system/media/audio/include/system/audio_effect-base.h \
|
2016-12-12 18:44:30 +01:00
|
|
|
android.hardware.audio.effect@2.0
|