错误:错误指令“同步” Corss 使用 tsec.c 驱动程序编译 uboot 源代码时
我正在尝试使用 uboot 源编译 tsec.c 文件。我以前已经这样做过,但使用的是 powerpc 工具链。现在我正在尝试使用android“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 -ffreestand -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'
有人可以帮助我理解这个错误。我尝试过谷歌搜索,但它对我帮助很大。
I am trying to compile tsec.c file with the uboot source. I have done that before but with powerpc toolchain. Right now I am trying to use ARM toolchain which comes with android "froyo". Without tsec.c included, uboot compiles fine but when I include this driver, I get following error :-
//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'
Can someone help me understanding this error. I tried googling but it dint helped me much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道你从哪里得到你的 tsec.c 所以我看不到来源。我最好的猜测是它有一些特定于体系结构(MIPS)的内联汇编。
您可能会在代码中的某处找到 asm("sync") 。
发生错误的原因是“sync”不是arm指令,因此汇编器无法识别和汇编它。
要修复该错误,您必须将驱动程序移植到 ARM,这可能不是一项简单的任务。
I have no idea where you got your tsec.c from so I can't see the source. My best guess is that it has some architecture specific (MIPS) inline assembly.
You'll probably find asm("sync") somewhere in the code.
The error occurs because `sync' is not an arm instruction, so the assembler cannot recognise and assemble it.
To fix the error you will have to port the driver to ARM, which will probably not be a trivial task.