在为嵌入式系统编译Linux内核时,如何理解和修复错误

时间:2015-05-20 23:06:45

标签: 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 - 你的男人。谢谢。非常感谢。这是最快的回复和正确的。

1 个答案:

答案 0 :(得分:2)

根据要求:

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