kbuild: use SoC-specific CONFIG to descend into SoC directory

Use "obj-$(CONFIG_FOO) += foo/" where it is possible.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
tegra: do not descend into empty directories

Some tegra makefiles only contain a dummy line to generate
a built-in.o.  Let's do not descend into such a directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
sh: use more descriptive prompts for board select menu

The current prompts were added by a conversion tool
based on board directory names when switching to Kconfig.

Use better prompts mostly taken from from arch/sh/boards/*
of Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Commit-notes:

Nobuhiro,
Please feel free to fix these prompts as you like.

END
Cover-letter:
sh: refactor SuperH Kconfig files

Kconfig conversion was almost automatically by a tool.

Let's tidy up board choice prompts and macro defines.

END
sh: move CONFIG_{SH2,SH2A,SH3,SH4} to Kconfig

This commit moves CONFIG_SH2, CONFIG_SH2A, CONFIG_SH3, CONFIG_SH4
to Kconfig renaming into CONFIG_CPU_SH2, CONFIG_CPU_SH2A,
CONFIG_CPU_SH3, CONFIG_CPU_SH4, respectively because
arch/sh/Kconfig of Linux uses CONFIG_CPU_SH* convention.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: consolidate CONFIG_SYS_CPU defines

Now each board selects one of CONFIG_CPU_SH2, CONFIG_CPU_SH3,
CONFIG_CPU_SH4, so let's move CONFIG_SYS_CPU definition to
arch/sh/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: define CONFIG_CPU_SH4A for some boards

Precisely, these boards are SH4A rather than SH4.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
sh: move -m options to arch/sh/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
generic-board: make compile-time noise for non-generic boards

Commit 0f605c1501f6 (Start the deprecation process for generic board)
added a run-time warning message.  Let's be noisier for non-generic
boards to inform the dead line of the conversion.

This commit intentionally outputs a warning message to stdout.
We still have many unconverted boards.  If we print the message
to stderr, MAKEALL and buildman will report tons of broken boards
and really important information will be buried.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Series-cc: Vagrant Cascadian <vagrant@debian.org>
Series-cc: sjg
Series-version: 3
Series-changes: 2
  - Mention to see doc/README.generic-board

Series-changes: 3
  - Print warning messages to stdout rather than stderr

Commit-notes:

Which is better v2(below) and this version?
http://patchwork.ozlabs.org/patch/402048/

The difference between the two is which stream is used, stdout or stderr.

END
dm: do not check dm_root before searching in uclass_root

The function uclass_find() looks for a uclass in the linked
list of gd->uclass_root; gd->dm_root has nothing to do with
gd->uclass_root.  Remove this confusing code.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
dm: minor coding style fixes
kconfig: add CONFIG_CROSS_COMPILE

Copy from Linux Kernel (with a few adjustments in comments).
kbuild: Use relative path when possible

Import 3 useful commits by Michal Marek <mmarek@suse.cz>
from Linux 3.16-rc1.

  commit 9da0763bdd82572be243fcf5161734f11568960f
  kbuild: Use relative path when building in a subdir of the source tree

  commit 890676c65d699db3ad82e7dddd0cf8fb449031af
  kbuild: Use relative path when building in the source tree

  commit 7e1c04779efd51154baf652e653ceb24ce68939b
  kbuild: Use relative path for $(objtree)

mkconfig and tools/Makefile must be adjusted to use relative path
for srctree.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: collect useful commands into scripts/Makefile.lib
aaaa
move blackfin specific objcopy rules
include/configs: Do not use $(BOARDDIR)
IMX: Rename IMX image "SPL" to something else for Cygwin

I am not sure how much effort we should make
for building U-Boot on Cygwin.

Anyway, other than host programs, I notice file name problem.

Unlike Unix or Linux, on Windows upper/lower cases for file names
are not distinguished.

On Cygwin, for example, we cannot do this:

  $ mkdir abc
  $ mkdir ABC
  mkdir: cannot create directory `ABC': File exists

It causes some problems in U-Boot too.

For example,

  $ make mrproper
    CLEAN   SPL
  rm: cannot remove `SPL': Is a directory
  Makefile:1278: recipe for target 'clobber' failed
  make: *** [clobber] Error 1

  $ make qong_config
  Configuring for qong board...

  $ make clean
    CLEAN   arch/arm/imx-common
  rm: cannot remove `arch/arm/imx-common/../../../SPL': Is a directory
  scripts/Makefile.clean:79: recipe for target '__clean' failed
  make[1]: *** [__clean] Error 1
  Makefile:1256: recipe for target '_clean_arch/arm/imx-common' failed
  make: *** [_clean_arch/arm/imx-common] Error 2

I notice at least one file name conflict at the top directory.

  SPL - image for IMX
  spl - directory where SPL is built

This commit renames the former to a temporary name.

I guess there is few developers testing U-Boot on Cygwin.
If Cygwin support is mandatory, please consider to rename IMX image.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-cc: Tom Rini <trini@ti.com>
Series-cc: Vasili Galka <vvv444@gmail.com>
Series-cc: Jeroen Hofstee <dasuboot@myspectrum.nl>
Series-to: uboot
Series-prefix: RFC
patman,buildman: remove redundant readlines() method

In Python, file objects can be used directly in iterators
without readlines() method.

The behavior is the same but it generally saves memory
without readlines().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
patman: use raw strings for regular expression

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
buildman: Do not parse git aliase file