Commit Graph

1601 Commits

Author SHA1 Message Date
Albert ARIBAUD d2a3e91139 Merge branch 'u-boot/master'
Conflicts:
	drivers/net/Makefile

(trivial merge)
2014-05-09 11:50:14 +02:00
Tom Rini 080d897585 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2014-04-25 14:53:51 -04:00
Masahiro Yamada 794d5f5540 Revert "build: Use filechk rules to create and update u-boot.lds"
This reverts commit a8b993eb81.

Commit a8b993eb claims it fixes u-boot.lds rule by replacing
$(call if_changed) with $(call filechk).

But the problem had already been fixed by commit 395e60cd
a few days before commit a8b993eb was posted.

There is no reason to apply commit a8b993eb. What is worse is
$(call filechk) is too strong to fix the problem and looks weird.

Date of the two patches:

[1] commit 395e60cdc2
    Author:     Masahiro Yamada <yamada.m@jp.panasonic.com>
    AuthorDate: Wed Apr 9 20:10:43 2014 +0900
    Commit:     Tom Rini <trini@ti.com>
    CommitDate: Fri Apr 11 10:08:42 2014 -0400
replaces $(call if_changed) -> $(call if_changed_dep)

[2] commit a8b993eb81
    Author:     Jon Loeliger <jon.loeliger@oracle.com>
    AuthorDate: Tue Apr 15 16:09:37 2014 -0500
    Commit:     Tom Rini <trini@ti.com>
    CommitDate: Fri Apr 18 16:14:16 2014 -0400
replaces $(call if_changed) -> $(call filechk)

A conflict must have happened when applying [2], but somehow it was
applied, sadly.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jon Loeliger <jon.loeliger@oracle.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Tom Rini <trini@ti.com>
2014-04-23 08:44:42 -04:00
Prabhakar Kushwaha 89ad7be8e7 Makefile: Add support of CONFIG_SPL_FSL_PBL
Objective of this target to have concatenate binary having
 - SPL binary in PBL command format
 - U-boot binary

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-04-22 17:58:51 -07:00
Albert ARIBAUD c9aab0f9dd Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2014-04-21 21:01:35 +02:00
Jon Loeliger a8b993eb81 build: Use filechk rules to create and update u-boot.lds
Prior to this patch, the top-level linker script u-boot.lds
used a simple $(call if_changed) check when generated.
That mechanism misses cases where a possible include file
change induces a change in the u-boot.lds too.

This patch converts it to a stronger check using ($call filechk)
that will also notice differences in file contents and
will catch changes due to pre-processing as well.

Signed-off-by: Jon Loeliger <jon.loeliger@oracle.com>
2014-04-18 16:14:16 -04:00
Masahiro Yamada 0e6256d077 kbuild: add user-supplied CPPFLAGS, AFLAGS and CFLAGS
Like Linux Kernel, this commit provides environment variables
KCPPFLAGS, KAFLAGS and KCFLAGS, which are useful to pass
additional options.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-04-18 11:43:36 -04:00
Masahiro Yamada 598e2d3388 kbuild: sync with Linux Kernel v3.15-rc1
This commit imports Kbuild-related updates
from v3.14 to v3.15-rc1.

 - commit 3d3d6b8474204b6819688c9800774d52d370a538
    kbuild: LLVMLinux: Adapt warnings for compilation with clang
 - commit 61163efae02040f66a95c8ed17f4407951ba58fa
    kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang
 - commit 79192ca8ebd9a25c583aa46024a250fef1e7766f
    scripts: objdiff: detect object code changes between two commits
 - commit 1c9e70a55b088d97a59241744fe459409d0c3582
    kbuild: create a build directory automatically for out-of-tree build
 - commit a03fcb50e816a69acffb13b5e56db75063aeba8a
    kbuild: remove redundant '.*.cmd' pattern from make distclean
 - commit 13338935f1574a2dcd1c891461b0dcc42f8cff42
    kbuild: move "quote" to Kbuild.include to be consistent
 - commit bfdfaeae500a3b194b73b01e92a8034791a58b7f
    kbuild: specify build_docproc as a phony target
 - commit f4d4ffc03efc864645b990e1d579bbe1b8e358a4
    kbuild: dtbs_install: new make target
 - commit 1e64ff42ea3d8d2fc8aa71f9717b3c1cb6c2f893
    Kbuild, lto: Disable LTO for asm-offsets.c
 - commit ccbef1674a1579842c7dbdf554efca85d2cd245a
    Kbuild, lto: add ld-version and ld-ifversion macros
 - commit ae63b2d7bdd9bd66b88843be0daf8e37d8f0b574
    scripts/tags.sh: Ignore *.mod.c
 - commit e36aaea28972c57a32a3ba5365e61633739719b9
    kbuild: Fix silent builds with make-4

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-04-18 11:43:36 -04:00
Vitaly Andrianov ef509b9063 k2hk: add support for k2hk SOC and EVM
k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler
SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please
refer the ti/k2hk_evm/README for details on the board, build and other
information.

This patch add support for keystone architecture and k2hk evm.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Sandeep Nair <sandeep_n@ti.com>
2014-04-17 17:24:38 -04:00
Tom Rini dda0dbfc69 Prepare v2014.04
Signed-off-by: Tom Rini <trini@ti.com>
2014-04-14 15:19:24 -04:00
Masahiro Yamada 395e60cdc2 kbuild: fix a bug in regeneration of linker scripts
In some use cases, SPL linker script was not updated even when
it should be.

For instance,

  $ make tricoder_config all
    [ build complete ]
  ... modify include/configs/tricoder.h
  $ make

spl/u-boot-spl.lds should be updated in this case, but it wasn't.

To fix this problem, linker scripts generation should be handled
by $(call if_changed_dep,...) rather than by $(call if_changed,...).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Andreas Bießmann <andreas.devel@googlemail.com>
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-04-11 10:08:42 -04:00
Albert ARIBAUD 519fdde9e6 Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts:
	arch/arm/cpu/arm926ejs/mxs/Makefile
	include/configs/trats.h
	include/configs/trats2.h
	include/mmc.h
2014-04-08 09:25:08 +02:00
Marek Vasut 1a9df13d5b arm: mxs: Add support for generating signed BootStream
This patch adds the groundwork for generating signed BootStream, which
can be used by the HAB library in i.MX28. We are adding a new target,
u-boot-signed.sb , since the process for generating regular non-signed
BootStream is much easier. Moreover, the signed bootstream depends on
external _proprietary_ _binary-only_ tool from Freescale called 'cst',
which is available only under NDA.

To make things even uglier, the CST or HAB mandates a kind-of circular
dependency. The problem is, unlike the regular IVT, which is generated
by mxsimage, the IVT for signed boot must be generated by hand here due
to special demands of the CST. The U-Boot binary (or SPL binary) and IVT
are then signed by the CST as a one block. But here is the problem. The
size of the entire image (U-Boot, IVT, CST blocks) must be appended at
the end of IVT. But the size of the entire image is not known until the
CST has finished signing the U-Boot and IVT. We solve this by expecting
the CST block to be always 3904B (which it is in case two files, U-Boot
and the hand-made IVT, are signed in the CST block).

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-04-04 11:44:59 +02:00
Stefano Babic 1cad23c5f4 Merge branch 'master' of git://git.denx.de/u-boot-arm into master
Conflicts:
	arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
	arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-04-04 11:35:30 +02:00
Stefano Babic 5dd73bc0a4 Revert "arm: mxs: Add support for generating signed BootStream"
This reverts commit 53e6b14e03.

Patch does not merge anymore with u-boot-arm and must be rebased.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-04-04 11:29:29 +02:00
Stefano Babic e64348f5eb imx: add rules for U-Boot DTB support
Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-04-02 10:45:35 +02:00
Tom Rini c494eaf409 Prepare v2014.04-rc3
Signed-off-by: Tom Rini <trini@ti.com>
2014-03-31 15:24:48 -04:00
Marek Vasut 53e6b14e03 arm: mxs: Add support for generating signed BootStream
This patch adds the groundwork for generating signed BootStream, which
can be used by the HAB library in i.MX28. We are adding a new target,
u-boot-signed.sb , since the process for generating regular non-signed
BootStream is much easier. Moreover, the signed bootstream depends on
external _proprietary_ _binary-only_ tool from Freescale called 'cst',
which is available only under NDA.

To make things even uglier, the CST or HAB mandates a kind-of circular
dependency. The problem is, unlike the regular IVT, which is generated
by mxsimage, the IVT for signed boot must be generated by hand here due
to special demands of the CST. The U-Boot binary (or SPL binary) and IVT
are then signed by the CST as a one block. But here is the problem. The
size of the entire image (U-Boot, IVT, CST blocks) must be appended at
the end of IVT. But the size of the entire image is not known until the
CST has finished signing the U-Boot and IVT. We solve this by expecting
the CST block to be always 3904B (which it is in case two files, U-Boot
and the hand-made IVT, are signed in the CST block).

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2014-03-31 18:28:50 +02:00
Masahiro Yamada 4642e0022b Kbuild: allow building tools without board configuration
Prior to Kbuild, U-Boot could build under tools/ directory
withour configuring for a specific board.

That feature was lost when switching to Kbuild.

This patch revives it again by adding a make target "tools-only".

Usage:
  $ make tools-only

Neither board configuration nor cross compiler are required to
build host tools.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
2014-03-31 11:47:51 -04:00
Masahiro Yamada 6bd04bb487 kbuild: fix bugs in cleaning targets
"make clean", "make clobber", "make mrproper" and "make distclean"
missed to clean-up some files when they were run with
O=<some_dir> option.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Wolfgang Denk <wd@denx.de>
2014-03-28 15:06:32 -04:00
Masahiro Yamada 5a449d75bc kbuild: create a build directory automatically for out-of-tree build
Prior to Kbuild, the build system created a build directory,
when it did not exist, for out-of-tree build.

This feature was dropped when we switched to Kbuild
because many of lines in makefiles were copied from Linux Kernel.
(In Linux Kernel, we have to create a build directory by ourselves
before starting build.)

That feature seems worth reviving for less typing
even if our code and Linux Kernel diverge.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2014-03-28 15:06:31 -04:00
Marek Vasut b97241b312 kbuild: Rename UIMAGE to MKIMAGE
U-Boot uses the 'mkimage' tool to produce various image types,
not only uImage image type. Rename the invocation name from
UIMAGE to MKIMAGE.

The following command was used to do the replacement:
git grep 'quiet_cmd_mkimage.* = UIMAGE' | cut -d : -f 1 | \
 xargs -i sed -i "s@\(quiet_cmd_mkimage\)\(.*\) = UIMAGE @\1\2 = MKIMAGE@" {}

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-28 15:06:29 -04:00
Masahiro Yamada 2e50f6dccb kbuild: delete *.pyc files by "make distclean"
The tools "buildman" and "patman" are written in Python.
When we run them, "*.pyc" files are created under
tools/buildman, tools/patman directories.

They should be cleaned up by "make distclean".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-03-12 17:05:00 -04:00
Masahiro Yamada 37bdf35978 kbuild: delete SPLTREE and TPLTREE
These variable are no longer used.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-12 17:04:59 -04:00
Masahiro Yamada 5ee828ca95 kbuild: rename OBJTREE to objtree
Prior to Kbuild, $(OBJTREE) was used for pointing to the
top of build directory with absolute path.

In Kbuild style, $(objtree) is used instead.
This commit renames OBJTREE to objtree and delete the
defition of OBJTREE.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-12 17:04:58 -04:00
Masahiro Yamada 01286329b2 kbuild: rename SRCTREE to srctree
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used for instead.
This commit renames SRCTREE to srctree and deletes the
defition of SRCTREE.

Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c,
doc/DocBook/Makefile should be keep.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-12 17:04:57 -04:00
Masahiro Yamada 4379ac6148 kbuild: rename TOPDIR to stctree
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
pointing to the top of source directory.
(No difference between the two.)

In Kbuild style, $(srctree) is used instead.
This commit renames TOPDIR to srctree and delete the
defition of TOPDIR.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-12 17:04:55 -04:00
Masahiro Yamada f5c66bdb18 kbuild: use $(KBUILD_SRC) to check out-of-tree build
Non-empty $(KBUILD_SRC) means out-of-tree build.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-12 17:04:54 -04:00
Masahiro Yamada 4ab3fc5eba kirkwood: kwbimage: refactor CONFIG_SYS_KWD_CONFIG
Pull out "$(SRCTREE)/" from CONFIG_SYS_KWD_CONFIG
and push it into the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Dave Purdy <david.c.purdy@gmail.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Cc: Luka Perkov <luka@openwrt.org>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Jason Cooper <u-boot@lakedaemon.net>
Cc: Siddarth Gore <gores@marvell.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Eric Cooper <ecc@cmu.edu>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
2014-03-12 17:04:52 -04:00
Masahiro Yamada e4536f8e37 freescale: pblimage: refactor CONFIG_SYS_FSL_PBL_{PBI, RCW}
Pull out "$(SRCTREE)/" from CONFIG_SYS_FSL_PBL_PBI
and CONFIG_SYS_FSL_PBL_RCW and push it into the top Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-03-12 17:04:49 -04:00
Masahiro Yamada 07e27ce013 kbuild,mxs: use short logs for MXS images
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Acked-by: Marek Vasut <marex@denx.de>
2014-03-12 17:04:37 -04:00
Tom Rini 8ee950dd27 Prepare v2014.04-rc2
Signed-off-by: Tom Rini <trini@ti.com>
2014-03-10 17:21:06 -04:00
Masahiro Yamada 2e6b2f6ae0 kbuild: fix a bug of make rule of version_autogenerated.h
include/generated/version_autogenerated.h was not correctly
generated on the parallel build (with -j option).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-03-10 13:50:32 -04:00
Masahiro Yamada d57d60cf24 kbuild: move "checkgcc4" to PowerPC archprepare
"checkgcc4" is used only for PowerPC.
Move it to arch/powerpc/config.mk.

To make sure gcc is new enough before beginning build,
run "checkgcc4" during "archprepare".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-07 10:59:07 -05:00
Masahiro Yamada 388b2e520b kbuild: move "checkthumb" to ARM archprepare
"checkthumb" makes sense only for ARM architecture.
Move it to arch/arm/config.mk.

To make sure gcc supports THUMB mode before beginning build,
run "checkthumb" during "archprepare".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-07 10:59:06 -05:00
Masahiro Yamada 026f9cf24f kbuild: improve Kbuild speed
Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.

After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).

Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.

$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.

This commit changes the build system as follows:

  - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

  - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
      PLATFORM_CPPFLAGS
      CPUDIR
      BOARDDIR
      OBJCOPYFLAGS
      LDFLAGS
      LDFLAGS_FINAL
        (used in nand_spl/board/*/*/Makefile)
      CONFIG_STANDALONE_LOAD_ADDR
        (used in examples/standalone/Makefile)
      SYM_PREFIX
        (used in examples/standalone/Makefile)
      RELFLAGS
        (used in examples/standalone/Makefile)

  - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

  - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> [on Sandbox]
Tested-by: Stephen Warren <swarren@nvidia.com> [on Tegra]
2014-03-07 10:59:06 -05:00
Masahiro Yamada cd2e46cb38 kbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC
Before this commit, USE_PRIVATE_LIBGCC was defined in
arch-specific config.mk and referenced in
arch/$(ARCH)/lib/Makefile.

We are not happy about parsing config.mk again and again.
We have to keep the same behavior with a different way.

By adding "CONFIG_" prefix, this macro appears
in include/autoconf.mk, include/spl-autoconf.mk.
(And treating USE_PRIVATE_LIBGCC as CONFIG macro
is reasonable enough.)

Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes"
in arch/arm/cpu/arm720t/tegra*/config.mk,
whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk.

It means Tegra enables PRIVATE_LIBGCC only for SPL.
We can describe the same behavior by adding

  #ifdef CONFIG_SPL_BUILD
  # define CONFIG_USE_PRIVATE_LIBGCC
  #endif

to include/configs/tegra-common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
2014-03-07 10:59:06 -05:00
Masahiro Yamada cbac2a6e49 xilinx: delete meaningless .gitignore files
config.tmp is never generated

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2014-03-07 10:59:06 -05:00
Masahiro Yamada 33a02da0f6 kbuild: allow empty board directories
U-Boot has compelled all boards to have
board/${BOARD}/ or board/${VENDOR}/${BOARD}/ directory.

Sometimes it does not seem suitable for some boards,
for example Sandbox. (Is it a board?)

And arcangel4 board has nothing to compile
under the board directory.

This commit makes the build system more flexible:
If '<none>' is given to the 6th column (=Board name) of boards.cfg,
Kbuild will not descend into the board directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-04 12:15:31 -05:00
Masahiro Yamada db5b339cca kbuild: add "cross_tools" target to build tools for the target
Programs in tools/ directory are usually built for the host.
But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are
useful on the target OS too.

Actually, prior to Kbuild, U-Boot could build tools for
the target like follows:

  $ make <target_board>_config
  $ export CROSS_COMPILE=<cross_gcc_prefix>
  $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools

In Kbuild, we can no longer replace HOSTCC at the command line.

In order to get back that feature, this commit adds "cross-tools" target.

Usage:

  Build tools for the host
  $ make CROSS_COMPILE=<cross_gcc_prefix> tools

  Build tools for the target
  $ make CROSS_COMPILE=<cross_gcc_prefix> cross_tools

Besides, "make cross_tools" strip tools programs because we
generally expect smaller storages on embedded systems.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2014-03-04 12:15:31 -05:00
Masahiro Yamada 1ec8b4efce kbuild: fix "tools-all" target
The top Makefile must export HOST_TOOLS_ALL to use it
in tools/Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2014-03-04 12:15:31 -05:00
Masahiro Yamada a86cf89c76 kbuild: consolidate PLATFORM_LIBS
We had switched to Kbuild so now we can specify
PLATFORM_LIBS/PLATFORM_LIBGCC with relative path.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2014-03-04 12:15:30 -05:00
Simon Glass 39f7611fec dm: Add a demonstration/example driver
As an example of how to write a uclass and a driver, provide a demo version
of each, accessible through the 'demo' command.

To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.

The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
CONFIG_DM_DEMO_SHAPE.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
2014-03-04 12:15:29 -05:00
Simon Glass 2e7d35d2a6 dm: Add basic tests
Add some tests of driver model functionality. Coverage includes:

- basic init
- binding of drivers to devices using platform_data
- automatic probing of devices when referenced
- availability of platform data to devices
- lifecycle from bind to probe to remove to unbind
- renumbering within a uclass when devices are probed/removed
- calling driver-defined operations
- deactivation of drivers when removed
- memory leak across creation and destruction of drivers/uclasses
- uclass init/destroy methods
- automatic probe/remove of children/parents when needed

This function is enabled for sandbox, using CONFIG_DM_TEST.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-03-04 12:15:29 -05:00
Simon Glass 6494d708bf dm: Add base driver model support
Add driver model functionality for generic board.

This includes data structures and base code for registering devices and
uclasses (groups of devices with the same purpose, e.g. all I2C ports will
be in the same uclass).

The feature is enabled with CONFIG_DM.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
2014-03-04 12:15:29 -05:00
Simon Glass 714a5621c2 sandbox: Build a device tree file for sandbox
Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
option to make it easier to use device tree with sandbox.

This adjusts the Makefile to build a u-boot.dtb file which can be passed
to sandbox U-Boot with:

   ./u-boot -d u-boot.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-03-04 12:15:28 -05:00
Masahiro Yamada 3d5a335cef nand_spl: display warning message to inform the end of nand_spl
Now we have two different frameworks for doing the same thing.
I'd like to propose to drop nand_spl framework.
How about deleting it before v2014.07 release?

In the interim, this commit will display a warning message
when compiling nand_spl board.

Now we have 19 nand_spl boards:

  MPC8315ERDB_NAND
  SIMPC8313_LP
  SIMPC8313_SP
  MPC8536DS_NAND
  MPC8569MDS_NAND
  MPC8572DS_NAND
  P1023RDS_NAND
  P1011RDB_NAND
  P1020RDB_NAND
  P2010RDB_NAND
  P2020RDB_NAND
  acadia_nand
  bamboo_nand
  canyonlands_nand
  glacier_nand
  haleakala_nand
  kilauea_nand
  rainier_nand
  sequoia_nand

They must be ported to SPL before the deadline,
otherwise they will be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Dave Liu <daveliu@freescale.com>
Cc: Ron Madrid <info@sheldoninst.com>
Cc: Roy Zang <tie-fei.zang@freescale.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2014-03-04 09:27:40 -05:00
Masahiro Yamada 2d88a6acf8 Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR
LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-03-04 09:27:39 -05:00
Masahiro Yamada 4a377552f0 kbuild: Move linker sciript check to prepare1
Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.

Before this commit, LDSCRIPT existence was not checked
when it was specified by CONFIG_SYS_LDSCRIPT.
Now LDSCRIPT existence is checked for all boards.

$(wildcard $(LDSCRIPT)) must point to the linker scripts
with absolute path.
Otherwise, make will terminate with a false error
on out-of-tree build.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25 11:01:29 -05:00
Masahiro Yamada 331b45fb70 kbuild: Fix a false error of generic board support
Before this commit, make terminated with an error
where is shouldn't under some condition.

This bug happened when we built a board unsupporting
generic board right after building with generic board.

For example, the following sequence failed.
(harmony uses generic board but microblaze-generic does not
support it)

  $ make harmony_config
  Configuring for harmony board...
  $ make CROSS_COMPILE=arm-linux-gnueabi-
    [ Build succeed ]
  $ make microblaze-generic_config
  Configuring for microblaze-generic board...
  $ make CROSS_COMPILE=microblaze-linux-
  Makefile:488: *** Your architecture does not support generic board.
  Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.

We had to do "make clean" before building the microblaze board.

This commit fixes this unconvenience.

Move generic board sanity check to "prepare1" target,
which is run after generation of include/autoconf.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-02-25 11:01:29 -05:00