Preparing HALs - YOCAP/documentation GitHub Wiki
First setup the vendor HALs by:
$ croot
$ cd /device/qcom/common
$ ./vendor_hal_makefile_generator.sh
Running "make" instead of "m" to build runs the vendor hal generator automatically before calling "m".
First issue:
FAILED: ninja: 'out/target/product/msm8998/obj/SHARED_LIBRARIES/[email protected]_intermediates/export_includes', needed by 'out/target/product/msm8998/obj/SHARED_LIBRARIES/libantradio_intermediates/import_includes', missing and no known rule to make it
Problem: libantradio is opensource, but is looking to build against aclosed source lib for which we do not have the source.
So we will need to find prebuilt versions of both those libraries and include them in our proprietary structure.
cc_prebuilt_library_shared {
name: "[email protected]",
owner: "qti",
strip: {
none: true,
},
target: {
android_arm: {
srcs: ["lib/[email protected]"],
},
android_arm64: {
srcs: ["lib64/[email protected]"],
},
},
compile_multilib: "both",
prefer: true,
}
cc_prebuilt_library_shared {
name: "libantradio",
owner: "qti",
strip: {
none: true,
},
target: {
android_arm: {
srcs: ["lib/libantradio.so"],
},
android_arm64: {
srcs: ["lib64/libantradio.so"],
},
},
compile_multilib: "both",
prefer: true,
}
I got those so files from the firmware for my OP5T.
Because we are now overriding something provided by CAF, we need to exclude the project from the manifest.
I do this by creating a local manifest (See repo docs) that says this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remove-project name="platform/external/ant-wireless/ant_native" />
</manifest>
Now this problem:
FAILED: ninja: 'out/target/product/msm8998/obj_arm/SHARED_LIBRARIES/[email protected]_intermediates/export_includes', needed by 'out/target/product/msm8998/obj_arm/SHARED_LIBRARIES/libfm-hci_intermediates/import_includes', missing and no known rule to make it
This it seems is related to FM Radio support. The msm8998 chip supports it, but the OnePlus 5T I'm building for doesn't have it enabled (No antenna at the very least), so we don't need this support.
Basically, look in device/qcom/common/base.mk and remove /disable the "FM" related bits. So set :
BOARD_HAVE_QCOM_FM ?= false
And comment out other "FM" related lines (Just look for the string).
Next:
FAILED: ninja: 'out/target/product/msm8998/obj/SHARED_LIBRARIES/[email protected]_intermediates/export_includes', needed by 'out/target/product/msm8998/obj/EXECUTABLES/fstman_intermediates/import_includes', missing and no known rule to make it
So fst manager wants this closed source HAL. We'll need to get the binary versions for both!