gpt4 book ai didi

从源代码编译内核。错误解释。

转载 作者:太空宇宙 更新时间:2023-11-04 04:22:50 26 4
gpt4 key购买 nike

我正在从源代码编译 android 内核。但是在制作对象 tspdrv.o 时遇到了一些错误,无法弄清楚它是从哪里生成的。以下是错误:

  CC      drivers/tspdrv/tspdrv.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from drivers/tspdrv/tspdrv.c:34:
drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_write_reg_val':
include/linux/dynamic_debug.h:61:16: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct _ddebug __aligned(8) \
^
include/linux/dynamic_debug.h:73:2: note: in expansion of macro
'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:196:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
drivers/tspdrv/ImmVibeSPI.c:681:4: note: in expansion of macro 'pr_debug'
pr_debug("drv2604 x5 write 0x%02x, 0x%02x", data[i], data[i + 1]);
^
<command-line>:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:63:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:73:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:196:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
drivers/tspdrv/ImmVibeSPI.c:681:4: note: in expansion of macro 'pr_debug'
pr_debug("drv2604 x5 write 0x%02x, 0x%02x", data[i], data[i + 1]);
^
<command-line>:0:27: note: each undeclared identifier is reported only once for each function it appears in
include/linux/dynamic_debug.h:63:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:73:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:196:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
drivers/tspdrv/ImmVibeSPI.c:681:4: note: in expansion of macro 'pr_debug'
pr_debug("drv2604 x5 write 0x%02x, 0x%02x", data[i], data[i + 1]);
^
drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_read_reg':
<command-line>:0:27: error: 'tspdrv' undeclared (first use in this function)
include/linux/dynamic_debug.h:63:14: note: in expansion of macro 'KBUILD_MODNAME'
.modname = KBUILD_MODNAME, \
^
include/linux/dynamic_debug.h:73:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
^
include/linux/printk.h:196:2: note: in expansion of macro 'dynamic_pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
^
drivers/tspdrv/ImmVibeSPI.c:732:2: note: in expansion of macro 'pr_debug'
pr_debug("drv2604 read addr:0x%x reg:0x%x data:0x%x res:%d",
^
cc1: some warnings being treated as errors
scripts/Makefile.build:306: *** [drivers/tspdrv/tspdrv.o] Error 1

#0 drivers/tspdrv/tspdrv.o at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:306
#1 drivers/tspdrv/built-in.o at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:374
#2 __build at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:8
Command-line invocation:
"remake -f scripts/Makefile.build obj=drivers/tspdrv"
scripts/Makefile.build:442: *** [drivers/tspdrv] Error 2

#0 drivers/tspdrv at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:442
#1 drivers/pinctrl/built-in.o at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:361
#2 drivers/built-in.o at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:374
#3 __build at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/scripts/Makefile.build:8
Command-line invocation:
"remake -f scripts/Makefile.build obj=drivers"
Makefile:949: *** [drivers] Error 2

#0 drivers at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/Makefile:949
#1 arch/arm/kernel/vmlinux.lds at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/Makefile:940
#2 vmlinux at
/home/ozair/nougat_mi3/kernel/xiaomi/cancro/Makefile:915
#3 all at /home/ozair/nougat_mi3/kernel/xiaomi/cancro/Makefile:563
#4 _all at /home/ozair/nougat_mi3/kernel/xiaomi/cancro/Makefile:111
Command-line invocation:
" none

我需要了解此错误的根源,因为它不会将我带到任何地方。例如让这部分错误

drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_write_reg_val':
include/linux/dynamic_debug.h:61:16: error: implicit declaration of
function 'KBUILD_STR' [-Werror=implicit-function-declaration]
static struct _ddebug __aligned(8) \
^

include/linux/dynamic_debug.h:61:16

中没有名为 KBUILD_STR 的函数

还是我读错了?

最佳答案

看起来 KBUILD_STR 已从 4.2 和 4.10 之间的某个位置的内核构建脚本中删除。

看起来驱动程序尚未更新以匹配。

关于从源代码编译内核。错误解释。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44646813/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com