問題如下:
In file included from drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils/cam_sensor_util.h:27, from drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils/cam_sensor_util.c:14: drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_io/cam_sensor_io.h:18:10: fatal error: cam_sensor_cmn_header.h: No such file or directory 18 | #include "cam_sensor_cmn_header.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[7]: *** [scripts/Makefile.build:339: drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils/cam_sensor_util.o] Error 1 make[6]: *** [scripts/Makefile.build:653: drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils] Error 2 make[5]: *** [scripts/Makefile.build:653: drivers/media/platform/msm/camera/cam_sensor_module] Error 2 make[4]: *** [scripts/Makefile.build:653: drivers/media/platform/msm/camera] Error 2 make[3]: *** [scripts/Makefile.build:653: drivers/media/platform/msm] Error 2 make[2]: *** [scripts/Makefile.build:653: drivers/media/platform] Error 2 make[2]: *** Waiting for unfinished jobs.... drivers/thermal/thermal_core.c:42:10: fatal error: ../base/base.h: No such file or directory 42 | #include <../base/base.h> | ^~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [scripts/Makefile.build:340: drivers/thermal/thermal_core.o] Error 1 make[1]: *** [scripts/Makefile.build:653: drivers/thermal] Error 2 make: *** [Makefile:1121: drivers] Error 2
解法如下:
$ vim Makefile 383 # Use USERINCLUDE when you must reference the UAPI directories only. 384 USERINCLUDE := \ 385 -I$(srctree)/drivers/base \ 386 -I$(srctree)/drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils \ 387 -I$(srctree)/arch/$(hdr-arch)/include/uapi \ 388 -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \ 389 -I$(srctree)/include/uapi \ 390 -I$(objtree)/include/generated/uapi \ 391 -include $(srctree)/include/linux/kconfig.h 405 KBUILD_CFLAGS := -w -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ $ vim .config 5223 # CONFIG_CC_WERROR is not set