U-boot移植出现的错误
2014-04-01 10:59
232 查看
鄙人,花了三天用来移植uboot到FL2440更换过各种版本的uboot和交叉编译器最终在arm-linux-gcc 4.4.3版本和uboot-1.3.4版本的情况先移植成功。
先面介绍一下我遇到的各种错误及解决方案:
错误一:
main.c:51:error:inline function 'show_boot_progress' cannot bedecleared weak
make[1]:***[main.0]错误1
make[1]:正在离开目录'/home/sns/linux2.6.32/icetek-v3/u-boot-orig/common'
make:***[common/libcommon.a]错误2
解决方法:去掉show_boot_progress 前面的inline即可
错误二:
board.c:127: error: inline function 'coloured_LED_init' cannotbe declared weak
board.c:129: error: inline function 'red_LED_on' cannot be declaredweak
board.c:131: error: inline function 'red_LED_off' cannot bedeclared weak
board.c:133: error: inline function 'green_LED_on' cannot bedeclared weak
board.c:135: error: inline function 'green_LED_off' cannot bedeclared weak
board.c:137: error: inline function 'yellow_LED_on' cannot bedeclared weak
board.c:139: error: inline function 'yellow_LED_off' cannot bedeclared weak
board.c:141: error: inline function 'blue_LED_on' cannot bedeclared weak
board.c:143: error: inline function 'blue_LED_off' cannot bedeclared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory`/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
解决方法:
打开lib_arm/board.c,定位到127行开始,将其注释掉:
void inline __coloured_LED_init (void){}
//void inline coloured_LED_init (void) __attribute__((weak,alias("__coloured_LED_init")));
这里注释掉了'coloured_LED_init' 的部分,自己做时对照注释掉后面几个带__attribute__的部分即可
错误三:cpu/arm920t/start.o: In function`start_code':
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:117: undefinedreference to `coloured_LED_init'
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:118: undefinedreference to `red_LED_on'
make: *** [u-boot] 错误 1
解决方法:
打开cpu/arm920t/start.S,搜索“coloured_LED_init”定位到117行,找到如下代码:
bl coloured_LED_init
bl red_LED_on
这两行是AT91RM9200DK开发板的LED初始化,注释掉即可。
错误四: MINI2440.c:In function 'board_init':
MINI2440.c:101:error‘S3C24X0_GPIO’ has no member named 'GPACON'
MINI2440.c:102:error‘S3C24X0_GPIO’ has no member named 'GPACON'
MINI2440.c:103‘S3C24X0_GPIO’has no member named 'GPACON'
......
解决方法:进入include/,编辑s3c24x0.h文件的407行,将#ifdef CONFIG_S3C2410改为#ifdefCONFIG_S3C2440。
五:warning: target CPU does not support interworking
解决:一看就知道是跟CPU有关,到u-boot根目录下执行
$sudo gedit "cpu/arm920t/config.mk"
把 PLATFORM_CPPFLAGS += -march=armv4 改成 PLATFORM_CPPFLAGS += -march=armv4t
六:uboot软浮点错误
问题:
opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0 -lgcc \
-Map u-boot.map -o u-boot
arm-linux-ld: ERROR: /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_udivdi3.o) uses hardware FP, whereas u-boot uses software FP
arm-linux-ld: failed to merge target specific data of file /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_udivdi3.o)
arm-linux-ld: ERROR: /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_clz.o) uses hardware FP, whereas u-boot uses software FP
arm-linux-ld: failed to merge target specific data of file /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_clz.o)
make: *** [u-boot] 错误 1
以上错误为编译器的软浮点问题,解决办法就是去掉makefile里面的浮点相关编译,建议你直接用3.4.5编译,这个问题就解决了。或者去掉"$CPU/cpu_type/config.mk"文件中的 -msoft-float。这里提供了更详细的解决办法:http://blog.163.com/cmdbat@126/blog/static/170292123201282611251617/
译链接器3.4.6,3.4.1用的是hardware FP,而u-boot 使用的是 software FP 。用2.95或者3.3.2或者4.4.3版本可解决这个问题
不过用2.95版本的时候还要修改一个链接。
先面介绍一下我遇到的各种错误及解决方案:
错误一:
main.c:51:error:inline function 'show_boot_progress' cannot bedecleared weak
make[1]:***[main.0]错误1
make[1]:正在离开目录'/home/sns/linux2.6.32/icetek-v3/u-boot-orig/common'
make:***[common/libcommon.a]错误2
解决方法:去掉show_boot_progress 前面的inline即可
错误二:
board.c:127: error: inline function 'coloured_LED_init' cannotbe declared weak
board.c:129: error: inline function 'red_LED_on' cannot be declaredweak
board.c:131: error: inline function 'red_LED_off' cannot bedeclared weak
board.c:133: error: inline function 'green_LED_on' cannot bedeclared weak
board.c:135: error: inline function 'green_LED_off' cannot bedeclared weak
board.c:137: error: inline function 'yellow_LED_on' cannot bedeclared weak
board.c:139: error: inline function 'yellow_LED_off' cannot bedeclared weak
board.c:141: error: inline function 'blue_LED_on' cannot bedeclared weak
board.c:143: error: inline function 'blue_LED_off' cannot bedeclared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory`/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
解决方法:
打开lib_arm/board.c,定位到127行开始,将其注释掉:
void inline __coloured_LED_init (void){}
//void inline coloured_LED_init (void) __attribute__((weak,alias("__coloured_LED_init")));
这里注释掉了'coloured_LED_init' 的部分,自己做时对照注释掉后面几个带__attribute__的部分即可
错误三:cpu/arm920t/start.o: In function`start_code':
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:117: undefinedreference to `coloured_LED_init'
/root/workspace/u-boot-2009.08/cpu/arm920t/start.S:118: undefinedreference to `red_LED_on'
make: *** [u-boot] 错误 1
解决方法:
打开cpu/arm920t/start.S,搜索“coloured_LED_init”定位到117行,找到如下代码:
bl coloured_LED_init
bl red_LED_on
这两行是AT91RM9200DK开发板的LED初始化,注释掉即可。
错误四: MINI2440.c:In function 'board_init':
MINI2440.c:101:error‘S3C24X0_GPIO’ has no member named 'GPACON'
MINI2440.c:102:error‘S3C24X0_GPIO’ has no member named 'GPACON'
MINI2440.c:103‘S3C24X0_GPIO’has no member named 'GPACON'
......
解决方法:进入include/,编辑s3c24x0.h文件的407行,将#ifdef CONFIG_S3C2410改为#ifdefCONFIG_S3C2440。
五:warning: target CPU does not support interworking
解决:一看就知道是跟CPU有关,到u-boot根目录下执行
$sudo gedit "cpu/arm920t/config.mk"
把 PLATFORM_CPPFLAGS += -march=armv4 改成 PLATFORM_CPPFLAGS += -march=armv4t
六:uboot软浮点错误
问题:
opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0 -lgcc \
-Map u-boot.map -o u-boot
arm-linux-ld: ERROR: /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_udivdi3.o) uses hardware FP, whereas u-boot uses software FP
arm-linux-ld: failed to merge target specific data of file /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_udivdi3.o)
arm-linux-ld: ERROR: /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_clz.o) uses hardware FP, whereas u-boot uses software FP
arm-linux-ld: failed to merge target specific data of file /opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-linux/lib/gcc/arm-linux/4.1.0/libgcc.a(_clz.o)
make: *** [u-boot] 错误 1
以上错误为编译器的软浮点问题,解决办法就是去掉makefile里面的浮点相关编译,建议你直接用3.4.5编译,这个问题就解决了。或者去掉"$CPU/cpu_type/config.mk"文件中的 -msoft-float。这里提供了更详细的解决办法:http://blog.163.com/cmdbat@126/blog/static/170292123201282611251617/
译链接器3.4.6,3.4.1用的是hardware FP,而u-boot 使用的是 software FP 。用2.95或者3.3.2或者4.4.3版本可解决这个问题
不过用2.95版本的时候还要修改一个链接。
相关文章推荐
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- 移植uip-0.9到u-boot中出现undefined reference to `strstr'错误的解决过程
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法
- 移植uip-0.9到u-boot中出现undefined reference to `flash_info'错误的分析过程
- U_BOOT移植时出现相关错误时解决办法
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- fastboot出现错误:no permissions fastboot
- ASP.NET程序从IIS6移植到IIS7时出现500.22错误[原创]
- ASP.NET程序从IIS6移植到IIS7时出现500.22错误(转)
- 搭建基于springboot的SSM项目时数据库出现的错误解决
- 对vc++6.0的程序进行移植时出现的错误及处理(一)
- 编译uboot出现链接错误--原因
- SpringBoot整合Mybatis出现的错误
- 移植boa出现的错误及解决方法
- 移植uboot、内核出现的问题
- 安装VC++.6.0.with.SP6出现acmboot.exe错误的解决办法
- arm-linux-gcc 移植u-boot2015.04时make menuconfig 错误
- arm板 sqlite3移植中出现的错误及解决方法:缺少libreadline.so.5和libncurses.so.5
- Nothing to be done for `_depend' 解决 make uboot时出现的错误
- 移植到android上编译时出现的错误&…