arm: include config.h in arch/arm/lib/vectors.S

Commit 41623c91 moved exception handling to arch/arm/lib/vectors.S,
but it missed to include <config.h>.

This mistake causes two problems.

[1]
"enbw_cmc", "da850evm_direct_nor", "calimain" boards are broken.

They expect CONFIG_SYS_DV_NOR_BOOT_CFG (= 0x00000011) at the beginning
of the boot image.

But it is missing since commit 41623c91 because
CONFIG_SYS_DV_NOR_BOOT_CFG is never defined in arch/arm/lib/vectors.S.

[2]
Boards with CONFIG_USE_IRQ fail with undefined reference error
of "IRQ_STACK_START" and "FIQ_STACK_START".

This is _potential_ problem because currently there is no board
enabling CONFIG_USE_IRQ.
But we cannot deny the possibility some board may enable it in future.

(If we are not willing to support interrupt feature, all references
to CONFIG_USE_IRQ should be dropped immediately.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Series-to: uboot
Series-version: 2
Series-changes: 2
  - Rephrase commit subject and description. (No change in code-diff)

Cover-letter:
ARM: bug fixes of commit 41623c91 (arch/arm/lib/vectors.S)

END
arm: fix a double-definition error of _start symbol

The symbol "_start" is defined twice in arch/arm/lib/vectors.S:
around line 48 and line 54.

If CONFIG_SYS_DV_NOR_BOOT_CFG is defined (as on calimain board),
build fails:

  arch/arm/lib/vectors.S: Assembler messages:
  arch/arm/lib/vectors.S:54: Error: symbol `_start' is already defined
  make[1]: *** [arch/arm/lib/vectors.o] Error 1
  make: *** [arch/arm/lib] Error 2

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Series-changes: 2
  - No change  (Resend as a series)
kbuild,tools: generate wrapper C sources automatically by Makefile

There are many source files shared between U-boot image and tools.
Instead of adding a lot of dummy wrapper files that just include
the corresponding file in lib/ or common/ directory,
Makefile should automatically generate them.

The original inspiration for this came from
scripts/Makefile.asm-generic of Linux Kernel.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Series-to: uboot
Series-cc: sjg
Series-cc: Charles Manning <cdhmanning@gmail.com>
Series-cc: Gerhard Sittig <gsi@denx.de>
Series-version: 2
Series-changes: 2
  - Rebase on commit 3e1fa221
kbuild: export HOSTCXX and HOSTCXXFLAGS

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
.gitignore: drop *.dts.tmp pattern

This pattern was added by commit cc4f427b to ignore the intermidiate
file for generating DTB.

When Kbuild was introduced, dts/Makefile was totally re-written.
This ignore pattern is already useless.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
kbuild: remove unnecessary adjustment for Cygwin

"SFX = .exe" was originally added for Cygwin environment.

It is true that GCC on Cygwin spits executables with .exe extention.

For example,

  gcc -o foo foo.c

will generate "foo.exe", not "foo".

But GNU make is also nicely adjusted for Cygwin.

For example,

  foo: foo.c
          gcc -o $@ $<

will compare the timestamp between "foo.exe" and "foo.c".

You do not have to tweak Makefiles like this:

  foo$(SFX): foo.c
          gcc -o $@ $<

And "make clean" works as well without adjustment for Cygwin because
the command "rm foo" on Cygwin will delete both "foo" and "foo.exe".

In conclusion, makefiles do not need special care for Cygwin.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-to: uboot
Series-cc: Tom Rini <trini@ti.com>
Series-cc: Vasili Galka <vvv444@gmail.com>
Series-cc: Jeroen Hofstee <dasuboot@myspectrum.nl>
Commit-notes:

I tested this patch on the following environment.

$ uname -a
CYGWIN_NT-6.1 yamada-win7 1.7.30(0.272/5/3) 2014-05-23 10:36 i686 Cygwin

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.8.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.3-1/src/gcc-4.8.3/configure
 --srcdir=/cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.3-1/src/gcc-4.8.3
 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
 --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
 --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
 --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
 --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin
 --without-libiconv-prefix --without-libintl-prefix --enable-shared
 --enable-shared-libgcc --enable-static
 --enable-version-specific-runtime-libs --enable-bootstrap
 --disable-__cxa_atexit --with-dwarf2 --with-arch=i686
 --with-tune=generic --disable-sjlj-exceptions
 --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++
 --enable-graphite --enable-threads=posix --enable-libatomic
 --enable-libgomp --disable-libitm --enable-libquadmath
 --enable-libquadmath-support --enable-libssp --enable-libada
 --enable-libjava --enable-libgcj-sublibs --disable-java-awt
 --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar
 --with-gnu-ld --with-gnu-as
 --with-cloog-include=/usr/include/cloog-isl
 --without-libiconv-prefix --without-libintl-prefix
 --with-system-zlib --libexecdir=/usr/lib
Thread model: posix
gcc version 4.8.3 (GCC)

$ make -v
GNU Make 4.0
Built for i686-pc-cygwin
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

END
Cover-letter:
Some Cygwin-related changes

END
.gitignore: move *.exe pattern to the top gitignore for Cygwin

GCC on Cygwin generates executables with .exe extension,
for example:
 scripts/basic/fixdep.exe
 scripts/docproc.exe

To ignore them, *.exe pattern should be moved
from tools/.gitignore to ./.gitignore

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
zynq: disable -Wstrict-prototypes option for ps7_init.c

The files ps7_init.c and ps7_init.h are supposed to be generated by
hw projects such as Vivado, PlanAhead and then to be copied into
board/xilinx/zynq directory.

But some prototypes in them cause annoying warning messages:

  CC      spl/board/xilinx/zynq/ps7_init.o
In file included from board/xilinx/zynq/ps7_init.c:50:0:
board/xilinx/zynq/ps7_init.h:137:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:138:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:139:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.h:145:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12602:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12723:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12742:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12761:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
board/xilinx/zynq/ps7_init.c:12854:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]

The prototypes should be

  int ps7_init(void);
  int ps7_post_config(void);
  int ps7_debug(void);

rather than

  int ps7_init();
  int ps7_post_config();
  int ps7_debug();

We do not want to be bothered because of automatically generated files.
But we cannot touch the external projects for now.
What we can do is to disable -Wstrict-prototypes for ps7_init.c

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Series-to: uboot
Series-version: 2
Series-changes: 2
   No change in code. Some changes in git-log
  - Fix a typo:  s/causes/cause/
  - Add Tested-by credit
kbuild: move spl/Makefile to scripts/Makefile.spl

All files under spl/ and tpl/ are generated during the build process
except spl/Makefile.

We can simplify clean-rule and git-ignore by moving spl/Makefile
to somewhere else.

Series-to: uboot
Commit-notes:
By the way, scripts/Makefile.spl shall be merged into
other makefiles in future.

This file is too special for SPL and TPL and
looks really ugly.

Treating them in a more generic way would be better.

END
kbuild: collect useful commands into scripts/Makefile.lib
aaaa
move blackfin specific objcopy rules
kbuild: move drivers/input to drivers/Makefile
include/configs: Do not use $(BOARDDIR)
boards.cfg: move more boards to Orphan

Chan-Taek Park <c-park@ti.com>
Inderpal Singh <inderpal.singh@linaro.org>
Matt Waddel <matt.waddel@linaro.org>

are invalid email addresses.
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
tools: tmp