fl2440的U-boot-2010.09移植(一)

        鉴于u-boot的2010.09版本之后的结构发生很大变化,特别是它启动步骤的改变,使得支持Nand flash启动支持的困难,我尝试了几次,最后从Nand flash启动后uboot的指令却无法支持了,而2010.09版本是U-boot结构发生较大改变的最后一个版本,其中已添加了S3C2440的支持(不像以前的版本需要在很多文件中的CONFIG_S3C2410后加上CONFIG_S3C2440),于是选择它作为fl2440的bootloader。

在Uboot中添加fl2440开发板的支持

1、打开U-boot-2010.09解压目录下的boards.cfg在smdk2410后添加fl2440的配置选项:

smdk2410	        arm	arm920t		-		samsung		s3c24x0
fl2440	        arm	arm920t		fl2440		-		s3c24x0

2、在/board子目录中建立自己的开发板fl2440目录

yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09$ cd board
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09/board$ mkdir fl2440
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09/board$ cp -arf samsung/smdk2410/* fl2440/
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09/board$ cd fl2440/
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09/board/fl2440$ mv smdk2410.c fl2440.c
 还要记得修改自己的开发板fl2440目录下的Makefile文件28行,不然编译时会出错:
修改Makefile的依赖文件
COBJS   := smdk2410.o  flash.o 为 COBJS    := fl2440.o  flash.o

3、在include/configs/中建立开发板的配置头文件

yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09$ cp include/configs/smdk2410.h include/configs/fl2440.h

(4)添加fl2440的配置文件,测试编译能否成功
配置
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09$ make fl2440_config
Configuring for fl2440 board...
测试编译
yanghao@yanghao:~/Desktop/uboot/u-boot-2010.09$ make

正常情况下应该输出成功了

注意:如果编译时出现以下错误(这是编译器的问题,没出错就不要修改):
uses hardware FP, whereas u-boot uses software FP
修改的方法:cpu/arm920t/config.mk的21行:PLATFORM_RELFLAGS += -fno-common -ffixed-r8 #-msoft-float ,删除msoft-float项。然后clean一下,重新make

你可能感兴趣的:(测试,Flash,FP,makefile,编译器,2010)