您的位置:首页 > 其它

编译u-boot1.1.6遇到的编译错误解决方法!

2015-10-03 17:03 525 查看
1.大量的警告:target CPU does not support interworking

与CPU有关,到u-boot根目录下执行:

#vi "cpu/arm920t/config.mk"

把 PLATFORM_CPPFLAGS += -march=armv4 改成 PLATFORM_CPPFLAGS += -march=armv4t

2.出现错误:undefined reference to ‘raise’

在uboot的根目录中的
Makefile 把PLATFORM_LIBS 修该为如下值

PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lc -L/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib

本人使用编译器就是这个路径!

3.出现如下错误:has EABI version 5, but target u-boot has EABI version 0
详情:




通过修改 u-boot-2010.06/arch/arm/cpu/arm920t/下的config.mk文件的最后两行才得以解决

PLATFORM_CPPFLAGS +=$(call cc-option,)

PLATFORM_RELFLAGS +=$(call cc-option,$(call cc-option,))

4.出现如下错误:[b]error:
structure has no member named `CAMDIVN'
[/b]
错误详情:
speed.c: In function `get_HCLK':

speed.c:121: error: structure has no member named `CAMDIVN'

speed.c: In function `get_PCLK':

speed.c:166: error: structure has no member named `CAMDIVN'

make[1]: *** [speed.o] Error 1

make[1]: Leaving directory `/home/alan/develop/u-boot/u-boot-1.1.6/cpu/arm920t/s3c24x0'

解决方法:
在include下的s3c24x0.h上的 S3C24X0_CLOCK_POWER 结构中添加相应名为:S3C24X0_REG32CAMDIVN;

5.出现如下错误:cfi_flash.c:220: error: structure has no member named `portwidth'
错误详情:



解决方法:
定位到cfi_flash.c的220行,发现是结构体flash_info_t的问题, 在/include/configs/100ask24x0.h中增加如下定义:
#define CFG_FLASH_CFI
1

6.出现如下错误: cfi_flash.c:411: error: `CFG_MONITOR_BASE' undeclared (first use
in this function)

问题原因:CFG_MONITOR_BASE 是要保护的FLASH的起始地址,这只是u-boot里提供的软件保护机制,避免使用u-boot的命令

误擦除FLASH上的u-boot
解决方法:在include/configs/100ask24x0.h中增加如下定义:
#define CFG_MONITOR_BASE 0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: