错误:使用tsec.c驱动程序交叉编译u启动源时出现错误指令`sync'

时间:2011-09-14 08:25:40

标签: gcc arm u-boot

我正在尝试使用uboot源编译tsec.c文件。我以前用powerpc工具链做过。现在我正在尝试使用ARM“froyo”附带的ARM工具链。如果没有包含tsec.c,uboot编译得很好但是当我包含这个驱动程序时,我得到以下错误: -

// toolchain / arm-marvell-linux-gnueabi / bin / arm-marvell-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D_ KERNEL _ -DTEXT_BASE = 0x0F00000 -I / uboot_sapphire / include -fno-builtin -ffreestanding -nostdinc -isystem / home / Build / Android_Froyo / vendor / marvell / generic / toolchain / arm-marvell-linux- gnueabi / bin /../ lib / gcc / arm-marvell-linux-gnueabi / 4.2.0 / include -pipe -DCONFIG_ARM -D_ ARM _ -march = armv5te -mabi = apcs-gnu - Wall -Wstrict-prototypes -fno-stack-protector -c -o drivers / net / tsec.o drivers / net / tsec.c

{standard input}: Assembler messages:
{standard input}:31: Error: bad instruction `sync'
{standard input}:73: Error: bad instruction `sync'
{standard input}:79: Error: bad instruction `sync'
{standard input}:402: Error: bad instruction `sync'
{standard input}:2278: Error: bad instruction `sync'
{standard input}:2286: Error: bad instruction `sync'
{standard input}:2293: Error: bad instruction `sync'

有人可以帮助我理解这个错误。我尝试使用谷歌搜索,但它对我帮助很大。

1 个答案:

答案 0 :(得分:0)

我不知道你从哪里得到你的tsec.c所以我看不到来源。我最好的猜测是它有一些特定于体系结构(MIPS)的内联汇编。

您可能会在代码中的某处找到asm(“sync”)。

发生错误是因为`sync'不是arm指令,因此汇编程序无法识别和汇编它。

要修复错误,您必须将驱动程序移植到ARM,这可能不是一项简单的任务。