c - 如何理解和修复为嵌入式系统编译 Linux 内核时出现的错误

标签 c linux-kernel makefile arm native

尝试编译以下文件时:

/*
 *  linux/arch/arm/mm/proc-syms.c
 *
 *  Copyright (C) 2000-2002 Russell King
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/module.h>
#include <linux/mm.h>

#include <asm/cacheflush.h>
#include <asm/proc-fns.h>
#include <asm/tlbflush.h>
#include <asm/page.h>

#ifndef MULTI_CPU
EXPORT_SYMBOL(cpu_dcache_clean_area);
EXPORT_SYMBOL(cpu_set_pte_ext);
EXPORT_SYMBOL(cpu_tima_set_pte_ext);
#else
EXPORT_SYMBOL(processor);
#endif

#ifndef MULTI_CACHE
EXPORT_SYMBOL(__cpuc_flush_kern_all);
EXPORT_SYMBOL(__cpuc_flush_user_all);
EXPORT_SYMBOL(__cpuc_flush_user_range);
EXPORT_SYMBOL(__cpuc_coherent_kern_range);
EXPORT_SYMBOL(__cpuc_flush_dcache_area);
#else
EXPORT_SYMBOL(cpu_cache);
#endif

#ifdef CONFIG_MMU
#ifndef MULTI_USER
EXPORT_SYMBOL(__cpu_clear_user_highpage);
EXPORT_SYMBOL(__cpu_copy_user_highpage);
#else
EXPORT_SYMBOL(cpu_user);
#endif
#endif

/*
 * No module should need to touch the TLB (and currently
 * no modules do.  We export this for "loadkernel" support
 * (booting a new kernel from within a running kernel.)
 */
#ifdef MULTI_TLB
EXPORT_SYMBOL(cpu_tlb);
#endif

我收到以下错误:

arch/arm/mm/proc-syms.c:21:1: error: 'cpu_tima_set_pte_ext' undeclared here (not in a function)
make[1]: *** [arch/arm/mm/proc-syms.o] Error 1
make: *** [arch/arm/mm] Error 2

我实际上对收到此错误感到惊讶。这是我从供应商下载的代码,我认为其中不会有错误。有什么办法可以绕过这个错误吗?这是一个真正的错误,还是会在链接阶段修复的错误?

@user58697 - 你真是个男人。谢谢。太感谢了。这是最快的回复并且是正确的。

最佳答案

根据要求:

这是一个已知问题。存在补丁(例如参见 here )

关于c - 如何理解和修复为嵌入式系统编译 Linux 内核时出现的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30361837/

相关文章:

c - C UNIX 中的隐式函数声明

linux-kernel - 如何获取 U-boot 的启动日志

python - make 在 make 调用期间找不到 OpenCV 库

c++ - Eigen、make 和 cmake 之间的问题(可能是 cmake 错误)

objective-c - 苹果机,OpenGL 4 : drawing on FrameBuffer does not work

c - 关于 C 文档

c - 在c中使用posix信号量的读写器应用程序中的段错误

Linux 陷入 CPU 软锁定?

c - 如何创建自己的 sysctl 参数

c++ - makefile 混淆中的链接器库路径