uboot用的是u-boot-2010.03.tar.bz2
原因和下载地址见
http://blog.csdn.net/davion_zhang/article/details/50617778
1.为了方便、先再win系统下将uboot解压然后精简解压包(这步可以省略的)
1)精简板级文件目录/uboot/board,仅保留samsung文件夹(内部包含smdk6400.c)
2)精简处理器文件目录/uboot/cpu,仅保留arm1176文件夹(6410的cpu类型)
3)精简头文件目录/uboot/include,删除asm-*文件夹,仅保留asm-arm与asm-generic
4)精简config文件目录uboot/include/configs,仅保留smdk6410.h
5)精简lib目录/uboot,将lib_*删除,仅保留lib_arm与lib_generic
2.创建编译脚本build.sh
export ARCH=arm export CROSS_COMPILE=/home/kevin/works/projects/S3C6410/arm-2014.05/bin/arm-none-linux-gnueabi- make smdk6400_config make3.复制smdk6400,做一份smdk6100(因为后续还有一些细节要修改,最好不要直接使用6400)
1)创建板级文件/board/samsung目录下
mkdir smdk6410 cp smdk6400/* smdk6410/
2)修改板级文件目录下的文件
cd smdk6410 mv smdk6400.c smdk6410.c
3)修改板级文件内容
vim smdk6410.c :%s/6400/6410/g :wq vim Makefile :%s/smdk6400/smdk6410/g :wq
4)添加smdk6410头文件
进入目录/include/configs
cp smdk6400.h smdk6410.h
将smdk6410.h中的6400全部替换成6410。
5)修改cpu目录的Makefile
进入目录/cpu/arm1176/s3c64xx
vim Makefile :%s/6400/6410/g :wq
6)修改根目录Makefile
找到smdk6400配置项,复制一段修改为smdk6410配置项
######################################################################### smdk6410_noUSB_config \ smdk6410_config : unconfig @mkdir -p $(obj)include $(obj)board/samsung/smdk6410 @mkdir -p $(obj)nand_spl/board/samsung/smdk6410 @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h @if [ -z "$(findstring smdk6410_noUSB_config,$@)" ]; then \ echo "RAM_TEXT = 0x57e00000" >> $(obj)board/samsung/smdk6410/config.tmp;\ $(MKCONFIG) $(@:_config=) arm arm1176 smdk6410 samsung s3c64xx; \ else \ echo "RAM_TEXT = 0xc7e00000" >> $(obj)board/samsung/smdk6410/config.tmp;\ $(MKCONFIG) $(@:_noUSB_config=) arm arm1176 smdk6410 samsung s3c64xx; \ fi @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk #========================================================================
7)添加include/asm-arm/arch-s3c64xx/s3c6410.h文件
cp s3c6400.h s3c6410.h
vim s3c6410.h
:%s/6400/6410/g
:wq
8)添加nand_spl板级Makefile
nand_spl/board/samsung/
拷贝smdk6400目录下的文件为smdk6410
cd /uboot/nand_spl_board/samsung cp smdk6400/* smdk6410/ vim smdk6410/Makefile :%s/6400/6410/g :wq
9)然后可以进行smdk6410的初次编译了,在根目录下修改build.sh
export ARCH=arm export CROSS_COMPILE=/home/kevin/works/projects/S3C6410/arm-2014.05/bin/arm-none-linux-gnueabi- make distclean make clean make smdk6410_config make我的编译没有问题