Skip to content

Commit

Permalink
Merge branch 'master' of git://git.denx.de/u-boot-arm
Browse files Browse the repository at this point in the history
Conflicts:
	boards.cfg

Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic committed Aug 11, 2014
2 parents f93f219 + 1899fac commit e82abae
Show file tree
Hide file tree
Showing 2,625 changed files with 50,912 additions and 2,924 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/SPL
/System.map
/u-boot*
/boards.cfg

#
# git files that we don't want to ignore even it they are dot-files
Expand All @@ -53,8 +54,6 @@
#
/include/config/
/include/generated/
/include/spl-autoconf.mk
/include/tpl-autoconf.mk

# stgit generated dirs
patches-*
Expand Down
65 changes: 65 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
mainmenu "U-Boot $UBOOTVERSION Configuration"

config UBOOTVERSION
string
option env="UBOOTVERSION"

config KCONFIG_OBJDIR
string
option env="KCONFIG_OBJDIR"

config DEFCONFIG_LIST
string
depends on !SPL_BUILD
option defconfig_list
default "configs/sandbox_defconfig"

menu "General setup"

config SPL_BUILD
bool
depends on $KCONFIG_OBJDIR="spl" || $KCONFIG_OBJDIR="tpl"
default y

config TPL_BUILD
bool
depends on $KCONFIG_OBJDIR="tpl"
default y

config SPL
bool
prompt "Enable SPL" if !SPL_BUILD
default y if SPL_BUILD
help
If you want to build SPL as well as the normal image, say Y.

config TPL
bool
depends on SPL
prompt "Enable TPL" if !SPL_BUILD
default y if TPL_BUILD
default n
help
If you want to build TPL as well as the normal image and SPL, say Y.

config SYS_EXTRA_OPTIONS
string "Extra Options (DEPRECATED)"
depends on !SPL_BUILD
help
The old configuration infrastructure (= mkconfig + boards.cfg)
provided the extra options field. It you have something like
"HAS_BAR,BAZ=64", the optional options
#define CONFIG_HAS
#define CONFIG_BAZ 64
will be defined in include/config.h.
This option was prepared for the smooth migration from the old
configuration to Kconfig. Since this option will be removed sometime,
new boards should not use this option.

endmenu # General setup

source "arch/Kconfig"
28 changes: 22 additions & 6 deletions MAKEALL
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,23 @@ while true ; do
echo "Internal error!" >&2 ; exit 1 ;;
esac
done

GNU_MAKE=$(scripts/show-gnu-make) || {
echo "GNU Make not found" >&2
exit 1
}

# echo "Remaining arguments:"
# for arg do echo '--> '"\`$arg'" ; done

if [ ! -r boards.cfg ]; then
echo "Could not find boards.cfg"
tools/genboardscfg.py || {
echo "Failed to generate boards.cfg" >&2
exit 1
}
fi

FILTER="\$1 !~ /^#/"
[ "$opt_a" ] && FILTER="${FILTER} && $opt_a"
[ "$opt_c" ] && FILTER="${FILTER} && $opt_c"
Expand Down Expand Up @@ -506,9 +520,9 @@ get_target_location() {
set ${line}
CONFIG_NAME="${7%_config}"
CONFIG_NAME="${7%_defconfig}"
[ "${BOARD_NAME}" ] || BOARD_NAME="${7%_config}"
[ "${BOARD_NAME}" ] || BOARD_NAME="${7%_defconfig}"
if [ $# -gt 5 ]; then
if [ "$6" = "-" ] ; then
Expand Down Expand Up @@ -633,19 +647,21 @@ build_target() {
target_arch=$(get_target_arch ${target})
eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
if [ "${cross_toolchain}" ] ; then
MAKE="make CROSS_COMPILE=${cross_toolchain}"
MAKE="$GNU_MAKE CROSS_COMPILE=${cross_toolchain}"
elif [ "${CROSS_COMPILE}" ] ; then
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
MAKE="$GNU_MAKE CROSS_COMPILE=${CROSS_COMPILE}"
else
MAKE=make
MAKE=$GNU_MAKE
fi
if [ "${output_dir}" != "." ] ; then
MAKE="${MAKE} O=${output_dir}"
fi
${MAKE} distclean >/dev/null
${MAKE} -s ${target}_config
echo "Building ${target} board..."
${MAKE} -s ${target}_defconfig >/dev/null
${MAKE} ${JOBS} ${CHECK} all \
>${LOG_DIR}/$target.MAKELOG 2> ${LOG_DIR}/$target.ERR
Expand Down
120 changes: 56 additions & 64 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#

VERSION = 2014
PATCHLEVEL = 07
PATCHLEVEL = 10
SUBLEVEL =
EXTRAVERSION =
EXTRAVERSION = -rc1
NAME =

# *DOCUMENTATION*
Expand Down Expand Up @@ -166,9 +166,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))

export srctree objtree VPATH

MKCONFIG := $(srctree)/mkconfig
export MKCONFIG

# Make sure CDPATH settings don't interfere
unexport CDPATH

Expand All @@ -189,16 +186,16 @@ HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \

export HOSTARCH HOSTOS

# Deal with colliding definitions from tcsh etc.
VENDOR=

#########################################################################

# set default to nothing for native builds
ifeq ($(HOSTARCH),$(ARCH))
CROSS_COMPILE ?=
endif

KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG

# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
Expand Down Expand Up @@ -341,6 +338,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
AWK = awk
PERL = perl
PYTHON = python
DTC = dtc
CHECK = sparse

Expand All @@ -362,7 +360,7 @@ export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION
export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM LDR STRIP OBJCOPY OBJDUMP
export MAKE AWK PERL
export MAKE AWK PERL PYTHON
export HOSTCXX HOSTCXXFLAGS DTC CHECK CHECKFLAGS

export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS
Expand Down Expand Up @@ -460,31 +458,49 @@ ifeq ($(config-targets),1)
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target

# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
KBUILD_DEFCONFIG := sandbox_defconfig
export KBUILD_DEFCONFIG KBUILD_KCONFIG

%_config:: outputmakefile
@$(MKCONFIG) -A $(@:_config=)
config: scripts_basic outputmakefile FORCE
+$(Q)$(PYTHON) $(srctree)/scripts/multiconfig.py $@

%config: scripts_basic outputmakefile FORCE
+$(Q)$(PYTHON) $(srctree)/scripts/multiconfig.py $@

else
# ===========================================================================
# Build targets only - this includes vmlinux, arch specific targets, clean
# targets and others. In general all targets except *config targets.

# load ARCH, BOARD, and CPU configuration
-include include/config.mk

ifeq ($(dot-config),1)
# Read in config
-include include/config/auto.conf

# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
-include include/config/auto.conf.cmd

# To avoid any implicit rule to kick in, define an empty command
$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;

# If .config is newer than include/config/auto.conf, someone tinkered
# with it and forgot to run make oldconfig.
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig

-include include/autoconf.mk
-include include/autoconf.mk.dep

# load other configuration
# We want to include arch/$(ARCH)/config.mk only when include/config/auto.conf
# is up-to-date. When we switch to a different board configuration, old CONFIG
# macros are still remaining in include/config/auto.conf. Without the following
# gimmick, wrong config.mk would be included leading nasty warnings/errors.
autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
-path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
ifneq ($(autoconf_is_current),)
include $(srctree)/config.mk

ifeq ($(wildcard include/config.mk),)
$(error "System not configured - see README")
endif

# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
Expand Down Expand Up @@ -513,8 +529,8 @@ ifndef LDSCRIPT
endif

else


# Dummy target needed, because used as prerequisite
include/config/auto.conf: ;
endif # $(dot-config)

KBUILD_CFLAGS += -Os #-fomit-frame-pointer
Expand Down Expand Up @@ -563,7 +579,8 @@ KBUILD_CFLAGS += $(KCFLAGS)
UBOOTINCLUDE := \
-Iinclude \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
-I$(srctree)/arch/$(ARCH)/include
-I$(srctree)/arch/$(ARCH)/include \
-include $(srctree)/include/linux/kconfig.h

NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)
Expand Down Expand Up @@ -1024,7 +1041,7 @@ define filechk_uboot.release
endef

# Store (new) UBOOTRELEASE string in include/config/uboot.release
include/config/uboot.release: Makefile FORCE
include/config/uboot.release: include/config/auto.conf FORCE
$(call filechk,uboot.release)


Expand All @@ -1042,8 +1059,8 @@ PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# 1) Check that make has not been executed in the kernel src $(srctree)
prepare3: include/config/uboot.release
ifneq ($(KBUILD_SRC),)
@$(kecho) ' Using $(srctree) as source for u-boot'
$(Q)if [ -f $(srctree)/include/config.mk ]; then \
@$(kecho) ' Using $(srctree) as source for U-Boot'
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \
echo >&2 " in the '$(srctree)' directory.";\
/bin/false; \
Expand All @@ -1053,7 +1070,8 @@ endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile

prepare1: prepare2 $(version_h) $(timestamp_h)
prepare1: prepare2 $(version_h) $(timestamp_h) \
include/config/auto.conf
ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
@echo >&2 " Your architecture does not support generic board."
Expand Down Expand Up @@ -1095,29 +1113,6 @@ $(version_h): include/config/uboot.release FORCE
$(timestamp_h): $(srctree)/Makefile FORCE
$(call filechk,timestamp.h)

#
# Auto-generate the autoconf.mk file (which is included by all makefiles)
#
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
# the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file.

quiet_cmd_autoconf_dep = GEN $@
cmd_autoconf_dep = $(CC) -x c -DDO_DEPS_ONLY -M $(c_flags) \
-MQ include/autoconf.mk $(srctree)/include/common.h > $@ || rm $@

include/autoconf.mk.dep: include/config.h include/common.h
$(call cmd,autoconf_dep)

quiet_cmd_autoconf = GEN $@
cmd_autoconf = \
$(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
rm $@.tmp

include/autoconf.mk: include/config.h
$(call cmd,autoconf)

# ---------------------------------------------------------------------------

PHONY += depend dep
Expand All @@ -1141,7 +1136,7 @@ spl/sunxi-spl.bin: spl/u-boot-spl
@:

tpl/u-boot-tpl.bin: tools prepare
$(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all CONFIG_TPL_BUILD=y
$(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all

TAG_SUBDIRS := $(patsubst %,$(srctree)/%,$(u-boot-dirs) include)

Expand Down Expand Up @@ -1216,20 +1211,18 @@ include/license.h: tools/bin2header COPYING

# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
CLEAN_FILES += u-boot.lds include/bmp_logo.h include/bmp_logo_data.h \
include/autoconf.mk* include/spl-autoconf.mk \
include/tpl-autoconf.mk
CLEAN_FILES += u-boot.lds include/bmp_logo.h include/bmp_logo_data.h

# Directories & files removed with 'make clobber'
CLOBBER_DIRS += spl tpl
CLOBBER_DIRS += $(foreach d, spl tpl, $(patsubst %,$d/%, \
$(filter-out include, $(shell ls -1 $d 2>/dev/null))))
CLOBBER_FILES += u-boot* MLO* SPL System.map

# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include/generated \
MRPROPER_DIRS += include/config include/generated spl tpl \
.tmp_objdiff
MRPROPER_FILES += .config .config.old \
ctags etags cscope* GPATH GTAGS GRTAGS GSYMS \
include/config.h include/config.mk
MRPROPER_FILES += .config .config.old include/autoconf.mk* include/config.h \
ctags etags TAGS cscope* GPATH GTAGS GRTAGS GSYMS

# clean - Delete most, but leave enough to build external modules
#
Expand Down Expand Up @@ -1306,10 +1299,9 @@ help:
@echo ' mrproper - Remove all generated files + config + various backup files'
@echo ' distclean - mrproper + remove editor backup and patch files'
@echo ''
# uncomment after adding Kconfig feature
# @echo 'Configuration targets:'
# @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
# @echo ''
@echo 'Configuration targets:'
@$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
@echo ''
@echo 'Other generic targets:'
@echo ' all - Build all necessary images depending on configuration'
@echo ' u-boot - Build the bare u-boot'
Expand Down
Loading

0 comments on commit e82abae

Please sign in to comment.