'i.mx.8'에 해당되는 글 1건

  1. 2023.11.16 NXP i.mx.8 v4.14.98-2.3.3 에서 debug symbol 추가할 때, linux-imx compile error
2023. 11. 16. 21:01

NXP i.mx.8 v4.14.98-2.3.3 에서 debug symbol 추가할 때, linux-imx compile error

https://developer.ridgerun.com/wiki/index.php/Preparing_Yocto_Development_Environment_for_Debugging

 

Preparing Yocto Development Environment for Debugging

From RidgeRun Developer Wiki Description Setting up an environment with the appropriate tools can help developers in the process of debugging and overall analyzing a system's behavior. Yocto supports several debugging capabilities which are aimed to produc

developer.ridgerun.com

https://stackoverflow.com/questions/62941898/yocto-generate-debug-symbol-of-all-the-included-packages

 

Yocto - generate debug symbol of all the included packages

I am trying to build debug symbols to be used with gdb when needed. To build debug symbols, added below in the target image target-image.inc file. IMAGE_GEN_DEBUGFS = "1" ...

stackoverflow.com

를 참고하여, image에 debug symbol을 추가할 때,

|   CC      drivers/acpi/ec.o
| In file included from /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/kernel.h:15:0,
|                  from /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/drivers/acpi/ec.c:32:
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/drivers/acpi/ec.c:1998:38: error: passing argument 1 of '__check_old_set_param' from incompatible pointer type [-Werror=incompatible-pointer-types]
|  module_param_call(ec_event_clearing, param_set_event_clearing, param_get_event_clearing,
|                                       ^
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/build_bug.h:30:56: note: in definition of macro 'BUILD_BUG_ON_ZERO'
|  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
|                                                         ^
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/moduleparam.h:228:6: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS'
|       VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } }
|       ^~~~~~~~~~~~~~~~~~~~~~~~
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/moduleparam.h:234:2: note: in expansion of macro '__module_param_call'
|   __module_param_call(MODULE_PARAM_PREFIX,   \
|   ^~~~~~~~~~~~~~~~~~~
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/drivers/acpi/ec.c:1998:1: note: in expansion of macro 'module_param_call'
|  module_param_call(ec_event_clearing, param_set_event_clearing, param_get_event_clearing,
|  ^~~~~~~~~~~~~~~~~
| In file included from /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/module.h:18:0,
|                  from /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/drivers/acpi/ec.c:33:
| /data/nxp/i.mx.8/4.14.98-2.3.3/ap.4/tmp/work-shared/imx8mmevk/kernel-source/include/linux/moduleparam.h:240:1: note: expected 'int (*)(const char *, struct kernel_param *)' but argument is of type 'int (*)(const char *, const struct kernel_param *)'
|  __check_old_set_param(int (*oldset)(const char *, struct kernel_param *))
|  ^~~~~~~~~~~~~~~~~~~~~
...

이렇게 오류가 발생하였다. 찾아 보니,,

linux-imx 컴파일 도중에 발생한 것으로, linux kernel 의 include/linux/moduleparam.h 화일에서 line 236 에 문제가 있다. 다음과 같이 [ perm, ] 으로 변경하면 문제가 해결된다.

오류 메시지를 정확하게 바라보고 이해했더라면, 쉽게 찾았을 수 있었을 텐데, 계속 구글에 물어 보고, 다른 것만 찾다가 2일의 시간을 낭비했다.

설명이 두서없지만, 혹시나 도움이 되기를 바라며,