I had a problem compiling the 5.10.160 kernel for Orange Pi 5 Plus.
I replaced the files in drivers/rknpu with those in rknpu_driver_0.9.6_20240322.tar.bz2 and added two functions to include/linux/mm.h, but still encountered a compilation error:
drivers/rknpu/rknpu_devfreq.c: In function 'rknpu_devfreq_init':
drivers/rknpu/rknpu_devfreq.c:732:9: error: implicit declaration of function 'rockchip_uninit_opp_table'; did you mean 'rockchip_init_opp_table'? [-Werror=implicit-function-declaration]
732 | rockchip_uninit_opp_table(dev, &rknpu_dev->opp_info);
| ^~~~~~~~~
| rockchip_init_opp_table
cc1: all warnings being treated as errors
make[2]: [scripts/Makefile.build:273: drivers/rknpu/rknpu_devfreq.o] Error 1
make[1]: [scripts/Makefile.build:516: drivers/rknpu] Error 2
make: *** [Makefile:1938: drivers] Error 2
I had a problem compiling the 5.10.160 kernel for Orange Pi 5 Plus. I replaced the files in drivers/rknpu with those in rknpu_driver_0.9.6_20240322.tar.bz2 and added two functions to include/linux/mm.h, but still encountered a compilation error: drivers/rknpu/rknpu_devfreq.c: In function 'rknpu_devfreq_init': drivers/rknpu/rknpu_devfreq.c:732:9: error: implicit declaration of function 'rockchip_uninit_opp_table'; did you mean 'rockchip_init_opp_table'? [-Werror=implicit-function-declaration] 732 | rockchip_uninit_opp_table(dev, &rknpu_dev->opp_info); | ^![image](https://github.com/airockchip/rknn-llm/assets/60282327/f50efc29-64a1-4475-b31c-865a55226ed9)
~~~~~~~~ | rockchip_init_opp_table cc1: all warnings being treated as errors make[2]: [scripts/Makefile.build:273: drivers/rknpu/rknpu_devfreq.o] Error 1 make[1]: [scripts/Makefile.build:516: drivers/rknpu] Error 2 make: *** [Makefile:1938: drivers] Error 2