发表于:2010-02-16 08:15:39
楼主
买来的ARM开发板放了很久一直没有动过,想想实在是对不去那几百大洋,都是饭费啊!抓紧开始学!不然真的到毕业时还没有哦拿得出手的东西,在这样的二线城市就会找不到工作了的,忧心忡忡啊!
这是初看,UBOOT的顶层Makefile后的结果,当然参考了网上不少前辈的文章,虽然看懂了不少,可是对于Makefile真的是有点学无止境的感觉,好多地方还看得含含糊糊的呵,要加油!!
http://space.ednchina.com/upload/2009/7/7/1a4a2d8d-b667-4db7-adff-e416b152454c.rarmkconfig
http://space.ednchina.com/upload/2009/7/7/03c9d7c6-271a-429b-9d7f-cd0dfecc4c41.rar顶层makefile
http://space.ednchina.com/upload/2009/7/7/98d534e8-fbca-4aba-acfe-157d7b4d617a.rar参考的文章。写的很好
#u-boot-2009-01
# (C) Copyright 2000-2008
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundatio; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#常量定义
VERSION = 2009
PATCHLEVEL = 01
SUBLEVEL =
EXTRAVERSION =
ifneq "$(SUBLEVEL)" ""
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
endif
TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
VERSION_FILE = $(obj)include/version_autogenerated.h
HOSTARCH := $(shell uname -m | \
#$(shell xxx)的意思是在shell中执行xxx命令
sed -e s/i.86/i386/ \
#sed -e的意思,就是表示后面跟的是一串命令脚本,s/abc/def/的命令表达式,就是表示要从标准输入中,查找到内容为abc的,然后替换成def
-e s/sun4u/sparc64/ \
-e s/arm.*/arm/ \
-e s/sa110/arm/ \
-e s/powerpc/ppc/ \
-e s/ppc64/ppc/ \
-e s/macppc/ppc/)
HOSTOS := $(shell uname -s | tr ‘【:upper:】‘ ‘【:lower:】‘ | \
#uname -s,得到kernel name,内核的名字
sed -e ‘s/\(cygwin\).*/cygwin/‘)
# Set shell to bash if possible, otherwise fall back to sh
SHELL := $(shell if 【 -x "$$BASH" 】; then echo $$BASH; \
else if 【 -x /bin/bash 】; then echo /bin/bash; \
else echo sh; fi; fi)
export HOSTARCH HOSTOS SHELL
# Deal with colliding definitions from tcsh etc.
VENDOR=
#########################################################################
# Allow for silent builds
ifeq (,$(findstring s,$(MAKEFLAGS)))
XECHO = echo
else
XECHO = :
endif
#########################################################################
#
# U-boot build supports producing a object files to the separate external
# directory. Two use cases are supported:
#
# 1) Add O= to the make command line
# ‘make O="/tmp/build" all‘
#
# 2) Set environement variable BUILD_DIR to point to the desired location
# ‘export BUILD_DIR=/tmp/build‘
# ‘make‘
#
# The second approach can also be used with a MAKEALL script
# ‘export BUILD_DIR=/tmp/build‘
# ‘./MAKEALL‘
#
# Command line ‘O=‘ setting overrides BUILD_DIR environent variable.
#
# When none of the above methods is used the local build is performed and
# the object files are placed in the source directory.
#