这个第n次看uboot-1.1.6-mini6410的makefile了,决定最后来一次系统的总结,并做一些记录,方便自己的同时,也
在网络上尽自己的一份力量,给初次接触uboot的看官们一些我的经验。
以tiny6410开发板和友善官方提供的uboot-1.1.6-mini6410源码为资料,在学习过程中,删掉了一些无关的代码,争取
在整个Bootloader学有小成之际,能为各位提供我所精简的uboot,也是怕初学者看到一大堆的代码就感到无从下手吧。
代码阅读器采用的是神器:SI。如果是linux初学者,建议看makefile前先好好看看其规则(任意门:
http://blog.csdn.net/wody87/article/details/4557835)
按照编译过程:
一:
首先输入:make mini6410_nand_config_ram256。根据Makefile的规则,将执行
mini6410_nand_config_ram256 : unconfig
@$(MKCONFIG) mini6410 arm s3c64xx mini6410 samsung s3c6410 NAND ram256
这里的依赖关系为unconfig,作用是删除上次生成的配置文件
unconfig:
@rm -f $(obj)include/config.h $(obj)include/config.mk \
$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp
这里的(obj),应该是编译后输出文件的根目录,一般情况下就是源代码目录了。具体每个文件的作用,在后面会有详解。
target是mini6410_nand_config_ram256,伪目标,所以每次make mini6410_nand_config_ram256,unconfig和command
都会执行,最后将参数mini6410 arm s3c64xx mini6410 samsung s3c6410 NAND ram256传递给shell文件mkconfig。
二:
接下来按照顺序到了mkconfig,这个文件也是在根目录下面的。在mkconfig的一开始就有对于各个传入参数的介绍:
Parameters: Target Architecture CPU Board [VENDOR] [SOC]
代码第一行APPEND=no的意思创建新的配置文件,值为yes则在原有文件上修改。
while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
*) break ;;
esac
done
上面的while循环的作用是检测传入的参数,并作出相应的更改。这里直接跳过,因为我们的参数不符合上述条件
,接着执行 [ "${BOARD_NAME}" ] || BOARD_NAME="$1" 也就是把BOARD_NAME定义为mini6410,接着检测传入参数的
长度是否符合要求
[ $# -lt 4 ] && exit 1
[ $# -gt 8 ] && exit 1
$#的意思是参数的个数,也就是要满足最小为4,最大为8的要求。接着回显
echo "Configuring for ${BOARD_NAME} board which boot from $7 $8..."
添加编译所需的头文件
if [ "$SRCTREE" != "$OBJTREE" ] ; then //判断目标目录和源目录是否相同
mkdir -p ${OBJTREE}/include
mkdir -p ${OBJTREE}/include2 //在目标目录下建立文件夹include和include2
cd ${OBJTREE}/include2 //切换到include2目录
rm -f asm
ln -s ${SRCTREE}/include/asm-$2 asm //在该例子中,是建立/include/asm-arm的连接到include2的asm下
LNPREFIX="../../include2/asm/" //定义字符串
cd ../include //对include目录也是进行类似的操作,本例宏上面的代码都没执行,直接从if跳到else处
rm -rf asm-$2
rm -f asm
mkdir asm-$2
ln -s asm-$2 asm
else //删除原来include下的asm,并重新指向为asm-$2
cd ./include
rm -f asm
ln -s asm-$2 asm
fi
下面的一些代码就没什么好说的了,大家都能看懂
rm -f asm-$2/arch
if [ -z "$6" -o "$6" = "NULL" ] ; then
ln -s ${LNPREFIX}arch-$3 asm-$2/arch
else
ln -s ${LNPREFIX}arch-$6 asm-$2/arch
fi
# create link for s3c24xx SoC
if [ "$3" = "s3c24xx" ] ; then
rm -f regs.h
ln -s $6.h regs.h
rm -f asm-$2/arch
ln -s arch-$3 asm-$2/arch
fi
# create link for s3c64xx SoC
if [ "$3" = "s3c64xx" ] ; then
rm -f regs.h
ln -s $6.h regs.h
rm -f asm-$2/arch
ln -s arch-$3 asm-$2/arch
fi
if [ "$2" = "arm" ] ; then
rm -f asm-$2/proc
ln -s ${LNPREFIX}proc-armv asm-$2/proc
fi
# create link for s3c64xx-mp SoC
if [ "$3" = "s3c64xx-mp" ] ; then
rm -f regs.h
ln -s $6.h regs.h
rm -f asm-$2/arch
ln -s arch-$3 asm-$2/arch
fi
好,到这里为止准备工作都完成了,开始生成config.h文件,为下一条make all指令生成配置文件
#
# Create include file for Make
#
echo "ARCH = $2" > config.mk /*将echo"XXX"的内容写入config.mk中
echo "CPU = $3" >> config.mk * >代表直接创建该文件,>>则是追加
echo "BOARD = $4" >> config.mk *下面的工作都是类似的
*/
[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk
[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
#
# Create board specific header file
#
if [ "$APPEND" = "yes" ] # Append to existing config file
then
echo >> config.h
else
> config.h # Create new config file
fi
echo "/* Automatically generated - do not edit */" >>config.h
case $7 in
SD)
echo "#define FRIENDLYARM_BOOT_MEDIA_SD" >> config.h
;;
NAND)
echo "#define FRIENDLYARM_BOOT_MEDIA_NAND" >> config.h
;;
*)
;;
esac
case $8 in
ram128)
echo "#define FRIENDLYARM_BOOT_RAM128" >> config.h
;;
ram256)
echo "#define FRIENDLYARM_BOOT_RAM256" >> config.h
;;
*)
;;
esac
echo "#include " >>config.h
到这里整个
mini6410_nand_config_ram256 : unconfig
@$(MKCONFIG) mini6410 arm s3c64xx mini6410 samsung s3c6410 NAND ram256
就算运行完毕,下面是本例中生成的两个配置文件
./include/config.mk
ARCH = arm
CPU = s3c64xx
BOARD = mini6410
VENDOR = samsung
SOC = s3c6410
./include/config.h
/* Automatically generated - do not edit */
#define FRIENDLYARM_BOOT_MEDIA_NAND
#define FRIENDLYARM_BOOT_RAM256
#include
三:
执行make all,跳到ALL处开始执行
ifeq ($(OBJTREE)/include/config.mk,$(wildcard $(OBJTREE)/include/config.mk))
# load ARCH, BOARD, and CPU configuration
include $(OBJTREE)/include/config.mk //引入上次生成的config.mk
export ARCH CPU BOARD VENDOR SOC //调用变量
ifndef CROSS_COMPILE //这是确定使用何种交叉编译工具
ifeq ($(HOSTARCH),ppc)
CROSS_COMPILE =
else
ifeq ($(ARCH),ppc)
CROSS_COMPILE = powerpc-linux-
endif
ifeq ($(ARCH),arm)
CROSS_COMPILE = arm-linux-
endif
ifeq ($(ARCH),i386)
ifeq ($(HOSTARCH),i386)
CROSS_COMPILE =
else
CROSS_COMPILE = i386-linux-
endif
endif
ifeq ($(ARCH),mips)
CROSS_COMPILE = mips_4KC-
endif
ifeq ($(ARCH),nios)
CROSS_COMPILE = nios-elf-
endif
ifeq ($(ARCH),nios2)
CROSS_COMPILE = nios2-elf-
endif
ifeq ($(ARCH),m68k)
CROSS_COMPILE = m68k-elf-
endif
ifeq ($(ARCH),microblaze)
CROSS_COMPILE = mb-
endif
ifeq ($(ARCH),blackfin)
CROSS_COMPILE = bfin-elf-
endif
ifeq ($(ARCH),avr32)
CROSS_COMPILE = avr32-
endif
endif
endif
CROSS_COMPILE = arm-linux- //指定交叉编译器的前缀
export CROSS_COMPILE
# load other configuration
include $(TOPDIR)/config.mk //包含顶层目录下的配置文件,1.定义交叉编译器2.定义编译选项3.定义编译规则
#########################################################################
# U-Boot objects....order is important (i.e. start must be first)
#OBJS(U-Boot objects)必需将start.o放在第一,具体看连接脚本,在对于的板子目录下的u-boot.lds中
OBJS = cpu/$(CPU)/start.o
ifeq ($(CPU),i386)
OBJS += cpu/$(CPU)/start16.o
OBJS += cpu/$(CPU)/reset.o
endif
ifeq ($(CPU),ppc4xx)
OBJS += cpu/$(CPU)/resetvec.o
endif
ifeq ($(CPU),mpc85xx)
OBJS += cpu/$(CPU)/resetvec.o
endif
ifeq ($(CPU),mpc86xx)
OBJS += cpu/$(CPU)/resetvec.o
endif
ifeq ($(CPU),bf533)
OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o
OBJS += cpu/$(CPU)/cplbhdlr.o cpu/$(CPU)/cplbmgr.o cpu/$(CPU)/flush.o
endif
OBJS := $(addprefix $(obj),$(OBJS))
#都是一些编译是需用的库文件
LIBS = lib_generic/libgeneric.a
LIBS += board/$(BOARDDIR)/lib$(BOARD).a
LIBS += cpu/$(CPU)/lib$(CPU).a
ifdef SOC
LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
endif
LIBS += lib_$(ARCH)/lib$(ARCH).a
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
LIBS += net/libnet.a
LIBS += disk/libdisk.a
LIBS += rtc/librtc.a
LIBS += dtt/libdtt.a
LIBS += drivers/libdrivers.a
LIBS += drivers/nand/libnand.a
LIBS += drivers/nand_legacy/libnand_legacy.a
# add to support onenand. by scsuh
LIBS += drivers/onenand/libonenand.a
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
endif
LIBS += drivers/sk98lin/libsk98lin.a
LIBS += post/libpost.a post/cpu/libcpu.a
LIBS += common/libcommon.a
LIBS += $(BOARDLIBS)
LIBS := $(addprefix $(obj),$(LIBS))
.PHONY : $(LIBS)
# Add GCC lib
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
# The "tools" are needed early, so put this first
# Don't include stuff already done in $(LIBS)
SUBDIRS = tools \
examples \
post \
post/cpu
.PHONY : $(SUBDIRS)
ifeq ($(CONFIG_NAND_U_BOOT),y)
NAND_SPL = nand_spl
U_BOOT_NAND = $(obj)u-boot-nand.bin
endif
__OBJS := $(subst $(obj),,$(OBJS))
__LIBS := $(subst $(obj),,$(LIBS))
#########################################################################
#########################################################################
ALL = $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND)$
all: $(ALL)
#根据依赖,这里会最先执行uboot的生成
$(obj)u-boot.hex: $(obj)u-boot
$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
@echo "=============2================="
$(obj)u-boot.srec: $(obj)u-boot
$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
@echo "=============3================="
$(obj)u-boot.bin: $(obj)u-boot
$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
$(OBJDUMP) -d $< > $<.dis
@echo "=============4================="
$(obj)u-boot.img: $(obj)u-boot.bin
./tools/mkimage -A $(ARCH) -T firmware -C none \
-a $(TEXT_BASE) -e 0 \
-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
-d $< $@
@echo "=============5================="
$(obj)u-boot.dis: $(obj)u-boot
$(OBJDUMP) -d $< > $@
@echo "=============6================="
#最先运行这里的代码,先跳到depend和version处运行
$(obj)u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
@echo "=============7================="
#依赖目标$(OBJS),即 cpu/start.o
#
$(OBJS):
$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
@echo "=============8================="
#依赖目标$(LIBS),都是每个子目录的库文件*.a ,通过执行相应子目录中的make 来完成
#
$(LIBS):
$(MAKE) -C $(dir $(subst $(obj),,$@))
@echo "=============9================="
#伪目标 SUBDIRS: 执行 tools ,examples ,post,post\cpu 子目录下面的 make 文件。
#
$(SUBDIRS):
$(MAKE) -C $@ all
@echo "=============10================="
$(NAND_SPL): version
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
@echo "=============11================="
$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
@echo "=============12================="
#依赖目标 version:生成版本信息到版本文件 VERSION_FILE 中。
#
version:
@echo "==============version===================="
@echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \
echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
$(TOPDIR)) >> $(VERSION_FILE); \
echo "\"" >> $(VERSION_FILE)
gdbtools:
$(MAKE) -C tools/gdb all || exit 1
updater:
$(MAKE) -C tools/updater all || exit 1
env:
$(MAKE) -C tools/env all || exit 1
################################################################################
#依赖目标 depend :生成各个子目录的.depend 文件,.depend 列出每个目标文件的依赖文
#件。生成方法,调用每个子目录的 make _depend.
#SUBDIRS = tools \
# examples \
# post \
# post/cpu
################################################################################
#
depend dep:
for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
对于代码的具体执行顺序一开始我比较迷茫,因此反复的进行了编译,然后根据回显进行判断
\for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: 进入目录“/home/smb/u-boot-mini6410/tools”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/tools”
make[1]: 进入目录“/home/smb/u-boot-mini6410/examples”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/examples”
make[1]: 进入目录“/home/smb/u-boot-mini6410/post”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post”
make[1]: 进入目录“/home/smb/u-boot-mini6410/post/cpu”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post/cpu”
==============version====================
make -C tools all
make[1]: 进入目录“/home/smb/u-boot-mini6410/tools”
make[1]: 离开目录“/home/smb/u-boot-mini6410/tools”
=============10=================
make -C examples all
make[1]: 进入目录“/home/smb/u-boot-mini6410/examples”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/examples”
=============10=================
make -C post all
make[1]: 进入目录“/home/smb/u-boot-mini6410/post”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post”
=============10=================
make -C post/cpu all
make[1]: 进入目录“/home/smb/u-boot-mini6410/post/cpu”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post/cpu”
=============10=================
make -C cpu/s3c64xx start.o
make[1]: 进入目录“/home/smb/u-boot-mini6410/cpu/s3c64xx”
arm-linux-gcc -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc7e00000 -I/home/smb/u-boot-mini6410/include -fno-builtin -ffreestanding -nostdinc -isystem /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5t -c -o start.o start.S
make[1]: 离开目录“/home/smb/u-boot-mini6410/cpu/s3c64xx”
=============8=================
make -C lib_generic/
make[1]: 进入目录“/home/smb/u-boot-mini6410/lib_generic”
make[1]: “libgeneric.a”是最新的。
make[1]: 离开目录“/home/smb/u-boot-mini6410/lib_generic”
=============9=================
make -C board/samsung/mini6410/
make[1]: 进入目录“/home/smb/u-boot-mini6410/board/samsung/mini6410”
arm-linux-gcc -D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc7e00000 -I/home/smb/u-boot-mini6410/include -fno-builtin -ffreestanding -nostdinc -isystem /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5t -c -o lowlevel_init.o lowlevel_init.S
arm-linux-ar crv libmini6410.a lowlevel_init.o mini6410.o flash.o
r - lowlevel_init.o
r - mini6410.o
r - flash.o
make[1]: 离开目录“/home/smb/u-boot-mini6410/board/samsung/mini6410”
=============9=================
make -C cpu/s3c64xx/
make[1]: 进入目录“/home/smb/u-boot-mini6410/cpu/s3c64xx”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/cpu/s3c64xx”
=============9=================
make -C cpu/s3c64xx/s3c6410/
make[1]: 进入目录“/home/smb/u-boot-mini6410/cpu/s3c64xx/s3c6410”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/cpu/s3c64xx/s3c6410”
=============9=================
make -C lib_arm/
make[1]: 进入目录“/home/smb/u-boot-mini6410/lib_arm”
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc7e00000 -I/home/smb/u-boot-mini6410/include -fno-builtin -ffreestanding -nostdinc -isystem /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5t -Wall -Wstrict-prototypes -c -o board.o board.c
arm-linux-ar crv libarm.a _ashldi3.o _ashrdi3.o _divsi3.o _modsi3.o _udivsi3.o _umodsi3.o armlinux.o board.o cache.o div0.o
r - _ashldi3.o
r - _ashrdi3.o
r - _divsi3.o
r - _modsi3.o
r - _udivsi3.o
r - _umodsi3.o
r - armlinux.o
r - board.o
r - cache.o
r - div0.o
make[1]: 离开目录“/home/smb/u-boot-mini6410/lib_arm”
=============9=================
make -C fs/cramfs/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/cramfs”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/cramfs”
=============9=================
make -C fs/fat/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/fat”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/fat”
=============9=================
make -C fs/fdos/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/fdos”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/fdos”
=============9=================
make -C fs/jffs2/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/jffs2”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/jffs2”
=============9=================
make -C fs/reiserfs/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/reiserfs”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/reiserfs”
=============9=================
make -C fs/ext2/
make[1]: 进入目录“/home/smb/u-boot-mini6410/fs/ext2”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/fs/ext2”
=============9=================
make -C net/
make[1]: 进入目录“/home/smb/u-boot-mini6410/net”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/net”
=============9=================
make -C disk/
make[1]: 进入目录“/home/smb/u-boot-mini6410/disk”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/disk”
=============9=================
make -C rtc/
make[1]: 进入目录“/home/smb/u-boot-mini6410/rtc”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/rtc”
=============9=================
make -C dtt/
make[1]: 进入目录“/home/smb/u-boot-mini6410/dtt”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/dtt”
=============9=================
make -C drivers/
make[1]: 进入目录“/home/smb/u-boot-mini6410/drivers”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/drivers”
=============9=================
make -C drivers/nand/
make[1]: 进入目录“/home/smb/u-boot-mini6410/drivers/nand”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/drivers/nand”
=============9=================
make -C drivers/nand_legacy/
make[1]: 进入目录“/home/smb/u-boot-mini6410/drivers/nand_legacy”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/drivers/nand_legacy”
=============9=================
make -C drivers/onenand/
make[1]: 进入目录“/home/smb/u-boot-mini6410/drivers/onenand”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/drivers/onenand”
=============9=================
make -C drivers/sk98lin/
make[1]: 进入目录“/home/smb/u-boot-mini6410/drivers/sk98lin”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/drivers/sk98lin”
=============9=================
make -C post/
make[1]: 进入目录“/home/smb/u-boot-mini6410/post”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post”
=============9=================
make -C post/cpu/
make[1]: 进入目录“/home/smb/u-boot-mini6410/post/cpu”
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/smb/u-boot-mini6410/post/cpu”
=============9=================
make -C common/
make[1]: 进入目录“/home/smb/u-boot-mini6410/common”
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0xc7e00000 -I/home/smb/u-boot-mini6410/include -fno-builtin -ffreestanding -nostdinc -isystem /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv5t -Wall -Wstrict-prototypes -c -o lcd.o lcd.c
arm-linux-ar crv libcommon.a main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_ace.o cmd_autoscript.o cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o cmd_cache.o cmd_console.o cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o cmd_eeprom.o cmd_elf.o cmd_ext2.o cmd_fat.o cmd_fdc.o cmd_fdos.o cmd_flash.o cmd_fpga.o cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o cmd_load.o cmd_log.o cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o cmd_nand.o cmd_net.o cmd_nvedit.o cmd_pci.o cmd_pcmcia.o cmd_portio.o cmd_reginfo.o cmd_reiser.o cmd_scsi.o cmd_spi.o cmd_universe.o cmd_usb.o cmd_vfd.o command.o console.o cyclon2.o devices.o dlmalloc.o docecc.o environment.o env_common.o env_nand.o env_dataflash.o env_flash.o env_eeprom.o env_nvram.o env_nowhere.o env_movi.o env_onenand.o exports.o flash.o fpga.o ft_build.o hush.o kgdb.o lcd.o lists.o lynxkdi.o memsize.o miiphybb.o miiphyutil.o s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o usb.o usb_kbd.o usb_storage.o virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o cmd_onenand.o cmd_usbd.o cmd_movi.o
r - main.o
r - ACEX1K.o
r - altera.o
r - bedbug.o
r - circbuf.o
r - cmd_ace.o
r - cmd_autoscript.o
r - cmd_bdinfo.o
r - cmd_bedbug.o
r - cmd_bmp.o
r - cmd_boot.o
r - cmd_bootm.o
r - cmd_cache.o
r - cmd_console.o
r - cmd_date.o
r - cmd_dcr.o
r - cmd_diag.o
r - cmd_display.o
r - cmd_doc.o
r - cmd_dtt.o
r - cmd_eeprom.o
r - cmd_elf.o
r - cmd_ext2.o
r - cmd_fat.o
r - cmd_fdc.o
r - cmd_fdos.o
r - cmd_flash.o
r - cmd_fpga.o
r - cmd_i2c.o
r - cmd_ide.o
r - cmd_immap.o
r - cmd_itest.o
r - cmd_jffs2.o
r - cmd_load.o
r - cmd_log.o
r - cmd_mem.o
r - cmd_mii.o
r - cmd_misc.o
r - cmd_mmc.o
r - cmd_nand.o
r - cmd_net.o
r - cmd_nvedit.o
r - cmd_pci.o
r - cmd_pcmcia.o
r - cmd_portio.o
r - cmd_reginfo.o
r - cmd_reiser.o
r - cmd_scsi.o
r - cmd_spi.o
r - cmd_universe.o
r - cmd_usb.o
r - cmd_vfd.o
r - command.o
r - console.o
r - cyclon2.o
r - devices.o
r - dlmalloc.o
r - docecc.o
r - environment.o
r - env_common.o
r - env_nand.o
r - env_dataflash.o
r - env_flash.o
r - env_eeprom.o
r - env_nvram.o
r - env_nowhere.o
r - env_movi.o
r - env_onenand.o
r - exports.o
r - flash.o
r - fpga.o
r - ft_build.o
r - hush.o
r - kgdb.o
r - lcd.o
r - lists.o
r - lynxkdi.o
r - memsize.o
r - miiphybb.o
r - miiphyutil.o
r - s_record.o
r - serial.o
r - soft_i2c.o
r - soft_spi.o
r - spartan2.o
r - spartan3.o
r - usb.o
r - usb_kbd.o
r - usb_storage.o
r - virtex2.o
r - xilinx.o
r - crc16.o
r - xyzModem.o
r - cmd_mac.o
r - cmd_onenand.o
r - cmd_usbd.o
r - cmd_movi.o
make[1]: 离开目录“/home/smb/u-boot-mini6410/common”
=============9=================
UNDEF_SYM=`arm-linux-objdump -x lib_generic/libgeneric.a board/samsung/mini6410/libmini6410.a cpu/s3c64xx/libs3c64xx.a cpu/s3c64xx/s3c6410/libs3c6410.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/onenand/libonenand.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd /home/smb/u-boot-mini6410 && arm-linux-ld -Bstatic -T /home/smb/u-boot-mini6410/board/samsung/mini6410/u-boot.lds -Ttext 0xc7e00000 $UNDEF_SYM cpu/s3c64xx/start.o \
--start-group lib_generic/libgeneric.a board/samsung/mini6410/libmini6410.a cpu/s3c64xx/libs3c64xx.a cpu/s3c64xx/s3c6410/libs3c6410.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/onenand/libonenand.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1 -lgcc \
-Map u-boot.map -o u-boot
=============7=================
arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec
=============3=================
arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
arm-linux-objdump -d u-boot > u-boot.dis
=============4=================
arm-linux-gcc
-D__ASSEMBLY__ -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DTEXT_BASE=0xc7e00000
-I/home/smb/u-boot-mini6410/include
-fno-builtin -ffreestanding -nostdinc
-isystem /home/feifeidebazhu/4.5.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include
-pipe -DCONFIG_ARM -D__ARM__ -march=armv5t
-c -o start.o start.S
至此完成了对make的初步分析,写的不好,大家该喷的喷,该骂的骂。
转自:http://blog.chinaunix.net/uid-27664308-id-3326006.html