1、解压缩:
tar -jxvf /mnt/hgfs/Linux/uboot-2009.08.tar.bz2 -C /home/lj/
2、进入解压缩包:
cd /home/lj/u-boot-2009.08/
[root@localhost samsung]# pwd
/home/lj/u-boot-2009.08/board/samsung
gq2440 smdk2400 smdk2410 smdk6400
5、通过复制的方式添加我的开发板文件夹,复制smdk2410中的内容到gq2440
[root@localhost samsung]#cp –r smdk2410 gq2440
进入gq2440目录,修改smdk2410.c为my2440.c[root@localhost samsung]# mv gq2440/smdk2410.c gq2440/gq2440.c
同时在gq2440.c所在目录下的Makefile中
[root@localhost u-boot-2009.08]# vi board/samsung/gq2440/Makefile
COBJS := smdk2410.o flash.o修改为
COBJS := gq2440.o flash.o
保存,退出。
6、通过复制的方式添加我的开发板头文件,创建板级相关的头文件,复制smdk2410.h到gq2440.h
[root@localhost u-boot-2009.08]# cp include/configs/smdk2410.h include/configs/gq2440.h
7、修改uboot根目录下的Makefile,按照smdk2410_config的格式建立gq2440_config的编译选项
[root@localhost u-boot-2009.08]#vi Makefile
在打开的文件中查找smdk2410的基本配置
输入:/smdk2410_config
回车跳转到
smdk2410_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
输入:2yy
输入:p
粘贴修改后:
smdk2410_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
gq2440_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920tgq2440 samsung s3c24x0
保存,退出。如果“@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0”中的“smdk2410”不改为“gq2440 ” 就会产生下面错误:
......
make[1]: Leaving directory `/home/lj/u-boot-2009.08/post'
make -C board/samsung/smdk2440/
make: *** board/samsung/smdk2440/: No such file or directory. Stop.
make: *** [board/samsung/smdk2440/libsmdk2440.a] Error 2
[root@localhost u-boot-2009.08]#
8、测试创建的板子gq2440能不能编译通过:
[root@localhost u-boot-2009.08]# make distclean [root@localhost u-boot-2009.08]# make gq2440_config
Configuring for my2440 board... ------说明my2440能够配置成功了
[root@localhost u-boot-2009.08]#make
......
arm-linux-ar crv libgq2440.a gq2440.o flash.o lowlevel_init.o
a - gq2440.o
a - flash.o
a - lowlevel_init.o
make[1]: Leaving directory `/home/lj/u-boot-2009.08/board/samsung/gq2440'
make -C /home/lj/u-boot-2009.08/cpu/arm920t/ u-boot.lds
make[1]: Entering directory `/home/lj/u-boot-2009.08/cpu/arm920t'
make[1]: Nothing to be done for `u-boot.lds'.
make[1]: Leaving directory `/home/lj/u-boot-2009.08/cpu/arm920t'
arm-linux-gcc -E -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/home/lj/u-boot-2009.08/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv4 -include /home/lj/u-boot-2009.08/include/u-boot/u-boot.lds.h -ansi -D__ASSEMBLY__ -P - </home/lj/u-boot-2009.08/cpu/arm920t/u-boot.lds >u-boot.lds
......
common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/samsung/gq2440/libgq2440.a --end-group /home/lj/u-boot-2009.08/lib_arm/eabi_compat.o -L /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/armv4t -lgcc -Map u-boot.map -o u-boot
arm-linux-objcopy -O srec u-boot u-boot.srec
arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
[root@localhost u-boot-2009.08]# ls
api examples lib_nios post
board fs lib_nios2 README
CHANGELOG include lib_ppc rules.mk
CHANGELOG-before-U-Boot-1.1.5 lib_arm lib_sh System.map
common lib_avr32 lib_sparc tools
config.mk lib_blackfin MAINTAINERS u-boot
COPYING libfdt MAKEALL u-boot.bin
cpu lib_generic Makefile u-boot.lds
CREDITS lib_i386 mkconfig u-boot.map
disk lib_m68k nand_spl u-boot.srec
doc lib_microblaze net
drivers lib_mips onenand_ipl