驱动开发的一些错误解决方法

36 篇文章 0 订阅
驱动开发的一些错误解决方法

In file included from /linux-2.6.32/arch/arm/include/asm/timex.h:15,

from include/linux/timex.h:170,

from include/linux/sched.h:56,

from arch/arm/kernel/asm-offsets.c:13:

arch/arm/mach-sep4020/include/mach/timex.h:4:26: asm/hardware.h: No such file or directory

解决方法:/linux-2.6.32/arch/arm/mach-sep4020/include/mach/timex.h中的改为#include "hardware.h"

# ARM720T

config CPU_ARM720T

bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_SEP4020 && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR

default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X ||ARCH_SEP4020

select CPU_32v4T

In file included from /linux-2.6.32/arch/arm/include/asm/page.h:26,

from include/linux/mm_types.h:15,

from include/linux/sched.h:63,

from arch/arm/kernel/asm-offsets.c:13:

/linux-2.6.32/arch/arm/include/asm/glue.h:160:2: #error Unknown prefetch abort handler type

解决方法:

select CPU_ABRT_LV4T

select CPU_PABRT_LEGACY

select CPU_CACHE_V4

select CPU_CACHE_VIVT

select CPU_CP15_MMU

select CPU_COPY_V4WT if MMU

select CPU_TLB_V4WT if MMU

In file included from /linux-2.6.32/arch/arm/include/asm/memory.h:18,

from /linux-2.6.32/arch/arm/include/asm/page.h:201,

from include/linux/mm_types.h:15,

from include/linux/sched.h:63,

from arch/arm/kernel/asm-offsets.c:13:

arch/arm/mach-sep4020/include/mach/memory.h:4:26: linux/config.h: No such file or directory

解决方法:

/linux-2.6.32/arch/arm/mach-sep4020/include/mach/memory.h #include <linux/autoconf.h>

In file included from /linux-2.6.32/arch/arm/include/asm/io.h:93,

from init/main.c:74:

arch/arm/mach-sep4020/include/mach/io.h:23:26: asm/hardware.h: No such file or directory

解决方法

#include "hardware.h"

In file included from /linux-2.6.32/arch/arm/include/asm/io.h:93,

from init/main.c:74:

arch/arm/mach-sep4020/include/mach/io.h:53:1: warning: "__cond_lock" redefined

In file included from include/linux/stddef.h:4,

from include/linux/posix_types.h:4,

from include/linux/types.h:14,

from init/main.c:12:

include/linux/compiler.h:34:1: warning: this is the location of the previous definition

In file included from /linux-2.6.32/arch/arm/include/asm/io.h:93,

from init/main.c:74:

arch/arm/mach-sep4020/include/mach/io.h:53:1: warning: "__cond_lock" redefined

In file included from include/linux/stddef.h:4,

from include/linux/posix_types.h:4,

from include/linux/types.h:14,

from init/main.c:12:

解决方法:/linux-2.6.32/arch/arm/mach-sep4020/include/mach/io.h //# define __cond_lock(x) (x) deleted by wmm

In file included from arch/arm/kernel/entry-armv.S:21:

arch/arm/mach-sep4020/include/mach/entry-macro.S:10:26: asm/hardware.h: No such file or directory

解决方法#include "hardware.h"

arch/arm/kernel/entry-armv.S: Assembler messages:

arch/arm/kernel/entry-armv.S:228: Error: bad instruction `get_irqnr_preamble r5,lr'

arch/arm/kernel/entry-armv.S:459: Error: bad instruction `get_irqnr_preamble r5,lr'

解决方法:进入arch/arm/kernel/entry-armv.S屏掉这两句话

因为[ARM] 4185/2: entry: introduce get_irqnr_preamble and arch_ret_to_user

get_irqnr_preamble allows machines to take some action before entering theget_irqnr_and_base loop. On iop we enable cp6 accessarch_ret_to_user is added to the userspace return path to allow individual architectures to take actions, like disabling coprocessor access, before the final return to userspace.Per Nicolas Pitre's note, there is no need to cp_wait on the return to user as the latency to return is sufficient. Signed-off-by: Dan Williams Signed-off-by: Russell King

arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:30: Error: bad instruction `arch_ret_to_user r1,lr'
arch/arm/kernel/entry-common.S:69: Error: bad instruction `arch_ret_to_user r1,lr'
make[1]: *** [arch/arm/kernel/entry-common.o] 错误 1
make: *** [arch/arm/kernel] 错误 2
解决方法:
直接屏掉这两句话,原因同上

arch/arm/kernel/process.c: In function 'arm_machine_restart':

arch/arm/kernel/process.c:103: error: too many arguments to function 'arch_reset'

/linux-2.6.32/arch/arm/mach-sep4020/include/mach/system.h static inline void arch_reset(char mode,const char* cmd)

In file included from include/linux/init.h:4,
from arch/arm/mach-sep4020/irq.c:1:
include/linux/compiler.h:34:1: warning: this is the location of the previous definition
arch/arm/mach-sep4020/irq.c:35: error: variable `sep4020_chip' has initializer but incomplete type
arch/arm/mach-sep4020/irq.c:37: error: unknown field `ack' specified in initializer
arch/arm/mach-sep4020/irq.c:37: warning: excess elements in struct initializer

解决方法:
arch/arm/mach-sep4020/irq.c:37: warning: (near initialization for `sep4020_chip')
arch/arm/mach-sep4020/irq.c:38: error: unknown field `mask' specified in initializer
arch/arm/mach-sep4020/irq.c:38: warning: excess elements in struct initializer
arch/arm/mach-sep4020/irq.c:38: warning: (near initialization for `sep4020_chip')
arch/arm/mach-sep4020/irq.c:39: error: unknown field `unmask' specified in initializer
arch/arm/mach-sep4020/irq.c:39: warning: excess elements in struct initializer
arch/arm/mach-sep4020/irq.c:39: warning: (near initialization for `sep4020_chip')
arch/arm/mach-sep4020/irq.c: In function `sep4020_init_irq':
arch/arm/mach-sep4020/irq.c:54: error: `do_level_IRQ' undeclared (first use in this function)
arch/arm/mach-sep4020/irq.c:54: error: (Each undeclared identifier is reported only once
arch/arm/mach-sep4020/irq.c:54: error: for each function it appears in.)
arch/arm/mach-sep4020/irq.c:55: warning: passing arg 2 of `set_irq_chip' from incompatible pointer type
arch/arm/mach-sep4020/irq.c: At top level:
arch/arm/mach-sep4020/irq.c:35: error: storage size of `sep4020_chip' isn't known
make[1]: *** [arch/arm/mach-sep4020/irq.o] 错误 1
make: *** [arch/arm/mach-sep4020] 错 误 2
解决方法:
将irq.c的35行换为static struct irq_chip sep4020_chip
将54行的set_irq_handler(i, do_level_IRQ);换为 set_irq_handler(i, handle_level_irq);

In file included from include/linux/timex.h:56,
from arch/arm/mach-sep4020/time.c:1:
include/linux/compiler.h:34:1: warning: this is the location of the previous definition
arch/arm/mach-sep4020/time.c: In function `sep4020_timer_interrupt':
arch/arm/mach-sep4020/time.c:29: error: too many arguments to function `timer_tick'
arch/arm/mach-sep4020/time.c: At top level:
arch/arm/mach-sep4020/time.c:38: error: `SA_INTERRUPT' undeclared here (not in a function)
arch/arm/mach-sep4020/time.c:38: error: `SA_TIMER' undeclared here (not in a function)
arch/arm/mach-sep4020/time.c:38: error: initializer element is not constant
arch/arm/mach-sep4020/time.c:38: error: (near initialization for `sep4020_timer_irq.flags')
arch/arm/mach-sep4020/time.c:39: warning: initialization from incompatible pointer type
arch/arm/mach-sep4020/time.c: In function `sep4020_timer_init':
arch/arm/mach-sep4020/time.c:47: error: implicit declaration of function `setup_irq'
make[1]: *** [arch/arm/mach-sep4020/time.o] 错误 1
make: *** [arch/arm/mach-sep4020] 错 误 2
解决方法:
将29行 timer_tick(regs);换为 timer_tick();
将23行static irqreturn_t sep4020_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)换为static irqreturn_t sep4020_timer_interrupt(int irq, void *dev_id)
将38行 .flags = SA_INTERRUPT | SA_TIMER,换为 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
另外在开头处写上#include

arch/arm/mach-sep4020/clock.c:26:27: asm/semaphore.h: No such file or directory

解决方法:#include <linux/semaphore.h>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值