uboot移植整理

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.Make 编译uboot出错:

……

……

board.c:138: error: inline function 'coloured_LED_init' cannot be declared weak board.c:140: error: inline function 'red_LED_on' cannot be declared weak

board.c:142: error: inline function 'red_LED_off' cannot be declared weak

board.c:144: error: inline function 'green_LED_on' cannot be declared weak

board.c:146: error: inline function 'green_LED_off' cannot be declared weak

board.c:148: error: inline function 'yellow_LED_on' cannot be declared weak board.c:150: error: inline function 'yellow_LED_off' cannot be declared weak

make[1]: *** [board.o] 错误1

make[1]:正在离开目录`/opt/u-boot-1.3.4/lib_arm'

make: *** [lib_arm/libarm.a] 错误2

开始编译的时候会出现上面的错误,继续移植操作这个错误将消失。或者注释掉出错行。

****挂载文件系统时候的错误:************

……

……

TCP cubic registered

NET: Registered protocol family 17

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "nfs" or unknown-block(2,0)

Please append a correct "root=" boot option; here are the available partitions:

1f00 16 mtdblock0 (driver?)

1f01 2048 mtdblock1 (driver?)

1f02 4096 mtdblock2 (driver?)

1f03 2048 mtdblock3 (driver?)

1f04 4096 mtdblock4 (driver?)

1f05 10240 mtdblock5 (driver?)

1f06 24576 mtdblock6 (driver?)

1f07 16384 mtdblock7 (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) [] (unwind_backtrace+0x0/0xf0) from [] (panic+0x54/0x17c) 解决方法:保证传入的命令行参数正确无误,保证NFS配置成功,rootfs正确,可以重启机器试试。

错误:error: common/libcommon.a(main.o) uses FPA instructions, whereas u-boot does not

/opt/opt/FriendlyARM/toolschain/4.4.3/bin/.arm-none-linux-gnueabi-ld: failed to merge target specific data of file common/libcommon.a(main.o)

不使用新的4.4.3版本的编译工具,改为以前的3.4.5版本的arm-linux-gnu-gcc.

****编译好的uboot下载到板子上没有任何的输出内容???************

可能是自动拷贝的4KB代码不能完成自启动,更改根目录下的Makefile文件:将一行改为如下形式:

__LIBS := $(subst $(obj),,$(LIBBOARD)) $(subst $(obj),,$(LIBS)

interrupts.c:184:3: #error "tbclk not configured"

interrupts.c: In function `get_tbclk':

interrupts.c:175: warning: 'tbclk' might be used uninitialized in this function

make[1]: *** [interrupts.o] 错误1

make[1]:正在离开目录`/opt/u-boot-1.3.1/cpu/arm920t/s3c24x0'

解决办法:进入cpu/arm920t/s3c24x0//interrupts.c文件,定位到错位的地方:

#elif defined(CONFIG_SBC2410X) || \

defined(CONFIG_SMDK2410) || \

defined(CONFIG_VCMA9)

tbclk = CFG_HZ;

#else

# error "tbclk not configured"

#endif 只需将SMDK2410改为FS2410即可。

2.注意:在添加代码的时候要注意添加的位置,不要放在#ifdef 条件编译中了!!!

不必做Nor 启动方式,只做Nand启动即可。

3.uboot移植完成了支持Nand Flash读写;支持从Nor/Nand Flash启动

支持CS8900网卡,支持Y affs2文件系统等功能。

*****涉及到的几个重要目录:*********

A . 建立自己的开发板项目并测试编译:

因FS2410是基于参考板smdk2410,资源差不多,所以我们就参考smdk2410在board/下建立自己开发板的项目fs2410,所以就以smdk2410项目的代码作为模板,以后再修改。在board/fs2410/目录下有几个重要文件,主要依赖板子(有fs2410.c boot_init.c flash.c uboot.lds Makefile lowlevel_init.c config.mk)。

B. 根目录下的Makefile文件,

C. include/configs/fs2410.h文件

D . cpu/arm920t/start.S文件

E . 上面的汇编代码中,调用了一个C函数CopyCode2Ram(),这个函数我们用来实现把代码从NOR/NAND中将代码拷贝到SDRAM中,为了实现了,在board/fs2410/下,新建boot_init.c,如下:#vi board/fs2410/boot_init.c

F . 在u-boot中添加对我们开发板上Nor Flash的支持.

相关文档
最新文档