Android kernel error: undefined reference to `get_hw_version_platform'

33 Views Asked by At

My device is Xiaomi 11 Lite 5G NE (lisa) and I am using the defconfig from ./arch/arm64/configs/vendor/lahaina-qgki_defconfig. I am using clang as CC and aarch64-linux-gnu- as CLANG_TRIPLE (both from proton-clang) while using aarch64-linux-android- as CROSS_COMPILE (from here https://github.com/ibnudz/aarch64-linux-android-4.9)

I am trying to build a kernel of that device but I faced some errors (https://github.com/renoir-development/android_kernel_xiaomi_sm8350/tree/lineage-19.1)

During the compilation, I got undefined error for these functions get_hw_country_version, get_hw_version_platform, get_hw_version_build, get_hw_version_major, get_hw_version_minor in ./drivers/soc/qcom/icnss2/qmi.o

By doing grep -r "get_hw_country_version", I was able to locate the function was declared in ./drivers/misc/hwid.c while the header file is located in ./include/linux/hwid.h

I found that qmi.c (mentioned above) already has hwid.h included and some defined values in hwid.h successfully be used by qmi.c, but I am still getting the undefined reference error for those functions. How do I fix this issue?

0

There are 0 best solutions below